diff options
-rw-r--r-- | chapter01/changelog.xml | 13 | ||||
-rw-r--r-- | chapter01/whatsnew.xml | 8 | ||||
-rw-r--r-- | chapter03/patches.xml | 9 | ||||
-rw-r--r-- | chapter06/udev.xml | 122 | ||||
-rw-r--r-- | chapter07/network.xml | 40 | ||||
-rw-r--r-- | chapter07/symlinks.xml | 4 | ||||
-rw-r--r-- | chapter07/udev.xml | 29 | ||||
-rw-r--r-- | general.ent | 4 | ||||
-rw-r--r-- | packages.ent | 18 | ||||
-rw-r--r-- | patches.ent | 5 |
10 files changed, 111 insertions, 141 deletions
diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 371860310..35d9eb735 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -37,6 +37,19 @@ --> <listitem> + <para>2008-05-22</para> + <itemizedlist> + <listitem> + <para>[bryan] - Updated Udev to 122, udev-config to + 20080522, and lfs-bootscripts to 20080522. Also made + persistent-net rules able to be pre-generated, using + udevadm test. Fixes #2057, #2079 (I think), #2170, and + #2186.</para> + </listitem> + </itemizedlist> + </listitem> + + <listitem> <para>2008-04-23</para> <itemizedlist> <listitem> diff --git a/chapter01/whatsnew.xml b/chapter01/whatsnew.xml index 10e5e5e32..c0f887bc8 100644 --- a/chapter01/whatsnew.xml +++ b/chapter01/whatsnew.xml @@ -179,9 +179,9 @@ <listitem> <para>Texinfo &texinfo-version;</para> </listitem> - <!--<listitem> + <listitem> <para>Udev &udev-version;</para> - </listitem>--> + </listitem> <listitem> <para>&udev-config;</para> </listitem> @@ -237,10 +237,6 @@ </listitem> <listitem> - <para>&udev-usbid-patch;</para> - </listitem> - - <listitem> <para>&vim-fixes-patch;</para> </listitem> diff --git a/chapter03/patches.xml b/chapter03/patches.xml index 5bd124a18..22a2d9620 100644 --- a/chapter03/patches.xml +++ b/chapter03/patches.xml @@ -188,15 +188,6 @@ <varlistentry> - <term>Udev usb_id Segfault Patch - <token>&udev-usbid-patch-size;</token>:</term> - <listitem> - <para>Download: <ulink url="&patches-root;&udev-usbid-patch;"/></para> - <para>MD5 sum: <literal>&udev-usbid-md5;</literal></para> - </listitem> - </varlistentry> - - - <varlistentry> <term>Vim Fixes Patch - <token>&vim-fixes-patch-size;</token>:</term> <listitem> <para>Download: <ulink url="&patches-root;&vim-fixes-patch;"/></para> diff --git a/chapter06/udev.xml b/chapter06/udev.xml index 8d7e820ae..95b7c3184 100644 --- a/chapter06/udev.xml +++ b/chapter06/udev.xml @@ -47,21 +47,17 @@ <screen><userinput remap="pre">tar -xvf ../&udev-config;.tar.bz2</userinput></screen> <para>Create some devices and directories that Udev cannot handle due to - them being required very early in the boot process:</para> + them being required very early in the boot process, or by Udev itself:</para> <screen><userinput remap="install">install -dv /lib/{firmware,udev/devices/{pts,shm}} mknod -m0666 /lib/udev/devices/null c 1 3 +mknod -m0600 /lib/udev/devices/kmsg c 1 11 ln -sv /proc/self/fd /lib/udev/devices/fd ln -sv /proc/self/fd/0 /lib/udev/devices/stdin ln -sv /proc/self/fd/1 /lib/udev/devices/stdout ln -sv /proc/self/fd/2 /lib/udev/devices/stderr ln -sv /proc/kcore /lib/udev/devices/core</userinput></screen> - <para><command>usb_id</command> is known to segfault under certain kernel - configurations. Fix the issue by applying the following patch:</para> - -<screen><userinput remap="pre">patch -Np1 -i ../&udev-usbid-patch;</userinput></screen> - <para>Compile the package:</para> <screen><userinput remap="make">make EXTRAS="`echo extras/*/`"</userinput></screen> @@ -104,13 +100,9 @@ ln -sv /proc/kcore /lib/udev/devices/core</userinput></screen> </variablelist> - <para>Udev has to be configured in order to work properly, as it only - installs a few configuration files by default. First install the - commonly-used rules files provided by Udev:</para> - -<screen><userinput remap="install">cp -v etc/udev/rules.d/[0-9]* /etc/udev/rules.d/</userinput></screen> - - <para>Now install the LFS-specific rules files:</para> + <para>Udev has to be configured in order to work properly, as its default + configuration does not cover all devices. Install the (LFS-specific) + custom rules files:</para> <screen><userinput remap="install">cd &udev-config; make install</userinput></screen> @@ -129,6 +121,7 @@ make install</userinput></screen> rules:</para> <screen><userinput remap="install">cd .. +install -dv /usr/share/doc/udev-&udev-version; install -m644 -v docs/writing_udev_rules/index.html \ /usr/share/doc/udev-&udev-version;/index.html</userinput></screen> @@ -143,10 +136,9 @@ install -m644 -v docs/writing_udev_rules/index.html \ <segtitle>Installed directory</segtitle> <seglistitem> - <seg>ata_id, cdrom_id, create_floppy_devices, edd_id, firmware.sh, - path_id, scsi_id, udevcontrol, udevd, udevinfo, udevmonitor, udevsettle, - udevtest, udevtrigger, usb_id, vol_id, write_cd_rules, and - write_net_rules</seg> + <seg>ata_id, cdrom_id, collect, create_floppy_devices, edd_id, + firmware.sh, fstab_import, path_id, scsi_id, udevadm, udevd, + usb_id, vol_id, write_cd_rules, and write_net_rules</seg> <seg>libvolume_id</seg> <seg>/etc/udev</seg> </seglistitem> @@ -179,6 +171,18 @@ install -m644 -v docs/writing_udev_rules/index.html \ </listitem> </varlistentry> + <varlistentry id="collect"> + <term><command>collect</command></term> + <listitem> + <para>Given an ID for the current uevent and a list of + IDs (for all target uevents), registers the current ID + and indicates whether all target IDs have been registered</para> + <indexterm zone="ch-system-udev collect"> + <primary sortas="b-collect">collect</primary> + </indexterm> + </listitem> + </varlistentry> + <varlistentry id="create_floppy_devices"> <term><command>create_floppy_devices</command></term> <listitem> @@ -209,6 +213,18 @@ install -m644 -v docs/writing_udev_rules/index.html \ </listitem> </varlistentry> + <varlistentry id="fstab_import"> + <term><command>fstab_import</command></term> + <listitem> + <para>Finds an entry in <filename>/etc/fstab</filename> that + matches the current device, and provides its information to + Udev</para> + <indexterm zone="ch-system-udev fstab_import"> + <primary sortas="b-fstab_import">fstab_import</primary> + </indexterm> + </listitem> + </varlistentry> + <varlistentry id="path_id"> <term><command>path_id</command></term> <listitem> @@ -232,13 +248,15 @@ install -m644 -v docs/writing_udev_rules/index.html \ </listitem> </varlistentry> - <varlistentry id="udevcontrol"> - <term><command>udevcontrol</command></term> + <varlistentry id="udevadm"> + <term><command>udevadm</command></term> <listitem> - <para>Configures a number of options for the running - <command>udevd</command> daemon, such as the log level.</para> - <indexterm zone="ch-system-udev udevcontrol"> - <primary sortas="b-udevcontrol">udevcontrol</primary> + <para>Generic udev administration tool: controls the udevd daemon, + provides info from the Udev database, monitors uevents, waits for + uevents to finish, tests Udev configuration, and triggers uevents + for a given device</para> + <indexterm zone="ch-system-udev udevadm"> + <primary sortas="b-udevadm">udevadm</primary> </indexterm> </listitem> </varlistentry> @@ -255,64 +273,6 @@ install -m644 -v docs/writing_udev_rules/index.html \ </listitem> </varlistentry> - <varlistentry id="udevinfo"> - <term><command>udevinfo</command></term> - <listitem> - <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 - rules</para> - <indexterm zone="ch-system-udev udevinfo"> - <primary sortas="b-udevinfo">udevinfo</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="udevmonitor"> - <term><command>udevmonitor</command></term> - <listitem> - <para>Prints the event received from the kernel and the environment - which Udev sends out after rule processing</para> - <indexterm zone="ch-system-udev udevmonitor"> - <primary sortas="b-udevmonitor">udevmonitor</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="udevsettle"> - <term><command>udevsettle</command></term> - <listitem> - <para>Watches the Udev event queue and exits if all current uevents - have been handled</para> - <indexterm zone="ch-system-udev udevsettle"> - <primary sortas="b-udevsettle">udevsettle</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="udevtest"> - <term><command>udevtest</command></term> - <listitem> - <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> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="udevtrigger"> - <term><command>udevtrigger</command></term> - <listitem> - <para>Triggers kernel device uevents to be replayed</para> - <indexterm zone="ch-system-udev udevtrigger"> - <primary sortas="b-udevtrigger">udevtrigger</primary> - </indexterm> - </listitem> - </varlistentry> - <varlistentry id="usb_id"> <term><command>usb_id</command></term> <listitem> diff --git a/chapter07/network.xml b/chapter07/network.xml index f3159a571..cf6762e5c 100644 --- a/chapter07/network.xml +++ b/chapter07/network.xml @@ -39,7 +39,9 @@ <para>Pre-generate the rules to ensure the same names get assigned to the same devices at every boot, including the first:</para> -<screen><userinput>/lib/udev/write_net_rules all_interfaces</userinput></screen> +<screen><userinput>for NIC in /sys/class/net/* ; do + INTERFACE=${NIC##*/} udevadm test --action=add --subsystem=net $NIC +done</userinput></screen> <para>Now, inspect the <filename>/etc/udev/rules.d/70-persistent-net.rules</filename> file, to find out which name was assigned to which network device:</para> @@ -48,14 +50,14 @@ <para>The file begins with a comment block followed by two lines for each NIC. The first line for each NIC is a commented description showing its - hardware IDs (e.g. its PC vendor and device IDs, if it's a PCI card), + hardware IDs (e.g. its PCI vendor and device IDs, if it's a PCI card), along with its driver in parentheses, if the driver can be found. Neither the hardware ID nor the driver is used to determine which name to give an - interface. The second line is the Udev rule that matches this NIC and - actually assigns it a name.</para> + interface; this information is only for reference. The second line is the + Udev rule that matches this NIC and actually assigns it a name.</para> <para>All Udev rules are made up of several keys, separated by commas and - optional whitespace. This rule's keys and an explanations of each of them + optional whitespace. This rule's keys and an explanation of each of them are as follows:</para> <itemizedlist> @@ -64,22 +66,34 @@ devices that are not network cards.</para> </listitem> <listitem> + <para><literal>ACTION=="add"</literal> - This tells Udev to ignore this + rule for a uevent that isn't an add ("remove" and "change" uevents also + happen, but don't need to rename network interfaces).</para> + </listitem> + <listitem> <para><literal>DRIVERS=="?*"</literal> - This exists so that Udev will ignore VLAN or bridge sub-interfaces (because these sub-interfaces do not have drivers). These sub-interfaces are skipped because the name that would be assigned would collide with their parent devices.</para> </listitem> <listitem> - <para><literal>ATTRS{type}=="1"</literal> - Optional. This key will - only be added if this NIC is a wireless NIC whose driver creates - multiple virtual interfaces; it ensures the rule only matches the - primary interface. The secondary interfaces are not matched for the - same reason that VLAN and bridge sub-interfaces are not matched: there - would be a name collision.</para> + <para><literal>ATTR{address}</literal> - The value of this key is the + NIC's MAC address.</para> + </listitem> + <listitem> + <para><literal>ATTR{type}=="1"</literal> - This ensures the rule only + matches the primary interface in the case of certain wireless drivers, + which create multiple virtual interfaces. The secondary interfaces are + skipped for the same reason that VLAN and bridge sub-interfaces are + skipped: there would be a name collision otherwise.</para> </listitem> <listitem> - <para><literal>ATTRS{address}</literal> - The value of this key is the - NIC's MAC address.</para> + <para><literal>KERNEL=="eth*"</literal> - This key was added to the + Udev rule generator to handle machines that have multiple network + interfaces, all with the same MAC address (the PS3 is one such + machine). If the independent interfaces have different basenames, + this key will allow Udev to tell them apart. This is generally not + necessary for most Linux From Scratch users, but does not hurt.</para> </listitem> <listitem> <para><literal>NAME</literal> - The value of this key is the name that diff --git a/chapter07/symlinks.xml b/chapter07/symlinks.xml index 4b0aafeed..1ddfa62ea 100644 --- a/chapter07/symlinks.xml +++ b/chapter07/symlinks.xml @@ -63,7 +63,7 @@ <filename class="directory">/sys/block/hdd</filename>) and run a command similar to the following:</para> -<screen role="nodump"><userinput>udevtest /sys/block/hdd</userinput></screen> +<screen role="nodump"><userinput>udevadm test /sys/block/hdd</userinput></screen> <para>Look at the lines containing the output of various *_id programs. The <quote>by-id</quote> mode will use the ID_SERIAL value if it exists and @@ -124,7 +124,7 @@ Figure out the attributes that identify the device uniquely (usually, vendor and product IDs and/or serial numbers work):</para> -<screen role="nodump"><userinput>udevinfo -a -p /sys/class/video4linux/video0</userinput></screen> +<screen role="nodump"><userinput>udevadm info -a -p /sys/class/video4linux/video0</userinput></screen> <para>Then write rules that create the symlinks, e.g.:</para> diff --git a/chapter07/udev.xml b/chapter07/udev.xml index e64fdf191..00afb06e7 100644 --- a/chapter07/udev.xml +++ b/chapter07/udev.xml @@ -105,14 +105,14 @@ class="directory">/lib/udev/devices</filename> to <filename class="directory">/dev</filename>. This is necessary because some devices, directories, and symlinks are needed before the dynamic device handling - processes are available during the early stages of booting a system. - Creating static device nodes in <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 uevents it receives. - Finally, the bootscript forces the kernel to replay uevents for any - devices that have already been registered and then waits for + processes are available during the early stages of booting a system, or + are required by <command>udevd</command> itself. Creating static device + nodes in <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 uevents it + receives. Finally, the bootscript forces the kernel to replay uevents for + any devices that have already been registered and then waits for <command>udevd</command> to handle them.</para> </sect3> @@ -155,9 +155,9 @@ <filename>/sys/bus/pci/devices/0000:00:0d.0/modalias</filename> file might contain the string <quote>pci:v00001319d00000801sv00001319sd00001319bc04sc01i00</quote>. - The rules that LFS installs will cause <command>udevd</command> to call - out to <command>/sbin/modprobe</command> with the contents of the - <envar>MODALIAS</envar> uevent environment variable (that should be the + The default rules provided with Udev will cause <command>udevd</command> + to call out to <command>/sbin/modprobe</command> with the contents of the + <envar>MODALIAS</envar> uevent environment variable (which should be the same as the contents of the <filename>modalias</filename> file in sysfs), thus loading all modules whose aliases match this string after wildcard expansion.</para> @@ -268,7 +268,8 @@ <para>This usually happens if a rule unexpectedly matches a device. For example, a poorly-writen rule can match both a SCSI disk (as desired) and the corresponding SCSI generic device (incorrectly) by vendor. - Find the offending rule and make it more specific.</para> + Find the offending rule and make it more specific, with the help of the + <command>udevadm info</command> command.</para> </sect3> @@ -281,8 +282,8 @@ For now, you can work around it by creating a rule that waits for the used <systemitem class="filesystem">sysfs</systemitem> attribute and appending it to the <filename>/etc/udev/rules.d/10-wait_for_sysfs.rules</filename> - file. Please notify the LFS Development list if you do so and it - helps.</para> + file (create this file if it does not exist). Please notify the LFS + Development list if you do so and it helps.</para> </sect3> diff --git a/general.ent b/general.ent index 0c23bf567..e5bebbb16 100644 --- a/general.ent +++ b/general.ent @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="ISO-8859-1"?> -<!ENTITY version "SVN-20080423"> -<!ENTITY releasedate "April 23, 2008"> +<!ENTITY version "SVN-20080522"> +<!ENTITY releasedate "May 22, 2008"> <!ENTITY milestone "7.0"> <!ENTITY generic-version "development"> <!-- Use "development", "testing", or "x.y[-pre{x}]" --> diff --git a/packages.ent b/packages.ent index 7afda42e1..67744dfb9 100644 --- a/packages.ent +++ b/packages.ent @@ -283,10 +283,10 @@ <!ENTITY less-ch6-du "2.8 MB"> <!ENTITY less-ch6-sbu "0.1 SBU"> -<!ENTITY lfs-bootscripts-version "20070813"> -<!ENTITY lfs-bootscripts-size "39 KB"> +<!ENTITY lfs-bootscripts-version "20080522"> +<!ENTITY lfs-bootscripts-size "42 KB"> <!ENTITY lfs-bootscripts-url "&downloads-root;lfs-bootscripts-&lfs-bootscripts-version;.tar.bz2"> -<!ENTITY lfs-bootscripts-md5 "0ecbdd3b774d519fc535a0a595aa5b86"> +<!ENTITY lfs-bootscripts-md5 "2f29eb04b3373de58b770e3946575751"> <!ENTITY lfs-bootscripts-home " "> <!ENTITY lfs-bootscripts-ch7-du "0.4 MB"> <!ENTITY lfs-bootscripts-ch7-sbu "less than 0.1 SBU"> @@ -488,18 +488,18 @@ <!ENTITY texinfo-ch6-du "16.6 MB"> <!ENTITY texinfo-ch6-sbu "0.2 SBU"> -<!ENTITY udev-version "113"> -<!ENTITY udev-size "191 KB"> +<!ENTITY udev-version "122"> +<!ENTITY udev-size "207 KB"> <!ENTITY udev-url "&kernel;linux/utils/kernel/hotplug/udev-&udev-version;.tar.bz2"> -<!ENTITY udev-md5 "cb9a227206b9d85ae8cfc88fc51c1710"> +<!ENTITY udev-md5 "aca509d0a286c06d897f9de67f527ace"> <!ENTITY udev-home "&kernel;linux/utils/kernel/hotplug/udev.html"> -<!ENTITY udev-ch6-du "5.8 MB"> +<!ENTITY udev-ch6-du "7.6 MB"> <!ENTITY udev-ch6-sbu "0.1 SBU"> -<!ENTITY udev-config "udev-config-20070731"> +<!ENTITY udev-config "udev-config-20080522"> <!ENTITY udev-config-size "13 KB"> <!ENTITY udev-config-url "&downloads-root;&udev-config;.tar.bz2"> -<!ENTITY udev-config-md5 "49c72e712f38c18884bd11a9a3b7e968"> +<!ENTITY udev-config-md5 "cb5126322dacf38fe1770c28119208d5"> <!ENTITY udev-config-home " "> <!ENTITY util-linux-ng-version "2.13.1"> diff --git a/patches.ent b/patches.ent index 51310c3b5..70b97562c 100644 --- a/patches.ent +++ b/patches.ent @@ -104,11 +104,6 @@ <!ENTITY shadow-useradd-patch-size "6.1 KB"> -<!ENTITY udev-usbid-patch "udev-&udev-version;-usb_id-1.patch"> -<!ENTITY udev-usbid-md5 "247614818827422b99672ea8bf3909ec"> -<!ENTITY udev-usbid-patch-size "3.2 KB"> - - <!ENTITY vim-fixes-patch "vim-&vim-version;-fixes-6.patch"> <!ENTITY vim-fixes-patch-md5 "a1e9ed80bac0ac8175bc3ed89867ca2e"> <!ENTITY vim-fixes-patch-size "422 KB"> |