BBB angstrom-v2013.06 build error: ltp-ddt_0.0.4.bb compile error (linux/types.h problem?)

Got past the libjpeg-turbo problem, but now it’s failing on ltp-ddt_0.0.4.bb:

`
ERROR: Function failed: do_compile (see /home/winston/Work/bbb/setup-scripts/build/tmp-angstrom_v2013_06-eglibc/work/beaglebone-angstrom-linux-gnueabi/ltp-ddt/0.0.4-r1/temp/log.do_compile.20093 for further information)


(log abbreviated due to size)

arm-angstrom-linux-gnueabi-gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D_GNU_SOURCE -I/home/winston/Work/bbb/setup-scripts/build/tmp-angstrom_v2013_06-eglibc/work/beaglebone-angstrom-linux-gnueabi/ltp-ddt/0.0.4-r1/git/testcases/kernel/include -I/home/winston/Work/bbb/setup-scripts/build/tmp-angstrom_v2013_06-eglibc/work/beaglebone-angstrom-linux-gnueabi/ltp-ddt/0.0.4-r1/git/testcases/kernel/timers/timer_settime/…/include -I…/…/…/…/include -I…/…/…/…/include -L…/…/…/…/lib -Wl,–hash-style=gnu -Wl,-O1 timer_settime02.c -lltp -lpthread -lrt -o timer_settime02

(NOTE: I’m not 100% sure the GCC command is the one causing the error … but it’s the only one in the log near to the errors)

In file included from /home/winston/Work/bbb/setup-scripts/build/tmp-angstrom_v2013_06-eglibc/sysroots/beaglebone/usr/src/kernel/include/linux/i2c.h:29:0,
from src/interface/common/st_i2c_common.h:54,
from src/testcases/st_i2c_eeprom.c:51:
/home/winston/Work/bbb/setup-scripts/build/tmp-angstrom_v2013_06-eglibc/sysroots/beaglebone/usr/src/kernel/include/linux/mod_devicetable.h:18:2: error: unknown type name ‘__u32’
/home/winston/Work/bbb/setup-scripts/build/tmp-angstrom_v2013_06-

In file included from /home/winston/Work/bbb/setup-scripts/build/tmp-angstrom_v2013_06-eglibc/sysroots/beaglebone/usr/src/kernel/include/linux/kobject.h:27:0,
from /home/winston/Work/bbb/setup-scripts/build/tmp-angstrom_v2013_06-eglibc/sysroots/beaglebone/usr/src/kernel/include/linux/device.h:17,
from /home/winston/Work/bbb/setup-scripts/build/tmp-angstrom_v2013_06-eglibc/sysroots/beaglebone/usr/src/kernel/include/linux/i2c.h:30,
from src/interface/common/st_i2c_common.h:54,
from src/testcases/st_i2c_eeprom.c:51:
/home/winston/Work/bbb/setup-scripts/build/tmp-angstrom_v2013_06-eglibc/sysroots/beaglebone/usr/src/kernel/include/linux/wait.h:8:25: fatal error: asm/current.h: No such file or directory
compilation terminated.

`

Looks like some issues with includes, missing linux/types.h?

Full output at the following pastebin:

http://pastebin.com/geS9FGvY

sigh, was really hoping to get angstrom-v2013.06 to build!

Did you have a branch mismatch when you did your initial setup?
I’m seeing meta-ti being pulled from git.yoctoproject.org/meta-ti, and configured with branch: angstrom-staging-yocto1.4
However that repository doesn’t have that branch (see below), however github.com/Angstrom-distribution/meta-ti does have the angstrom-staging-yocto1.4 branch.

Here are my steps:

git clone git://github.com/Angstrom-distribution/setup-scripts.git
cd setup-scripts
git checkout angstrom-v2013.06-yocto1.4
MACHINE=beaglebone ./oebb.sh config beaglebone << error in output setting meta-ti branch

Here are the valid remote branches for meta-ti:
$ cd setup-scripts/sources/meta-ti

$ git branch -a

  • master
    remotes/origin/HEAD → origin/master
    remotes/origin/danny
    remotes/origin/denzil
    remotes/origin/dylan
    remotes/origin/master
    remotes/origin/split

Although I may be totally confused…please correct me if I am,
Dale

Did you have a branch mismatch when you did your initial setup?

Yes. But the errors aren’t “fatal” as they are if you use the 2012.12 (master) branch of setup-scripts (which is what the documentation says to use) due to the missing ‘danny’ branch.

I’m seeing meta-ti being pulled from git.yoctoproject.org/meta-ti, and configured with branch: angstrom-staging-yocto1.4
However that repository doesn’t have that branch (see below), however github.com/Angstrom-distribution/meta-ti does have the angstrom-staging-yocto1.4 branch.

Here are my steps:

git clone git://github.com/Angstrom-distribution/setup-scripts.git
cd setup-scripts
git checkout angstrom-v2013.06-yocto1.4
MACHINE=beaglebone ./oebb.sh config beaglebone << error in output setting meta-ti branch

Here are the valid remote branches for meta-ti:
$ cd setup-scripts/sources/meta-ti

$ git branch -a

  • master
    remotes/origin/HEAD → origin/master
    remotes/origin/danny
    remotes/origin/denzil
    remotes/origin/dylan
    remotes/origin/master
    remotes/origin/split

