modules: aliases and configuration
Two questions, if I may, about modules, aliases, and configuration. (Perhaps they're even related!)
Question 1) Aliases with "formalized" names:
In the BlueZ (bluetooth) How-To we are advised to add the following aliases to /etc/modules.conf
alias net-pf-31 bluez
alias tty-ldisc-15 hci_uart
alias char-major-10-250 hci_vhci
In the IrDA (infrared) How-To we are advised to add the following aliases (as well as others) to /etc/modules.conf
alias tty-ldisc-11 irtty
alias char-major-161 ircomm-tty
So what is it with these "formalized" (for want of a better word) alias names? If I see an alias char-major-<n> (for some number <n>), what is the significance of <n>?
Question 2) Module configuration info:
If I look in my system's /etc/modules.conf it consists of 2 lines.
Yet if I do 'modprobe -c' I get a couple of hundred lines. The man page
for modprobe says that 'modprobe -c' shows the "currently used
configuration (default + configuration file)". So where does this "default" come from? Presumably it's established somewhere during the kernel build, but where?
Thanks, in advance, for the info. If there's a good reference for this and other stuff, I'm sure many members of the list would like to hear about it.
John Aspinall
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Quoted 3 lines
So what is it with these "formalized" (for want of a better word) alias names? If I see an alias char-major-<n> (for some number <n>), what is the significance of <n>?
When the kernel wants to load a driver, it usually doesn't know the name of the driver (so, for instance, if it wants to start a network interface, and the driver isn't currently loaded, it won't know whether to load rtl8139 or 3c59x). The standard names reflect what it *does* know about the driver i.e. why it needs to be loaded.
On older Linux systems, before the introduction of devfs, devices were identified by a major number, which specified the class of device e.g. serial ports, and a minor number, which specified the specific instance. ``char-major-<n>'' is supposed to be an alias for the driver which provides a character-by-character device with major number <n>.
I'm not aware of any authoritative list of such aliases. The ones I've come across are:
char-major-<n> -- see above
char-major-<n>-<m> -- same, but request the specific minor number <m>
block-major-<n> -- block oriented major device <n>
block-major-<n>-<m> -- same, but request the specific minor number <m>
tty-ldisc-<n> -- tty line discipline number <n> (a tty is an
abstraction layer which can get put on top of
basically any bi-directional character device)scsi_hostadapter -- SCSI host adapter for the machine
sound-slot-<n> -- Sound card number <n>
sound-service-<n>-<m> -- service <m> provided by soundcard <n>
(Service 0 == mixer, 1 == sequencer, 2 == midi, 3 == dsp)
binfmt-<n> -- binary (i.e. executable) format <n>. The <n> is
a magic number from near the start of the file,
rather than anything predictable.
iptable_<s> -- the iptables table which is called <s>
ipt_<s> -- the iptables target or match rule which is
called <s>
In addition, network interfaces are requested directly by name e.g. the module responsible for eth0 is requested as eth0.
I'm sure there are lots of other entertaining special cases.
Quoted 7 lines
Question 2) Module configuration info:
If I look in my system's/etc/modules.confit consists of 2 lines. Yet if I do 'modprobe -c' I get a couple of hundred lines. The man page
for modprobe says that 'modprobe -c' shows the "currently used
configuration (default + configuration file)". So where does this "default" come from? Presumably it's established somewhere during the kernel build, but where?
I think it's actually chosen when modprobe is built, rather than as part of the kernel build. I' haven't got a Linux machine handy to check, though.
Steven Smith,
[email protected].