Blog Sturntech

Archive for the ‘Bitbake’ Category

Linux: ELF file extraction of 32-bit binaries on a 64-bit system (Error)

without comments

I use OpenEmbedded and Bitbake to build cross-compiled bootloaders, linux kernels, and filesystems for embedded device projects. I’m currently working with several OMAP35x based boards (BeagleBoard, Gumstix). My development system runs on an AMD64 architecture (Ubuntu 10.10 (Maverick)). My target architecture is ARMv7.

I’ve been working on building a variation of the “omap3-sgx-modules” bitbake recipe. This recipe uses the SGX SDK provided by Texas Instruments for their access functions for off-loading the graphics-processing from the Cortex-A8 ARMv7 core to the TMS320C64x+ DSP core.

When “baking” the recipe, I was getting the following error output:
OE:beagleboard lucas@godzilla:~/oe$ bitbake omap3-sgx-modules
Build Configuration:
BB_VERSION = "1.10.2"
METADATA_BRANCH = "beagleboard"
TARGET_OS = "linux-gnueabi"
MACHINE = "beagleboard"
DISTRO = "angstrom"
DISTRO_VERSION = "2010.7-20110218"
TARGET_FPU = "hard"
NOTE: Running task 96 of 213 (ID: 13, /home/lucas/oe/, do_compile)
ERROR: Task 13 (/home/lucas/oe/, do_compile) failed with 256
ERROR: '/home/lucas/oe/' failed
NOTE: package omap3-sgx-modules- task do_compile: Started
ERROR: Function do_compile failed
Log data follows:
| NOTE: make -j 4 -e MAKEFLAGS= KERNEL_PATH=/home/lucas/oe/tmp/sysroots/beagleboard-angstrom-linux-gnueabi/kernel KERNEL_SRC=/home/lucas/oe/tmp/sysroots/beagleboard-angstrom-linux-gnueabi/kernel KDIR=/home/lucas/oe/tmp/sysroots/beagleboard-angstrom-linux-gnueabi/kernel KERNELDIR=/home/lucas/oe/tmp/sysroots/beagleboard-angstrom-linux-gnueabi/kernel KERNEL_DIR=/home/lucas/oe/tmp/sysroots/beagleboard-angstrom-linux-gnueabi/kernel KERNEL_VERSION=2.6.29-omap1 CC=arm-angstrom-linux-gnueabi-gcc -mno-thumb-interwork -mno-thumb LD=arm-angstrom-linux-gnueabi-ld AR=arm-angstrom-linux-gnueabi-ar BUILD=release
| make: *** No targets specified and no makefile found. Stop.
| FATAL: oe_runmake failed
ERROR: '/home/lucas/oe/' failed

If you didn’t modify the file and left the patches as part of the bitbake recipe, bitbake will crash on the do_patch step with a quilt-related error. It won’t make it far enough to reach the make related error statements shown above. The function call to quilt (and the call to make) fail due to missing files. These files were supposed to be extracted from an archive file that passed an md5sum check.

Very strange. A glance at the OpenEmbedded temporary work directory: oe/tmp/work/beagleboard-angstrom-linux-gnueabi/omap3-sgx-modules/ shows that only a skeleton of a filesystem was created (some folders, no files). It seems that bitbake tried to initiate the ELF-file’s self-extraction but something silently failed in the process.

The root problem was the lack of the ia32-libs libraries. This library is required to read the 32-bit ELF binary-file.

Written by sturnfie

February 18th, 2011 at 6:17 pm