加载驱动模块时Device or resource busy的解决方法
2012-09-17 11:17
543 查看
加载驱动模块时Device or resource busy的解决方法
加载驱动模块时Device or resource busy的解决方法
insmod或modprobe驱动模块时Device or resource busy的解决方法
在编译好memdev驱动模块后,通过insmod加载模块时发现以下错误提示:
#insmod memdev.ko
insmod: error inserting 'memdev.ko': -1 Device or resource busy
这种情况一般都是驱动的设备号已经被系统使用了。
我回头查看memdev模块的主设备号,我定义的是254,然后查看系统设备列表。
#cat /proc/devices
Character devices:
1 mem
2 pty
3 ttyp
4 /dev/vc/0
4 tty
4 ttyS
5 /dev/tty
5 /dev/console
5 /dev/ptmx
6 lp
7 vcs
10 misc
13 input
21 sg
29 fb
128 ptm
136 pts
180 usb
189 usb_device
254 vmci
Block devices:
1 ramdisk
2 fd
7 loop
8 sd
9 md
22 ide1
65 sd
66 sd
67 sd
68 sd
69 sd
70 sd
71 sd
128 sd
129 sd
130 sd
131 sd
132 sd
133 sd
134 sd
135 sd
253 device-mapper
254 mdp
此时发现字符设别驱动的254已经被使用了。
解决方法:更换一个上表未使用的的主设备号,或者直接让系统自动分配。
-----------------------------------------------------------------------------------------
另外值得注意的是,编译内核模块的时候,必须有一个已经配置好并编译过的内核源代码树。否则会出现以下错误:
Building modules, stage 2.
/xxx/linux-2.6.29/scripts/Makefile.modpost:43: include/config/auto.conf: No such file or directory
make[2]: *** No rule to make target 'include/config/auto.conf'.
make[1]: *** [modules] Error 2
make[1]: Leaving directory '/xxx/linux-2.6.29'
make: *** [all] Error 2
解决方法:先配置编译内核源代码树,然后再编译内核模块或者驱动模块。
加载驱动模块时Device or resource busy的解决方法
insmod或modprobe驱动模块时Device or resource busy的解决方法
在编译好memdev驱动模块后,通过insmod加载模块时发现以下错误提示:
#insmod memdev.ko
insmod: error inserting 'memdev.ko': -1 Device or resource busy
这种情况一般都是驱动的设备号已经被系统使用了。
我回头查看memdev模块的主设备号,我定义的是254,然后查看系统设备列表。
#cat /proc/devices
Character devices:
1 mem
2 pty
3 ttyp
4 /dev/vc/0
4 tty
4 ttyS
5 /dev/tty
5 /dev/console
5 /dev/ptmx
6 lp
7 vcs
10 misc
13 input
21 sg
29 fb
128 ptm
136 pts
180 usb
189 usb_device
254 vmci
Block devices:
1 ramdisk
2 fd
7 loop
8 sd
9 md
22 ide1
65 sd
66 sd
67 sd
68 sd
69 sd
70 sd
71 sd
128 sd
129 sd
130 sd
131 sd
132 sd
133 sd
134 sd
135 sd
253 device-mapper
254 mdp
此时发现字符设别驱动的254已经被使用了。
解决方法:更换一个上表未使用的的主设备号,或者直接让系统自动分配。
-----------------------------------------------------------------------------------------
另外值得注意的是,编译内核模块的时候,必须有一个已经配置好并编译过的内核源代码树。否则会出现以下错误:
Building modules, stage 2.
/xxx/linux-2.6.29/scripts/Makefile.modpost:43: include/config/auto.conf: No such file or directory
make[2]: *** No rule to make target 'include/config/auto.conf'.
make[1]: *** [modules] Error 2
make[1]: Leaving directory '/xxx/linux-2.6.29'
make: *** [all] Error 2
解决方法:先配置编译内核源代码树,然后再编译内核模块或者驱动模块。
相关文章推荐
- 加载驱动模块时Device or resource busy的解决方法
- 【解决问题】加载驱动模块时Device or resource busy的解决方法
- 加载驱动模块时Device or resource busy的解决方法
- LINUX驱动学习:加载模块时出现Device or resource busy的解决方法
- LINUX驱动学习:加载模块时出现Device or resource busy的解决方法
- LINUX驱动学习:加载模块时出现Device or resource busy的解决方法
- Docker 出现 “device or resource busy” 异常,用一下方法解决
- rm: cannot remove `dir': Device or resource busy解决办法
- ubuntu 12.04出现insmod: error inserting 'hello.ko': -1 Device or resource busy的解决办法
- read()、write()返回 Input/output error, Device or resource busy解决
- ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired解决方法
- rmmod: remove 'led': Device or resource busy解决办法
- 驱动加载错误:insmod: error inserting 'hello.ko': -1 Device or resource busy
- npm resource busy or locked解决方法
- npm resource busy or locked解决方法
- docker中执行sed: can't move '/etc/resolv.conf73UqmG' to '/etc/resolv.conf': Device or resource busy错误的处理原因及方式
- 模块插入错误 insmod: can't insert 'memdev.ko': Device or resource busy
- Android 删除再创建导致open failed: EBUSY (Device or resource busy)
- 重启docker服务器后 遇到 'device or resource busy'错误
- open failed: EBUSY (Device or resource busy)