You must create an empty directory such as/lib/modules/2.6.30.4. Otherwise, you Cannot uninstall the Ko module. # Rmmod nls_cp936 Rmmod: chdir (/lib/modules): no such file or directory However, you can uninstall nls_cp936, but there will always be a prompt: Rmmod: module 'nls _ cp936 'not found
initial findings , Originally, this was compiled kernel make modules_install A generated directory , however, it was tested that rmmod: module 'nls _ cp936 'not found comes from busybox, not from kernel. |
|
|
|
|
|
|
|
|
|
1. Create an empty/lib/modules/2.6.30 directory.
2. Use the following source code to generate the rmmod command. You can unmount the Ko module without any prompts. [Luther. gliethttp]
# Include <stdio. h>
# Include <stdlib. h>
# Include <unistd. h>
# Include <fcntl. h>
# Include <string. h>
# Include <errno. h>
Int main (INT argc, char * argv [])
{
Const char * modname = argv [1];
Int ret =-1;
Int maxtry = 10;
While (maxtry --> 0 ){
Ret = delete_module (modname, o_nonblock | o_excl); // The system calls sys_delete_module.
If (Ret <0 & errno = eagain)
Usleep (500000 );
Else
Break;
}
If (Ret! = 0)
Printf ("unable to unload driver module \" % s \ ": % s \ n ",
Modname, strerror (errno ));
}
3. Copy the generated command to the file system
# Arm-Linux-gcc-static-O rmmod. c
# Arm-Linux-strip-s rmmod
# Cp rmmod/nfs/
CP/nfs/rmmod/sbin
This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/qiaoliang328/archive/2010/01/15/5191821.aspx