Although I may be totally confused…please correct me if I am,

The OE build system is quite … complex. I have yet to dig into it so I can’t say what’s right or wrong here!

I think I’m going to try Ubuntu on the BBB!

It appears that the missing ‘danny’ branch has now been fixed on 2012.12. As Koen advised I am reverting

Also looks like this commit fixed the repo location for meta-ti: ae663d02a24e123418c7a57b018c183f8b9fc53b
This fixed my missing branch message.
Maybe I do understand this?

-Dale

So started over and I switched to the 2012.12 branch:

git checkout angstrom-v2012.12-yocto1.3

The config seemed to go without any git errors or warnings. Looks good so far, although I’m only about 12% done.

-W.

Yep, it all worked. Awesome. Now I just need to build an SD card with the flasher & my custom image.

+1

Next question is how to create the .img.xz image files. After running the bitbake cloud9-image, I have the following files in ./build/tmp-angstrom_v2012_12-eglibdeploy/images/beaglebone:

`
winston@ubuntu-raring:~/Work/bbb/setup-scripts/build/tmp-angstrom_v2012_12-eglibdeploy/images/beaglebone$ ls
Angstrom-Cloud9-IDE-eglibc-ipk-v2012.12-beaglebone.rootfs.tar.gz
Angstrom-Cloud9-IDE-eglibc-ipk-v2012.12-beaglebone.rootfs.tar.xz
Cloud9-IDE-beaglebone.tar.gz
Cloud9-IDE-beaglebone.tar.xz
MLO
MLO-beaglebone
MLO-beaglebone-2013.04
modules-3.8.13-r23a-beaglebone.tgz
README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt
u-boot-beaglebone-2013.04-r0.img
u-boot-beaglebone.img
u-boot.img
uImage
uImage-3.8.13-r23a-beaglebone-20130822180811.bin
uImage-beaglebone.bin

`

But no Angstrom-Cloud9-IDE-eglibc-ipk-v2012.12-beaglebone.img.xz.

+1

Next question is how to create the .img.xz image files. After running the bitbake cloud9-image, I have the following files in ./build/tmp-angstrom_v2012_12-eglibdeploy/images/beaglebone:

`
winston@ubuntu-raring:~/Work/bbb/setup-scripts/build/tmp-angstrom_v2012_12-eglibdeploy/images/beaglebone$ ls
Angstrom-Cloud9-IDE-eglibc-ipk-v2012.12-beaglebone.rootfs.tar.gz
Angstrom-Cloud9-IDE-eglibc-ipk-v2012.12-beaglebone.rootfs.tar.xz
Cloud9-IDE-beaglebone.tar.gz
Cloud9-IDE-beaglebone.tar.xz
MLO
MLO-beaglebone
MLO-beaglebone-2013.04
modules-3.8.13-r23a-beaglebone.tgz
README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt
u-boot-beaglebone-2013.04-r0.img
u-boot-beaglebone.img
u-boot.img
uImage
uImage-3.8.13-r23a-beaglebone-20130822180811.bin
uImage-beaglebone.bin

`

But no Angstrom-Cloud9-IDE-eglibc-ipk-v2012.12-beaglebone.img.xz.

That step isn’t fully automated. High level steps are to run mkcard.txt to prepare a card and then dd back the image to a file.

If you want to make a flasher image, take an existing flasher and replace the rootfs tarball specified in emmc.sh and replace it with your new one.

That’s what I figured, this article (below) has some pretty good detail on how the flasher works:

http://www.crashcourse.ca/wiki/index.php/BBB_software_update_process

Thanks!

I did get this to work, but only by accident [because the eMMC on my BBB had already been set up]. I used the 8-21-13 version of the flasher, which might not have been a good idea, but I was able to mount the img, update ID.txt, replace the rootfs with mine and update the md5 hashes in the script to match.

When I booted it, the flashing process failed (the leds went out), but although I had the serial console connected, there was no “output” to indicate it had failed. Next, I logged in and manually ran the [modified] /usr/bin/emmc.sh script and found that there were some errors. Notably, the blockdev and kpartx tools were missing from the flasher linux image. However, the unpack of the rootfs succeeded and it did copy in the updated MLO and u-boot.bin files.

One thing that would make rolling-your-own flasher image easier if the following values were read from a config file rather than being hard coded into the emmc.sh script:

  • MD5 hash for MLO

  • MD5 hash for u-boot.bin

  • Root filesystem archive filename

  • ID/dogtag value

  • Extra stuff to copy/validate (such as the BBB getting started stuff, wallpaper etc … I didn’t need that so I commented it out)

  • Logging any errors to the console/syslog during flashing (just in case anyone is watching with a serial console)

Ultimately, I got what I needed, thanks to everyone for their help!

-W.

FYI it seems that cloud9’s pointer to sass is no longer around…this should only matter if you’re using the 2013 branch since the build process does some caching via sources.angstrom-distribution.org.
Should you want to build 2013 with the cloud9 image, you’ll need to mod this file:
setup-scripts/sources/meta-openembedded/meta-oe/recipes-devtools/cloud9/cloud9_0.6.bb

Change that worked for me is:

24c24
< git://github.com/matehat/sass.js.git;destsuffix=git/support/connect/support/sass;name=sass \