Sei sulla pagina 1di 98

Lexpertise au service de lembarqu

YOCTO PROJECT:
COPING WITH BUILD
ERRORS
Gilles BLANC, ELCE Yocto Project Dev Day
October 16th 2014

WHO ARE WE?


ExpEmb group presentation
Me, Myself and I
Lexpertise au service de lembarqu

WHO ARE WE?


EXPEMB

A group company dedicated to hardware and


embedded software

Tokhatec: Computer on modules expertise


dedicated to embedded solutions (distribution &
system conception)

Sysmic: Embedded Linux expertise

Axupteam: software service company

5 years old

~US$ 4 million revenue

~20 people
Lexpertise au service de lembarqu

> WHOAMI

embedded Linux expert

lecturer & author

visiting academic & professional trainer

misunderstood evangelist for well-managed


projects
Lexpertise au service de lembarqu

THE YOCTO PROJECT


Lexpertise au service de lembarqu

WHY DOES IT ROCK?

wide support

organization

recipes

layers

packages

industry-friendly

several distros at a time

pipeline of tasks

SDK generation

sanity checks/QA

soon, toaster web interface will


do (almost) everything (already
nearly as amazing as Belen)

Tizen inside (yay!!)

and above all...

reliable

stable

perennial

core element of a good


lean software factory
Lexpertise au service de lembarqu

THERES NO MAGIC

hard to understand

how it works, how it is structured...

even with documentation (plenty of it, but... paradoxically sometimes totally


useless for simple matters)

already a (slight) technical debt (in the structure)

a lot of generation

limits

firmware generation (playing around with bbclass)

several machines in the same build (playing around with local.conf, difficult &
can fail badly)

keeping everything in its own meta layer is sometimes impossible


Lexpertise au service de lembarqu

COPING WITH ERRORS


OMG what have I done?
Lexpertise au service de lembarqu

CLASSIC TUTORIALS...

Lexpertise au service de lembarqu

NOT SO MAGICAL

everything goes wrong all the time

difficult to understand, to write, to test and


then...

it goes wrong once again

(maybe I should sacrifice a stuffed goat on


the keyboard, to give a try?)

there will be blood, toil, sweat and tears


Lexpertise au service de lembarqu

Lexpertise au service de lembarqu

Shadok motto

If you keep trying it finally succeeds. So: the


more it fails, the more chances you have to see
it working.
Lexpertise au service de lembarqu

HOW TO COPE

sometimes very verbose for nothing

sometimes very shy for big failures

but all in all rather comprehensive for non-human beings (a.k.a


geeks)

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)

go inside workdir and run the temp/run.do_compile (or


other) script to emulate the bitbake compilation process
Lexpertise au service de lembarqu

BITBAKE ADVANCED
USAGE

know your bitbake -c listtasks and bitbake -c


cleansstates commands

well, bitbake -c anytask too, if you want only to run a


single task of the bitbake compilation process

very useful: bitbake-layers show-appends (and other


options) to inspect layers (messing with each other)

bitbake -e is like 42 (the answer to everything or almost)

use bitbake -k if you want to run as far as possible


ignoring errors, instead of stopping everything at the first
error (very useful)
Lexpertise au service de lembarqu

AFTER ALL...

when you compile C++, its even worse

(if you need to find a consolation)

the same cycle of: write test correct


test ... write ...

(call it Continual improvement process, its


sexier)

(or Plan-Do-Check-Act Deming wheel)


Lexpertise au service de lembarqu

THE PROJECT
well, what I can tell you about it
Lexpertise au service de lembarqu

WHAT IS IT?

an IP screen displaying one/several cameras

using Engicam iMx6 module (Reduced Q7 form


factor)

what does it do exactly?

thats a secret

but its wonderful

it will save lots of lives including baby penguins


Lexpertise au service de lembarqu

Lexpertise au service de lembarqu

WAY TO GO

1st step:

git clone daisy

git clone freescale

create meta-expemb

create BSP support for Engicam iMx6 RQS board (inspired by


Congatec)

2nd step:

git clone lots of other layers (e.g. ro-fs)

git clone meta-engicam, the new layer with 3.10 kernel!! :)


(For gods sake, LTIB sucked so much....)
Lexpertise au service de lembarqu

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"

Lexpertise au service de lembarqu

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

Lexpertise au service de lembarqu

TIME TO COMPILE!

First, test the new BSP support:

bitbake core-image-minimal

Then, after writing our own distro recipe:

bitbake our-very-secret-project-name-i-should-notmention

(Lets call it ipscreen roughly, this is the name


of the main graphic app. OK, it will be secretproject)
Lexpertise au service de lembarqu

LETS GO!
fasten your seat belt,
protect yourself from projections
Lexpertise au service de lembarqu

ST
1

ERROR (THAT
WAS QUICK)

ERROR: Traceback (most recent call last):


File "/home/gblanc/devel/expemb/yocto/bitbake/lib/bb/cookerdata.py", line 163, in wrapped
return func(fn, *args)
File "/home/gblanc/devel/expemb/yocto/bitbake/lib/bb/cookerdata.py", line 173, in
parse_config_file
return bb.parse.handle(fn, data, include)
File "/home/gblanc/devel/expemb/yocto/bitbake/lib/bb/parse/__init__.py", line 99, in handle
return h['handle'](fn, data, include)
File "/home/gblanc/devel/expemb/yocto/bitbake/lib/bb/parse/parse_py/ConfHandler.py", line
120, in handle
abs_fn = resolve_file(fn, data)
File "/home/gblanc/devel/expemb/yocto/bitbake/lib/bb/parse/__init__.py", line 122, in
resolve_file
raise IOError("file %s not found" % fn)
IOError: file /home/gblanc/devel/expemb/yocto/meta-expemb/conf/
layer.conf not found
ERROR: Unable to parse /home/gblanc/devel/expemb/yocto/metaexpemb/conf/layer.conf: file /home/gblanc/devel/expemb/yocto/
meta-expemb/conf/layer.conf not found

Lexpertise au service de lembarqu

ST
1

RESOLUTION

was ist das Problem??

forgot to create mandatory file layer.conf in


the new custom ExpEmb meta layer...

vi /home/gblanc/devel/expemb/yocto/
meta-expemb/conf/layer.conf

OK, thats dumb...

Lexpertise au service de lembarqu

Lexpertise au service de lembarqu

* WELCOME TO THE
MACHINE

gblanc@linux-07qd:~/devel/expemb/build> bitbake core-image-minimal

ERROR: Error parsing configuration files


