Forward: The following document assumes that you are using at least a USB Mouse or Keyboard and have the ability to recompile the gentoo-sources kernel. This document presents the installation of USB drivers in a "modular" form to better diagnose any problems that you may encounter. When using a USB mouse and keyboard, however, it may be preferable to compile the USB drivers statically into the kernel. If you have any further questions or problems, you may wish to read over the USB HID Configuration Guide from www.linux-usb.org before posting a question.
This document is broken down into three sections:
1. USB Mouse (only)
2. USB Keyboard (only)
3. USB Mouse & Keyboard
USB Mouse Howto:
1. Enter your kernel configuration
Code: Select all
cd /usr/src/linux
make menuconfig hit enter.
3. Hit "m" for Input Core Support. Scroll down to Mouse Support, and hit m. Exit from this menu.
4. Scroll down to USB support and hit enter.
5. In USB Support, hit y at Support for USB. Scroll down to "Preliminary USB device filesystem" and hit y. Include either "UHCI (Intel PIIX4, VIA, ...) support" or "UHCI Alternate Driver (JE) Support" as modules (m). Finally, include "USB Human Interface Device (full HID) support" as a module (m). Include HID input layer support with y.
6. Exit USB Support, then exit the menuconfig. Now do "make dep && make clean bzImage modules modules_install".
7. The following new modules will be created:
- Modules Name..................................Path to modules
1a. UHCI (Intel PIIX4, VIA,...)............ /lib/modules/kernel-version/kernel/drivers/usb/usb-uhci.o
or
1b. UHCI Alternate Driver (JE) support /lib/modules/kernel-version/kernel/drivers/usb/uhci.o
2. USB Human Interface Device....... /lib/modules/kernel-3. version/kernel/drivers/usb/hid.o
3. Input Core Support..................... /lib/modules/kernel-version/kernel/drivers/input/input.o
4. Mouse Support............................ /lib/modules/kernel-version/kernel/drivers/input/mousedev.o
9. Edit your /etc/modules.autoload file and add the following lines:
Code: Select all
input
mousedev
hid
usb-uhci (or uhci)11. If everything goes well, your modules should all load ok.
12. To ensure your mouse works in X, be sure to edit /etc/X11/XF86Config. Here is an example:
Code: Select all
Section "InputDevice"
# Identifier and driver
Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5"USB Keyboard Howto:
Note: When using a USB keyboard there are two things you should be aware of: First, if something goes wrong with loading your modules, your keyboard will not function. This is why I do NOT recommend loading your USB keyboard in modular form. Secondly, many newer BIOS's include automatic support for USB keyboards (so you don't technically need to to build support for them). Either way, BE SURE TO READ THIS DOCUMENT BEFORE PROCEEDING: http://www.linux-usb.org/USB-guide/x194.html
1. Enter your kernel configuration
Code: Select all
cd /usr/src/linux
make menuconfig 3. Hit "y" for Input Core Support. Scroll down to Keyboard Support, and hit y. Exit from this menu.
4. Scroll down to USB support and hit enter.
5. In USB Support, hit y at Support for USB. Scroll down to "Preliminary USB device filesystem" and hit y. Include "USB Human Interface Device (full HID) support" as a module (y). Include HID input layer support with y.
6. Exit USB Support, then exit the menuconfig. Now do "make dep && make clean bzImage modules modules_install".
7. No modules need to be loaded for your USB keyboard.
8. Be sure to mount your /boot partition and copy over the new kernel image!
9. Reboot your machine to test your new drivers.
USB Mouse and Keyboard Howto:
Note: When using a USB keyboard there are two things you should be aware of: First, if something goes wrong with loading your modules, your keyboard will not function. This is why I do NOT recommend loading your USB keyboard in modular form. Secondly, many newer BIOS's include support for USB keyboards. But this BIOS support is overridden when you load usb HID support. So you can start with keyboard support and lose it when loading one of the uhci modules or when loading a kernel with HID support built in. Better to build keyboard support into the kernel to be safe, since you can work without a mouse but not without a keyboard. Either way, BE SURE TO READ THIS DOCUMENT BEFORE PROCEEDING: http://www.linux-usb.org/USB-guide/x194.html
1. Enter your kernel configuration
Code: Select all
cd /usr/src/linux
make menuconfig 3. Hit "y" for Input Core Support. Scroll down to Keyboard Support and hit y. Scroll down to Mouse Support and hit y. Exit from this menu.
4. Scroll down to USB support and hit enter.
5. In USB Support, hit y at Support for USB. Scroll down to "Preliminary USB device filesystem" and hit y. Hit y at UHCI (Intel PIIX4, VIA, ...) support or UHCI Alternate Driver (JE) support, whichever you prefer. Include "USB Human Interface Device (full HID) support" by hitting y. Finally, hit y at HID input layer support.
6. Exit USB Support, then exit the menuconfig. Now do "make dep && make clean bzImage modules modules_install".
7. No modules will be created during this installation; instead, everything will be statically compiled into the kernel.
8. Be sure to mount your /boot partition and copy over the new kernel image!
9. Reboot your machine to test your new drivers.
10. If everything goes well, your USB mouse and keyboard should work flawlessly.





