On Sun, May 09, 2004 at 10:09:36PM +0300, Shachar Shemesh wrote:
> This doesn't work with devfs. If the sound module isn't loaded, there is
> no /dev/dsp. There is no /dev/audio/whatever either. The kernel is not
> yet aware that there is a sound card in the machine. As far as I
> understood, that was the reason devfs is not on by default, nor is it
> even maintained any longer.
devfsd solved this problem a long time ago, by launching 'modprobe
/dev/blah' every time someone open()ed a non-existant /dev/blah.
modules.conf, in turn, has a list of aliases, e.g.:
alias /dev/dsp/* sound
Feels a bit weird, but works for your late-module-loading needs.
--
Then again, when talking about modules for hardware you actually have,
why to bother delaying their load? That's the new (2.6) approach:
/sbin/hotplug gets called not only for each new USB/PCMCIA device
(as it used to do in 2.4) but also for each PCI device (as they are
listed by the kernel at boot time). Then the hotplug scripts takes care
of loading the driver.
How does it find the matching module for a piece of hardware? Simple.
Modules contain an info block declaring what devices they handle (by
vendor ID, device ID or whatever). modinfo somedriver, for example.
depmod generates summaries of modules and the devices they support
in /lib/modules/, including a modules.alias file. You should include
this file in your modprobe.conf, and then the HotPlug script would
call:
modprobe pci:v00001274d00001371sv*sd*bc*sc*i*
^^ device descriptor: bus, vendor_id, device_id etc.
and it'll load the snd_ens1371 driver.
=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]