Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 01-29-2012, 01:12 PM   #1
LQ Newbie
Registered: Sep 2010
Posts: 2

Rep: Reputation: 0
Talking 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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Issue while cross compiling kernel on fedara 14 host sameersbn Programming 2 03-23-2011 08:20 AM
Help Cross compiling a kernel for an HP Jornada 728 Semash! Linux - General 0 10-09-2009 02:49 AM
cross-compiling modules for a preemptive kernel(2.6.23) Trixy_Tree Linux - Embedded & Single-board computer 1 04-07-2009 10:47 AM
Compiling a module separately without compiling entire kernel kushalkoolwal Linux - Kernel 8 08-06-2008 01:45 AM
Compiling Linux kernel using Cross Compiler shilu72000 Linux - Newbie 4 05-26-2008 12:45 PM

All times are GMT -5. The time now is 03:05 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration