Tweaked some of the educational text regarding udev.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@7510 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
Archaic 2006-04-13 20:17:52 +00:00
parent d2c332bc21
commit a0d96d25cf
2 changed files with 23 additions and 28 deletions

View File

@ -31,10 +31,9 @@
device nodes, in particular the <filename device nodes, in particular the <filename
class="devicefile">console</filename> and <filename class="devicefile">console</filename> and <filename
class="devicefile">null</filename> devices. The device nodes will be created class="devicefile">null</filename> devices. The device nodes will be created
on the hard disk so that they are available before <command>udev</command> on the hard disk so that they are available before <command>udevd</command>
has been started, and additionally when Linux is started in single user mode has been started, and additionally when Linux is started with
(hence the restrictive permissions on <filename <parameter>init=/bin/bash</parameter>. Create the devices by running the
class="devicefile">console</filename>). Create the devices by running the
following commands:</para> following commands:</para>
<screen><userinput>mknod -m 600 $LFS/dev/console c 5 1 <screen><userinput>mknod -m 600 $LFS/dev/console c 5 1

View File

@ -95,24 +95,24 @@
<title>Udev Bootscript</title> <title>Udev Bootscript</title>
<para>The <command>S10udev</command> initscript takes care of creating <para>The <command>S10udev</command> initscript takes care of creating
device nodes when Linux is booted. The script starts by unsetting the device nodes when Linux is booted. The script unsets the uevent handler
hotplug event handler from the default of <command>/sbin/hotplug</command> from the default of <command>/sbin/hotplug</command>. This is done
This is done because, instead of the kernel calling out to an external because the kernel no longer needs to call out to an external binary.
binary, <command>udevd</command> will listen on a netlink socket for Instead <command>udevd</command> will listen on a netlink socket for
hotplug events that the kernel raises. The bootscript copies any static uevents that the kernel raises. Next, the bootscript copies any static
device nodes that exist in <filename device nodes that exist in <filename
class="directory">/lib/udev/devices</filename> to <filename class="directory">/lib/udev/devices</filename> to <filename
class="directory">/dev</filename>. This is necessary because some devices, class="directory">/dev</filename>. This is necessary because some devices,
directories and symlinks are needed before the dynamic device handling directories, and symlinks are needed before the dynamic device handling
processes are available during the early stages of booting a system. processes are available during the early stages of booting a system.
Creating static device nodes in Creating static device nodes in <filename
<filename class="directory">/lib/udev/devices</filename> also provides class="directory">/lib/udev/devices</filename> also provides an easy
an easy workaround for devices that are not supported by the dynamic workaround for devices that are not supported by the dynamic device
device handling infrastructure. The bootscript then starts the Udev handling infrastructure. The bootscript then starts the Udev daemon,
daemon, <command>udevd</command>, which will act on any hotplug events it <command>udevd</command>, which will act on any uevents it receives.
receives. Finally, the bootscript &quot;coldplugs&quot; any devices that Finally, the bootscript forces the kernel to replay uevents for any
have already been registered with the kernel by forcing them to raise devices that have already been registered and then waits for
hotplug events which <command>udevd</command> will then handle.</para> <command>udevd</command> to handle them.</para>
</sect3> </sect3>
@ -177,7 +177,7 @@
<para>When you plug in a device, such as a Universal Serial Bus (USB) MP3 <para>When you plug in a device, such as a Universal Serial Bus (USB) MP3
player, the kernel recognizes that the device is now connected and player, the kernel recognizes that the device is now connected and
generates a hotplug event. This hotplug event is then handled by generates a uevent. This uevent is then handled by
<command>udevd</command> as described above.</para> <command>udevd</command> as described above.</para>
</sect3> </sect3>
@ -197,10 +197,8 @@
bus driver properly exports the necessary aliases to <systemitem bus driver properly exports the necessary aliases to <systemitem
class="filesystem">sysfs</systemitem>. In other cases, one should class="filesystem">sysfs</systemitem>. In other cases, one should
arrange module loading by other means. With Linux-&linux-version;, Udev is arrange module loading by other means. With Linux-&linux-version;, Udev is
known to load properly-written drivers for PCI, USB, SCSI, SERIO and known to load properly-written drivers for INPUT, IDE, PCI, USB, SCSI,
FireWire devices.</para> SERIO and FireWire devices.</para>
<!-- After linux-2.6.16, add INPUT and IDE to the list above -->
<para>To determine if the device driver you require has the necessary <para>To determine if the device driver you require has the necessary
support for Udev, run <command>modinfo</command> with the module name as support for Udev, run <command>modinfo</command> with the module name as
@ -217,10 +215,8 @@
<para>If there is no <filename>modalias</filename> file in the relevant <para>If there is no <filename>modalias</filename> file in the relevant
directory under <filename class="directory">/sys/bus</filename>, this directory under <filename class="directory">/sys/bus</filename>, this
means that the kernel developers have not yet added modalias support to means that the kernel developers have not yet added modalias support to
this bus type. With Linux-&linux-version;, this is the case with ISA and this bus type. With Linux-&linux-version;, this is the case with ISA
IDE busses. Expect this issue to be fixed in later kernel versions.</para> busses. Expect this issue to be fixed in later kernel versions.</para>
<!-- Remove IDE from the list above after Linux-2.6.16 -->
<para>Udev is not intended to load <quote>wrapper</quote> drivers such as <para>Udev is not intended to load <quote>wrapper</quote> drivers such as
<emphasis>snd-pcm-oss</emphasis> and non-hardware drivers such as <emphasis>snd-pcm-oss</emphasis> and non-hardware drivers such as
@ -269,7 +265,7 @@
<title>Udev creates a device incorrectly, or makes a wrong symlink</title> <title>Udev creates a device incorrectly, or makes a wrong symlink</title>
<para>This usually happens if a rule unexpectedly matches a device. For <para>This usually happens if a rule unexpectedly matches a device. For
example, a poorly-writen rule can match by both a SCSI disk (as desired) example, a poorly-writen rule can match both a SCSI disk (as desired)
and the corresponding SCSI generic device (incorrectly) by vendor. and the corresponding SCSI generic device (incorrectly) by vendor.
Increase the logging verbosity of Udev, find the offending rule by Increase the logging verbosity of Udev, find the offending rule by
examining the logs and make it more specific.</para> examining the logs and make it more specific.</para>