The attached patch does the following:

* Kills the words "hotplug event". These things are officially renamed to "uevents". * Kills "<command>udev</command>". There is no such command anymore, but it is still appropriate to refer to the "Udev" package. * Moves the text about obsolete module alias documentation to the Udev troubleshooting page * Updates the examples and command descriptions for Linux-2.6.16 and the new Udev.

It doesn't do the following:

 * Update to Udev-088
 * Bind-mount the host's /dev

Please review and apply.

--
Alexander E. Patrakov
Index: chapter06/udev.xml
===================================================================
--- chapter06/udev.xml	(revision 7450)
+++ chapter06/udev.xml	(working copy)
@@ -198,7 +198,7 @@
       <varlistentry id="ata_id">
         <term><command>ata_id</command></term>
         <listitem>
-          <para>Provides <command>udev</command> with a unique string and
+          <para>Provides Udev with a unique string and
           additional information (uuid, label) for an ATA drive</para>
           <indexterm zone="ch-system-udev ata_id">
             <primary sortas="b-ata_id">ata_id</primary>
@@ -209,7 +209,7 @@
       <varlistentry id="cdrom_id">
         <term><command>cdrom_id</command></term>
         <listitem>
-          <para>Provides <command>udev</command> with the capabilities of a
+          <para>Provides Udev with the capabilities of a
           CD-ROM or DVD-ROM drive</para>
           <indexterm zone="ch-system-udev cdrom_id">
             <primary sortas="b-cdrom_id">cdrom_id</primary>
@@ -230,7 +230,7 @@
       <varlistentry id="edd_id">
         <term><command>edd_id</command></term>
         <listitem>
-          <para>Provides <command>udev</command> with the EDD ID for a BIOS disk
+          <para>Provides Udev with the EDD ID for a BIOS disk
           drive</para>
           <indexterm zone="ch-system-udev edd_id">
             <primary sortas="b-edd_id">edd_id</primary>
@@ -241,8 +241,7 @@
       <varlistentry id="firmware_helper">
         <term><command>firmware_helper</command></term>
         <listitem>
-          <para>Enables <command>udev</command> to upload firmware to
-          devices</para>
+          <para>Uploads firmware to devices</para>
           <indexterm zone="ch-system-udev firmware_helper">
             <primary sortas="b-firmware_helper">firmware_helper</primary>
           </indexterm>
@@ -252,7 +251,7 @@
       <varlistentry id="scsi_id">
         <term><command>scsi_id</command></term>
         <listitem>
-          <para>Provides <command>udev</command> with a unique SCSI identifier
+          <para>Provides Udev with a unique SCSI identifier
           based on the data returned from sending a SCSI INQUIRY command to
           the specified device</para>
           <indexterm zone="ch-system-udev scsi_id">
@@ -275,8 +274,9 @@
       <varlistentry id="udevd">
         <term><command>udevd</command></term>
         <listitem>
-          <para>A daemon that reorders hotplug events before submitting them to
-          <command>udev</command>, thus avoiding various race conditions</para>
+          <para>A daemon that listens for uevents on the netlink socket,
+	  creates devices and runs the configured external programs in
+	  response to these uevents.</para>
           <indexterm zone="ch-system-udev udevd">
             <primary sortas="b-udevd">udevd</primary>
           </indexterm>
@@ -286,7 +286,7 @@
       <varlistentry id="udevinfo">
         <term><command>udevinfo</command></term>
         <listitem>
-          <para>Allows users to query the <command>udev</command> database for
+          <para>Allows users to query the Udev database for
           information on any device currently present on the system; it also
           provides a way to query any device in the <systemitem
           class="filesystem">sysfs</systemitem> tree to help create udev
@@ -300,8 +300,8 @@
       <varlistentry id="udevmonitor">
         <term><command>udevmonitor</command></term>
         <listitem>