Traceback (most recent call last):
File "/home/gblanc/devel/expemb/yocto/bitbake/lib/bb/data_smart.py", line 331, in DataSmart.expandWithRefs(s='def
__anon_639__home_gblanc_devel_expemb_yocto_meta_classes_base_bbclass(d):\n import string, re\n\n # Handle
PACKAGECONFIG\n #\n # These take the form:\n #\n # PACKAGECONFIG ??= "<default options>"\n #
PACKAGECONFIG[foo] = "--enable-foo,--disable-foo,foo_depends,foo_runtime_depends"\n pkgconfigflags =
d.getVarFlags("PACKAGECONFIG") or {}\n if pkgconfigflags:\n
pkgconfig = (d.getVar(\'PACKAGECONFIG\', True)
or "").split()\n
pn = d.getVar("PN", True)\n
mlprefix = d.getVar("MLPREFIX", True)\n\n
def
expandFilter(appends, extension, prefix):\n
appends = bb.utils.explode_deps(d.expand(" ".join(appends)))\n
newappends = []\n
for a in appends:\n
if a.endswith("-native") or a.endswith("-cross"):\n
newappends.append(a)\n
elif a.startswith("virtual/"):\n
subs = a.split("/", 1)[1]\n
newappends.append("virtual/" + prefix + subs + extension)\n
else:\n
if a.startswith(prefix):\n
newappends.append(a + extension)\n
else:\n
newappends.append(prefix + a + extension)
\n
return newappends\n\n
def appendVar(varname, appends):\n
if not appends:\n
return
\n
if varname.find("DEPENDS") != -1:\n
if pn.startswith("nativesdk-"):\n
appends =
expandFilter(appends, "", "nativesdk-")\n
if pn.endswith("-native"):\n
appends =
expandFilter(appends, "-native", "")\n
if mlprefix:\n
appends = expandFilter(appends, "", mlprefix)
\n
varname = d.expand(varname)\n
d.appendVar(varname, " " + " ".join(appends))\n\n
extradeps =
[]\n
extrardeps = []\n
extraconf = []\n
for flag, flagval in sorted(pkgconfigflags.items()):\n
if flag
== "defaultval":\n
continue\n
items = flagval.split(",")\n
num = len(items)\n
if num >
4:\n
bb.error("Only enable,disable,depend,rdepend can be specified!")\n\n
....................................................................................................................................................................................

etc.

Lexpertise au service de lembarqu

COMPLETE ERROR
(FOR THE RECORD)

ERROR: Error parsing configuration files


Traceback (most recent call last):
File "/home/gblanc/devel/expemb/yocto/bitbake/lib/bb/data_smart.py", line 331, in DataSmart.expandWithRefs(s='def __anon_639__home_gblanc_devel_expemb_yocto_meta_classes_base_bbclass(d):\n import string, re\n\n # Handle PACKAGECONFIG\n #\n #
These take the form:\n #\n # PACKAGECONFIG ??= "<default options>"\n # PACKAGECONFIG[foo] = "--enable-foo,--disable-foo,foo_depends,foo_runtime_depends"\n pkgconfigflags = d.getVarFlags("PACKAGECONFIG") or {}\n if pkgconfigflags:\n
pkgconfig = (d.getVar(\'PACKAGECONFIG\', True) or "").split()\n
pn = d.getVar("PN", True)\n
mlprefix = d.getVar("MLPREFIX", True)\n\n
def expandFilter(appends, extension, prefix):\n
appends = bb.utils.explode_deps(d.expand(" ".join(appends)))\n
newappends = []\n
for a in appends:\n
if a.endswith("-native") or a.endswith("-cross"):\n
newappends.append(a)\n
elif a.startswith("virtual/"):\n
subs = a.split("/", 1)[1]\n
newappends.append("virtual/" +
prefix + subs + extension)\n
else:\n
if a.startswith(prefix):\n
newappends.append(a + extension)\n
else:\n
newappends.append(prefix + a + extension)\n
return newappends\n\n
def
appendVar(varname, appends):\n
if not appends:\n
return\n
if varname.find("DEPENDS") != -1:\n
if pn.startswith("nativesdk-"):\n
appends = expandFilter(appends, "", "nativesdk-")\n
if pn.endswith("-native"):\n
appends = expandFilter(appends, "-native", "")\n
if mlprefix:\n
appends = expandFilter(appends, "", mlprefix)\n
varname = d.expand(varname)\n
d.appendVar(varname, " " + " ".join(appends))\n\n
extradeps = []\n
extrardeps
= []\n
extraconf = []\n
for flag, flagval in sorted(pkgconfigflags.items()):\n
if flag == "defaultval":\n
continue\n
items = flagval.split(",")\n
num = len(items)\n
if num > 4:\n
bb.error("Only
enable,disable,depend,rdepend can be specified!")\n\n
if flag in pkgconfig:\n
if num >= 3 and items[2]:\n
extradeps.append(items[2])\n
if num >= 4 and items[3]:\n
extrardeps.append(items[3])\n
if num >=
1 and items[0]:\n
extraconf.append(items[0])\n
elif num >= 2 and items[1]:\n
extraconf.append(items[1])\n
appendVar(\'DEPENDS\', extradeps)\n
appendVar(\'RDEPENDS_${PN}\', extrardeps)\n
if
bb.data.inherits_class(\'cmake\', d):\n
appendVar(\'EXTRA_OECMAKE\', extraconf)\n
else:\n
appendVar(\'EXTRA_OECONF\', extraconf)\n\n # If PRINC is set, try and increase the PR value by the amount specified\n # The PR server is now the
preferred way to handle PR changes based on\n # the checksum of the recipe (including bbappend). The PRINC is now\n # obsolete. Return a warning to the user.\n princ = d.getVar(\'PRINC\', True)\n if princ and princ != "0":\n
bb.warn("Use of PRINC %s
was detected in the recipe %s (or one of its .bbappends)\\nUse of PRINC is deprecated. The PR server should be used to automatically increment the PR. See: https://wiki.yoctoproject.org/wiki/PR_Service." % (princ, d.getVar("FILE", True)))\n
pr = d.getVar(\'PR\', True)
\n
pr_prefix = re.search("\\D+",pr)\n
prval = re.search("\\d+",pr)\n
if pr_prefix is None or prval is None:\n
bb.error("Unable to analyse format of PR variable: %s" % pr)\n
nval = int(prval.group(0)) + int(princ)\n
pr = pr_prefix.group(0) +
str(nval) + pr[prval.end():]\n
d.setVar(\'PR\', pr)\n\n pn = d.getVar(\'PN\', True)\n license = d.getVar(\'LICENSE\', True)\n if license
== "INVALID":\n
bb.fatal(\'This recipe does not have the LICENSE field set (%s)\' % pn)\n\n if bb.data.inherits_class(\'license\', d):\n
unmatched_license_flag = check_license_flags(d)\n
if unmatched_license_flag:\n
bb.debug(1, "Skipping %s because it
has a restricted license not"\n
" whitelisted in LICENSE_FLAGS_WHITELIST" % pn)\n
raise bb.parse.SkipPackage("because it has a restricted license not"\n
" whitelisted in LICENSE_FLAGS_WHITELIST")\n\n # If we\'re building a target
package we need to use fakeroot (pseudo)\n # in order to capture permissions, owners, groups and special files\n if not bb.data.inherits_class(\'native\', d) and not bb.data.inherits_class(\'cross\', d):\n
d.setVarFlag(\'do_unpack\', \'umask\', \'022\')\n
d.setVarFlag(\'do_configure\', \'umask\', \'022\')\n
d.setVarFlag(\'do_compile\', \'umask\', \'022\')\n
d.appendVarFlag(\'do_install\', \'depends\', \' virtual/fakeroot-native:do_populate_sysroot\')\n
d.setVarFlag(\'do_install\', \'fakeroot\', 1)\n
d.setVarFlag(\'do_install\', \'umask\', \'022\')\n
d.appendVarFlag(\'do_package\', \'depends\', \' virtual/fakeroot-native:do_populate_sysroot\')\n
d.setVarFlag(\'do_package\', \'fakeroot\', 1)\n
d.setVarFlag(\'do_package\', \'umask\', \'022\')\n
d.setVarFlag(\'do_package_setscene\', \'fakeroot\', 1)\n
d.appendVarFlag(\'do_package_setscene\', \'depends\', \' virtual/fakeroot-native:do_populate_sysroot\')\n
d.setVarFlag(\'do_devshell\', \'fakeroot\', 1)\n
d.appendVarFlag(\'do_devshell\', \'depends\', \'
virtual/fakeroot-native:do_populate_sysroot\')\n source_mirror_fetch = d.getVar(\'SOURCE_MIRROR_FETCH\', 0)\n if not source_mirror_fetch:\n
need_host = d.getVar(\'COMPATIBLE_HOST\', True)\n
if need_host:\n
import re\n
this_host =
d.getVar(\'HOST_SYS\', True)\n
if not re.match(need_host, this_host):\n
raise bb.parse.SkipPackage("incompatible with host %s (not in COMPATIBLE_HOST)" % this_host)\n\n
need_machine = d.getVar(\'COMPATIBLE_MACHINE\', True)\n
if
need_machine:\n
import re\n
compat_machines = (d.getVar(\'MACHINEOVERRIDES\', True) or "").split(":")\n
for m in compat_machines:\n
if re.match(need_machine, m):\n
break\n
else:\n
raise
bb.parse.SkipPackage("incompatible with machine %s (not in COMPATIBLE_MACHINE)" % d.getVar(\'MACHINE\', True))\n\n\n
bad_licenses = (d.getVar(\'INCOMPATIBLE_LICENSE\', True) or "").split()\n\n
check_license = False if pn.startswith("nativesdk-") else
True\n
for t in ["-native", "-cross", "-cross-initial", "-cross-intermediate",\n
"-crosssdk-intermediate", "-crosssdk", "-crosssdk-initial",\n
"-cross-canadian-" + d.getVar(\'TRANSLATED_TARGET_ARCH\', True)]:\n
if pn.endswith(t):\n
check_license = False\n\n
if check_license and bad_licenses:\n
whitelist = []\n
for lic in bad_licenses:\n
for w in ["HOSTTOOLS_WHITELIST_", "LGPLv2_WHITELIST_", "WHITELIST_"]:\n
whitelist.extend((d.getVar(w + lic, True)
or "").split())\n
spdx_license = return_spdx(d, lic)\n
if spdx_license:\n
whitelist.extend((d.getVar(\'HOSTTOOLS_WHITELIST_%s\' % spdx_license, True) or "").split())\n
if not pn in whitelist:\n
recipe_license =
d.getVar(\'LICENSE\', True)\n
pkgs = d.getVar(\'PACKAGES\', True).split()\n
skipped_pkgs = []\n
unskipped_pkgs = []\n
for pkg in pkgs:\n
if incompatible_license(d, bad_licenses, pkg):\n
skipped_pkgs.append(pkg)\n
else:\n
unskipped_pkgs.append(pkg)\n
all_skipped = skipped_pkgs and not unskipped_pkgs\n
if unskipped_pkgs:\n
for pkg in skipped_pkgs:\n
bb.debug(1, "SKIPPING the package " + pkg + " at do_rootfs because it\'s " + recipe_license)\n
d.setVar(\'LICENSE_EXCLUSION-\' + pkg, 1)\n
for pkg in
unskipped_pkgs:\n
bb.debug(1, "INCLUDING the package " + pkg)\n
elif all_skipped or incompatible_license(d, bad_licenses):\n
bb.debug(1, "SKIPPING recipe %s because it\'s %s" % (pn, recipe_license))\n
raise
bb.parse.SkipPackage("incompatible with license %s" % recipe_license)\n\n srcuri = d.getVar(\'SRC_URI\', True)\n # Svn packages should DEPEND on subversion-native\n if "svn://" in srcuri:\n
d.appendVarFlag(\'do_fetch\', \'depends\', \' subversionnative:do_populate_sysroot\')\n\n # Git packages should DEPEND on git-native\n if "git://" in srcuri:\n
d.appendVarFlag(\'do_fetch\', \'depends\', \' git-native:do_populate_sysroot\')\n\n # Mercurial packages should DEPEND on mercurial-native\n elif "hg://" in
srcuri:\n
d.appendVarFlag(\'do_fetch\', \'depends\', \' mercurial-native:do_populate_sysroot\')\n\n # OSC packages should DEPEND on osc-native\n elif "osc://" in srcuri:\n
d.appendVarFlag(\'do_fetch\', \'depends\', \' osc-native:do_populate_sysroot\')\n\n #
*.lz4 should depends on lz4-native for unpacking\n # Not endswith because of "*.patch.lz4;patch=1". Need bb.fetch.decodeurl in future\n if \'.lz4\' in srcuri:\n
d.appendVarFlag(\'do_unpack\', \'depends\', \' lz4-native:do_populate_sysroot\')\n\n # *.xz should
depends on xz-native for unpacking\n # Not endswith because of "*.patch.xz;patch=1". Need bb.fetch.decodeurl in future\n if \'.xz\' in srcuri:\n
d.appendVarFlag(\'do_unpack\', \'depends\', \' xz-native:do_populate_sysroot\')\n\n # unzip-native should already be
staged before unpacking ZIP recipes\n if ".zip" in srcuri:\n
d.appendVarFlag(\'do_unpack\', \'depends\', \' unzip-native:do_populate_sysroot\')\n\n # file is needed by rpm2cpio.sh\n if ".src.rpm" in srcuri:\n
d.appendVarFlag(\'do_unpack\', \'depends\', \' filenative:do_populate_sysroot\')\n\n set_packagetriplet(d)\n\n # \'multimachine\' handling\n mach_arch = d.getVar(\'MACHINE_ARCH\', True)\n pkg_arch = d.getVar(\'PACKAGE_ARCH\', True)\n\n if (pkg_arch == mach_arch):\n
# Already machine specific nothing further to do\n
return\n\n #\n # We always try to scan SRC_URI for urls with machine overrides\n # unless the package sets SRC_URI_OVERRIDES_PACKAGE_ARCH=0\n #\n override = d.getVar(\'SRC_URI_OVERRIDES_PACKAGE_ARCH\',
True)\n if override != \'0\':\n
paths = []\n
fpaths = (d.getVar(\'FILESPATH\', True) or \'\').split(\':\')\n
machine = d.getVar(\'MACHINE\', True)\n
for p in fpaths:\n
if os.path.basename(p) == machine and os.path.isdir(p):\n
paths.append(p)\n\n
if len(paths) != 0:\n
for s in srcuri.split():\n
if not s.startswith("file://"):\n
continue\n
fetcher = bb.fetch2.Fetch([s], d)\n
local = fetcher.localpath(s)\n
for mp in paths:\n
if
local.startswith(mp):\n
#bb.note("overriding PACKAGE_ARCH from %s to %s for %s" % (pkg_arch, mach_arch, pn))\n
d.setVar(\'PACKAGE_ARCH\', "${MACHINE_ARCH}")\n
return\n\n packages = d.getVar(\'PACKAGES
\', True).split()\n for pkg in packages:\n
pkgarch = d.getVar("PACKAGE_ARCH_%s" % pkg, True)\n\n
# We could look for != PACKAGE_ARCH here but how to choose\n
# if multiple differences are present?\n
# Look through PACKAGE_ARCHS for
the priority order?\n
if pkgarch and pkgarch == mach_arch:\n
d.setVar(\'PACKAGE_ARCH\', "${MACHINE_ARCH}")\n
bb.warn("Recipe %s is marked as only being architecture specific but seems to
have machine specific packages?! The recipe may as well mark itself as machine specific directly." % d.getVar("PN", True))\n', varname='__anon_639__home_gblanc_devel_expemb_yocto_meta_classes_base_bbclass'):
try:
>
s = __expand_var_regexp__.sub(varparse.var_sub, s)
s = __expand_python_regexp__.sub(varparse.python_sub, s)
File "/home/gblanc/devel/expemb/yocto/bitbake/lib/bb/data_smart.py", line 102, in VariableParse.var_sub(match=<_sre.SRE_Match object at 0x2baaa58>):
else:
>
var = self.d.getVarFlag(key, "_content", True)
self.references.add(key)
File "/home/gblanc/devel/expemb/yocto/bitbake/lib/bb/data_smart.py", line 612, in DataSmart.getVarFlag(var='MACHINE_ARCH', flag='_content', expand=True, noweakdefault=False):
cachename = var + "[" + flag + "]"
>
value = self.expand(value, cachename)
if value and flag == "_content" and local_var is not None and "_removeactive" in local_var:
File "/home/gblanc/devel/expemb/yocto/bitbake/lib/bb/data_smart.py", line 350, in DataSmart.expand(s="${@[d.getVar('TUNE_PKGARCH', True), d.getVar('MACHINE', True)][bool(d.getVar('MACHINE', True))].replace('-', '_')}", varname='MACHINE_ARCH'):
def expand(self, s, varname = None):
>
return self.expandWithRefs(s, varname).value
File "/home/gblanc/devel/expemb/yocto/bitbake/lib/bb/data_smart.py", line 340, in DataSmart.expandWithRefs(s="${@[d.getVar('TUNE_PKGARCH', True), d.getVar('MACHINE', True)][bool(d.getVar('MACHINE', True))].replace('-', '_')}", varname='MACHINE_ARCH'):
except Exception as exc:
>
raise ExpansionError(varname, s, exc)
ExpansionError: Failure expanding variable MACHINE_ARCH, expression was ${@[d.getVar('TUNE_PKGARCH', True), d.getVar('MACHINE', True)][bool(d.getVar('MACHINE', True))].replace('-', '_')} which triggered exception AttributeError: 'NoneType' object has no
attribute 'replace'

Lexpertise au service de lembarqu

Was ist denn los?!?

Lexpertise au service de lembarqu

THIS IS THE END...

Holly fucking shit, is this the end of the world?


Wait, Im hearing trumpets.......

Hhhmmm....

Actually...

problem with MACHINE variable in local.conf

I typed "MACHIME"...
Lexpertise au service de lembarqu

ST
1

LESSON LEARNED

Lexpertise au service de lembarqu

* NEXT ERROR
(PLEAAASE)

gblanc@linux-07qd:~/devel/expemb/build> bitbake core-imageminimal

ERROR: OE-core's config sanity checker detected a potential


misconfiguration.
Either fix the cause of this error or at your own risk disable the
checker (see sanity.conf).
Following is the list of potential problems / advisories:
Please set a valid MACHINE in your local.conf or
environment

ERROR: Execution of event handler 'check_sanity_eventhandler'


failed
ERROR: Command execution failed: Exited with 1
Lexpertise au service de lembarqu

BUT... WHY?

Sanity checks really rock

(not like Buildroots there isnt any...)

Had to specify a unique name for my board

mv conf/machine/engicam.conf conf/
machine/engicam-mx6sRqs.conf

Because mx6 and other freescale CPU +


Mx6S, D or Q use different u-boot
configurations!
Lexpertise au service de lembarqu

* 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

Lexpertise au service de lembarqu

Lexpertise au service de lembarqu

LOOKING FOR
DEFCONFIG

the included Freescale kernel recipe looks for a "defconfig" file to


compile. Done a "zcat /proc/config.gz > defconfig" on the board
to retrieve a fresh configuration file. :)

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 \
"

(And change before the damned


"# CONFIG_DEVTMPFS is not set"
to
"CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y"
we are not savages for Christs sake!!!)
Lexpertise au service de lembarqu

* PATCH ERROR

ERROR: Command Error: exit status: 1 Output:


Applying patch 001_mainpatch_131008.patch
(Stripping trailing CRs from patch; use --binary to disable.)
patching file arch/arm/mach-mx6/Kconfig
Hunk #1 FAILED at 215.
1 out of 1 hunk FAILED -- rejects in file arch/arm/mach-mx6/Kconfig
(Stripping trailing CRs from patch; use --binary to disable.)
can't find file to patch at input line 23
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
-------------------------|diff --git a/arch/arm/mach-mx6/board-mx6q_icore.c b/arch/arm/mach-mx6/board-mx6q_icore.c
|index 9175787..70b2ec4 100644
|--- a/arch/arm/mach-mx6/board-mx6q_icore.c
|+++ b/arch/arm/mach-mx6/board-mx6q_icore.c
-------------------------No file to patch. Skipping patch.
3 out of 3 hunks ignored
(Stripping trailing CRs from patch; use --binary to disable.)
patching file arch/arm/mach-mx6/cpu_op-mx6.c
Hunk #1 FAILED at 74.
Hunk #2 FAILED at 125.
Hunk #3 FAILED at 168.
Hunk #4 FAILED at 193.
Hunk #5 FAILED at 218.

Lexpertise au service de lembarqu

(NEARLY FINISHED)

Hunk #6 FAILED at 233.


Hunk #7 succeeded at 244 (offset -21 lines).
Hunk #8 succeeded at 271 (offset -21 lines).
6 out of 8 hunks FAILED -- rejects in file arch/arm/mach-mx6/cpu_op-mx6.c
(Stripping trailing CRs from patch; use --binary to disable.)
patching file arch/arm/plat-mxc/include/mach/iomux-mx6q.h
(Stripping trailing CRs from patch; use --binary to disable.)
patching file drivers/input/touchscreen/Kconfig
Hunk #1 FAILED at 808.
1 out of 1 hunk FAILED -- rejects in file drivers/input/touchscreen/Kconfig
(Stripping trailing CRs from patch; use --binary to disable.)
patching file drivers/input/touchscreen/Makefile
Hunk #1 FAILED at 58.
1 out of 1 hunk FAILED -- rejects in file drivers/input/touchscreen/Makefile
(Stripping trailing CRs from patch; use --binary to disable.)
patching file drivers/input/touchscreen/ft5x0x_ts.c
(Stripping trailing CRs from patch; use --binary to disable.)
patching file drivers/staging/iio/light/Kconfig
(Stripping trailing CRs from patch; use --binary to disable.)
patching file drivers/staging/iio/light/Makefile
(Stripping trailing CRs from patch; use --binary to disable.)
patching file drivers/staging/iio/light/apds9300.c
(Stripping trailing CRs from patch; use --binary to disable.)
patching file include/linux/input/ft5x0x_ts.h
(Stripping trailing CRs from patch; use --binary to disable.)

Lexpertise au service de lembarqu

(THE END)

patching file sound/soc/soc-core.c


Hunk #3 succeeded at 806 (offset 3 lines).
Hunk #4 succeeded at 1480 (offset 3 lines).
Hunk #5 succeeded at 1764 (offset 3 lines).
Patch 001_mainpatch_131008.patch does not apply (enforce
with -f)
ERROR: Function failed: patch_do_patch
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_patch.5964
ERROR: Task 67 (/home/gblanc/devel/expemb/yocto/metaexpemb/recipes-kernel/linux/linux-engicam-mx6_3.0.35.bb,
do_patch) failed with exit code '1'
Lexpertise au service de lembarqu

TRICKY KERNEL
PATCHING PROBLEM

this one is tricky...

the patches do not apply correctly, one of them because the file to patch doesn't
exist.

it appears that Engicam used an unreleased Freescale 3.0.x kernel

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

* NOT QUITE FINISHED


YET

ERROR: Command Error: exit status: 1 Output:


Applying patch 001_mainpatch_131008.patch
(Stripping trailing CRs from patch; use --binary to disable.)
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
-------------------------|diff --git a/arch/arm/mach-mx6/Kconfig b/arch/arm/mach-mx6/Kconfig
|index 039f541..7ee6bc1 100644
|--- a/arch/arm/mach-mx6/Kconfig
|+++ b/arch/arm/mach-mx6/Kconfig
-------------------------No file to patch. Skipping patch.
1 out of 1 hunk ignored
(Stripping trailing CRs from patch; use --binary to disable.)
can't find file to patch at input line 23
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
-------------------------|diff --git a/arch/arm/mach-mx6/board-mx6q_icore.c b/arch/arm/mach-mx6/board-mx6q_icore.c
|index 9175787..70b2ec4 100644
|--- a/arch/arm/mach-mx6/board-mx6q_icore.c
|+++ b/arch/arm/mach-mx6/board-mx6q_icore.c
-------------------------No file to patch. Skipping patch.

Lexpertise au service de lembarqu

SKIPPY PROBLEM

(previous output was cut, seven more times the


same error)

bitbake did not find files to patch

actually, in linux-imx.inc:
S = "${WORKDIR}/git"

So, as we have just changed the kernel, ${S} is not


ok...

S=${WORKDIR}/linux-3.0.35.eng/
Lexpertise au service de lembarqu

Lexpertise au service de lembarqu

* HUM-ERROR

ERROR: ParseError at /home/gblanc/devel/


expemb/yocto/meta-expemb/recipes-kernel/
linux/linux-engicam-mx6_3.0.35.bb:24: unparsed
line: 'S=${WORKDIR}/linux-3.0.35.eng/'-:--

error in the previous slide (did you spot it?)

Better with brackets...


S="${WORKDIR}/linux-3.0.35.eng/"
Lexpertise au service de lembarqu

Lexpertise au service de lembarqu

* THE SHAME-ON-YOU
ERROR

ERROR: Command Error: exit status: 1 Output:


Applying patch 002.01_patch_pwm3.patch
(Stripping trailing CRs from patch; use --binary to disable.)
patching file arch/arm/mach-mx6/board-mx6q_icore.c
Hunk #1 FAILED at 107 (different line endings).
Hunk #2 FAILED at 142 (different line endings).
Hunk #3 FAILED at 295 (different line endings).
Hunk #4 FAILED at 1336 (different line endings).
Hunk #5 FAILED at 1531 (different line endings).
5 out of 5 hunks FAILED -- rejects in file arch/arm/machmx6/board-mx6q_icore.c
Patch 002.01_patch_pwm3.patch does not apply (enforce with -f)
ERROR: Function failed: patch_do_patch
ERROR: Logfile of failure stored in: /home/gblanc/devel/expemb/build/tmp/
work/engicam_mx6sRqs-poky-linux-gnueabi/linux-engicam-mx6/3.0.35-r0/
temp/log.do_patch.17558
ERROR: Task 1 (/home/gblanc/devel/expemb/yocto/meta-expemb/recipeskernel/linux/linux-engicam-mx6_3.0.35.bb, do_patch) failed with exit code '1'
Lexpertise au service de lembarqu

SORTING OUT THAT


$&@

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

it seems that this file has been edited with Windows!!!!

gblanc@linux-07qd:~/devel/expemb/yocto/meta-expemb> dos2unix recipes-kernel/linux/linux-engicammx6-3.0.35/002.01_patch_pwm3.patch


dos2unix: converting file recipes-kernel/linux/linux-engicam-mx6-3.0.35/002.01_patch_pwm3.patch to Unix
format ...
gblanc@linux-07qd:~/devel/expemb/yocto/meta-expemb> less recipes-kernel/linux/linux-engicammx6-3.0.35/002.01_patch_pwm3.patch
gblanc@linux-07qd:~/devel/expemb/yocto/meta-expemb> dos2unix recipes-kernel/linux/linux-engicammx6-3.0.35/002.02_iCoreM6_openframe_lvds.patch
dos2unix: converting file recipes-kernel/linux/linux-engicammx6-3.0.35/002.02_iCoreM6_openframe_lvds.patch to Unix format ...

etc.

bitbake detects automagically that a patch has changed and so unpacks/patches again the kernel

because Yocto project rocks.

Lexpertise au service de lembarqu

Lexpertise au service de lembarqu

* THE NON-YOCTOPROJECT ERROR

ERROR: Command Error: exit status: 1 Output:


Applying patch 002.02_iCoreM6_openframe_lvds.patch
patching file arch/arm/mach-mx6/Kconfig
Hunk #1 FAILED at 222.
1 out of 1 hunk FAILED -- rejects in file arch/arm/mach-mx6/Kconfig
patching file arch/arm/mach-mx6/board-mx6q_icore.c
Hunk #1 succeeded at 106 (offset -1 lines).
Hunk #2 succeeded at 269 (offset -1 lines).
Hunk #3 succeeded at 424 (offset -1 lines).
Hunk #4 succeeded at 1435 with fuzz 2 (offset -11 lines).
Hunk #5 succeeded at 1651 (offset -11 lines).
patching file drivers/video/mxc/mxc_ipuv3_fb.c
Patch 002.02_iCoreM6_openframe_lvds.patch does not apply (enforce with -f)
ERROR: Function failed: patch_do_patch
ERROR: Logfile of failure stored in: /home/gblanc/devel/expemb/build/tmp/work/
engicam_mx6sRqs-poky-linux-gnueabi/linux-engicam-mx6/3.0.35-r0/temp/log.do_patch.
19000
ERROR: Task 1 (/home/gblanc/devel/expemb/yocto/meta-expemb/recipes-kernel/linux/
linux-engicam-mx6_3.0.35.bb, do_patch) failed with exit code '1'

Lexpertise au service de lembarqu

COLD KERNEL PANIC

it seems that Kconfig has changed a bit...

gblanc@linux-07qd:~/devel/expemb/build> less tmp/work/engicam_mx6sRqs-pokylinux-gnueabi/linux-engicam-mx6/3.0.35-r0/linux-3.0.35.eng/arch/arm/mach-mx6/


Kconfig

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

Lexpertise au service de lembarqu

* USELESS ERROR

ERROR: Function failed: do_configure (log file is located at /home/gblanc/devel/


expemb/build/tmp/work/engicam_mx6sRqs-poky-linux-gnueabi/linux-engicammx6/3.0.35-r0/temp/log.do_configure.21393)
ERROR: Logfile of failure stored in: /home/gblanc/devel/expemb/build/tmp/work/
engicam_mx6sRqs-poky-linux-gnueabi/linux-engicam-mx6/3.0.35-r0/temp/
log.do_configure.21393
Log data follows:
| DEBUG: Executing python function sysroot_cleansstate
| DEBUG: Python function sysroot_cleansstate finished
| DEBUG: Executing shell function do_configure
| WARNING: /home/gblanc/devel/expemb/build/tmp/work/engicam_mx6sRqs-pokylinux-gnueabi/linux-engicam-mx6/3.0.35-r0/temp/run.do_configure.21393:1 exit 128
from
| head=`git rev-parse --verify --short HEAD 2> /dev/null`
| ERROR: Function failed: do_configure (log file is located at /home/gblanc/devel/
expemb/build/tmp/work/engicam_mx6sRqs-poky-linux-gnueabi/linux-engicammx6/3.0.35-r0/temp/log.do_configure.21393)
ERROR: Task 5 (/home/gblanc/devel/expemb/yocto/meta-expemb/recipes-kernel/
linux/linux-engicam-mx6_3.0.35.bb, do_configure) failed with exit code '1'
Lexpertise au service de lembarqu

THE ROAD TO HELL IS PAVED


WITH GOOD INTENTIONS

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.

lesson learned: inc & bbappend/append/prepend are powerful but


with great power comes great responsibility...
Lexpertise au service de lembarqu

Lexpertise au service de lembarqu

* EVEN MORE USELESS


ERROR

ERROR: Function failed: do_compile (log file is located at /home/gblanc/devel/expemb/build/tmp/work/


engicam_mx6sRqs-poky-linux-gnueabi/u-boot-imx/2009.08-r18/temp/log.do_compile.15681)
ERROR: Logfile of failure stored in: /home/gblanc/devel/expemb/build/tmp/work/engicam_mx6sRqs-pokylinux-gnueabi/u-boot-imx/2009.08-r18/temp/log.do_compile.15681
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: make -j 4 CROSS_COMPILE=arm-poky-linux-gnueabi- CC=arm-poky-linux-gnueabi-gcc -sysroot=/home/gblanc/devel/expemb/build/tmp/sysroots/engicam-mx6sRqs HOSTSTRIP=true
mx6s_icore_rqs_config
| make: *** No rule to make target `mx6s_icore_rqs_config'. Stop.
| ERROR: oe_runmake failed
| WARNING: /home/gblanc/devel/expemb/build/tmp/work/engicam_mx6sRqs-poky-linux-gnueabi/u-bootimx/2009.08-r18/temp/run.do_compile.15681:1 exit 1 from
| exit 1
| ERROR: Function failed: do_compile (log file is located at /home/gblanc/devel/expemb/build/tmp/work/
engicam_mx6sRqs-poky-linux-gnueabi/u-boot-imx/2009.08-r18/temp/log.do_compile.15681)
ERROR: Task 198 (/home/gblanc/devel/expemb/yocto/meta-fsl-arm/recipes-bsp/u-boot/u-bootimx_2009.08.bb, do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1706 tasks of which 1704 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-fsl-arm/recipes-bsp/u-boot/u-boot-imx_2009.08.bb, do_compile
Summary: There was 1 ERROR message shown, returning a non-zero exit code.

Lexpertise au service de lembarqu

THE VI CLASSIC

config command is not properly set

same pbm than with the kernel: patched sources are special...

oddly, the patches didn't fail...

in recipes-bsp/u-boot/u-boot-imx_2009.08.bbappend, we see:

"SRC_URI_append_engicami-mx6sRqs"

OK, vi problem... Remove extra "i"!!

gblanc@linux-07qd:~/devel/expemb/build> bitbake -c
cleansstate u-boot-imx

gblanc@linux-07qd:~/devel/expemb/build> bitbake uboot-imx

Remove also "_append_", because we now use special sources and not git ones.
Lexpertise au service de lembarqu

Lexpertise au service de lembarqu

* WHERES WALLY EP2

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

named the subdirectory "engicam-mx6" because it is


common to all chips S, D and Q. OK, will deal with that
later...

mv engicam-mx6 u-boot/u-boot-imx/
engicam-mx6 u-boot/u-boot-imx/
engicam-mx6sRqs

One day, will set properly FILESEXTRAPATHS_prepend.

(actually, all of this was later replaced by a new


shining meta-engicam layer with 3.10.x kernel, and it
rocks)
Lexpertise au service de lembarqu

Lexpertise au service de lembarqu

* NOW COMPILING
U-BOOT

ERROR: Command Error: exit status: 1 Output:


Applying patch 001_iCoreM6_uboot_mainpatch_131114.patch
(Stripping trailing CRs from patch; use --binary to disable.)
can't find file to patch at input line 5
[.....................]
No file to patch. Skipping patch.
3 out of 3 hunks ignored
Patch 001_iCoreM6_uboot_mainpatch_131114.patch does not apply
(enforce with -f)
ERROR: Function failed: patch_do_patch
ERROR: Logfile of failure stored in: /home/gblanc/devel/expemb/build/
tmp/work/engicam_mx6sRqs-poky-linux-gnueabi/u-boot-imx/2009.08r18/temp/log.do_patch.20569
ERROR: Task 193 (/home/gblanc/devel/expemb/yocto/meta-fsl-arm/
recipes-bsp/u-boot/u-boot-imx_2009.08.bb, do_patch) failed with exit
code '1'
Lexpertise au service de lembarqu

ONCE AGAIN

seems like an error of ${S} or ${WORKDIR}...

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

the "git" directory should not exist anymore...

recipe is ".bbappend", let's look at the extended original meta-fsl-arm/recipes-bsp/uboot/u-boot-imx_2009.08.bb

S = "${WORKDIR}/git"

let's put inside our bbappend: S = "${WORKDIR}/u-boot-2009.08.eng"

don't forget:

gblanc@linux-07qd:~/devel/expemb/build> bitbake -c cleansstate


u-boot-imx
Lexpertise au service de lembarqu

Lexpertise au service de lembarqu

* THE ERROR THAT


MUST NOT BE NAMED

// this slide was censored to protect the audiences


sensibility //

(but it was about a script launching u-boot compilation


with static absolute paths including Android pieces)

Was fr eine Schande!

(really ugly)

(went through 6 months of therapy to forget about it)

next error in a similar flavour


Lexpertise au service de lembarqu

Lexpertise au service de lembarqu

* THE NASTY ERROR

ERROR: Function failed: do_compile (log file is located at /home/gblanc/devel/expemb/build/


tmp/work/engicam_mx6sRqs-poky-linux-gnueabi/u-boot-imx/2009.08-r18/temp/
log.do_compile.22101)
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_compile.22101
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: make -j 4 CROSS_COMPILE=arm-poky-linux-gnueabi- CC=arm-poky-linuxgnueabi-gcc --sysroot=/home/gblanc/devel/expemb/build/tmp/sysroots/engicam-mx6sRqs
HOSTSTRIP=true mx6s_icore_rqs_config
| Configuring for mx6s_icore_rqs board...
| NOTE: make -j 4 CROSS_COMPILE=arm-poky-linux-gnueabi- CC=arm-poky-linuxgnueabi-gcc --sysroot=/home/gblanc/devel/expemb/build/tmp/sysroots/engicam-mx6sRqs
HOSTSTRIP=true u-boot.bin
| Generating include/autoconf.mk
| Generating include/autoconf.mk.dep
| for dir in tools examples/standalone examples/api ; do make -C $dir _depend ; done
| make[1]: Entering directory `/home/gblanc/devel/expemb/build/tmp/work/
engicam_mx6sRqs-poky-linux-gnueabi/u-boot-imx/2009.08-r18/u-boot-2009.08.eng/tools'
// ...... lot of ok things ....... //

Lexpertise au service de lembarqu

| make[1]: Entering directory `/home/gblanc/devel/expemb/build/tmp/work/


engicam_mx6sRqs-poky-linux-gnueabi/u-boot-imx/2009.08-r18/u-boot-2009.08.eng/
tools'
| make[1]: *** No rule to make target `/data/iCoreM6/uboot-2009.08.eng/tools/gen_eth_addr.c', needed by `gen_eth_addr.o'.
Stop.
| make[1]: Leaving directory `/home/gblanc/devel/expemb/build/tmp/work/
engicam_mx6sRqs-poky-linux-gnueabi/u-boot-imx/2009.08-r18/u-boot-2009.08.eng/
tools'
| make: *** [tools] Error 2
// .... lot of ugly things like those ..... //
| make[1]: Nothing to be done for `all'.
| make[1]: Leaving directory `/home/gblanc/devel/expemb/build/tmp/work/
engicam_mx6sRqs-poky-linux-gnueabi/u-boot-imx/2009.08-r18/u-boot-2009.08.eng/
examples/api'
| make: *** wait: No child processes. Stop.
| ERROR: oe_runmake failed
| WARNING: /home/gblanc/devel/expemb/build/tmp/work/engicam_mx6sRqs-pokylinux-gnueabi/u-boot-imx/2009.08-r18/temp/run.do_compile.22101:1 exit 1 from
| exit 1
| ERROR: Function failed: do_compile (log file is located at /home/gblanc/devel/
expemb/build/tmp/work/engicam_mx6sRqs-poky-linux-gnueabi/u-boot-imx/
2009.08-r18/temp/log.do_compile.22101)
ERROR: Task 198 (/home/gblanc/devel/expemb/yocto/meta-fsl-arm/recipes-bsp/uboot/u-boot-imx_2009.08.bb, do_compile) failed with exit code '1'

Lexpertise au service de lembarqu

NOT BITBAKES FAULT

there are some binary files in u-boot tarball tool subdirectory...

Tough one....

References to "/data/iCoreM6/u-boot-2009.08.eng/" in
".depend" files

VERY DIRTY !!!!!

do_compile_prepend() {
make clean
find ${S} -name '.depend' | xargs rm -f
}

Lexpertise au service de lembarqu

Lexpertise au service de lembarqu

* THE INDIRECT ONE

ERROR: Nothing PROVIDES 'libfslvpuwrap' (but /home/gblanc/devel/


expemb/yocto/meta-fsl-arm/recipes-multimedia/gstreamer/gstreamer1.0plugins-imx_0.9.6.bb DEPENDS on or otherwise requires it)
ERROR: libfslvpuwrap was skipped: incompatible with machine engicammx6sRqs (not in COMPATIBLE_MACHINE)
NOTE: Runtime target 'gstreamer1.0-plugins-imx' is unbuildable,
removing...
Missing or unbuildable dependency chain was: ['gstreamer1.0-plugins-imx',
'libfslvpuwrap']
ERROR: Required build target 'secret-project' has no buildable providers.
Missing or unbuildable dependency chain was: ['secret-project',
'gstreamer1.0-plugins-imx', 'libfslvpuwrap']

MACHINE wasn't mx6dl or mx6q: seems that mx6s has not the good
DSP.... :/

Have to remove gstreamer1.0-plugins-imx from distro recipe.


Lexpertise au service de lembarqu

* THE BBLAYERS ERROR

ERROR: ParseError at /home/gblanc/devel/expemb/


yocto/meta-expemb/recipes-secret-project/ipscreen/
ipscreen.bb:9: Could not inherit file classes/
qmake5.bbclass

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

Lexpertise au service de lembarqu

* BEWARE OF QT5
ERRORS

ERROR: Function failed: do_configure (log file is located at /home/gblanc/devel/expemb/build/tmp/work/


cortexa9hf-vfp-neon-mx6-poky-linux-gnueabi/qtbase/5.2.1-r0/temp/log.do_configure.4784)
ERROR: Logfile of failure stored in: /home/gblanc/devel/expemb/build/tmp/work/cortexa9hf-vfp-neon-mx6poky-linux-gnueabi/qtbase/5.2.1-r0/temp/log.do_configure.4784
Log data follows:
| DEBUG: Executing python function sysroot_cleansstate
| DEBUG: Python function sysroot_cleansstate finished
| DEBUG: Executing shell function qmake5_base_preconfigure
| DEBUG: Shell function qmake5_base_preconfigure finished
| DEBUG: Executing shell function do_configure
|
| This is the Qt Open Source Edition.
|
| You are licensed to use this software under the terms of
| the Lesser GNU General Public License (LGPL) versions 2.1.
|
| You have already accepted the terms of the license.
|
| Performing shadow build...
| Preparing build tree...
| 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 fvisibility=hidden fvisibility.c
| Symbol visibility control enabled.

Lexpertise au service de lembarqu

(a thousand more lines at least)

| 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

| /home/gblanc/devel/expemb/build/tmp/work/cortexa9hf-vfp-neon-mx6-pokylinux-gnueabi/qtbase/5.2.1-r0/qtbase-opensource-src-5.2.1/configure -v -dontprocess -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/
linux-oe-g++ -xplatform linux-oe-g++ -reduce-relocations -shared -silent -no-pch no-rpath -pkg-config -no-accessibility -no-alsa -dbus -directfb -evdev -make
examples -compile-examples -no-fontconfig -freetype -opengl es2 -eglfs -no-glib gtkstyle -no-iconv -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-sql-mysql -no-sql-oci -no-sql-odbc -nosql-psql -no-sql-sqlite -no-sql-sqlite2 -no-sql-tds -nomake tests -make tools -tslib libudev -widgets -xcb -xcb-xlib -system-xcb -xcursor -xfixes -xinerama -xinput xinput2 -xkb -xrandr -xrender -xshape -xsync -xvideo -system-zlib -no-eglfs
| ERROR: Function failed: do_configure (log file is located at /home/gblanc/devel/
expemb/build/tmp/work/cortexa9hf-vfp-neon-mx6-poky-linux-gnueabi/qtbase/5.2.1r0/temp/log.do_configure.4784)
ERROR: Task 101 (/home/gblanc/devel/expemb/yocto/meta-qt5/recipes-qt/qt5/
qtbase_5.2.1.bb, do_configure) failed with exit code '1'

Lexpertise au service de lembarqu

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

Lexpertise au service de lembarqu

DIRECTFB ILLNESS

Did you see it? -directfb !!

Where does it come from?

In recipe meta-qt5/recipes-qt/qt5/qtbase.inc:

PACKAGECONFIG_FB ?= "${@base_contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)}"


PACKAGECONFIG_X11 ?= "${@base_contains('DISTRO_FEATURES', 'x11', 'xcb xvideo xsync
xshape xrender xrandr xfixes xinput2 xinput xinerama xcursor gtkstyle xkb', '', d)}"
PACKAGECONFIG ?= " \
${PACKAGECONFIG_RELEASE} \
${PACKAGECONFIG_DEFAULT} \
${PACKAGECONFIG_OPENSSL} \
${PACKAGECONFIG_GL} \
${PACKAGECONFIG_FB} \
${PACKAGECONFIG_X11} \
${PACKAGECONFIG_FONTS} \
${PACKAGECONFIG_SYSTEM} \
${PACKAGECONFIG_MULTIMEDIA} \
${PACKAGECONFIG_DISTRO} \
"

Lexpertise au service de lembarqu

REMOVING DIRECTFB

build> bitbake -e ipscreen | grep ^DISTRO_FEATURES

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"

From conf/machine/engicam-mx6sRqs.conf, removing "directfb":

DISTRO_FEATURES_append = " ext2 opengl usbhost x11"

Or:

vi qtbase_5.2.1.bbappend
PACKAGECONFIG_FB = ""
Lexpertise au service de lembarqu

* COMPILING QT
STUFF

ERROR: Function failed: do_configure (log file is located at /home/gblanc/devel/expemb/build/tmp/


work/cortexa9hf-vfp-neon-poky-linux-gnueabi/ipscreen/1.0-r0/temp/log.do_configure.16933)
ERROR: Logfile of failure stored in: /home/gblanc/devel/expemb/build/tmp/work/cortexa9hf-vfpneon-poky-linux-gnueabi/ipscreen/1.0-r0/temp/log.do_configure.16933
Log data follows:
| DEBUG: Executing python function sysroot_cleansstate
| DEBUG: Python function sysroot_cleansstate finished
| DEBUG: Executing shell function qmake5_base_preconfigure
| DEBUG: Shell function qmake5_base_preconfigure finished
| DEBUG: Executing shell function do_configure
| Project ERROR: Unknown module(s) in QT: multimediawidgets
| ERROR: Error calling /home/gblanc/devel/expemb/build/tmp/sysroots/x86_64-linux/usr/bin/qt5/
qmake -makefile -o Makefile -r /home/gblanc/devel/expemb/build/tmp/work/cortexa9hf-vfpneon-poky-linux-gnueabi/ipscreen/1.0-r0/ipscreen/ipscreen.pro
| WARNING: /home/gblanc/devel/expemb/build/tmp/work/cortexa9hf-vfp-neon-poky-linuxgnueabi/ipscreen/1.0-r0/temp/run.do_configure.16933:1 exit 1 from
| exit 1
| ERROR: Function failed: do_configure (log file is located at /home/gblanc/devel/expemb/build/
tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/ipscreen/1.0-r0/temp/log.do_configure.16933)
ERROR: Task 6 (/home/gblanc/devel/expemb/yocto/meta-expemb/recipes-secret-project/ipscreen/
ipscreen.bb, do_configure) failed with exit code '1'
NOTE: Tasks Summary: Attempted 2052 tasks of which 2050 didn't need to be rerun and 1 failed.

Lexpertise au service de lembarqu

MISSING DEPENDENCY

missing dependency to

bitbake-layers show-recipes | less

/multimedia
qtmultimedia:
meta-qt5
meta-qt5

5.2.1
5.2.1+gitAUTOINC+db7f7cc565

Modify recipe file:


DEPENDS = "qtbase qtmultimedia"
Lexpertise au service de lembarqu

* LICENSE PROBLEM

ERROR: Nothing PROVIDES 'gst-ffmpeg'


ERROR: gst-ffmpeg was skipped: because it has a restricted license not whitelisted in
LICENSE_FLAGS_WHITELIST

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"

(with dependencies: LICENSE_FLAGS_WHITELIST = "commercial_gst-ffmpeg


commercial_libav commercial_x264" )

Lexpertise au service de lembarqu

DESYNCHRONIZED
APPENDED RECIPE ERROR

No recipes available for:


/home/gblanc/devel/expemb/yocto/metaexpemb/recipes-secret-project/busybox/
busybox_1.21.1.bbappend
ERROR: Command execution failed: Exited with 1

due to recycling of busybox customization with


bbappend

busybox_1.21.1 was for Dora, for Daisy you need


to mv file to busybox_1.22.1!
Lexpertise au service de lembarqu

* FINDING LOST FILE

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

put it in new "files" directory to prevent any more error


Lexpertise au service de lembarqu

Lexpertise au service de lembarqu

* THE WHATS-MYNAME ERROR

ERROR: Unable to install packages. Command '/home/gblanc/devel/expemb/build/tmp/


sysroots/x86_64-linux/usr/bin/opkg-cl -f /home/gblanc/devel/expemb/build/tmp/work/
engicam_mx6sRqs-poky-linux-gnueabi/secret-project/1.0-r0/opkg.conf -o /home/gblanc/
devel/expemb/build/tmp/work/engicam_mx6sRqs-poky-linux-gnueabi/secret-project/1.0-r0/
rootfs --force_postinstall --prefer-arch-to-version install packagegroup-core-ssh-dropbear
dhcp <lot of other packages> tslib-calibrate' returned 255:
Installing packagegroup-core-ssh-dropbear (1.0-r1) to root...
Downloading file:/home/gblanc/devel/expemb/build/tmp/deploy/ipk/all/packagegroup-coressh-dropbear_1.0-r1_all.ipk.
Installing dropbear (2014.63-r0) to root...
[...]
Configuring qtbase-plugins.
Configuring ipscreen.
Configuring tslib-tests.
Collected errors:
* opkg_install_cmd: Cannot install package dhcp.
ERROR: Function failed: do_rootfs

recipe name dhcp is not the same as its package name

either dhcp-client or dhcp-server

Lexpertise au service de lembarqu

* WRONG INSTALL

ERROR: Function failed: do_install (log file is located at /home/gblanc/devel/expemb/build/


tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/ipscreen/1.0-r0/temp/log.do_install.5446)
ERROR: Logfile of failure stored in: /home/gblanc/devel/expemb/build/tmp/work/cortexa9hfvfp-neon-poky-linux-gnueabi/ipscreen/1.0-r0/temp/log.do_install.5446
Log data follows:
| DEBUG: Executing shell function do_install
| install: cannot stat '/home/gblanc/devel/expemb/build/tmp/work/
cortexa9hf-vfp-neon-poky-linux-gnueabi/ipscreen/1.0-r0/ipscreen/
ipscreen/configuration.json': No such file or directory
| WARNING: /home/gblanc/devel/expemb/build/tmp/work/cortexa9hf-vfp-neon-poky-linuxgnueabi/ipscreen/1.0-r0/temp/run.do_install.5446:1 exit 1 from
| install -m 644 /home/gblanc/devel/expemb/build/tmp/work/cortexa9hf-vfp-neon-pokylinux-gnueabi/ipscreen/1.0-r0/ipscreen/ipscreen/configuration.json /home/gblanc/devel/
expemb/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/ipscreen/1.0-r0/image/opt/
| ERROR: Function failed: do_install (log file is located at /home/gblanc/devel/expemb/build/
tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/ipscreen/1.0-r0/temp/log.do_install.5446)
ERROR: Task 342 (/home/gblanc/devel/expemb/yocto/meta-expemb/recipes-secret-project/
ipscreen/ipscreen.bb, do_install) failed with exit code '1'

wrong line in do_install (install -m 644 ${S}/configuration.json ${D}/opt )

Lexpertise au service de lembarqu

* SHIPPING PROBLEM

ERROR: QA Issue: ipscreen: Files/directories were


installed but not shipped
/opt/configuration.json
ERROR: QA run found fatal errors. Please consider fixing them.
ERROR: Function failed: do_package_qa
ERROR: Logfile of failure stored in: /home/gblanc/devel/
expemb/build/tmp/work/cortexa9hf-vfp-neon-poky-linuxgnueabi/ipscreen/1.0-r0/temp/log.do_package.5576
ERROR: Task 351 (/home/gblanc/devel/expemb/yocto/metaexpemb/recipes-secret-project/ipscreen/ipscreen.bb,
do_package) failed with exit code '1'

classical shipping problem when using non-bitbake-standard


target directories
Lexpertise au service de lembarqu

Lexpertise au service de lembarqu

* THE FAILING
DO_INSTALL

ERROR: Function failed: do_install (log file is located at /home/gblanc/devel/expemb/build/


tmp/work/engicam_mx6sRqs-poky-linux-gnueabi/base-files/3.0.14-r86/temp/log.do_install.
25353)
ERROR: Logfile of failure stored in: /home/gblanc/devel/expemb/build/tmp/work/
engicam_mx6sRqs-poky-linux-gnueabi/base-files/3.0.14-r86/temp/log.do_install.25353
Log data follows:
| DEBUG: Executing shell function do_install
| install: target '/home/gblanc/devel/expemb/build/tmp/work/
engicam_mx6sRqs-poky-linux-gnueabi/base-files/3.0.14-r86/image/
etc/init.d/' is not a directory: No such file or directory
| WARNING: /home/gblanc/devel/expemb/build/tmp/work/engicam_mx6sRqs-poky-linuxgnueabi/base-files/3.0.14-r86/temp/run.do_install.25353:1 exit 1 from
| install -m 0644 /home/gblanc/devel/expemb/build/tmp/work/engicam_mx6sRqs-pokylinux-gnueabi/base-files/3.0.14-r86/fbconfig /home/gblanc/devel/expemb/build/tmp/work/
engicam_mx6sRqs-poky-linux-gnueabi/base-files/3.0.14-r86/image/etc/init.d/
| ERROR: Function failed: do_install (log file is located at /home/gblanc/devel/expemb/build/
tmp/work/engicam_mx6sRqs-poky-linux-gnueabi/base-files/3.0.14-r86/temp/log.do_install.
25353)
ERROR: Task 1139 (/home/gblanc/devel/expemb/yocto/meta/recipes-core/base-files/basefiles_3.0.14.bb, do_install) failed with exit code '1'

Lexpertise au service de lembarqu

HOW TO SUCCEED
WITH DO_INSTALL

when bitbake copies files to image directory


(proceeding to install), with customized install
commands, the whole directory structure must
exist

create the directory before making installation

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/
}

Lexpertise au service de lembarqu

* BRACKET-ERROR

ERROR: ParseError at /home/gblanc/devel/expemb/yocto/meta-expemb/


recipes-secret-project/ipscreen/qtbase_5.2.1.bbappend:9: unparsed line:
'QMAKE_INCDIR_OPENGL_ES2 += ${STAGING_INCDIR}'

don't forget brackets around variable names!

QMAKE_INCDIR_OPENGL_ES2 += "${STAGING_INCDIR}"

Lexpertise au service de lembarqu

* 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'

Lexpertise au service de lembarqu

Lexpertise au service de lembarqu

LAST BIT OF SOLVING

you thought it was about missing license file?


Not at all...

in sysvinit_2.88dsf.bbappend

SRC_URI += "file://rcS-default"

The "+" was missing!...

Lexpertise au service de lembarqu

ITS STABLE!!!!

Lexpertise au service de lembarqu

XKCD #303

Lexpertise au service de lembarqu

ANY QUESTIONS?
Lexpertise au service de lembarqu

Lexpertise au service de lembarqu

THANK YOU
ExpEmb
http://www.expemb.com
+33 177 048 035

Potrebbero piacerti anche