http://blog.chinaunix.net/uid-17188120-id-4081314.html
http://blog.sina.com.cn/s/blog_89fa41ef0102w3d1.html
最近在搞高通的平台,感觉之前搞的那些linux平台都太小儿科了。今天被bitbake卡住了,没办法刨吧。有句很经典的话,“不是你熟悉你才做,而是你做了才熟悉”
首先先看看这是啥东西,暂时把他看做一个构建嵌入式linux体统的工具。
然后装上他
wget http://git.openembedded.org/bitbake/snapshot/bitbake-1.17.0.tar.gz
sudo python setup.py install 后会提示
/bin/sh: xsltproc: command not found
sudo apt-get install xsltproc
安装完成后,输入bitbake -h 发现有一堆报错
ImportError: No module named ply
以后遇到这种问题 sudo apt-get install python-xxx 就可以了。bitbake <wbr>入门学习之helloworld
有一个英文的文档挺好的,正在看
http://www.yoctoproject.org/docs/1.8/bitbake-user-manual/bitbake-user-manual.html#intro
发现硬货了!!,往最后找 有 A.4. The Hello World Example 按着步骤做 ,写的很详细bitbake <wbr>入门学习之helloworld
最后那步一直报错,
请教高人后原来不能用sudo python setup.py install
设置环境变量后export PATH=$PATH:/xxx/xxx/bin终于可以正常用了bitbake <wbr>入门学习之helloworld
我在github上找了一个最新的下载的bitbake
https://github.com/openembedded/bitbake
总结一下例子里的helloword 里的文件都什么作用
classes/base.bbclass 文件里
addtask build 想执行 bitbake hello -c build ,必须在这个文件里addtask,后来我想加一个abc指令,找了半天,在这加上就可以了
conf/bitbake.conf 文件
TMPDIR = "${TOPDIR}/tmp"
CACHE = "${TMPDIR}/cache"
STAMP = "${TMPDIR}/stamps"
T = "${TMPDIR}/work"
B = "${TMPDIR}"
conf/bblayers.conf 文件
BBLAYERS ?= "/xx/xxx/xxx" 指定helloworld 目录
helloword 目录
conf 文件夹 layer.conf文件
BBPATH .= ":${LAYERDIR}"
BBFILES += "${LAYERDIR}/*.bb"
BBFILE_COLLECTIONS += "helloword"
BBFILE_PATTERN_fakelayer := "^${LAYERDIR}/"
xxx.bb
DESCRIPTION = "Prints Hello World"
PN = 'helloworld'
PV = '1'
python do_build() { //注意如果-c没指定task 默认执行 build
bb.plain("********************");
bb.plain("* *");
bb.plain("* Hello, World! *");
bb.plain("* *");
bb.plain("********************");
}