Autoloading USB printer module

Alexander E. Patrakov see at the.sig
Sat Apr 24 07:10:50 PDT 2004

Laurens Blankers wrote:
> Hi All,
> I have my USB Host driver compiled as part of the kernel (2.4), but the 
> USB printer driver is a module (printer.o). What do I have to add to 
> /etc/modules.conf in order for this module to be auto loaded when a 
> program tries to print to /dev/usb/lp0?

1) Not printer.o, but usblp.o. The line you are looking for is probably 
(not tested) either

alias char-major-180-* usblp
alias char-major-180* usblp

2) The way of loading a driver when some program tries to open a device 
is deprecated now. Instead, all modules for all devices present in the 
system should be loaded by initscripts, and /etc/modules.conf should be 
an empty (or at least not hardware-specific) file.

To achieve this, the "hotplug" package was written. Its use for loading 
modules is documented (albeit for an old version and with some typos) in 
my Hardware Detection Hint that you can find in the Hints section of the 
LFS website.

My /etc/modprobe.conf is, however, not empty, and contains some 
hardware-specific lines, and that's too far from being ideal:

install sound-slot-0 modprobe snd-pcm-oss; modprobe \
	snd-mixer-oss; modprobe snd-seq-oss
alias char-major-195-* nvidia
alias char-major-62-* ltserial

Alexander E. Patrakov
To get my address: echo '0!42!+/6 at 5-3.535.25' | tr [!-:] [a-z] | tr n .

More information about the blfs-support mailing list