I decided to give cross-compiling the module on my Ubuntu machine a
shot.
I started off getting the Angstrom SD card image to build to confirm
that things are working:
Install Bitbake from the Ubuntu Software Center
sudo apt-get install build-essential
sudo apt-get install diffstat
sudo apt-get install texi2html
sudo apt-get install texinfo
sudo apt-get install gawk
sudo apt-get install chrpath
sudo apt-get install lzop
mkdir angstrom
cd angstrom
git clone git://
git.angstrom-distribution.org/setup-scripts
cd setup-scripts
git checkout origin/oe-core -b oe-core
./oebb.sh config beaglebone
MACHINE=beaglebone ./oebb.sh bitbake systemd-image
MACHINE=beaglebone ./oebb.sh bitbake virtual/kernel
I was also able to use Bitbake to compile a simple "Hello, World!"
application that was was able to load and execute on the BeagleBone.
So I tried to build a Bitbake recipe around the Makefile for the
driver build. Here it is:
DESCRIPTION = "RT5370 Kernel Module"
SECTION = "kernel/modules"
PRIORITY = "optional"
LICENSE = "CLOSED"
RDEPENDS = "kernel (${KERNEL_VERSION})"
DEPENDS = "virtual/kernel"
PR = "r0"
SRC_URI = ""
S = "${WORKDIR}"
inherit module
When I run it I get the following:
jerrill@JerrillUbuntuLT:~/projects/angstrom/setup-scripts$ bitbake
rt5370
Loading cache: 100% |###########################################|
ETA: 00:00:00
Loaded 1891 entries from dependency cache.
Parsing recipes: 100% |#########################################|
Time: 00:00:01
Parsing of 1467 .bb files complete (1466 cached, 1 parsed). 1889
targets, 76 skipped, 0 masked, 0 errors.
OE Build Configuration:
BB_VERSION = "1.15.0"
TARGET_ARCH = "arm"
TARGET_OS = "linux-gnueabi"
MACHINE = "beaglebone"
DISTRO = "angstrom"
DISTRO_VERSION = "v2011.12-core"
TUNE_FEATURES = "armv7a vfp neon cortexa8"
TARGET_FPU = "vfp-neon"
meta-angstrom = "master:f0f99ea3cd132a6a69a9f4bad22da55403f9f940"
meta-oe
meta-efl
meta-gpe
meta-gnome
meta-xfce = "master:2642db3615ea2d4196b9c73537d9ebff6c57de2d"
meta-ti = "master:1f506217992776b7f07983240e497cf6e068fc80"
meta-ettus = "master:f097bb61772d07610d84a668dc19a47e180962b3"
meta-efikamx = "master:2ef47fdd4e8232d766c0c63d9427253ee56e31d0"
meta-nslu2 = "master:17853811179f2760791c6b138f96e9dd15493517"
meta-htc
meta-nokia
meta-openmoko
meta-palm = "master:0166243d2bc87124c8db2868b57df5d166f9ffaa"
meta-sugarbay
meta-crownbay
meta-emenlow
meta-fishriver
meta-jasperforest
meta-n450 = "master:7c3db7010479970f3f92501349827c517de3c36a"
meta = "master:8f348ccad083d6c02c200652ff6295e701e88f0d"
NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Running task 1100 of 1109 (ID: 8, /home/jerrill/projects/
angstrom/setup-scripts/sources/openembedded-core/meta/recipes-jerrill/
rt5370/
rt5370_0.0.bb, do_compile)
NOTE: package rt5370-0.0-r0: task do_compile: Started
ERROR: Function 'do_compile' failed (see /home/jerrill/projects/
angstrom/setup-scripts/build/tmp-angstrom_2010_x-eglibc/work/
beaglebone-angstrom-linux-gnueabi/rt5370-0.0-r0/temp/log.do_compile.
17742 for further information)
ERROR: Logfile of failure stored in: /home/jerrill/projects/angstrom/
setup-scripts/build/tmp-angstrom_2010_x-eglibc/work/beaglebone-
angstrom-linux-gnueabi/rt5370-0.0-r0/temp/log.do_compile.17742
Log data follows:
| ERROR: Function 'do_compile' failed (see /home/jerrill/projects/
angstrom/setup-scripts/build/tmp-angstrom_2010_x-eglibc/work/
beaglebone-angstrom-linux-gnueabi/rt5370-0.0-r0/temp/log.do_compile.
17742 for further information)
| + cd /home/jerrill/projects/angstrom/setup-scripts/build/tmp-
angstrom_2010_x-eglibc/work/beaglebone-angstrom-linux-gnueabi/
rt5370-0.0-r0
| + do_compile
| + module_do_compile
| + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
| + oe_runmake KERNEL_PATH=/home/jerrill/projects/angstrom/setup-
scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/beaglebone/kernel
KERNEL_SRC=/home/jerrill/projects/angstrom/setup-scripts/build/tmp-
angstrom_2010_x-eglibc/sysroots/beaglebone/kernel
KERNEL_VERSION=3.1.0+ 'CC=arm-angstrom-linux-gnueabi-gcc -mno-thumb-
interwork -marm -mno-thumb-interwork -mno-thumb' 'LD=arm-angstrom-
linux-gnueabi-ld ' 'AR=arm-angstrom-linux-gnueabi-ar '
| + '[' xmake = x ']'
| + bbnote make -j2 -e MAKEFLAGS= KERNEL_PATH=/home/jerrill/projects/
angstrom/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/
beaglebone/kernel KERNEL_SRC=/home/jerrill/projects/angstrom/setup-
scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/beaglebone/kernel
KERNEL_VERSION=3.1.0+ 'CC=arm-angstrom-linux-gnueabi-gcc -mno-thumb-
interwork -marm -mno-thumb-interwork -mno-thumb' 'LD=arm-angstrom-
linux-gnueabi-ld ' 'AR=arm-angstrom-linux-gnueabi-ar '
| + echo 'NOTE: make -j2 -e MAKEFLAGS= KERNEL_PATH=/home/jerrill/
projects/angstrom/setup-scripts/build/tmp-angstrom_2010_x-eglibc/
sysroots/beaglebone/kernel KERNEL_SRC=/home/jerrill/projects/angstrom/
setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/beaglebone/
kernel KERNEL_VERSION=3.1.0+ CC=arm-angstrom-linux-gnueabi-gcc -mno-
thumb-interwork -marm -mno-thumb-interwork -mno-thumb LD=arm-angstrom-
linux-gnueabi-ld AR=arm-angstrom-linux-gnueabi-ar '
| NOTE: make -j2 -e MAKEFLAGS= KERNEL_PATH=/home/jerrill/projects/
angstrom/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/
beaglebone/kernel KERNEL_SRC=/home/jerrill/projects/angstrom/setup-
scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/beaglebone/kernel
KERNEL_VERSION=3.1.0+ CC=arm-angstrom-linux-gnueabi-gcc -mno-thumb-
interwork -marm -mno-thumb-interwork -mno-thumb LD=arm-angstrom-linux-
gnueabi-ld AR=arm-angstrom-linux-gnueabi-ar
| + make -j2 -e MAKEFLAGS= KERNEL_PATH=/home/jerrill/projects/angstrom/
setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/beaglebone/
kernel KERNEL_SRC=/home/jerrill/projects/angstrom/setup-scripts/build/
tmp-angstrom_2010_x-eglibc/sysroots/beaglebone/kernel
KERNEL_VERSION=3.1.0+ 'CC=arm-angstrom-linux-gnueabi-gcc -mno-thumb-
interwork -marm -mno-thumb-interwork -mno-thumb' 'LD=arm-angstrom-
linux-gnueabi-ld ' 'AR=arm-angstrom-linux-gnueabi-ar '
| make: *** No targets specified and no makefile found. Stop.
| + die 'oe_runmake
NOTE: package rt5370-0.0-r0: task do_compile: Failed
ERROR: Task 8 (/home/jerrill/projects/angstrom/setup-scripts/sources/
openembedded-core/meta/recipes-jerrill/rt5370/
rt5370_0.0.bb,
do_compile) failed with exit code '1'
ERROR: '/home/jerrill/projects/angstrom/setup-scripts/sources/
openembedded-core/meta/recipes-jerrill/rt5370/
rt5370_0.0.bb' failed
jerrill@JerrillUbuntuLT:~/projects/angstrom/setup-scripts$
It appears that it isn't copying the source from the source folder to
the build folder. But I'm still trying to figure out the problem. I'm
sure it has to do with the SRC_URI value, but even when I specify the
Makefile, it doesn't seem to get copied.
Thanks for any input anyone can offer!
Jerrill
> > > > > > TX packets:0 errors:0 dropped:0...
>
> read more »