Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Can anyone please tell, When we use modprobe, which path it looks in to find the .ko modules. Because i am using like this
modprobe ./a.ko
it is giving me following error:
FATAL: Module ./a.ko not found
The documentation says that it looks into /lib/modules, i have copied the necessary .ko file into the above mentioned directory but still i am getting the error
Module: ./a.ko not found
Can anybody tell which path the modprobe looks into or what should i do to run modprobe?
I tried depmod -a
before running modprobe but still getting same problem. Do i need some special configuration in kernel config file?
The problem with insmod is as follows:
I have two modules a.ko and b.ko. b.ko is using the APIs of a.ko. I have exported the APIs from a.ko that i want to use in b.ko, But when i am doing insmod ./a.ko,
it is inserting it successfully but when i run
insmod ./b.ko
i am getting the following error:
insmod: error inserting 'b.ko': -1 unknown symbol in module and when i am using dmesg
i am getting the following info
b: Unknown symbol register_driver
SO here i am stuck. Any help will be appreciated. so thats why i tried using modprobe. What should i do to run it successfully?
Well, I don't think the misc directory is important, as depmod will find all the modules under /lib/modules/`uname -r` and build the necessary dependencies.
So I guess that the b.ko does not have any reference to symbols from the a.ko. You can see if that's the case grepping a.ko or b.ko in modules.dep:
Code:
grep b.ko /lib/modules/`uname -r`/modules.dep
If the dependencies exist you can unload a.ko and try to load b.ko directly to see if it loads also a.ko.
First very-2 thanks for supporting me. Yeah I have put the a.ko and b.ko files in /lib/modules/'uname-r' and then run the depmod -a and i am able to see dependencies in modules.dep But when i tried
modprobe ./b.ko
it is giving me error
FATAL: Module ./b.ko not found
what should i change that this modprobe will work.
f8def9a0 r __ksymtab_register_driver [a.ko]
f8def9e7 r __kstrtab_register_driver [a.ko]
f8def9bc r __kcrctab_register_driver [a.ko]
de21cf89 a __crc_register_driver [a.ko]
f8def130 T register_driver [a.ko]
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.