aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArchaic <archaic@linuxfromscratch.org>2006-03-21 16:04:33 +0000
committerArchaic <archaic@linuxfromscratch.org>2006-03-21 16:04:33 +0000
commit9f0158cdc39f381917ea35d2f327d982bffbf4aa (patch)
tree0220880f44dfae4e1b583ee3e5cbc2ebd6344fe8
parent6712c004a990fa6e545e654f9021bfa01d5e1060 (diff)
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. git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/udev_update/BOOK@7443 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
-rw-r--r--chapter01/changelog.xml12
-rw-r--r--chapter01/whatsnew.xml7
-rw-r--r--chapter03/patches.xml7
-rw-r--r--chapter06/udev.xml63
-rw-r--r--chapter07/bootscripts.xml22
-rw-r--r--chapter08/kernel.xml22
-rw-r--r--general.ent6
-rw-r--r--patches.ent2
8 files changed, 80 insertions, 61 deletions
diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml
index 6736086c7..67c16094d 100644
--- a/chapter01/changelog.xml
+++ b/chapter01/changelog.xml
@@ -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>
diff --git a/chapter01/whatsnew.xml b/chapter01/whatsnew.xml
index 758474176..580ef1b76 100644
--- a/chapter01/whatsnew.xml
+++ b/chapter01/whatsnew.xml
@@ -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>
diff --git a/chapter03/patches.xml b/chapter03/patches.xml
index 048448c7c..e70fbfe93 100644
--- a/chapter03/patches.xml
+++ b/chapter03/patches.xml
@@ -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>
diff --git a/chapter06/udev.xml b/chapter06/udev.xml
index 066aea2e3..bfcb86661 100644
--- a/chapter06/udev.xml
+++ b/chapter06/udev.xml
@@ -112,13 +112,66 @@ EOF</userinput></screen>
<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>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>
+
+ <para>First, create a simple C file:</para>
+
+<screen><userinput>cat &gt; bug.c &lt;&lt; EOF
+/* Simple event recorder */
+#define _GNU_SOURCE
+#include &lt;sys/types.h&gt;
+#include &lt;sys/stat.h&gt;
+#include &lt;fcntl.h&gt;
+#include &lt;unistd.h&gt;
+#include &lt;stdlib.h&gt;
+#include &lt;argz.h&gt;
+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, &amp;envz, &amp;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 &gt; /etc/udev/rules.d/90-bug.rules &lt;&lt; "EOF"
+ACTION=="add", RUN+="bug"
+EOF</userinput></screen>
- <para>Run the <command>udevstart</command> program to create our full
- complement of device nodes.</para>
+ <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>
-<screen><userinput>/sbin/udevstart</userinput></screen>
+ </important>
</sect2>
diff --git a/chapter07/bootscripts.xml b/chapter07/bootscripts.xml
index 67a4d877c..a5c589c76 100644
--- a/chapter07/bootscripts.xml
+++ b/chapter07/bootscripts.xml
@@ -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>
diff --git a/chapter08/kernel.xml b/chapter08/kernel.xml
index 9a9de871b..1840c3008 100644
--- a/chapter08/kernel.xml
+++ b/chapter08/kernel.xml
@@ -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>
diff --git a/general.ent b/general.ent
index e183f0033..777c119a2 100644
--- a/general.ent
+++ b/general.ent
@@ -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">
diff --git a/patches.ent b/patches.ent
index bef63527b..81e978a50 100644
--- a/patches.ent
+++ b/patches.ent
@@ -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">