linux设备驱动模块引用和依赖

来源:互联网 发布:电脑重置网络dos命令 编辑:程序博客网 时间:2024/06/05 14:25
/modules/04 # lsmod test 787 0 - Live 0xbf010000 (PO)func 633 1 test, Live 0xbf00c000 (PO)test -> func ^ 引用计数/modules/04 # rmmod func引用计数>0 不能卸载rmmod: remove 'func': Resource temporarily unavailable modprobe自动解决依赖:/ # modprobe test[  307.800000] test: Unknown symbol print (err 0)[  307.850000] hello kernel<-- insmod func.ko ; insmod test.ko/ # lsmod test 787 0 - Live 0xbf01c000 (PO)func 633 1 test, Live 0xbf018000 (PO)/ # modprobe -r func<-- 引用计数>0 不能卸载modprobe: remove 'func': Resource temporarily unavailable/ # modprobe -r test<-- rmmod test.ko ; rmmod func.ko[  363.130000] cleanup module

0 0
原创粉丝点击