环境:
Red Hat Enterprise Linux Server release 7.5 (Maipo)
git version 1.8.3.1
Python 2.7.6
tar (GNU tar) 1.26
操作步骤:
git clone git://git.yoctoproject.org/poky
cd poky/
source oe-init-build-env
bitbake core-image-minimal 报错:
Traceback (most recent call last):
File "/var/fpwork/alice/poky/bitbake/bin/bitbake", line 31, in <module>
import bb
File "/var/fpwork/alice/poky/bitbake/lib/bb/__init__.py", line 77, in <module>
import bb.msg
File "/var/fpwork/alice/poky/bitbake/lib/bb/msg.py", line 32, in <module>
import bb.event
File "/var/fpwork/alice/poky/bitbake/lib/bb/event.py", line 35, in <module>
import bb.utils
File "/var/fpwork/alice/poky/bitbake/lib/bb/utils.py", line 37, in <module>
from commands import getstatusoutput
ImportError: cannot import name getstatusoutput
检查并重新配置python环境, 重新执行core-image-minimal target,执行成功:
$ python -V
Python 2.7.5
$ unset PYTHONPATH
$ export PATH="${PATH}:/build/ltesdkroot/Tools/Tools/python/python-3.3.2/bin/"
$ export PATH=/build/ltesdkroot/Tools/Tools/7za/7za-9.20/:$PATH
$ export PATH=/build/ltesdkroot/Tools/Tools/python/python-2.7.6/bin/:$PATH
$ source oe-init-build-env
$ bitbake core-image-minimal
创建新的recipe:
尝试创建空的myapp.bb,报错:
$ mkdir meta/recipes-devtools/myapp
$ touch meta/recipes-devtools/myapp/myapp.bb
$ bitbake myapp
WARNING: Host distribution "RedHatEnterpriseLinuxServer-7.5" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Loading cache: 100% |############################################################################################################################################################################| ETA: 00:00:00
Loaded 1309 entries from dependency cache.
ERROR: /var/fpwork/alice/poky/meta/recipes-devtools/myapp/myapp.bb: This recipe does not have the LICENSE field set (myapp) | ETA: --:--:--
ERROR: Failed to parse recipe: /var/fpwork/alice/poky/meta/recipes-devtools/myapp/myapp.bb
Summary: There was 1 WARNING message shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
配置license,参考https://www.yoctoproject.org/docs/latest/ref-manual/ref-manual.html#var-LICENSE:
增