Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6659691
  • 博文数量: 1159
  • 博客积分: 12444
  • 博客等级: 上将
  • 技术积分: 12570
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-13 21:34
文章分类

全部博文(1159)

文章存档

2016年(126)

2015年(350)

2014年(56)

2013年(91)

2012年(182)

2011年(193)

2010年(138)

2009年(23)

分类: Android平台

2015-12-26 20:55:43



Why won't modprobe or insmod work when I have the .ko file available?

I downloaded a kernel module source for the batman advanced MANET and then called make in the directory of the source and let it do its thing.

Once make was finished the file batman-adv.ko was available in the folder located in /home/batman-adv-2013.2.0. When I call modprobe batman-adv in the directory I get the error:

FATAL: Module batman_adv not found.

and when I call insmod batman-adv.ko:

 insmod: error inserting '/home/batman-adv-2013.2.0/batman-adv.ko': -1 Unknown symbol in module

The operating system I am using is Debian GNU/Linux 6.0.7 (squeeze)

Have I missed anything that I should have done differently or perhaps the module files need to be placed somewhere else?

2 Answers:

"Unknown symbol" usually implies that the module has a dependency on another module. You can verify which symbol by using dmesg, which will tell you what unknown symbol(s) have been encountered. usually the prefix of a symbol (e.g. fat_***xx) implies which kernel module is required. modprobe will work only for modules which are listed in the modules.dep file.

to add to Technologeeks answer:

modprobe will only search for modules in the standard path /lib/modules/$(uname -r). since your .ko file is not in that directory, modprobe doesn't find it.

the proper way to use your module would be to:

make install
depmod -a
modprobe batman-adv

    the first line should install the module to a proper location, where all the other tools work with.

    the 2nd line tries to find out all the dependencies needed to use your modules, and puts that info into some persistent place (lib/modules/$(uname -r)/modules.dep)

    the 3rd line uses the dependency information and loads all dependencies and your module.


阅读(1577) | 评论(0) | 转发(0) |
0

上一篇:缅怀—纪念—1893.12.26

下一篇:抑郁

给主人留下些什么吧!~~