r7443 - in branches/udev_update/BOOK: . chapter01 chapter03 chapter06 chapter07 chapter08

archaic at linuxfromscratch.org archaic at linuxfromscratch.org
Tue Mar 21 08:04:39 PST 2006


Author: archaic
Date: 2006-03-21 09:04:33 -0700 (Tue, 21 Mar 2006)
New Revision: 7443

Modified:
   branches/udev_update/BOOK/chapter01/changelog.xml
   branches/udev_update/BOOK/chapter01/whatsnew.xml
   branches/udev_update/BOOK/chapter03/patches.xml
   branches/udev_update/BOOK/chapter06/udev.xml
   branches/udev_update/BOOK/chapter07/bootscripts.xml
   branches/udev_update/BOOK/chapter08/kernel.xml
   branches/udev_update/BOOK/general.ent
   branches/udev_update/BOOK/patches.ent
Log:
Updated the bootscripts. Removed references to hotplug and the
bootscripts udev patch. Removed reference to udevstart. Added
text and commands for generating Udev bug reports.


Modified: branches/udev_update/BOOK/chapter01/changelog.xml
===================================================================
--- branches/udev_update/BOOK/chapter01/changelog.xml	2006-03-18 21:43:25 UTC (rev 7442)
+++ branches/udev_update/BOOK/chapter01/changelog.xml	2006-03-21 16:04:33 UTC (rev 7443)
@@ -37,6 +37,18 @@
 -->
 
     <listitem>
+      <para>March 21, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[archaic] - Updated the bootscripts. Removed references to
+          hotplug and the bootscripts udev patch. Removed reference to
+          udevstart. Added text and commands for generating Udev bug reports.
+          </para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
       <para>March 11, 2006</para>
       <itemizedlist>
         <listitem>

Modified: branches/udev_update/BOOK/chapter01/whatsnew.xml
===================================================================
--- branches/udev_update/BOOK/chapter01/whatsnew.xml	2006-03-18 21:43:25 UTC (rev 7442)
+++ branches/udev_update/BOOK/chapter01/whatsnew.xml	2006-03-21 16:04:33 UTC (rev 7443)
@@ -106,9 +106,9 @@
     <listitem>
       <para>Less &less-version;</para>
     </listitem>
-    <!--<listitem>
+    <listitem>
       <para>LFS-Bootscripts &lfs-bootscripts-version;</para>
-    </listitem>-->
+    </listitem>
     <listitem>
       <para>Libtool &libtool-version;</para>
     </listitem>
@@ -229,9 +229,6 @@
       <para>&kbd-gcc4_fixes-patch;</para>
     </listitem>
     <listitem>
-      <para>&lfs-bootscripts-recent_udev-patch;</para>
-    </listitem>
-    <listitem>
       <para>MAN-DB-&man-db-version;</para>
     </listitem>
     <listitem>

Modified: branches/udev_update/BOOK/chapter03/patches.xml
===================================================================
--- branches/udev_update/BOOK/chapter03/patches.xml	2006-03-18 21:43:25 UTC (rev 7442)
+++ branches/udev_update/BOOK/chapter03/patches.xml	2006-03-21 16:04:33 UTC (rev 7443)
@@ -131,13 +131,6 @@
     </varlistentry>
 
     <varlistentry>
-      <term>LFS Bootscripts Recent Udev Patch - 4 KB;</term>
-      <listitem>
-        <para><ulink url="&patches-root;&lfs-bootscripts-recent_udev-patch;"/></para>
-      </listitem>   
-    </varlistentry>
-
-    <varlistentry>
       <term>Inetutils GCC-4.x Fix Patch - 2 KB:</term>
       <listitem>
         <para><ulink url="&patches-root;&inetutils-gcc4_fixes-patch;"/></para>

Modified: branches/udev_update/BOOK/chapter06/udev.xml
===================================================================
--- branches/udev_update/BOOK/chapter06/udev.xml	2006-03-18 21:43:25 UTC (rev 7442)
+++ branches/udev_update/BOOK/chapter06/udev.xml	2006-03-21 16:04:33 UTC (rev 7443)
@@ -112,14 +112,67 @@
 
 <screen><userinput>install -m644 -D -v docs/writing_udev_rules/index.html /usr/share/doc/udev-&udev-version;/index.html</userinput></screen>
 
