What exactly are .ko files? They seem to be related to modules but aren't actually modules since insmod won't load them. The question arose because I'm trying to get a PCTel internal modem to work. I have two files, pctel.ko and ptserial.ko, in my /lib/modules directory (a couple of levels down). I would guess that those files contain the modules I need, but how do I get the modules loaded? I did lsmod | grep pctel and it came up with nothing, so the modules apparently aren't there yet. Paul
Paul Abrahams wrote:
What exactly are .ko files? kernel object. They are the modules for a 2.6 series kernel. They seem to be related to modules but aren't actually modules since insmod won't load them.
The question arose because I'm trying to get a PCTel internal modem to work. I have two files, pctel.ko and ptserial.ko, in my /lib/modules directory (a couple of levels down). Exactly which directory, and exactly which kernel are you running? Just being there doesn't mean it will work, it needs to be in the module
actually, they will load, as long as everything is correct. directory for your running kernel, and depmod should have been run so it knows of any module dependencies.
I would guess that those files contain the modules I need, but how do I get the modules loaded? modprobe is better than insmod. I did
lsmod | grep pctel
and it came up with nothing, so the modules apparently aren't there yet.
You may need some entries in /etc/modprobe.conf.local so it knows what module to use. -- Joe Morris Registered Linux user 231871
On Saturday 26 August 2006 2:46 am, Joe Morris (NTM) wrote:
Paul Abrahams wrote:
The question arose because I'm trying to get a PCTel internal modem to work. I have two files, pctel.ko and ptserial.ko, in my /lib/modules directory (a couple of levels down).
Exactly which directory, and exactly which kernel are you running? Just being there doesn't mean it will work, it needs to be in the module directory for your running kernel, and depmod should have been run so it knows of any module dependencies.
I would guess that those files contain the modules I need, but how do I get the modules loaded?
modprobe is better than insmod.
I did
lsmod | grep pctel
and it came up with nothing, so the modules apparently aren't there yet.
You may need some entries in /etc/modprobe.conf.local so it knows what module to use.
Thanks for the advice. Here's what I tried after reading it: suillus:/lib/modules # ls 2.6.5-7.155.29-default/misc . .. linmodem.ko pctel.ko pctel_hw.ko suillus:/lib/modules # depmod suillus:/lib/modules # uname -a Linux suillus 2.6.13-15.11-default #1 Mon Jul 17 09:43:01 UTC 2006 i686 athlon i386 GNU/Linux suillus:/lib/modules # modprobe linmodem.ko FATAL: Module linmodem.ko not found. suillus:/lib/modules # modprobe linmodem FATAL: Module linmodem not found. suillus:/lib/modules # cp -a 2.6.5-7.155.29-default/misc 2.6.13-15.11-default/ suillus:/lib/modules # ls 2.6.13-15.11-default/misc . .. linmodem.ko pctel.ko pctel_hw.ko suillus:/lib/modules # modprobe linmodem.ko FATAL: Module linmodem.ko not found. suillus:/lib/modules # modprobe pctel.ko FATAL: Module pctel.ko not found. suillus:/lib/modules # modprobe linmodem FATAL: Module linmodem not found. suillus:/lib/modules # modprobe 2.6.13-15.11-default/misc/*.ko FATAL: Module 2.6.13_15.11_default/misc/linmodem.ko not found. suillus:/lib/modules # If there's just a kernel version problem, then I'd expect a different diagnostic than "module not found". Any more advice? Thanks. Paul
Paul Abrahams wrote:
Thanks for the advice. Here's what I tried after reading it:
suillus:/lib/modules # ls 2.6.5-7.155.29-default/misc . .. linmodem.ko pctel.ko pctel_hw.ko suillus:/lib/modules # depmod suillus:/lib/modules # uname -a Linux suillus 2.6.13-15.11-default #1 Mon Jul 17 09:43:01 UTC 2006 i686 athlon i386 GNU/Linux
OK, so the kernel will be looking for modules in /lib/modules/2.6.13-15.11-default tree.
suillus:/lib/modules # modprobe linmodem.ko FATAL: Module linmodem.ko not found. suillus:/lib/modules # modprobe linmodem FATAL: Module linmodem not found.
Not found in the tree it is looking for modules.
suillus:/lib/modules # cp -a 2.6.5-7.155.29-default/misc 2.6.13-15.11-default/ suillus:/lib/modules # ls 2.6.13-15.11-default/misc . .. linmodem.ko pctel.ko pctel_hw.ko
so you copied the modules to the correct tree, in the misc directory.
suillus:/lib/modules # modprobe linmodem.ko FATAL: Module linmodem.ko not found. suillus:/lib/modules # modprobe pctel.ko FATAL: Module pctel.ko not found. suillus:/lib/modules # modprobe linmodem FATAL: Module linmodem not found.
You forgot to rerun depmod -a to remake a module dependency list for all the new modules.
suillus:/lib/modules # modprobe 2.6.13-15.11-default/misc/*.ko FATAL: Module 2.6.13_15.11_default/misc/linmodem.ko not found. suillus:/lib/modules #
If there's just a kernel version problem, then I'd expect a different diagnostic than "module not found".
It still isn't listed in any of the modules.* files since you forgot to run depmod.
Any more advice?
run depmod-a and try modinfo linmodem. If you get a return of some info (and for which kernel it was built for), and want to try, modprobe linmodem. I still suspect it may not work because of the huge difference in kernel versions. -- Joe Morris Registered Linux user 231871
On Saturday 26 August 2006 7:05 pm, Joe Morris (NTM) wrote:
run depmod-a and try modinfo linmodem. If you get a return of some info (and for which kernel it was built for), and want to try, modprobe linmodem. I still suspect it may not work because of the huge difference in kernel versions.
Here it is: suillus:/lib/modules # depmod -a suillus:/lib/modules # modinfo linmodem filename: /lib/modules/2.6.13-15.11-default/misc/linmodem.ko license: GPL description: Generic Linux Software Modem TTY Layer author: Gustavo Sverzut Barbieri <barbieri@gmail.com> depends: vermagic: 2.6.5-7.155.29-default 586 REGPARM gcc-3.3 suillus:/lib/modules # modprobe linmodem FATAL: Error inserting linmodem (/lib/modules/2.6.13-15.11-default/misc/linmodem.ko): Invalid module format So it finds the module if I ask for it simply as "linmodem" but doesn't like its "format". I wonder if the "format" really has to have the right version to be valid. That would seem surprising (but maybe it's true) since I'd expect a complaint about "wrong version", not "wrong format", unless the format was totally off. Paul
On Saturday 26 August 2006 16:37, Paul Abrahams wrote:
suillus:/lib/modules # ls 2.6.5-7.155.29-default/misc . .. linmodem.ko pctel.ko pctel_hw.ko
Looks like you found some drivers for SLES 9. They're not going to work in 10.0 Just copying the drivers to the new kernel dir won't change the fact that they were compiled for a much older kernel, with a different binary interface. You need to find drivers made for the newer kernel specifically
On Saturday 26 August 2006 7:13 pm, Anders Johansson wrote:
On Saturday 26 August 2006 16:37, Paul Abrahams wrote:
suillus:/lib/modules # ls 2.6.5-7.155.29-default/misc . .. linmodem.ko pctel.ko pctel_hw.ko
Looks like you found some drivers for SLES 9. They're not going to work in 10.0
That's probably the cause. I was assuming, erroneously, that 2.6.5 isn't much older than 2.6.13. I'll try to locate the sources and do a recompile from them. I wonder if anyone else has gotten a PCTel modem working under SuSE 10.x (x=0 or x=1) and, if so, whether appropriate .ko files are publicly available somewhere. Thanks for your help -- and thanks to Joe also. Paul
participants (3)
-
Anders Johansson
-
Joe Morris (NTM)
-
Paul Abrahams