Kernel 2.6.x usb scanner support
I notice that with kernel 2.6, "usb scanner support" is identified as obsolete. The option appears in .config through kernel 2.6.2, but beginning with kernel 2.6.3 this .config option is dropped.
I have an hp5470 scanner for which there is a non-libusb sane backend available. I have no idea how to convert/rewrite this backend to use libusb. So, to continue having support for my scanner, I've devised a way to bring usb scanner support forward into kernel 2.6.3 and kernel 2.6.4. Here is the procedure:
1) copy scanner.o and scanner.h from /usr/src/linux-2.6.2/drivers/usb/image/ to the corresponding place in the linux-2.6.3 build tree.
2) copy the text from the section defining "config USB_SCANNER" from /usr/src/linux-2.6.2/drivers/usb/image/Kconfig into an appropriate place in /usr/src/linux-2.6.3/drivers/usb/image/Kconfig.
3) in the file /usr/src/linux-2.6.3/drivers/usb/Makefile, add the line obj-$(CONFIG_USB_SCANNER) += image/
4) in the file /usr/src/linux-2.6.3/drivers/usb/image/Makefile, add the line obj-$(CONFIG_USB_SCANNER) += scanner.o
5) add the line CONFIG_USB_SCANNER=m to the .config file.
From here on, one can run "make xconfig" and be presented with the option to set CONFIG_USB_SCANNER. When set, the following "make", "make modules_install", and "make install" will create a viable scanner.ko in /lib/modules/2.6.3/kernel/drivers/usb/image.
I'm aware that the kernel folks will probably take a dim view of the above. I do wish however that support for my (fairly common, I think) scanner hadn't been summarily dropped in kernel 2.6.3. I hope nothing changes in future kernel build trees anytime soon that makes my carrying forward CONFIG_USB_SCANNER impossible.
|