Error: could not insert module dnw_usb.ko: Invalid module format
2013-10-27 23:02
513 查看
在fedora17下安装usb下载驱动dnw_usb.ko时出错了:
???????????????????????????????????????????????????????????????????我是在加载设备驱动程序的时候遇到的问题。
[plain] view plaincopy$ sudo insmod Dev_hello.ko
然后出现了问题: [plain] view plaincopy
[plain] view plaincopyError: could not insert module Dev_hello.ko: Invalid module format
[plain] view plaincopy
通过查 *.ko 文件vermagic和内核版本号:
[lgw@localhost shareArm]$ sudo modinfo Dev_hello.ko [sudo] password for lgw: filename: /home/lgw/shareArm/Dev_hello.ko depends: vermagic: 3.5.0-2.fc17.i686 SMP mod_unload 686
lgw@localhost shareArm]$ uname -r 3.5.0-2.fc17.i686.PAE
然后在网上还查到执行命令cat /var/log/message | tail 命令去查看日志文件错误信息
相关部分:[plain] view plaincopyAug 10 14:24:29 localhost kernel: [14410.773882] Dev_hello: version magic '3.5.0-2.fc17.i686 SMP mod_unload 686 ' should be '3.5.0-2.fc17.i686.PAE SMP mod_unload 686 '
=========================================内核问题============================== 然后我查看我的内核根目录是/usr/src/kernels/里面只有3.5.0-2.fc17.i686 文件夹,而我的内核版本是PAE版的,却没有这个选项。
而在之前Makefile中用到的 /lib/modules下却有三个文件夹:3.3.4-5.fc17.i686 3.5.0-2.fc17.i686 3.5.0-2.fc17.i686.PAE
Makefile中相关的几句是:
[plain] view plaincopyKERNEL_DIR := /lib/modules/$(shell uname -r)/build PWD := $(shell pwd) all: make -C $(KERNEL_DIR) M=$(PWD) modules
结果是这样一条命令:make -C /lib/modules/3.5.0-2.fc17.i686.PAE/build M=/home/lgw/shareArm modules这个build的软链接是链接到 /usr/src/kernels/3.5.0-2.fc17.i686.PAE,但是这个链接是不存在的,于是我将这个链接改到没有PAE的那个文件夹上去了,结果Makefile可以make成功了,但是,insmod却一直报错。(我好废话啊~~~毕竟辛苦试了一天,各种找方法,各种试,至少最后找到办法了!还是google比较强大,各种英文的论坛看啊)
==========================================================================================================解决办法================================================================================================================
[plain] view plaincopy<span style="font-size:24px;color:#009900;"><strong>sudo yum isntall kernel-PAE-devel</strong></span>
然后/usr/src/kernels/文件夹下就出现了3.5.0-2.fc17.i686.PAE文件夹。
谢谢回复我http://topic.csdn.net/u/20120810/14/a350bd84-ff57-4a44-bb88-1960fe5f21c3.html?seed=1160754062&r=79376733#r_79376733这篇帖子的两位朋友!
下面晒一晒我加载好的驱动!(图中可以看出进入的文件夹路径是带PAE的~)
(加载后,$ dmesg)
(卸载后,$ dmesg)
参考: fedoraforum.org论坛该帖子的5楼
17th April 2010, 10:44 PM | |||
| |||
Re: No kernel source files in /usr/src/kernels/ directoryHrrm, looking at the Fedora link CSchwangler provided, it seems to me that they're making a very simple thing more complex than it is, as well as not even giving the necessary information. If you have the i686 kernel, chances are that it runs the PAE kernel by default. Rather than using the vanilla kernel, you're usually better off, when using Fedora, to use its own kernel packages. Do uname -r If it has the letters PAE in it, then do yum install kernel-PAE-devel Actually, probably better off doing yum update linux-kernel, and if a later kernel is available, reboot into it, then do yum isntall kernel-PAE-devel, to make sure that there are no version mismatches. (I'd also remove the links you've already created to avoid conflicts.) Then you're done, almost no muss, fuss, or bother. |
相关文章推荐
- insmod: ERROR: could not insert module module.ko: Invalid parameters
- 编译模块出错:insmod: ERROR: could not insert module module.ko: Invalid parameters
- 嵌入式linux插入内核模块Error: could not insert module xxx.ko: Device or resource busy处理
- 插入模块出现Error: could not insert module testsecond.ko: Device or resource busy
- linux 加载驱动 insmod: ERROR: could not insert module *: Invalid parameters
- insmod: ERROR: could not insert module xxx.ko: Unkown symbol in module
- Microsoft LiveMeeting: Error – “The specified module could not be found”
- insmod: error inserting 'hello.ko': -1 Invalid module format
- insmod: error inserting 'simp-blkdev.ko': -1 Invalid module format
- POCO:InvalidOperationError:Mapping and metadata information could not be found for Entity Type
- ionic3:错误1: Error: Could not find IonicModule.forRoot call in "imports"
- progisp下载错误-error:could not find USBASP device
- insmod: error inserting 'first_drv.ko': -1 Invalid module format
- 解决insmod: error inserting 'helloworld.ko': -1 Invalid module format
- 加载模块是提示“insmod: error inserting 'helloworld.ko': -1 Invalid module format”
- Could not insert new outlet connection error
- ERROR: modinfo: could not find module rbd FATAL
- Could not execute: invalid directory (Win32 error 267)
- fatal error could not build module ‘UIKit’ 错误
- insmod: error inserting 'simp-blkdev.ko': -1 Invalid module format