I'm trying to cross compile a helloworld kernel module with specifications:
- host: intel x86 32 bit, linux-3.0.0
- target: ARM machine (Parrot AR.Drone), linux-2.6.27.47
I'm using the makefile:
PWD := $(shell pwd)
obj-m := test.o
all:
$(MAKE) -C /path/to/kernel M=$(PWD) CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm modules
Where arm-none-linux-gnueabi-
is the prefix of the arm toolchain.
As kernel, I tried using a clone from git://github.com/CyanogenMod/cm-kernel.git
as kernel. This is a 2.6 kernel fork. Using this kernel, compilation was successfull. When trying to insert the module, it gives the error:
invalid module format
Which, sadly, says very little.
dmesg
can be used to show the log. – Eugene