1)設(shè)置http_proxy,https_proxy,ftp_proxy等代理,修改方法是在 .bashrc(linux上使用ctrl+h顯示隱藏文件)最后增加如下內(nèi)容
export http_proxy='http://128.0.0.0:88/'
export https_proxy='https://128.0.0.0:88/'
export ftp_proxy='http://128.0.0.0:88/'
export no_proxy=‘’
2)進入poky目錄
source oe-init-build-env 運行完此命令自動進入build目錄(build目錄為當前工作目錄)
3)設(shè)置BBLAYERS
從build目錄進入conf,修改bblayers.con文件設(shè)置BBLAYERS
4)修改local.conf設(shè)置MACHINE,DL_DIR等變量,DL_DIR最好設(shè)置在build目錄外部,這樣不同的target可以使用同樣的下載文件。
5)運行bitbake core-image-minimal
編譯生成的結(jié)果存在于./tmp/deploy/images/$MACHINE/目錄下
A1)單獨編譯某個包:
bitbake -b /home/YOCTO/poky/meta/recipes-devtools/gcc/gcc-cross_5.2.bb -c [clean][build]。。。
A2)編譯外部的包(使用當前的。BB)
devtool modify -s virtual/kernel /home/ZED2/kernel/linux-xlnx-master
此命令會在build目錄下建立workspace文件夾,并把workspace目錄加入到BBLAYERS
A3)創(chuàng)建defconfig取代linux的.config
創(chuàng)建一個linux-xlnx_4.4.bbappend文件,文件內(nèi)容如下(和Helloworld的例子類似,defconfig要放在linux-xlnx子目錄里。linux-xlnx_4.4.bbappend放在上一層目錄)
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += "
??file://defconfig
?"