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

  免費(fèi)注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 2984 | 回復(fù): 4
打印 上一主題 下一主題

[驅(qū)動(dòng)] arm hello模塊make時(shí)錯(cuò)誤 [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報(bào)告]
發(fā)表于 2015-01-08 22:30 |只看該作者 |倒序?yàn)g覽
arm hello模塊make時(shí)錯(cuò)誤

宿主機(jī)環(huán)境:PC 虛擬機(jī) Linux(2.6.18-53.el5)_redhat gcc(4.3.2)
目標(biāo)機(jī):arm Linux(2.6.29) mini2440 hello.ko模塊在本開發(fā)板掛載

出現(xiàn)以下錯(cuò)誤:
[root@localhost arm_hello_module_makefile]# ls
hello.c  Makefile
[root@localhost arm_hello_module_makefile]# make
make -C /home/sun/linux-2.6.29/ M=/temp/arm_hello_module_makefile modules ARCH=arm CROSS_COMPILE=arm-linux-
make[1]: Entering directory `/home/sun/linux-2.6.29'
  CC [M]  /temp/arm_hello_module_makefile/hello.o
In file included from include/linux/gfp.h:4,
                 from include/linux/kmod.h:22,
                 from include/linux/module.h:13,
                 from /temp/arm_hello_module_makefile/hello.c:1:
include/linux/mmzone.h:18:26: error: linux/bounds.h: No such file or directory
include/linux/mmzone.h:256:5: warning: "MAX_NR_ZONES" is not defined
In file included from include/linux/gfp.h:4,
                 from include/linux/kmod.h:22,
                 from include/linux/module.h:13,
                 from /temp/arm_hello_module_makefile/hello.c:1:
include/linux/mmzone.h:290: error: 'MAX_NR_ZONES' undeclared here (not in a function)
/temp/arm_hello_module_makefile/hello.c:10: warning: function declaration isn't a prototype
/temp/arm_hello_module_makefile/hello.c:16: warning: function declaration isn't a prototype
make[2]: *** [/temp/arm_hello_module_makefile/hello.o] Error 1
make[1]: *** [_module_/temp/arm_hello_module_makefile] Error 2
make[1]: Leaving directory `/home/sun/linux-2.6.29'
make: *** [all] Error 2



Makefile文件內(nèi)容如下:
ifneq ($(KERNELRELEASE),)

obj-m := hello.o

else

KDIR := /home/sun/linux-2.6.29/
all:
        make -C $(KDIR) M=$(PWD) modules ARCH=arm CROSS_COMPILE=arm-linux-
clean:
        rm -f *.ko *.o *.mod.o *.mod.c *.symvers

endif

論壇徽章:
5
摩羯座
日期:2014-07-22 09:03:552015元宵節(jié)徽章
日期:2015-03-06 15:50:392015亞冠之大阪鋼巴
日期:2015-06-12 16:01:352015年中國系統(tǒng)架構(gòu)師大會(huì)
日期:2015-06-29 16:11:2815-16賽季CBA聯(lián)賽之四川
日期:2018-12-17 14:10:21
2 [報(bào)告]
發(fā)表于 2015-01-20 13:38 |只看該作者
看上去有可能是kernel版本沒有對上
報(bào)錯(cuò)是沒有找到對應(yīng)的頭文件

論壇徽章:
0
3 [報(bào)告]
發(fā)表于 2015-01-22 15:31 |只看該作者
編譯環(huán)境:
linux-2.6.29 arm-linux-gcc gcc 4.3.2

加載方法:
1.  hello_module.ko文件正確
hello_module.ko  對應(yīng)的編譯內(nèi)核與ARM開發(fā)板內(nèi)核一致
如果內(nèi)核不一致,不兼容,則會(huì)顯示路徑變換chdir

2.  路徑正確
#cp hello_module.ko /lib/modules/2.6.29.4-FriendlyARM/
如果路徑不正確,則會(huì)找不到模塊

3.  加載查看卸載
#modprobe hello_module 加載模塊
#lsmod  查看使用的模塊
#rmmod hello_module  卸載模塊

論壇徽章:
5
摩羯座
日期:2014-07-22 09:03:552015元宵節(jié)徽章
日期:2015-03-06 15:50:392015亞冠之大阪鋼巴
日期:2015-06-12 16:01:352015年中國系統(tǒng)架構(gòu)師大會(huì)
日期:2015-06-29 16:11:2815-16賽季CBA聯(lián)賽之四川
日期:2018-12-17 14:10:21
4 [報(bào)告]
發(fā)表于 2015-01-23 17:06 |只看該作者
elesun8 發(fā)表于 2015-01-22 15:31
編譯環(huán)境:
linux-2.6.29 arm-linux-gcc gcc 4.3.2


?說什么呢?

論壇徽章:
0
5 [報(bào)告]
發(fā)表于 2015-01-23 17:20 |只看該作者
問題已解決,這是我的總結(jié)。
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報(bào)專區(qū)
中國互聯(lián)網(wǎng)協(xié)會(huì)會(huì)員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP