rmmod doesn't work properly
Hello,
I am using mini2440 arm board with linux 2.29.4 kernel ported. I can successfully insert the kernel module (main.ko). But when trying rmmod it does not be removed. ########### [root@FriendlyARM /]# rmmod main.ko rmmod: chdir(2.6.29.4-FriendlyARM): No such file or directory [root@FriendlyARM /]# modprobe -r main.ko modprobe: chdir(2.6.29.4-FriendlyARM): No such file or directory ########## Please help me to solve the problem. Thanking You, Anoob T Murali. |
What does dmesg say,
After you insmod the module ? After you rmmod the module ? |
Hello,
When I 'insmod' the module, the message in printk(" message"); was displayed (in dmesg also). After 'rmmod' there is no other messages in 'dmesg'. What may the problem is? |
Did you check whether the module loaded?
What is the output for lsmod? |
Quote:
First check the output of lsmod to see if its there or not, if its not there then its obvious that it will give that error. use this command to serach main.ko: #lsmod |grep main.ko |
The kernel looks for its modules in /lib/modules/`uname -r`/. Likely your kernel and your modules aren't in sync with what arch/release they think they are, likely because they were installed from some (differing) packages. That is, either the kernel or the modules is having an identity crisis. You can avoid the problem totally by building/installing the kernel and its modules from the same source. Remember to run depmod afterwards. Also, modules should be inserted with 'modprobe whatever' and removed with 'modprobe -r whatever'. List all available modules the kernel knows of with 'modprobe -l '.
|
Quote:
|
Quakeboy02,
Oh you are so correct, this small error slipped out of my mind :doh: |
Thank You all.
I got it. One of my problems was using rmmod main.ko, I have used it without .ko. Second I created a folder "2.6.29.4-FriendlyARM" under /lib/module. And Thank You for all. |
atmurali,
Nice, you got it solved :) |
also refer to :www.developmentboard.net
embedded board |
All times are GMT -5. The time now is 06:04 PM. |