免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 6279 | 回复: 1
打印 上一主题 下一主题

怎么编译.ko文件 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-06-01 19:40 |只看该作者 |倒序浏览
本帖最后由 aaaaa5aa 于 2011-06-01 20:05 编辑

很久没编译驱动了,今天编译一个驱动,结果就出问题了

出错:
aaaaa5aa@aaaaa5aa-desktop:~/codes/infodroid-2.2/test$ make
make -C /home/aaaaa5aa/codes/infodroid-2.2/kernel M=/home/aaaaa5aa/codes/infodroid-2.2/test modules
make[1]: Entering directory `/home/aaaaa5aa/codes/infodroid-2.2/kernel'
  CC [M]  /home/aaaaa5aa/codes/infodroid-2.2/test/wifi_rtl8188.o
/home/aaaaa5aa/codes/infodroid-2.2/test/wifi_rtl8188.c:17:20: error: stdlib.h: No such file or directory
/home/aaaaa5aa/codes/infodroid-2.2/test/wifi_rtl8188.c:18:19: error: fcntl.h: No such file or directory
/home/aaaaa5aa/codes/infodroid-2.2/test/wifi_rtl8188.c:19:19: error: errno.h: No such file or directory
/home/aaaaa5aa/codes/infodroid-2.2/test/wifi_rtl8188.c:20:20: error: string.h: No such file or directory
/home/aaaaa5aa/codes/infodroid-2.2/test/wifi_rtl8188.c:22:34: error: hardware_legacy/wifi.h: No such file or directory
/home/aaaaa5aa/codes/infodroid-2.2/test/wifi_rtl8188.c:23:36: error: libwpa_client/wpa_ctrl.h: No such file or directory
/home/aaaaa5aa/codes/infodroid-2.2/test/wifi_rtl8188.c:26:24: error: cut   ils/log.h: No such file   
……
/home/aaaaa5aa/codes/infodroid-2.2/test/wifi_rtl8188.c: In function 'rmmod':
/home/aaaaa5aa/codes/infodroid-2.2/test/wifi_rtl8188.c:113: error: 'O_NONBLOCK' undeclared (first use in this function)
/home/aaaaa5aa/codes/infodroid-2.2/test/wifi_rtl8188.c:113: error: (Each undeclared identifier is reported only once
/home/aaaaa5aa/codes/infodroid-2.2/test/wifi_rtl8188.c:113: error: for each function it appears in.)
/home/aaaaa5aa/codes/infodroid-2.2/test/wifi_rtl8188.c:113: error: 'O_EXCL' undeclared (first use in this function)
/home/aaaaa5aa/codes/infodroid-2.2/test/wifi_rtl8188.c:114: error: 'errno' undeclared (first use in this function)
/home/aaaaa5aa/codes/infodroid-2.2/test/wifi_rtl8188.c:114: error: 'EAGAIN' undeclared (first use in this function)
/home/aaaaa5aa/codes/infodroid-2.2/test/wifi_rtl8188.c:115: error: implicit declaration of function 'usleep'
/home/aaaaa5aa/codes/infodroid-2.2/test/wifi_rtl8188.c:121: error: implicit declaration of function 'LOGE'
/home/aaaaa5aa/codes/infodroid-2.2/test/wi  ……

我的Makefile:

  1.             #  
  2.             # Makefile for the wifi_rtl8188 drivers.     
  3.             #      
  4.             # Makefile2.6      
  5.                PWD = $(shell pwd)   
  6.                KERNEL_SRC = /home/aaaaa5aa/codes/infodroid-2.2/kernel   
  7.                CROSS_COMPILE=arm-eabi-     
  8.                obj-m := wifi_rtl8188.o     
  9.                ecc_module-objs := wifi_rtl8188.o   
  10.               all:     
  11.                     $(MAKE) -C $(KERNEL_SRC) M=$(PWD) modules     
  12.                
  13.               clean:   
  14.                     rm -rf *.o *.ko
复制代码

论坛徽章:
0
2 [报告]
发表于 2011-06-03 08:37 |只看该作者
没人知道么
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP