为Intel Quark构建Openembedded时出错

时间:2018-10-16 21:19:00

标签: yocto bitbake openembedded cflags

试图为具有Intel Quark处理器的研华UBC-221构建Linux。 该系统是在VMware上运行的Debian 9。能够成功地制作出有趣的东西。

让我总结一下我在做什么:

mkdir quark
cd quark
git clone git://git.yoctoproject.org/meta-intel-quark
git clone git://git.openembedded.org/openembedded-core
git clone git://git.yoctoproject.org/poky
cp -r poky/bitbake .
cd openembedded-core
source oe-init-build-env
bitbake-layers add-layer ~/quark/meta-intel-quark/
bitbake core-image-base

我得到的错误代码:

WARNING: Layer quark-bsp should set LAYERSERIES_COMPAT_quark-bsp in its conf/layer.conf file to list the core layer names it is compatible with.
WARNING: Layer quark-bsp should set LAYERSERIES_COMPAT_quark-bsp in its conf/layer.conf file to list the core layer names it is compatible with.
WARNING: /home/bgabor/quark/meta-intel-quark/recipes-kernel/linux/linux-yocto-quark_3.8.bb: Variable key RDEPENDS_${KERNEL_PACKAGE_NAME}-base (${KERNEL_PACKAGE_NAME}-image) replaces original key RDEPENDS_kernel-base ().
WARNING: /home/bgabor/quark/meta-intel-quark/recipes-bsp/grub/grub_0.97.bb: Exception during build_dependencies for CFLAGS
WARNING: /home/bgabor/quark/meta-intel-quark/recipes-bsp/grub/grub_0.97.bb: Error during finalise of /home/bgabor/quark/meta-intel-quark/recipes-bsp/grub/grub_0.97.bb
ERROR: ExpansionError during parsing /home/bgabor/quark/meta-intel-quark/recipes-bsp/grub/grub_0.97.bb
Traceback (most recent call last):
bb.data_smart.ExpansionError: Failure expanding variable CFLAGS, expression was  -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/bgabor/quark/openembedded-core/build/tmp-glibc/work/i586-oe-linux/grub/0.97+gitAUTOINC+5775f32a62-r0=/usr/src/debug/grub/0.97+gitAUTOINC+5775f32a62-r0 -fdebug-prefix-map=/home/bgabor/quark/openembedded-core/build/tmp-glibc/work/i586-oe-linux/grub/0.97+gitAUTOINC+5775f32a62-r0/recipe-sysroot= -fdebug-prefix-map=/home/bgabor/quark/openembedded-core/build/tmp-glibc/work/i586-oe-linux/grub/0.97+gitAUTOINC+5775f32a62-r0/recipe-sysroot-native=  -Os -fno-strict-aliasing -Wall -Werror -Wno-shadow -Wno-unused  -Wno-pointer-sign  -DINTEL_QUARK_TEST=${@base_contains('PACKAGECONFIG', 'grub_test', '1', '0', d)} which triggered exception NameError: name 'base_contains' is not defined
Summary: There were 5 WARNING messages shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.

我几乎被困在这里。一些帮助将不胜感激!

编辑: 试图在Debian 7.11 32位系统上构建。情况变好了,但是又出现了另一个错误:

bgabor@debian:~/quark/dizzy/build$ bitbake core-image-base
WARNING: Host distribution "Debian-7.11" 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 1292 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION        = "1.24.0"
BUILD_SYS         = "i686-linux"
NATIVELSBSTRING   = "Debian-7.11"
TARGET_SYS        = "i586-poky-linux"
MACHINE           = "quark"
DISTRO            = "poky"
DISTRO_VERSION    = "1.7.3"
TUNE_FEATURES     = "m32 i586"
TARGET_FPU        = ""
meta              
meta-yocto        
meta-yocto-bsp    = "dizzy:58863ad092c9a279e305c841dbb4353de2ecfae8"
meta-intel-quark  = "master:a314f0ceea986fde42d5d9b0ea449f7a563e9351"

NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: Unable to install packages. Command '/home/bgabor/quark/dizzy/build/tmp/sysroots/i686-linux/usr/bin/smart --quiet --data-dir=/home/bgabor/quark/dizzy/build/tmp/work/quark-poky-linux/core-image-minimal-initramfs/1.0-r0/rootfs/var/lib/smart install -y busybox@i586 initramfs-live-install-efi@i586 run-postinsts@all initramfs-live-install@i586 udev@i586 initramfs-live-boot@quark base-passwd@i586' returned 1:
error: Can't install initramfs-live-install-1.0-r9@i586: no package provides grub

ERROR: Function failed: do_rootfs
ERROR: Logfile of failure stored in: /home/bgabor/quark/dizzy/build/tmp/work/quark-poky-linux/core-image-minimal-initramfs/1.0-r0/temp/log.do_rootfs.29435
ERROR: Task 240 (/home/bgabor/quark/dizzy/meta/recipes-core/images/core-image-minimal-initramfs.bb, do_rootfs) failed with exit code '1'
NOTE: Tasks Summary: Attempted 2529 tasks of which 2527 didn't need to be rerun and 1 failed.
No currently running tasks (2435 of 2531)

Summary: 1 task failed:
  /home/bgabor/quark/dizzy/meta/recipes-core/images/core-image-minimal-initramfs.bb, do_rootfs
Summary: There was 1 WARNING message shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

它没有找到grub包,但是我可以看到食谱中有两个:

bgabor@debian:~/quark/dizzy/build$ bitbake-layers show-recipes | grep "grub" -A 3
Parsing recipes..done.
grub:
  meta-intel-quark     0.97+gitAUTOINC+5775f32a62
  meta                 0.97
  meta                 2.00
--
grub-conf:
  meta-intel-quark     1.0
grub-efi:
  meta                 2.00
gsettings-desktop-schemas:
  meta                 3.10.1

试图进行清洁,然后再次烘烤,但没有结果。 这里可能是什么问题?

1 个答案:

答案 0 :(得分:1)

首先,Poky包含OpenEmbedded Core,因此您无需克隆两者,只需克隆Poky。

第二,meta-intel-iot层已经死了,仅正式支持Poky的Daisy版本(请参阅README)。使用较新的版本可能会很幸运,但显然不是git master(aka Thud)。

https://wiki.yoctoproject.org/wiki/Releases列出了发行版。而不是签出Poky的母版,而是签出相关的发行分支。我建议从雏菊开始,但是尝试一些较新的东西(例如jethro)是个好主意。