* modules: aliases and configuration
@ 2003-11-09 3:00 John Aspinall
2003-11-09 12:10 ` Steven Smith
0 siblings, 1 reply; 2+ messages in thread
From: John Aspinall @ 2003-11-09 3:00 UTC (permalink / raw)
To: linux-newbie
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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: modules: aliases and configuration
2003-11-09 3:00 modules: aliases and configuration John Aspinall
@ 2003-11-09 12:10 ` Steven Smith
0 siblings, 0 replies; 2+ messages in thread
From: Steven Smith @ 2003-11-09 12:10 UTC (permalink / raw)
To: John Aspinall; +Cc: linux-newbie
[-- Attachment #1: Type: text/plain, Size: 2697 bytes --]
> 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.
> 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?
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,
sos22@cam.ac.uk.
[-- Attachment #2: Type: application/pgp-signature, Size: 187 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-11-09 12:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-09 3:00 modules: aliases and configuration John Aspinall
2003-11-09 12:10 ` Steven Smith
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.