-    <!-- Not for the LiveCD -->
-    <!-- Edit Me -->
+    <important>
 
-    <para>Run the <command>udevstart</command> program to create our full
-    complement of device nodes.</para>
+      <para>When Udev is started by the LFS-Bootscripts, a replay of all kernel
+      device events happens. These events tell Udev what devices exist.
+      Sometimes the Udev bootscript doesn't wait long enough for
+      <command>udevd</command> to process all of the replayed events and
+      consequently the devices for those missed events are not created before the
+      script exits. Since <command>udevd</command> is still running in the
+      background, the devices will be created a few milliseconds later, but the
+      next bootscript to run may require a device to exist before it has been
+      created. To avoid such missed events, and to avoid hardcoding an overly
+      long wait time, It is recommended that you run the following commands to
+      aide the LFS development team in debugging these missed events and finding
+      an acceptable solution more quickly.</para>
 
-<screen><userinput>/sbin/udevstart</userinput></screen>
+      <para>First, create a simple C file:</para>
 
+<screen><userinput>cat > bug.c << EOF
+/* Simple event recorder */
+#define _GNU_SOURCE
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <argz.h>
+int main(int argc, char * argv[])
+{
+  char * envz;
+  size_t len;
+  int bug;
+  bug = open("/dev/bug", O_WRONLY | O_APPEND);
+  if (bug == -1)
+  return 0;
+  setenv("_SEPARATOR", "--------------------------------------", 1);
+  argz_create(environ, &envz, &len);
+  argz_stringify(envz, len, '\n');
+  envz[len-1]='\n';
+  write(bug, envz, len);
+  close(bug);
+  free(envz);
+  return 0;
+}
+EOF</userinput></screen>
+
+      <para>Now compile it:</para>
+
+<screen><userinput>gcc -o /lib/udev/bug bug.c</userinput></screen>
+
+      <para>The next step adds a simple logging rule to run this program.</para>
+
+<screen><userinput>cat > /etc/udev/rules.d/90-bug.rules << "EOF"
+ACTION=="add", RUN+="bug"
+EOF</userinput></screen>
+
+      <para>When booting the new LFS system, if any events are missed, a warning
+      message will appear and a <filename>/dev/bugreport</filename> file will be
+      created. The warning message will tell you where to send feedback.</para>
+
+    </important>
+
   </sect2>
 
   <sect2 id="contents-udev" role="content">

Modified: branches/udev_update/BOOK/chapter07/bootscripts.xml
===================================================================
--- branches/udev_update/BOOK/chapter07/bootscripts.xml	2006-03-18 21:43:25 UTC (rev 7442)
+++ branches/udev_update/BOOK/chapter07/bootscripts.xml	2006-03-21 16:04:33 UTC (rev 7443)
@@ -43,16 +43,6 @@
   <sect2 role="installation">
     <title>Installation of LFS-Bootscripts</title>
 
-    <para>Prevent the hotplug bootscript from being installed, as the hotplug
-      package is no longer installed.</para>
-
-<screen><userinput>sed -i '/hotplug/d' Makefile</userinput></screen>
-
-    <para>Apply the following patch to allow the Udev bootscript to work with
-    recent versions of Udev:</para>
-
-<screen><userinput>patch -Np1 -i ../&lfs-bootscripts-recent_udev-patch;</userinput></screen>
-
     <para>Install the package:</para>
 
 <screen><userinput>make install</userinput></screen>
@@ -66,7 +56,7 @@
       <segtitle>Installed scripts</segtitle>
 
       <seglistitem>
-        <seg>checkfs, cleanfs, console, functions, halt, hotplug, ifdown, ifup,
+        <seg>checkfs, cleanfs, console, functions, halt, ifdown, ifup,
         localnet, mountfs, mountkernfs, network, rc, reboot, sendsignals,
         setclock, static, swap, sysklogd, template, and udev</seg>
       </seglistitem>
@@ -135,16 +125,6 @@
         </listitem>
       </varlistentry>
 
-      <varlistentry id="hotplug-bootscripts">
-        <term><command>hotplug</command></term>
-        <listitem>
-          <para>Loads modules for system devices</para>
-            <indexterm zone="ch-scripts-bootscripts hotplug-bootscripts">
-          <primary sortas="d-hotplug">hotplug</primary>
-          </indexterm>
-        </listitem>
-      </varlistentry>
-
       <varlistentry id="ifdown-bootscripts">
         <term><command>ifdown</command></term>
         <listitem>

