亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

Chinaunix

標(biāo)題: ARM內(nèi)核模塊編譯 [打印本頁(yè)]

作者: xy598646744    時(shí)間: 2011-12-09 22:01
標(biāo)題: ARM內(nèi)核模塊編譯
下面是我用的原碼!  

  1 #include <linux/module.h>
  2
  3 int int_module(void){
  4         printk(" <1> hello world!\n");
  5         return 0;
  6 }
  7
  8 void cleanup_module(void){
  9         printk(" <1> goodbye!\n");
10 }

我用來(lái)編譯的命令arm-linux-gcc -o hello.o _D__KERNEL__ -DMODULE -I /home/linux-2.6.38/include -c hello.c

錯(cuò)誤為
arm-linux-gcc: _D__KERNEL__: No such file or directory
In file included from /home/linux-2.6.38/include/linux/list.h:4:0,
                 from /home/linux-2.6.38/include/linux/module.h:9,
                 from hello.c:1:
/home/linux-2.6.38/include/linux/types.h:13:2: warning: #warning "Attempt to use kernel headers from user space, see http://kernelnewbies.org/KernelHeaders"
In file included from /home/linux-2.6.38/include/linux/list.h:7:0,
                 from /home/linux-2.6.38/include/linux/module.h:9,
                 from hello.c:1:
/home/linux-2.6.38/include/linux/prefetch.h:14:27: fatal error: asm/processor.h: No such file or directory
compilation terminated.

我是新手,請(qǐng)高人指點(diǎn)啊,
作者: goldenfort    時(shí)間: 2011-12-11 23:40
_D__KERNEL__

好象應(yīng)該是 -D__KERNEL__
作者: cliffordl    時(shí)間: 2013-03-20 11:29
需要一本,內(nèi)核裁剪的書。求推薦。
作者: rabbit2013    時(shí)間: 2013-03-30 23:46
本帖最后由 rabbit2013 于 2013-03-30 23:59 編輯

......nnbnb




歡迎光臨 Chinaunix (http://www.72891.cn/) Powered by Discuz! X3.2