Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
YOCTO PROJECT:
COPING WITH BUILD
ERRORS
Gilles BLANC, ELCE Yocto Project Dev Day
October 16th 2014
5 years old
~20 people
Lexpertise au service de lembarqu
> WHOAMI
wide support
organization
recipes
layers
packages
industry-friendly
pipeline of tasks
SDK generation
sanity checks/QA
reliable
stable
perennial
THERES NO MAGIC
hard to understand
a lot of generation
limits
several machines in the same build (playing around with local.conf, difficult &
can fail badly)
CLASSIC TUTORIALS...
NOT SO MAGICAL
Shadok motto
HOW TO COPE
color helps
look at log dumps (the file name is specified each time, its in $
{WORKDIR}/temp/ build history directory, the links to the last ones
are log.do_patch, log.do_configure, log.do_compile, and so on)
BITBAKE ADVANCED
USAGE
AFTER ALL...
THE PROJECT
well, what I can tell you about it
Lexpertise au service de lembarqu
WHAT IS IT?
thats a secret
WAY TO GO
1st step:
create meta-expemb
2nd step:
FIRST MACHINE
SUPPORT
~/devel/expemb/yocto/meta-expemb/conf/machine/engicam-mx6sRqs.conf
#@TYPE: Machine
#@NAME: Engicam iMx6
#@SOC: i.MX6S
#@DESCRIPTION: Machine configuration for Engicam board
include conf/machine/include/imx-base.inc
include conf/machine/include/tune-cortexa9.inc
SOC_FAMILY = "mx6:mx6s"
# Use u-boot imx
UBOOT_SUFFIX = "bin"
UBOOT_PADDING = "2"
PREFERRED_PROVIDER_u-boot = "u-boot-imx"
PREFERRED_VERSION_u-boot-imx = "2009.08"
PREFERRED_PROVIDER_virtual/kernel ?= "linux-engicam-mx6"
UBOOT_MACHINE = "engicam-mx6sRqs_config"
SERIAL_CONSOLE = "115200 ttymxc3"
MACHINE_FEATURES += " pci"
LAYER
ORGANIZATION
gblanc@linux-07qd:~/devel/expemb/yocto/meta-expemb> ls -R
.:
conf recipes-bsp recipes-kernel
./conf:
layer.conf machine
./conf/machine:
engicam-mx6sRqs.conf
./recipes-bsp:
u-boot
./recipes-bsp/u-boot:
u-boot-imx u-boot-imx_2009.08.bbappend
./recipes-bsp/u-boot/u-boot-imx:
engicam-mx6
./recipes-bsp/u-boot/u-boot-imx/engicam-mx6:
001.01_iCoreM6_mac_address.patch 001.02_iCoreM6_backlight.patch
001_iCoreM6_uboot_mainpatch_131114.patch
./recipes-kernel:
linux
./recipes-kernel/linux:
linux-engicam-mx6-3.0.35 linux-engicam-mx6_3.0.35.bb
./recipes-kernel/linux/linux-engicam-mx6-3.0.35:
001_mainpatch_131008.patch 002.01_patch_pwm3.patch 002.02_iCoreM6_openframe_lvds.patch
002.03_iCoreM6_camera.patch
TIME TO COMPILE!
bitbake core-image-minimal
bitbake our-very-secret-project-name-i-should-notmention
LETS GO!
fasten your seat belt,
protect yourself from projections
Lexpertise au service de lembarqu
ST
1
ERROR (THAT
WAS QUICK)
ST
1
RESOLUTION
vi /home/gblanc/devel/expemb/yocto/
meta-expemb/conf/layer.conf
* WELCOME TO THE
MACHINE
etc.
COMPLETE ERROR
(FOR THE RECORD)
Hhhmmm....
Actually...
I typed "MACHIME"...
Lexpertise au service de lembarqu
ST
1
LESSON LEARNED
* NEXT ERROR
(PLEAAASE)
BUT... WHY?
mv conf/machine/engicam.conf conf/
machine/engicam-mx6sRqs.conf
* GIMME ANOTHER
ONE, IM READY
ERROR: Fetcher failure: Unable to find file file://defconfig anywhere. The paths that were searched were:
/home/gblanc/devel/expemb/yocto/meta-expemb/recipes-kernel/linux/linux-engicam-mx6-3.0.35/poky
/home/gblanc/devel/expemb/yocto/meta-expemb/recipes-kernel/linux/linux-engicam-mx6/poky
/home/gblanc/devel/expemb/yocto/meta-expemb/recipes-kernel/linux/files/poky
/home/gblanc/devel/expemb/yocto/meta-expemb/recipes-kernel/linux/linux-engicam-mx6-3.0.35/engicam-mx6sRqs
/home/gblanc/devel/expemb/yocto/meta-expemb/recipes-kernel/linux/linux-engicam-mx6/engicam-mx6sRqs
/home/gblanc/devel/expemb/yocto/meta-expemb/recipes-kernel/linux/files/engicam-mx6sRqs
/home/gblanc/devel/expemb/yocto/meta-expemb/recipes-kernel/linux/linux-engicam-mx6-3.0.35/mx6s
/home/gblanc/devel/expemb/yocto/meta-expemb/recipes-kernel/linux/linux-engicam-mx6/mx6s
<a lot of other directories with mx6s, mx6, arm7a and arm>
/home/gblanc/devel/expemb/yocto/meta-expemb/recipes-kernel/linux/linux-engicam-mx6-3.0.35/
/home/gblanc/devel/expemb/yocto/meta-expemb/recipes-kernel/linux/linux-engicam-mx6/
/home/gblanc/devel/expemb/yocto/meta-expemb/recipes-kernel/linux/files/
/home/gblanc/devel/expemb/build/downloads
ERROR: Function failed: Fetcher failure for URL: 'file://defconfig'. Unable to fetch URL from any source.
ERROR: Logfile of failure stored in: /home/gblanc/devel/expemb/build/tmp/work/engicam_mx6sRqs-poky-linuxgnueabi/linux-engicam-mx6/3.0.35-r0/temp/log.do_fetch.6775
ERROR: Task 70 (/home/gblanc/devel/expemb/yocto/meta-expemb/recipes-kernel/linux/linux-engicam-mx6_3.0.35.bb,
do_fetch) failed with exit code '1'
NOTE: Tasks Summary: Attempted 829 tasks of which 15 didn't need to be rerun and 1 failed.
Waiting for 0 running tasks to finish:
Summary: 1 task failed:
/home/gblanc/devel/expemb/yocto/meta-expemb/recipes-kernel/linux/linux-engicam-mx6_3.0.35.bb, do_fetch
LOOKING FOR
DEFCONFIG
In meta-fsl-arm/recipes-kernel/linux/linux-imx.inc :
SRC_URI = "git://git.freescale.com/imx/linux-2.6-imx.git;branch=${SRCBRANCH}\
file://defconfig \
"
* PATCH ERROR
(NEARLY FINISHED)
(THE END)
TRICKY KERNEL
PATCHING PROBLEM
the patches do not apply correctly, one of them because the file to patch doesn't
exist.
solution: injecting kernel sources from LTIB to Yocto project, and modifying
SRC_URI consequently:
SRC_URI = "file://linux-3.0.35.eng.tar.bz2 \
file://defconfig \
"
Then, clean:
$ bitbake -c cleansstate virtual/kernel
And retry:
$ bitbake virtual/kernel
Lexpertise au service de lembarqu
SKIPPY PROBLEM
actually, in linux-imx.inc:
S = "${WORKDIR}/git"
S=${WORKDIR}/linux-3.0.35.eng/
Lexpertise au service de lembarqu
* HUM-ERROR
* THE SHAME-ON-YOU
ERROR
oh shit...
Extract:
diff --git a/arch/arm/mach-mx6/board-mx6q_icore.c b/arch/arm/mach-mx6/board-mx6q_icore.c^M
index 70b2ec4..e277db3 100644^M
--- a/arch/arm/mach-mx6/board-mx6q_icore.c^M
etc.
bitbake detects automagically that a patch has changed and so unpacks/patches again the kernel
Replace:
config MACH_MX6Q_ICORE_STARTERKIT_CAP_EDT
bool "Support i.Core capacitive starterkit"
depends on MACH_MX6Q_ICORE
with:
config MACH_MX6Q_ICORE_OF_CAP
bool "Support i.Core capacitve open frame"
depends on MACH_MX6Q_ICORE
gblanc@linux-07qd:~/devel/expemb/yocto/meta-expemb> vi
recipes-kernel/linux/linux-engicammx6-3.0.35/002.02_iCoreM6_openframe_lvds.patch
* USELESS ERROR
in ../meta-fsl-arm/recipes-kernel/linux/linux-imx.inc, there is a
do_configure_prepend with this piece of script:
if [ "${SCMVERSION}" = "y" ]; then
# Add GIT revision to the local version
head=`git rev-parse --verify --short HEAD 2> /dev/
null`
printf "%s%s" +g $head > ${S}/.scmversion
fi
disable it with:
SCMVERSION = "n"
in our kernel bbappend recipe file.
THE VI CLASSIC
same pbm than with the kernel: patched sources are special...
in recipes-bsp/u-boot/u-boot-imx_2009.08.bbappend, we see:
"SRC_URI_append_engicami-mx6sRqs"
gblanc@linux-07qd:~/devel/expemb/build> bitbake -c
cleansstate u-boot-imx
Remove also "_append_", because we now use special sources and not git ones.
Lexpertise au service de lembarqu
ERROR: Fetcher failure: Unable to find file file://uboot-2009.08.eng.tar.bz2 anywhere. The paths that were searched were:
/home/gblanc/devel/expemb/yocto/meta-fsl-arm/recipes-bsp/u-boot/u-boot-git/
engicam-mx6sRqs
/home/gblanc/devel/expemb/yocto/meta-expemb/recipes-bsp/u-boot/u-boot-imx/
poky
/home/gblanc/devel/expemb/yocto/meta-fsl-arm/recipes-bsp/u-boot/u-bootimx-2009.08/poky
/home/gblanc/devel/expemb/yocto/meta-fsl-arm/recipes-bsp/u-boot/u-boot-imx/poky
// ...............................................
/home/gblanc/devel/expemb/yocto/meta-fsl-arm/recipes-bsp/u-boot/u-boot-imx/
/home/gblanc/devel/expemb/yocto/meta-fsl-arm/recipes-bsp/u-boot/files/
/home/gblanc/devel/expemb/build/downloads
ERROR: Function failed: Fetcher failure for URL: 'file://u-boot-2009.08.eng.tar.bz2'. Unable
to fetch URL from any source.
ERROR: Logfile of failure stored in: /home/gblanc/devel/expemb/build/tmp/work/
engicam_mx6sRqs-poky-linux-gnueabi/u-boot-imx/2009.08-r18/temp/log.do_fetch.18727
ERROR: Task 4 (/home/gblanc/devel/expemb/yocto/meta-fsl-arm/recipes-bsp/u-boot/uboot-imx_2009.08.bb, do_fetch) failed with exit code '1
Lexpertise au service de lembarqu
SUBDIRECTORY MESS
mv engicam-mx6 u-boot/u-boot-imx/
engicam-mx6 u-boot/u-boot-imx/
engicam-mx6sRqs
* NOW COMPILING
U-BOOT
ONCE AGAIN
gblanc@linux-07qd:~/devel/expemb/build> ls tmp/work/
engicam_mx6sRqs-poky-linux-gnueabi/u-boot-imx/2009.08r18/git/patches/
001_iCoreM6_uboot_mainpatch_131114.patch series
S = "${WORKDIR}/git"
don't forget:
(really ugly)
Tough one....
References to "/data/iCoreM6/u-boot-2009.08.eng/" in
".depend" files
do_compile_prepend() {
make clean
find ${S} -name '.depend' | xargs rm -f
}
MACHINE wasn't mx6dl or mx6q: seems that mx6s has not the good
DSP.... :/
After:
git clone -b daisy git://
github.com/meta-qt5/meta-qt5.git
Don't foget to add the layer in conf/bblayers.conf :
/home/gblanc/devel/expemb/yocto/meta-qt5
Lexpertise au service de lembarqu
* BEWARE OF QT5
ERRORS
| DirectFB auto-detection... ()
| arm-poky-linux-gnueabi-g++ -march=armv7-a -mthumb-interwork -mfloat-abi=hard
-mfpu=neon -mtune=cortex-a9 --sysroot=/home/gblanc/devel/expemb/build/tmp/
sysroots/engicam-mx6sRqs -c -pipe -O2 -pipe -g -feliminate-unused-debug-types fvisibility-inlines-hidden -D_REENTRANT -O2 -DLINUX=1 -Wall -W -fPIE -I../../../../
qtbase-opensource-src-5.2.1/mkspecs/linux-oe-g++ -I../../../../qtbase-opensourcesrc-5.2.1/config.tests/qpa/directfb -I../../../../../../../../sysroots/engicam-mx6sRqs/usr/include/
directfb -I. -o directfb.o ../../../../qtbase-opensource-src-5.2.1/config.tests/qpa/directfb/
directfb.cpp
| ../../../../qtbase-opensource-src-5.2.1/config.tests/qpa/directfb/directfb.cpp:45:2: error:
#error DirectFB headers are unclean and cannot compile
| #error DirectFB headers are unclean and cannot compile
| ^
| make: *** [directfb.o] Error 1
| DirectFB disabled.
| DirectFB support cannot be enabled due to functionality tests!
| Turn on verbose messaging (-v) to /home/gblanc/devel/expemb/build/tmp/work/
cortexa9hf-vfp-neon-mx6-poky-linux-gnueabi/qtbase/5.2.1-r0/qtbase-opensourcesrc-5.2.1/configure to see the final report.
| If you believe this message is in error you may use the continue
| switch (-continue) to /home/gblanc/devel/expemb/build/tmp/work/cortexa9hf-vfpneon-mx6-poky-linux-gnueabi/qtbase/5.2.1-r0/qtbase-opensource-src-5.2.1/configure to
continue.
| WARNING: /home/gblanc/devel/expemb/build/tmp/work/cortexa9hf-vfp-neon-mx6poky-linux-gnueabi/qtbase/5.2.1-r0/temp/run.do_configure.4784:1 exit 101 from
Lexpertise au service de lembarqu
BAKER-STREET ERROR
looking at run.do_configure
/home/gblanc/devel/expemb/build/tmp/work/
cortexa9hf-vfp-neon-mx6-poky-linux-gnueabi/
qtbase/5.2.1-r0/qtbase-opensource-src-5.2.1/
configure -v \
-dont-process \
-opensource -confirm-license \
-sysroot /home/gblanc/devel/expemb/build/
tmp/sysroots/engicam-mx6sRqs \
-no-gcc-sysroot \
-prefix /usr \
-bindir /usr/bin/qt5 \
-libdir /usr/lib \
-datadir /usr/share/qt5 \
-sysconfdir /etc/qt5 \
-docdir /usr/share/doc/qt5 \
-headerdir /usr/include/qt5 \
-archdatadir /usr/lib/qt5 \
-libexecdir /usr/lib/qt5/libexec \
-plugindir /usr/lib/qt5/plugins \
-importdir /usr/lib/qt5/imports \
-qmldir /usr/lib/qt5/qml \
-translationdir /usr/share/qt5/translations \
-testsdir /usr/share/qt5/tests \
-examplesdir /usr/share/qt5/examples \
-hostbindir /usr/bin/qt5 \
-hostdatadir /home/gblanc/devel/expemb/build/
tmp/sysroots/engicam-mx6sRqs/usr/lib/qt5 \
-external-hostbindir /home/gblanc/devel/
expemb/build/tmp/sysroots/x86_64-linux/usr/bin/qt5
\
-platform /home/gblanc/devel/expemb/build/
tmp/sysroots/x86_64-linux/usr/lib/qt5/mkspecs/linuxoe-g++ \
-xplatform linux-oe-g++ \
-reduce-relocations -shared -silent
-no-pch -no-rpath -pkg-config
-noaccessibility -no-alsa -dbus -directfb -evdev -make
examples -compile-examples -no-fontconfig freetype -opengl es2 -eglfs -no-glib -gtkstyle -noiconv -icu -system-libjpeg -no-kms -system-libpng make libs -no-linuxfb -no-mitshm -no-mtdev -no-nis
-openssl-linked -no-openvg -qt-pcre -pulseaudio release -no-sm -no-sql-db2 -no-sql-ibase -no-sqlmysql -no-sql-oci -no-sql-odbc -no-sql-psql -no-sqlsqlite -no-sql-sqlite2 -no-sql-tds -nomake tests -make
tools -tslib -libudev -widgets -xcb -xcb-xlib -systemxcb -xcursor -xfixes -xinerama -xinput -xinput2 -xkb
-xrandr -xrender -xshape -xsync -xvideo -system-zlib
-no-eglfs
DIRECTFB ILLNESS
In recipe meta-qt5/recipes-qt/qt5/qtbase.inc:
REMOVING DIRECTFB
DISTRO_FEATURES="alsa argp bluetooth ext2 irda largefile pcmcia usbgadget usbhost wifi
xattr nfs zeroconf pci 3g nfc x11 ipv4 ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxxtests libc-catgets libc-charsets libc-crypt
libc-crypt-ufc libc-dbaliases libc-envz libc-fcvt libc-fmtmsg libc-fstab libc-ftraverse
libcgetlogin libc-idn libc-inet-anl libc-libm libc-locales libc-locale-code
libc-memusage libc-nis libc-nsswitch libc-rcmd libc-rtld-debug libc-spawn libc-streams libcsunrpc
libc-utmp libc-utmpx libc-wordexp libc-posix-clang-wchar
libc-posix-regexp libc-posix-regexp-glibc
libc-posix-wchar-io
largefile opengl ptest multiarch wayland pulseaudio sysvinit directfb ext2 opengl usbhost
x11"
Or:
vi qtbase_5.2.1.bbappend
PACKAGECONFIG_FB = ""
Lexpertise au service de lembarqu
* COMPILING QT
STUFF
MISSING DEPENDENCY
missing dependency to
/multimedia
qtmultimedia:
meta-qt5
meta-qt5
5.2.1
5.2.1+gitAUTOINC+db7f7cc565
* LICENSE PROBLEM
meta/recipes-multimedia/gstreamer/gst-ffmpeg_0.10.13.bb
LICENSE = "GPLv2+ & LGPLv2+ & ( (GPLv2+ & LGPLv2.1+) | (GPLv3+ & LGPLv3+) )"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://ext/libpostproc/
gstpostproc.c;beginline=1;endline=18;md5=5896e445e41681324381f5869ee33d38 \
file://COPYING.LIB;md5=55ca817ccb7d5b5b66355690e9abc605 \
file://ext/ffmpeg/gstffmpeg.h;beginline=1;endline=18;md5=ff65467b0c53cdfa98d0684c1bc240a9
\
file://gst-libs/ext/libav/LICENSE;md5=abc3b8cb02856aa7823bbbd162d16232 \
file://gst-libs/ext/libav/COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://gst-libs/ext/libav/COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
file://gst-libs/ext/libav/COPYING.LGPLv2.1;md5=e344c8fa836c3a41c4cbd79d7bd3a379 \
file://gst-libs/ext/libav/COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
LICENSE_FLAGS = "commercial"
vi conf/local.conf
LICENSE_FLAGS_WHITELIST = "commercial_gst-ffmpeg"
DESYNCHRONIZED
APPENDED RECIPE ERROR
ERROR: Fetcher failure: Unable to find file file://ipscreen/ipscreeninit anywhere. The paths that were searched were:
/home/gblanc/devel/expemb/yocto/meta-expemb/recipes-secret-project/
ipscreen/poky
/home/gblanc/devel/expemb/yocto/meta-expemb/recipes-secret-project/
ipscreen/ipscreen-1.0/poky
// ......... etc. ........ //
ERROR: Function failed: Fetcher failure for URL: 'file://ipscreen/ipscreen-init'.
Unable to fetch URL from any source.
ERROR: Logfile of failure stored in: /home/gblanc/devel/expemb/build/tmp/work/
cortexa9hf-vfp-neon-poky-linux-gnueabi/ipscreen/1.0-r0/temp/log.do_fetch.5096
ERROR: Task 353 (/home/gblanc/devel/expemb/yocto/meta-expemb/recipessecret-project/ipscreen/ipscreen.bb, do_fetch) failed with exit code '1'
file is not found because it was suppressed by error when copying the new
sources directly into Yocto tree
* WRONG INSTALL
* SHIPPING PROBLEM
* THE FAILING
DO_INSTALL
HOW TO SUCCEED
WITH DO_INSTALL
do_install_append () {
install -m 0644 ${WORKDIR}/pointercal ${D}${sysconfdir}/pointercal
install -d ${D}${sysconfdir}/init.d/
install -m 0644 ${WORKDIR}/fbconfig ${D}${sysconfdir}/init.d/
}
* BRACKET-ERROR
QMAKE_INCDIR_OPENGL_ES2 += "${STAGING_INCDIR}"
* HIDDEN ERROR
WARNING: Could not copy license file COPYING: [Errno 2] No such file or directory: '/home/gblanc/
devel/expemb/build-rqsm6solo/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/sysvinit/2.88dsf-r11/
sysvinit-2.88dsf/COPYING'
WARNING: Could not copy license file COPYRIGHT: [Errno 2] No such file or directory: '/home/gblanc/
devel/expemb/build-rqsm6solo/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/sysvinit/2.88dsf-r11/
sysvinit-2.88dsf/COPYRIGHT'
ERROR: Function failed: sysvinit: LIC_FILES_CHKSUM points to an invalid file: /home/gblanc/devel/expemb/
build-rqsm6solo/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/sysvinit/2.88dsf-r11/sysvinit-2.88dsf/
COPYING
ERROR: Logfile of failure stored in: /home/gblanc/devel/expemb/build-rqsm6solo/tmp/work/cortexa9hf-vfpneon-poky-linux-gnueabi/sysvinit/2.88dsf-r11/temp/log.do_configure.26460
Log data follows:
| DEBUG: Executing python function sysroot_cleansstate
| DEBUG: Python function sysroot_cleansstate finished
| DEBUG: Executing shell function do_configure
| DEBUG: Shell function do_configure finished
| DEBUG: Executing python function do_qa_configure
| NOTE: Checking autotools environment for common misconfiguration
| DEBUG: Python function do_qa_configure finished
| ERROR: Function failed: sysvinit: LIC_FILES_CHKSUM points to an invalid file: /home/gblanc/devel/
expemb/build-rqsm6solo/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/sysvinit/2.88dsf-r11/
sysvinit-2.88dsf/COPYING
ERROR: Task 5 (/home/gblanc/devel/expemb/yocto/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb,
do_configure) failed with exit code '1'
in sysvinit_2.88dsf.bbappend
SRC_URI += "file://rcS-default"
ITS STABLE!!!!
XKCD #303
ANY QUESTIONS?
Lexpertise au service de lembarqu
THANK YOU
ExpEmb
http://www.expemb.com
+33 177 048 035