*)  Decide if you want the midi driver to be part of the kernel, or
    a loadable module.  If you want it to be part of the kernel follow
    the first set of instructions.  If you want it to be a loadable
    module, follow the second set.
    Building a module has some advantages - notably, you can load and
    unload it as you wish to reuse resources, and it requires no changes
    to your existing kernel.  It is more convenient for debugging
    purposes.
    This driver has been tested on Linux systems with kernel versions
    > 1.1.50.

KERNEL BUILTIN
0) All paths are relative to /usr/src/linux
1) Put the files midi.c, midiconf.c, quad.c and quad.h in drivers/char
2) Put midi.h in include/linux
3) Edit midiconf.c for the correct setup for your MPU401s.
4) Apply the patches in midi.patch from the /usr/src/linux directory
     patch -p < midi.patch
5) make a major number for MIDI_MAJOR in include/linux/major.h
   Something like:
     #define MIDI_MAJOR 28
6) make the midi devices in /dev.  Feel free to make extras if you
   have more than 3 MPU401s.  Having extra entries in /dev doesn't
   hurt anything.  I've assumed that the MIDI_MAJOR number is 28,
   if it is something else, change the 28s in the following lines
   to the correct value.

   mknod /dev/midi0 c 28 0
   mknod /dev/midi1 c 28 1
   mknod /dev/midi2 c 28 2
   mknod /dev/smpte0 c 28 128
   mknod /dev/smpte1 c 28 129
   mknod /dev/smpte2 c 28 130
   chmod 666 /dev/midi* /dev/smpte*

7) reconfig "make config"
8) rebuild and install the kernel normally
9) you're done

LOADABLE MODULE
0) You no longer need to patch the kernel.
1) Put midi.h in <linux/midi.h>
2) Edit midiconf.c for the correct setup for your MPU401s.
3) make a major number for MIDI_MAJOR in <linux/major.h>
   Something like:
     #define MIDI_MAJOR 28
4) make the midi devices in /dev.  Feel free to make extras if you
   have more than 3 MPU401s.  Having extra entries in /dev doesn't
   hurt anything.  I've assumed that the MIDI_MAJOR number is 28,
   if it is something else, change the 28s in the following lines
   to the correct value.

   mknod /dev/midi0 c 28 0
   mknod /dev/midi1 c 28 1
   mknod /dev/midi2 c 28 2
   mknod /dev/smpte0 c 28 128
   mknod /dev/smpte1 c 28 129
   mknod /dev/smpte2 c 28 130
   chmod 666 /dev/midi* /dev/smpte*

5) Take a look at the Makefile, I don't think you'll need to make
   any changes, but you never know.  Make sure KERNEL_PATH points to
   your linux kernel.
6) make
7) make install
8) to remove the module, "rmmod /dev/midi.o"
9) that's it

If you build the driver as a module, remember to rebuild it after any
change/upgrade to the kernel (insmod will normally flag that if the kernel
version has changed). To avoid any trouble, it is safest to reboot with
the new kernel and *then* recompile the module.
