-   Programming (
-   -   Beagleboard Kernel Module Cross Compiling (

dreamer2000 01-29-2012 01:12 PM

Beagleboard Kernel Module Cross Compiling

I am trying to cross-compile a kernel module for a few days now.
This module is just a hello world module to get started.

The module should be cross-compiled for Beagleboard XM Rev C with an ARM processor.

I installed the Angstrom toolchain by doing this:

git clone git://

After that i build the kernel and an image:

MACHINE=beagleboard ./ config beagleboard
MACHINE=beagleboard ./ update
MACHINE=beagleboard ./ bitbake virtual/kernel
MACHINE=beagleboard ./ bitbake systemd-gnome-image

Then i use just a small Makefile for the Kernel Module:

obj-m := mod1.o

And this build script:

export SYSROOTS=${HOME}/source/toolchain/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots
export PATH=${PATH}:${SYSROOTS}/x86_64-linux/usr/bin/armv7a-angstrom-linux-gnueabi
export ARCH=arm
export CROSS_COMPILE=arm-angstrom-linux-gnueabi-
export KERNELDIR=${SYSROOTS}/beagleboard/kernel
make -C ${KERNELDIR} M=$(pwd) modules

The Problem now:

tom@***:~/source/modtest$ ./
make: Entering directory `/home/tom/source/toolchain/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/beagleboard/kernel'
CC [M] /home/tom/source/modtest/mod1.o
/bin/sh: scripts/basic/fixdep: not found
make[1]: *** [/home/tom/source/modtest/mod1.o] Error 127
make: *** [_module_/home/tom/source/modtest] Error 2
make: Leaving directory `/home/tom/source/toolchain/setup-scripts/build/tmp-angstrom_2010_x-eglibc/sysroots/beagleboard/kernel'

I think fixdep is used to find out the dependencies for something, what do i have to do, to get fixdep.c compiled (source and Makefile are present in this folder). And which platform do i have to compile it to: ARM or x86 ? I think x86... but how can i do that?

--> I am using a Ubuntu Server Edition to do all the cross compiling.

Any suggestions are welcome!
Thanks, Tom

All times are GMT -5. The time now is 03:04 AM.