现在我用make modules编译驱动,出现以下问题:
make[1]: *** No rule to make target `|', needed by `firmware/dabusb/firmware.fw'. Stop.
make: *** [modules] Error 2
从网上搜了一下,用make M=drivers/char modules编译模块,成功生成.ko文件。
用nfs文件系统启动2440开发板时加载ztm_hello模块时出现如下问题:
结果:/mnt # rmmod ztm_hello.ko
Eixt!
Byebye ztm!
正确!!!
insmod ztm_hello.ko
insmod: QM_MODULES: Function not implemented
/mnt # rmmod ztm_hello
rmmod: cannot unload 'ztm_hello': Device or resource busy
解决以上问题:加了头文件
#include<linux/kernel.h>
#include<linux/moduleparam.h>
#include<linux/version.h>