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) |