Modified: branches/udev_update/BOOK/chapter08/kernel.xml
===================================================================
--- branches/udev_update/BOOK/chapter08/kernel.xml	2006-03-18 21:43:25 UTC (rev 7442)
+++ branches/udev_update/BOOK/chapter08/kernel.xml	2006-03-21 16:04:33 UTC (rev 7443)
@@ -98,27 +98,13 @@
 
 <screen><userinput>make</userinput></screen>
 
-    <para>If using kernel modules, an <filename>/etc/modprobe.conf</filename> file
-    may be needed. Information pertaining to modules and kernel configuration is
-    located in the kernel documentation in the <filename
+    <para>If using kernel modules, an <filename>/etc/modprobe.conf</filename>
+    file may be needed. Information pertaining to modules and kernel
+    configuration is located in <xref linkend="ch-scripts-udev"/> and in the
+    kernel documentation in the <filename
     class="directory">linux-&linux-version;/Documentation</filename> directory.
     Also, <filename>modprobe.conf(5)</filename> may be of interest.</para>
 
-    <para>Be very careful when reading other documentation relating to kernel
-    modules because it usually applies to 2.4.x kernels only. As far as we know,
-    kernel configuration issues specific to Hotplug and Udev are not documented.
-    The problem is that Udev will create a device node only if Hotplug or a
-    user-written script inserts the corresponding module into the kernel, and not
-    all modules are detectable by Hotplug. Note that statements like the one below
-    in the <filename>/etc/modprobe.conf</filename> file do not work with
-    Udev:</para>
-
-<screen><literal>alias char-major-XXX some-module</literal></screen>
-
-    <para>Because of the complications with Hotplug, Udev, and modules, we
-    strongly recommend starting with a completely non-modular kernel
-    configuration, especially if this is the first time using Udev.</para>
-
     <para>Install the modules, if the kernel configuration uses them:</para>
 
 <screen><userinput>make modules_install</userinput></screen>

Modified: branches/udev_update/BOOK/general.ent
===================================================================
--- branches/udev_update/BOOK/general.ent	2006-03-18 21:43:25 UTC (rev 7442)
+++ branches/udev_update/BOOK/general.ent	2006-03-21 16:04:33 UTC (rev 7443)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!ENTITY version "udev_update-20060311">
-<!ENTITY releasedate "March 11, 2006">
+<!ENTITY version "udev_update-20060321">
+<!ENTITY releasedate "March 21, 2006">
 <!ENTITY milestone "6.2">
 <!ENTITY generic-version "udev_update"> <!-- Use "development", "testing", or "x.y[-pre{x}]" -->
 
@@ -56,7 +56,7 @@
 <!ENTITY iproute2-version "051007">
 <!ENTITY kbd-version "1.12">
 <!ENTITY less-version "394">
-<!ENTITY lfs-bootscripts-version "20051223">
+<!ENTITY lfs-bootscripts-version "udev_update-20060315">
 <!ENTITY libtool-version "1.5.22">
 <!ENTITY linux-version "2.6.15.6">
 <!ENTITY linux-dl-version "2.6">

Modified: branches/udev_update/BOOK/patches.ent
===================================================================
--- branches/udev_update/BOOK/patches.ent	2006-03-18 21:43:25 UTC (rev 7442)
+++ branches/udev_update/BOOK/patches.ent	2006-03-21 16:04:33 UTC (rev 7443)
@@ -32,8 +32,6 @@
 <!ENTITY inetutils-gcc4_fixes-patch "inetutils-&inetutils-version;-gcc4_fixes-3.patch">
 <!ENTITY inetutils-man_pages-patch "inetutils-&inetutils-version;-no_server_man_pages-1.patch">
 
-<!ENTITY lfs-bootscripts-recent_udev-patch "lfs-bootscripts-&lfs-bootscripts-version;-recent_udev-1.patch">
-
 <!ENTITY linux-utf8-patch "linux-&linux-version;-utf8_input-1.patch">
 
 <!ENTITY mktemp-tempfile-patch "mktemp-&mktemp-version;-add_tempfile-3.patch">




More information about the lfs-book mailing list