-          <para>Prints the event received from the kernel and the event which
-          <command>udev</command> sends out after rule processing</para>
+          <para>Prints the event received from the kernel and the environment which
+          <command>udevd</command> sends out after rule processing</para>
           <indexterm zone="ch-system-udev udevmonitor">
             <primary sortas="b-udevmonitor">udevmonitor</primary>
           </indexterm>
@@ -311,9 +311,9 @@
       <varlistentry id="udevtest">
         <term><command>udevtest</command></term>
         <listitem>
-          <para>Simulates a <command>udev</command> run for the given device,
-          and prints out the name of the node the real <command>udev</command>
-          would have created or (not in LFS) the name of the renamed network
+          <para>Simulates a uevent for the given device,
+          and prints out the name of the node the real <command>udevd</command>
+          would have created, or the name of the renamed network
           interface</para>
           <indexterm zone="ch-system-udev udevtest">
             <primary sortas="b-udevtest">udevtest</primary>
@@ -324,7 +324,7 @@
       <varlistentry id="usb_id">
         <term><command>usb_id</command></term>
         <listitem>
-          <para>Provides <command>udev</command> with information about USB
+          <para>Provides Udev with information about USB
           devices</para>
           <indexterm zone="ch-system-udev usb_id">
             <primary sortas="b-usb_id">usb_id</primary>
@@ -335,7 +335,7 @@
       <varlistentry id="vol_id">
         <term><command>vol_id</command></term>
         <listitem>
-          <para>Provides <command>udev</command> with the label and uuid of a
+          <para>Provides Udev with the label and uuid of a
           filesystem</para>
           <indexterm zone="ch-system-udev vol_id">
             <primary sortas="b-vol_id">vol_id</primary>
@@ -346,7 +346,7 @@
       <varlistentry id="etc-udev">
         <term><filename class="directory">/etc/udev</filename></term>
         <listitem>
-          <para>Contains <command>udev</command> configuation files,
+          <para>Contains Udev configuation files,
           device permissions, and rules for device naming</para>
           <indexterm zone="ch-system-udev etc-udev">
             <primary sortas="e-/etc/udev">/etc/udev</primary>
Index: chapter06/devices.xml
===================================================================
--- chapter06/devices.xml	(revision 7450)
+++ chapter06/devices.xml	(working copy)
@@ -17,11 +17,12 @@
   <sect2>
     <title>Creating Initial Device Nodes</title>
 
+<!-- FIXME: udevd _is_ started in single-user mode. Do you mean "init=/bin/sh"? -->
     <para>When the kernel boots the system, it requires the presence of a few
     device nodes, in particular the <filename class="devicefile">console</filename>
     and <filename class="devicefile">null</filename> devices. The device nodes
     will be created on the hard disk so that they are available before
-    <command>udev</command> has been started, and additionally when Linux is
+    <command>udevd</command> has been started, and additionally when Linux is
     started in single user mode (hence the restrictive permissions on
     <filename class="devicefile">console</filename>). Create the devices by
     running the following commands:</para>
Index: chapter07/udev.xml
===================================================================
--- chapter07/udev.xml	(revision 7450)
+++ chapter07/udev.xml	(working copy)
@@ -95,10 +95,10 @@
 
       <para>The <command>S10udev</command> initscript takes care of creating
       device nodes when Linux is booted. The script starts by unsetting the
-      hotplug event handler from the default of <command>/sbin/hotplug</command>
+      uevent handler from the default of <command>/sbin/hotplug</command>
       This is done because, instead of the kernel calling out to an external
       binary, <command>udevd</command> will listen on a netlink socket for
-      hotplug events that the kernel raises. The bootscript copies any static
+      <quote>uevents</quote> that the kernel raises. The bootscript copies any static
       device nodes that exist in <filename
       class="directory">/lib/udev/devices</filename> to <filename
       class="directory">/dev</filename>. This is necessary because some devices,
@@ -108,10 +108,10 @@
       <filename class="directory">/lib/udev/devices</filename> also provides
       an easy workaround for devices that are not supported by the dynamic
       device handling infrastructure.  The bootscript then starts the Udev
