Linux Input Drivers




SuSE Labs - Introduction - News - Download - Joysticks - Quick Start - Documentation - Supported Hardware - Adapters - Links









Quick Start

This section describes how to download, compile and use the Input Drivers. Change to your source directory, fasten your seatbelts, and here we go:

cd /usr/src

Download

You can get the development tree and necessary utilities via CVS. To access the CVS you can use the following commands (use an empty password):

cvs -d :pserver:anonymous@cvs1.sourceforge.net:/cvsroot/linuxconsole login
cvs -z3 -d :pserver:anonymous@cvs1.sourceforge.net:/cvsroot/linuxconsole checkout ruby

Once you have downloaded the CVS, you can always update it to the most recent version using the following command:

cvs -z3 update ruby

Patching

To compile and use the files you download, you first have to get a 2.4 kernel to use the drivers with. You can get it from ftp.kernel.org.

wget ftp://ftp.kernel.org/pub/linux/kernel/v2.4/linux-2.4.0-test1.tar.bz2
mv linux linux-old
tar xIvf linux-2.4.0-test1.tar.bz2

When you've got the kernel unpacked, you have to copy the ruby files over it, and clean files not used anymore:

cd ruby/linux
cp -avP * ../../linux/
cd ../../linux
sh ../ruby/utils/remove-unused-files

Configuration

Then you configure the kernel:

make menuconfig

This part is a little tricky. You have to select quite a bunch of options to have your system operate correctly. For a most usual setup with a PS/2 mouse and a AT keyboard you need to select:

Input device support --->
  Input device support
  i8042 aux+kbd controller
  AT and PS/2 keyboards
  PS/2 mouse
  Mouse interface

For a setup with an USB mouse and keyboard you'd use:

USB support --->
  Support for USB
  Preliminary USB device filesystem
  UHCI (Intel PIIX4, VIA, ...) support
  OHCI (Compaq, iMacs, OPTi, SiS, ALi, ...) support
Input device support --->
  Input device support
  USB Human Interface Device
  Mouse interface

For serial mice you need:

Input device support --->
  Serial port input line discipline
  Serial mouse
  Mouse interface

And in your init scripts a call to the inputattach utility (can be found in the utils subdir in the ruby tree). See the help for this utility about what the command line will be for your mouse - there are quite a couple different types of them.

  inputattach -t mman /dev/ttyS0 &

To get an analog joystick working, you add:

Input device support --->
  ns558 gameports
  Analog joysticks and gamepads
  Joystick interface

For other joystick types and gameport types you can select other joystick and gameport drivers if you have them. The same for mice, keyboards and other drivers.

When you're done with configuring the kernel, you compile and install it (make sure your /etc/lilo.conf has an entry for this new kernel):

make dep modules modules_install bzImage
cp arch/i386/boot/bzImage /boot/vmlinuz
lilo

Then, to keep a working system after you boot with the new kernel, you also need to change a couple nodes in /dev:

cd /dev
mkdir old
mv mouse js? old
mkdir input
cd input
mknod js0 c 13 0
mknod js1 c 13 1
mknod js2 c 13 2
mknod js3 c 13 3
mknod mouse0 c 13 32
mknod mouse1 c 13 33
mknod mouse2 c 13 34
mknod mouse3 c 13 35
mknod mice c 13 63
mknod event0 c 13 64
mknod event1 c 13 65
mknod event2 c 13 66
mknod event3 c 13 67
cd ..
ln -s input/js0 js0
ln -s input/js1 js1
ln -s input/mice mouse

After this, reboot, load any modules you didn't compile straight into the kernel, and everything should work. If it doesn't, well, something went wrong.

Send any questions, comments, bug reports to: Vojtech Pavlik <vojtech@suse.cz>

Sponsored by SuSE