Кросс-компиляция модуля ядра для архитектуры ARM
я пытаюсь сделать .ko файл для ARM с машины Linux x86. Я попробовал следующий Makefile:
1 obj-m +=helloworldtest_module.o
2 modules_install:
3 make ARCH=$(ARCH) CC=$(CROSS_COMPILER) -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
4 clean:
5 make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
... но я получил ошибку при предоставленииmake -f Makefile ARCH=arm CROSS_COMPILER=arm-linux-gnueabi-gcc
в командной строке следующим образом:
make ARCH=arm CC=arm-linux-gnueabi-gcc -C /lib/modules/3.2.0-29-generic/build M=/home/terenesas/sample modules
make[1]: Entering directory `/usr/src/linux-headers-3.2.0-29-generic'
CC [M] /home/terenesas/sample/helloworldtest_module.o
In file included from /usr/src/linux-headers-3.2.0-29-generic/arch/arm/include/asm/types.h:4:0,
from include/linux/types.h:4,
from include/linux/list.h:4,
from include/linux/module.h:9,
from /home/terenesas/sample/helloworldtest_module.c:2:
include/asm-generic/int-ll64.h:11:29: fatal error: asm/bitsperlong.h: No such file or directory
compilation terminated.
make[2]: *** [/home/terenesas/sample/helloworldtest_module.o] Error 1
make[1]: *** [_module_/home/terenesas/sample] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-29-generic'
make: *** [modules_install] Error 2
Что я сделал не так?