I have recently received an omap3evm and a gumstix board, and am currently taking my first steps learning how to use embedded linux. I have set up a cross compile environment for openembedded, based upon instructions for the beagleboard which I found at: http://elinux.org/BeagleBoardAndOpenEmbeddedGit . However, while I can compile most things without any problems, I have been unable to compile the x-loader for the omap3evm.
My local.conf file is set to:
DISTRO = "angstrom-2008.1"
BBFILES = "/home/omap/oe/openembedded/recipes/*/*.bb"
TMPDIR = "/home/omap/oe/tmp"
MACHINE = "omap3evm"
ENABLE_BINARY_LOCALE_GENERATION = "0"
And I have pulled the most recent changes from the 2009/stable git tree.
If I try to bitbake x-load, I get the following error:
NOTE: Running task 325 of 475 (ID: 7, /home/omap/oe/openembedded/recipes/x-load/x-load_git.bb, do_compile)
NOTE: package x-load-1_1.42+r7+gitr73eb0caf065b3b3f407d8af5c4836624e5cc7b69-r7: task do_compile: started
ERROR: function do_compile failed
ERROR: see log in /home/omap/oe/tmp/work/omap3evm-angstrom-linux-gnueabi/x-load-1_1.42+r7+gitr73eb0caf065b3b3f407d8af5c4836624e5cc7b69-r7/temp/log.do_compile.7898
NOTE: Task failed: /home/omap/oe/tmp/work/omap3evm-angstrom-linux-gnueabi/x-load-1_1.42+r7+gitr73eb0caf065b3b3f407d8af5c4836624e5cc7b69-r7/temp/log.do_compile.7898
NOTE: package x-load-1_1.42+r7+gitr73eb0caf065b3b3f407d8af5c4836624e5cc7b69-r7: task do_compile: failed
ERROR: TaskFailed event exception, aborting
ERROR: Build of /home/omap/oe/openembedded/recipes/x-load/x-load_git.bb do_compile failed
ERROR: Task 7 (/home/omap/oe/openembedded/recipes/x-load/x-load_git.bb, do_compile) failed
NOTE: Tasks Summary: Attempted 324 tasks of which 324 didn't need to be rerun and 1 failed.
ERROR: '/home/omap/oe/openembedded/recipes/x-load/x-load_git.bb' failed
Looking at the log file, I have the following (only relevant part of file shown):
arm-angstrom-linux-gnueabi-gcc -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -D__KERNEL__ -DTEXT_BASE=0x40200800 -I/home/omap/oe/tmp/work/omap3evm-angstrom-linux-gnueabi/x-load-1_1.42+r7+gitr73eb0caf065b3b3f407d8af5c4836624e5cc7b69-r7/git/include -fno-builtin -ffreestanding -nostdinc -isystem /home/omap/oe/tmp/cross/armv7a/lib/gcc/arm-angstrom-linux-gnueabi/4.3.1/include -pipe -DCONFIG_ARM -D__ARM__ -march=armv7-a -Wall -Wstrict-prototypes -c -o board.o board.c
board.c: In function 'init_func_i2c':
board.c:52: warning: implicit declaration of function 'i2c_init'
board.c:52: error: 'CFG_I2C_SPEED' undeclared (first use in this function)
board.c:52: error: (Each undeclared identifier is reported only once
board.c:52: error: for each function it appears in.)
board.c:52: error: 'CFG_I2C_SLAVE' undeclared (first use in this function)
board.c: In function 'start_armboot':
board.c:83: warning: implicit declaration of function 'misc_init_r'
board.c:89: warning: implicit declaration of function 'mmc_init'
board.c:102: warning: implicit declaration of function 'get_mem_type'
board.c:75: warning: unused variable 'dev_desc'
make[1]: *** [board.o] Error 1
make[1]: Leaving directory `/home/omap/oe/tmp/work/omap3evm-angstrom-linux-gnueabi/x-load-1_1.42+r7+gitr73eb0caf065b3b3f407d8af5c4836624e5cc7b69-r7/git/lib'
make: *** [lib/libarm.a] Error 2
FATAL: oe_runmake failed
I have looked at board.c, and noticed that there was no inclusion of <i2c.h>. However, adding this only rectified the line "board.c:52: warning: implicit declaration of function 'i2c_init'" and did not resolve the problems. I think it is also worth mentioning that when I changed the machine in my local.conf file to "overo" for the gumstix overo, the x-loader compiled without errors and appears to work fine on the overo. The board.c used in the overo build is identical to the one that is failing here. Rummaging around the system, I have not yet managed to work out where the declarations for CFG_I2C_SPEED and CFG_I2C_SLAVE are being satisfied.
As a last note, in case it is relevant my host PC is running Ubuntu 8.10.
I have no idea what to do from here. I had assumed that gumstix / beagleboard and the omap3evm were similar enough that the instructions I had followed would work for all of them. Any suggestions on what I should be doing to make this work / what I am doing wrong are greatly appreciated.