hello驱动问题

来源:互联网 发布:java 常量类初始化map 编辑:程序博客网 时间:2024/06/01 16:36

 

现在我用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>

 

原创粉丝点击