View previous topic :: View next topic |
Author |
Message |
gentooner n00b
Joined: 15 May 2003 Posts: 17
|
Posted: Fri May 23, 2003 2:34 pm Post subject: How do I load kernel modules? |
|
|
I've looked through the documentation, but I cannot seem to figure out how to load these following modules:
input.o, hid.o and mousedev.o modules
which are required to setup my Logitech USB mouse.
I have setup HID support in the kernel, and my kernel does detect my mouse, and passes these messages:
hub.c: new USB device 00:07.2-1, assigned address 3
: USB HID v1.10 Mouse [Lotitech USB Mouse] on usb1:3.0
However, when I try to cat either /dev/input/mice or /dev/usbmouse I get "no such device."
I'm assuming its because I don't have the input.o, hid.o, and mousedev.o modules properly installed, but again I have no idea how to set those up.
I restated my question in a new thread because the subject heading on the old one was mouse-specific, whereas this question involves the mouse but is more a request for knowledge in regard to installing kernel modules in general.
Thank you![/code] |
|
Back to top |
|
|
GuidoJ Guru
Joined: 24 Dec 2002 Posts: 444 Location: Netherlands
|
Posted: Fri May 23, 2003 3:04 pm Post subject: |
|
|
You can list the loaded modules with
You can load (insert) modules with
or even better probe with
You can even unload a module with
|
|
Back to top |
|
|
gentooner n00b
Joined: 15 May 2003 Posts: 17
|
Posted: Fri May 23, 2003 3:25 pm Post subject: |
|
|
lsmod shows no modules loaded. I tried insmod hid.o, etc. and it states "no such file or directory. I tried find / -name "hid.o" to try to find it but it wasn't on my system.
Where can I obtain these module files? |
|
Back to top |
|
|
gentooner n00b
Joined: 15 May 2003 Posts: 17
|
Posted: Fri May 23, 2003 5:58 pm Post subject: |
|
|
lsmod shows no modules loaded. I tried insmod hid.o, etc. and it states "no such file or directory. I tried find / -name "hid.o" to try to find it but it wasn't on my system.
Where can I obtain these module files? |
|
Back to top |
|
|
paranode l33t
Joined: 06 Mar 2003 Posts: 679 Location: Texas
|
Posted: Fri May 23, 2003 6:15 pm Post subject: |
|
|
Are you sure you put them in the kernel config as modules? I find it easier to build that stuff in to the kernel myself. _________________ Meh. |
|
Back to top |
|
|
gentooner n00b
Joined: 15 May 2003 Posts: 17
|
Posted: Fri May 23, 2003 6:28 pm Post subject: |
|
|
I think I'm getting confused here. I've read through the documentation but I can't seem to figure out just how to actually load the modules into the kernel. I managed to find input.o and mousedev.o and entered them into /etc/modules.autoload, but they fail to load when the kernel boots. I've recompiled my kernel numerous times, trying different USB options without success.
The USB mouse documentation states this:
"The first thing that has to be done is the installation of the kernel modules. The modules that will be needed for a USB mouse to work are usbmouse, mousedev, hid, usbcore, usb-uhci, and input. After the necessary kernel configuration is done, insmod the modules."
I have no idea how to do just this. When I do make menuconfig I can choose what I think is usb-uhci, but I don't see the other options. Maybe this is causing some of the problem. I have a laptop with a touchpad installed, which is working fine. however, I can't stand using it and I really want to use the USB wheel mouse.
I'm having problems getting sound to work properly too, and I think its because I'm missing something fundamental. I've been using linux for years, and have had good success with numerous other distros. I can tell that gentoo is taking me to a deeper level than I've ever been in setting up my system, and I appreciate the opportunity to learn, but damn this stuff is confusing!
Anyhow, thanks for your help and further help |
|
Back to top |
|
|
bin-doph Guru
Joined: 23 May 2003 Posts: 302
|
Posted: Fri May 23, 2003 8:42 pm Post subject: |
|
|
if you have modules installed then you'll find them there
/lib/modules/`uname -r`
your modules are only installed if you do something like that:
Code: | cd /usr/src/linux
make dep bzImage modules modules_install |
what will compile your kernel, the modules and copy them to that directory
/etc/modules.autoload should contain the names of the modules without the fileextenstion like
Code: | # For example:
3c59x # for 3c59x.o |
make sure to read man modules.autoload then your modules should be loaded automatically at startup. be sure to check dmesg after boot for errors and other logs or load them manually with insmod/modprobe. _________________ perl -e '$_=q;4a75737420616e6f74686572205065726c204861636b65720as;;for(s;s;s;s;s;s;s;s;s;s;s;s){s;(..)s?;qq qprint chr 0x$1 and \161 ssq;excess;}' |
|
Back to top |
|
|
taskara Advocate
Joined: 10 Apr 2002 Posts: 3763 Location: Australia
|
Posted: Fri May 23, 2003 11:40 pm Post subject: |
|
|
a module is only created when you select an option in your kernel (when running menuconfig)
when you were building your kernel, there was a section that said "USB Support"
if you leave it blank, you can't use usb on your system
if you select y (or put a * there) no module is created, and support for usb is always enabled
if you select m, a module is created when you compile your kernel using the command "make modules modules_install"
then as someone posted it will appear in your /lib/modiles/[kernel version] directory.
then you can insmod manually, or they will be auto loaded at bootup if you have them in your modules.autoload config file.
I see little point in using modules.. not only is it a security vulnerability but things that never change, like your usb controller, and your ide controller should be enabled directly into the kernel. _________________ Kororaa install method - have Gentoo up and running quickly and easily, fully automated with an installer! |
|
Back to top |
|
|
dma Guru
Joined: 31 Jan 2003 Posts: 437 Location: Charlotte, NC, USA
|
Posted: Sat May 24, 2003 12:39 am Post subject: |
|
|
DON'T FORGET MODINFO!
Code: | root@laureate:~# modinfo input
filename: /lib/modules/2.4.20-gentoo-r1/kernel/drivers/input/input.o
description: "Input layer module"
author: "Vojtech Pavlik <vojtech@suse.cz>"
license: "GPL"
|
Code: | root@laureate:~# modinfo mousedev
filename: /lib/modules/2.4.20-gentoo-r1/kernel/drivers/input/mousedev.o
description: "Input driver to PS/2 or ImPS/2 device driver"
author: "Vojtech Pavlik <vojtech@suse.cz>"
license: "GPL"
parm: xres int, description "Horizontal screen resolution"
parm: yres int, description "Vertical screen resolution"
|
|
|
Back to top |
|
|
taskara Advocate
Joined: 10 Apr 2002 Posts: 3763 Location: Australia
|
Posted: Sat May 24, 2003 1:00 am Post subject: |
|
|
good one _________________ Kororaa install method - have Gentoo up and running quickly and easily, fully automated with an installer! |
|
Back to top |
|
|
|