怎么编译.ko文件
本帖最后由 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:
- #
- # Makefile for the wifi_rtl8188 drivers.
- #
- # Makefile2.6
- PWD = $(shell pwd)
- KERNEL_SRC = /home/aaaaa5aa/codes/infodroid-2.2/kernel
- CROSS_COMPILE=arm-eabi-
- obj-m := wifi_rtl8188.o
- ecc_module-objs := wifi_rtl8188.o
- all:
- $(MAKE) -C $(KERNEL_SRC) M=$(PWD) modules
- clean:
- rm -rf *.o *.ko
复制代码
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
没人知道么