Add yourself to the right group to do stuff in /usr/src/
Unpack the kernel sources with
tar xvjf kernel-source-2.6.10.tar.bz2
Get a config file to use as a starting point here and save
it as /usr/src/kernel-source-2.6.10/.config.
Put the new usb-obd driver in
/usr/src/kernel-source-2.6.10/drivers/usb/misc/usb-obd.c
Modify the files:
/usr/src/kernel-source-2.6.10/drivers/usb/misc/Kconfig by inserting the following at the bottom:
config USB_OBD tristate "USB-OBDII driver (EXPERIMENTAL)" depends on USB && USB_DEVICEFS && EXPERIMENTAL help Linux driver for USB-OBDII adapter being built for CS 448
/usr/src/kernel-source-2.6.10/drivers/usb/Makefile by
inserting the following line:
obj-$(CONFIG_USB_OBC) += misc/
/usr/src/kernel-source-2.6.10/drivers/usb/misc/Makefile by inserting the following line:
obj-$(CONFIG_USB_OBC) += usbobd.o
Change directory to /usr/src/kernel-source-2.6.10 and
run the commands
make-kpkg --config=x clean make-kpkg --config=x configureThis second command should put up a configuration GUI. Find the USB_OBD driver, and select it for building as a module (there should be a dot in the middle of the checkbox for the option). Save the new configuration, and quit.
Run the command
fakeroot make-kpkg kernel-image kernel-headersTo create a new kernel package (also a set of kernel headers so we can compile up new stuff against the kernel). If you're got any "special" modules in
/usr/src/modules give the
command
fakeroot make-kpkg kernel-image kernel-headers modules-image(this only applies to modules in
/usr/src/modules -
not the usbobd.c module)
OK... it compiled for me. Go up a level to /usr/src
and install the new kernel with
sudo dpkg --install kernel-image*2.6.10*deb kernel-headers*2.6.10*deb
With any luck, you can now boot from your new kernel! You can also insert the module into the kernel with the command
#modprobe usbobd