在写Linux驱动是,sudo insmod ***.ko时出现错误:insmod: error inserting 'memdev.ko': -1 File exists 原因可能是你以前同名的驱动没有卸载干净。 解决方法: 使用lsmod | grep *** 查看是否已经存在该模块, 如果存在***,则 sudo rmmod ***,卸载干净。 然后重新insmod即可。
情况3..在插入模块的时候出现如下问题: # insmod globalmem.ko insmod: error inserting 'globalmem.ko': -1 Device or resource busy ANSWER:主设备号被占用了,换另一个。 你把globalmem.c文件里面的宏定义那里改为226或其他,然后再编译就可以插入了! 特别注意: 如果换了主设备号以后,下面接着创建节点的时候...
因此,对于2.6.26以后的内核,如果某个模块使用了另一个模块里面的函数,则Module.symvers里面要有该函数的信息,否则在insmod的时候会出现类似以下的错误 Error inserting depends (/lib/modules/2.6.31-16-generic/kernel/net/depends/depends.ko): Unknown symbol in module, or unknown parameter (...
在使用命令ismod helloworld.ko 加载编译成功的模块helloworld.ko时出现错误insmod: error inserting 'helloworld.ko': -1 Invalid module format 一般出错信息被记录在文件/var/log/messages中 [root@hailiang linux-2.6.15.5]# cat /var/log/messages |tail Sep 14 09:20:19 localhost kernel: hello: disagrees ...
因为你载入的是已经载入内核的模块,这时就会出现这样的错误提示信息。
在使用命令ismod helloworld.ko 加载编译成功的模块helloworld.ko时出现错误 insmod: error inserting 'helloworld.ko': -1 Invalid module format 一般出错信息被记录在文件/var/log/messages中 [root@hailiang linux-2.6.15.5]# cat /var/log/messages |tail ...
今天写了个块设备驱动例子,在虚拟机上加载模块insmod simp_blkdev.ko的时候,出现以下错误。 insmod: error inserting 'simple-blk.ko': -1 Invalid module format 其实错误很简单,Makefile的编写失误,因为之前是想让这个驱动模块在TQ2440上运行的,所以,Makefile的编写使用了以下形式: ...
[axlrose@ibmgentoo hello] $ sudo insmod hello.ko insmod: error inserting 'hello.ko': -1 File exists 现在一眼就能看出怎么回事了, -1 文件已存在,也就是说hello模块已经加载了,再次加载便得到上面的错误信息 http://oreilly.com/catalog/9780596005900/errata/9780596005900.unconfirmed ...
insmod: error inserting 'simp-blkdev.ko': -1 Invalid module format 2015-06-29 10:29 − (一) 今天写了个块设备驱动例子,在虚拟机上加载模块insmod simp_blkdev.ko的时候,出现以下错误。 insmod: error inserting 'simple-blk.ko': -1 Invalid module format 其实错误很简单,Makefile的编... 瘋耔...
For loading the kernel module dsplinkk.ko, I gave the command : insmod dsplinkk.ko But the result was: insmod: error inserting 'dsplinkk.ko': -1 Invalid module format How to solve this problem and run the DSP link examples? My host is Fedora 12 (kernel 2.6.31.5-127.fc12...