-      daemon, <command>udevd</command>, which will act on any hotplug events it
-      receives. Finally, the bootscript &quot;coldplugs&quot; any devices that
-      have already been registered with the kernel by forcing them to raise
-      hotplug events which <command>udevd</command> will then handle.</para>
+      daemon, <command>udevd</command>, which will act on any uevents it
+      receives. Finally, the bootscript forces the kernel to replay uevents for
+      any devices that have already been registered. Then the bootscript waits
+      for <command>udevd</command> to handle the outstanding uevents.</para>
     </sect3>
 
     <sect3>
@@ -173,7 +173,7 @@
 
       <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
-      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>
     </sect3>
 
@@ -191,11 +191,9 @@
       bus driver properly exports the necessary aliases to <systemitem
       class="filesystem">sysfs</systemitem>. In other cases, one should
       arrange module loading by other means. With Linux-&linux-version;, Udev is
-      known to load properly-written drivers for PCI, USB, SCSI, SERIO and
-      FireWire devices.</para>
+      known to load properly-written drivers for PCI, USB, SCSI, SERIO,
+      FireWire, IDE and input 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
       support for Udev, run <command>modinfo</command> with the module name as
       the argument.  Now try locating the device directory under
@@ -211,14 +209,28 @@
       <para>If there is no <filename>modalias</filename> file in the relevant
       directory under <filename class="directory">/sys/bus</filename>, this
       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
-      IDE busses. Expect this issue to be fixed in later kernel versions.</para>
+      this bus type. With Linux-&linux-version;, this is the case with the ISA
+      bus. 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
       <emphasis>snd-pcm-oss</emphasis> and non-hardware drivers such as
       <emphasis>loop</emphasis> at all.</para>
+      
+      <para>Some documentation available on the net suggests to create lines
+      in the <filename>/etc/modprobe.conf</filename> file with the form:</para>
+
+<screen>alias char-major-X some-module
+alias block-major-Y another-module
+alias eth0 e100
+alias snd-card-0 snd-sblive</screen>
+
+      <para>Such documentation is obsolete and does not apply to Udev-based
+      systems. Aliases don't help loading modules on such systems. There are
+      two reasons for this. First, Udev can load a driver before such aliases
+      have a chance to work (e.g., before the attempt to bring eth0 up or use
+      a sound card is made). Second, such rules rely on the device node already
+      existing, but Udev creates device nodes after a module is loaded, thus
+      creating a <quote>chicken-and-egg</quote> problem.</para>
     </sect3>
 
     <sect3>
@@ -257,8 +269,11 @@
     <sect3>
       <title>Udev creates a device incorrectly, or makes a wrong symlink</title>
 
+<!-- FIXME: this requires the ability to replay uevents manually after starting 
+            syslogd -->
+
       <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.
       Increase the logging verbosity of Udev, find the offending rule by
       examining the logs and make it more specific.</para>
@@ -302,8 +317,8 @@
       never be <quote>fixed</quote>. You should not rely upon the kernel device
       names being stable. Instead, create your own rules that make symlinks with
       stable names based on some stable attributes of the device, such as a
-      serial number or the output of various *_id utilities installed by Udev.
-      See also the network interface renaming example in
+      serial number or the output of various <command>*_id</command> utilities
+      installed by Udev. See also the network interface renaming example in
       <xref linkend="ch-scripts-network"/>.</para>
     </sect3>
     
Index: general.ent
===================================================================
--- general.ent	(revision 7450)
+++ general.ent	(working copy)
@@ -58,7 +58,7 @@
 <!ENTITY less-version "394">
 <!ENTITY lfs-bootscripts-version "udev_update-20060321">
 <!ENTITY libtool-version "1.5.22">
-<!ENTITY linux-version "2.6.15.6">
+<!ENTITY linux-version "2.6.16">
 <!ENTITY linux-dl-version "2.6">
 <!ENTITY linux-libc-headers-version "2.6.12.0">
 <!ENTITY m4-version "1.4.4">
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to