On Thu, Sep 04, 2008 at 12:36:16AM +0200, Denys Vlasenko wrote:
> Still can't reproduce.
> 
> # /usr/app/module-init-tools-3.4/sbin/insmod --version
> module-init-tools version 3.4
> 
> # /usr/app/module-init-tools-3.4/sbin/insmod camellia
> insmod: can't read 'camellia': No such file or directory

Hello Denys,

thanks for investigating and sorry for being unclear. It's about a
missing /lib/modules/`uname -r` directory, not about a missing module
file. Here's how you can reproduce the problem.

I created a test directory with busybox 1.11.2 and 1.12.0 binaries,
and a kernel module:

# pwd
/mnt/HD_a2/tmp/test

# ls
busybox-1.11.2  busybox-1.12.0  usb-storage.ko

# file *
busybox-1.11.2: ELF 32-bit LSB executable, ARM, version 1, dynamically linked 
(uses shared libs), stripped
busybox-1.12.0: ELF 32-bit LSB executable, ARM, version 1, dynamically linked 
(uses shared libs), stripped
usb-storage.ko: ELF 32-bit LSB relocatable, ARM, version 1


There's no /lib/modules/`uname -r`:

# uname -r
2.6.12.6-arm1

# rm -rf /lib/modules/2.6.12.6-arm1


I can load and unload the module just fine with busybox-1.11.2:

# ./busybox-1.11.2 lsmod
Module                  Size  Used by    Not tainted
usblp                  10976  0 
sd_mod                 14484  3 

# ./busybox-1.11.2 insmod usb-storage.ko 

# ./busybox-1.11.2 lsmod
Module                  Size  Used by    Not tainted
usb_storage            29956  0 
usblp                  10976  0 
sd_mod                 14484  3 

# ./busybox-1.11.2 rmmod usb-storage 

# ./busybox-1.11.2 lsmod
Module                  Size  Used by    Not tainted
usblp                  10976  0 
sd_mod                 14484  3 


But I can't with 1.12.0:

# ./busybox-1.12.0 lsmod
usblp 10976 0 - Live 0xbf005000
sd_mod 14484 3 - Live 0xbf000000

# ./busybox-1.12.0 insmod usb-storage.ko 
insmod: chdir(2.6.12.6-arm1): No such file or directory


Here's strace output:

# strace -o log -tt -s 99 ./busybox-1.12.0 insmod usb-storage.ko

log:
...
09:06:46.654800 getpid()                = 20713
09:06:46.655656 getuid32()              = 0
09:06:46.656633 brk(0)                  = 0xb4000
09:06:46.657360 brk(0xbd000)            = 0xbd000
09:06:46.658569 chdir("/lib/modules")   = 0
09:06:46.659495 uname({sys="Linux", node="ede", ...}) = 0
09:06:46.662604 chdir("2.6.12.6-arm1")  = -1 ENOENT (No such file or directory)
09:06:46.663772 write(2, "insmod: chdir(2.6.12.6-arm1): No such file or 
directory\n", 56) = 56
09:06:46.665381 exit(1)                 = ?


Cheers,
Tobias

_______________________________________________
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to