小弟的环境是unbuntu11.10,下载了Android4.0.1源码和goldfish内核源码。都编译通过了。
现在想编译能在Android下能加载的ko内核模块文件。参照了大牛quaful
的文章:http://blog.csdn.net/quaful/article/details/6053708但是编译时报错:
root@hurricane-virtual-machine:/home/hurricane/test/arm# make
make -C /home/hurricane/WORKING_DIRECTORY/goldfish ARCH=arm CROSS_COMPILE=/home/hurricane/WORKING_DIRECTORY/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi- M=/home/hurricane/test/arm modules
make[1]: Entering directory `/home/hurricane/WORKING_DIRECTORY/goldfish'
CC [M] /home/hurricane/test/arm/hello.o
Building modules, stage 2.
MODPOST 1 modules
WARNING: "printk" [/home/hurricane/test/arm/hello.ko] undefined!
CC /home/hurricane/test/arm/hello.mod.o
/home/hurricane/test/arm/hello.mod.c:8: error: variable '__this_module' has initializer but incomplete type
/home/hurricane/test/arm/hello.mod.c:9: error: unknown field 'name' specified in initializer
/home/hurricane/test/arm/hello.mod.c:9: warning: excess elements in struct initializer
/home/hurricane/test/arm/hello.mod.c:9: warning: (near initialization for '__this_module')
/home/hurricane/test/arm/hello.mod.c:10: error: unknown field 'init' specified in initializer
/home/hurricane/test/arm/hello.mod.c:10: warning: excess elements in struct initializer
/home/hurricane/test/arm/hello.mod.c:10: warning: (near initialization for '__this_module')
/home/hurricane/test/arm/hello.mod.c:14: error: unknown field 'arch' specified in initializer
/home/hurricane/test/arm/hello.mod.c:14: error: 'MODULE_ARCH_INIT' undeclared here (not in a function)
/home/hurricane/test/arm/hello.mod.c:14: warning: excess elements in struct initializer
/home/hurricane/test/arm/hello.mod.c:14: warning: (near initialization for '__this_module')
make[2]: *** [/home/hurricane/test/arm/hello.mod.o] Error 1
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/home/hurricane/WORKING_DIRECTORY/goldfish'
make: *** [modules] Error 2
这些错误信息中的error是什么意思啊?
现在想编译能在Android下能加载的ko内核模块文件。参照了大牛quaful
的文章:http://blog.csdn.net/quaful/article/details/6053708但是编译时报错:
root@hurricane-virtual-machine:/home/hurricane/test/arm# make
make -C /home/hurricane/WORKING_DIRECTORY/goldfish ARCH=arm CROSS_COMPILE=/home/hurricane/WORKING_DIRECTORY/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi- M=/home/hurricane/test/arm modules
make[1]: Entering directory `/home/hurricane/WORKING_DIRECTORY/goldfish'
CC [M] /home/hurricane/test/arm/hello.o
Building modules, stage 2.
MODPOST 1 modules
WARNING: "printk" [/home/hurricane/test/arm/hello.ko] undefined!
CC /home/hurricane/test/arm/hello.mod.o
/home/hurricane/test/arm/hello.mod.c:8: error: variable '__this_module' has initializer but incomplete type
/home/hurricane/test/arm/hello.mod.c:9: error: unknown field 'name' specified in initializer
/home/hurricane/test/arm/hello.mod.c:9: warning: excess elements in struct initializer
/home/hurricane/test/arm/hello.mod.c:9: warning: (near initialization for '__this_module')
/home/hurricane/test/arm/hello.mod.c:10: error: unknown field 'init' specified in initializer
/home/hurricane/test/arm/hello.mod.c:10: warning: excess elements in struct initializer
/home/hurricane/test/arm/hello.mod.c:10: warning: (near initialization for '__this_module')
/home/hurricane/test/arm/hello.mod.c:14: error: unknown field 'arch' specified in initializer
/home/hurricane/test/arm/hello.mod.c:14: error: 'MODULE_ARCH_INIT' undeclared here (not in a function)
/home/hurricane/test/arm/hello.mod.c:14: warning: excess elements in struct initializer
/home/hurricane/test/arm/hello.mod.c:14: warning: (near initialization for '__this_module')
make[2]: *** [/home/hurricane/test/arm/hello.mod.o] Error 1
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/home/hurricane/WORKING_DIRECTORY/goldfish'
make: *** [modules] Error 2
这些错误信息中的error是什么意思啊?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货