Neil Hopcroft

A digital misfit

Adding yocto project

There seems to be a number of people using Yocto Project for their embedded systems builds, indeed, I have experimented with it for the Intel Galileo board I dabbled with a couple of years ago.
To add this to the CI build server I am going to use the Jethro branch. First step is to to clone the code and manually try some builds from the command line. This gives me an error:

libsdl-native is set to be ASSUME_PROVIDED but sdl-config can’t be found in PATH. Please either install it, or configure qemu not to require sdl.

I will add libsdl to the CI build server and see if that resolves the problem – it doesn’t. The latest code there installs libSDL2 and sdl2-config, which doesn’t resolve the dependency problem. Instead removing the SDL lines from the yocto/build/conf/local.conf file does resolve the problem.
The next problem is the sheer size of the build – it is, after all, a system to build a complete image – I aborted the ‘bitbake world’ build at about 20% completion when it threatened to consume all available disk space. ‘bitbake core-image-minimal’ is probably manageable. Then there is the question of how long a build will take – the 20% of the ‘world’ build had taken nearly 2 days, so it isn’t something we want to do clean rebuilds of on a regular basis.
Now the build is failing with

build/genattrtab /usr/share/tomcat7/.jenkins/workspace/yocto/build/tmp/work-shared/gcc-5.2.0-r0/gcc-5.2.0/gcc/common.md /usr/share/tomcat7/.jenkins/workspace/yocto/build/tmp/work-shared/gcc-5.2.0-r0/gcc-5.2.0/gcc/config/i386/i386.md insn-conditions.md \
-Atmp-attrtab.c -Dtmp-dfatab.c -Ltmp-latencytab.c
make[1]: *** [s-attrtab] Killed

A quick search reveals that this is likely caused by running out of memory. Applying the suggested fix there, to add some swap space, resolves this problem.
Now the build runs to completion, taking 37 hours to complete even though I had already allowed 200-odd of the tasks to run in a shell.
The next question is how updates occur, I have launched a few more builds since this completion and there have been no changes, leaving the build with no tasks requiring rerunning. I’ll put this on a weekly rebuild schedule and see what happens.


Leave a Reply

Your email address will not be published.