Changeset 61e63d3
- Timestamp:
- 05/23/2008 01:45:45 AM (16 years ago)
- Branches:
- 10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
- Children:
- 9faa3e2
- Parents:
- 1c6f1c1
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter01/changelog.xml
r1c6f1c1 r61e63d3 36 36 </listitem> 37 37 --> 38 39 <listitem> 40 <para>2008-05-22</para> 41 <itemizedlist> 42 <listitem> 43 <para>[bryan] - Updated Udev to 122, udev-config to 44 20080522, and lfs-bootscripts to 20080522. Also made 45 persistent-net rules able to be pre-generated, using 46 udevadm test. Fixes #2057, #2079 (I think), #2170, and 47 #2186.</para> 48 </listitem> 49 </itemizedlist> 50 </listitem> 38 51 39 52 <listitem> -
chapter01/whatsnew.xml
r1c6f1c1 r61e63d3 180 180 <para>Texinfo &texinfo-version;</para> 181 181 </listitem> 182 < !--<listitem>182 <listitem> 183 183 <para>Udev &udev-version;</para> 184 </listitem> -->184 </listitem> 185 185 <listitem> 186 186 <para>&udev-config;</para> … … 235 235 <listitem> 236 236 <para>&readline-fixes-patch;</para> 237 </listitem>238 239 <listitem>240 <para>&udev-usbid-patch;</para>241 237 </listitem> 242 238 -
chapter03/patches.xml
r1c6f1c1 r61e63d3 189 189 190 190 <varlistentry> 191 <term>Udev usb_id Segfault Patch - <token>&udev-usbid-patch-size;</token>:</term>192 <listitem>193 <para>Download: <ulink url="&patches-root;&udev-usbid-patch;"/></para>194 <para>MD5 sum: <literal>&udev-usbid-md5;</literal></para>195 </listitem>196 </varlistentry>197 198 199 <varlistentry>200 191 <term>Vim Fixes Patch - <token>&vim-fixes-patch-size;</token>:</term> 201 192 <listitem> -
chapter06/udev.xml
r1c6f1c1 r61e63d3 48 48 49 49 <para>Create some devices and directories that Udev cannot handle due to 50 them being required very early in the boot process :</para>50 them being required very early in the boot process, or by Udev itself:</para> 51 51 52 52 <screen><userinput remap="install">install -dv /lib/{firmware,udev/devices/{pts,shm}} 53 53 mknod -m0666 /lib/udev/devices/null c 1 3 54 mknod -m0600 /lib/udev/devices/kmsg c 1 11 54 55 ln -sv /proc/self/fd /lib/udev/devices/fd 55 56 ln -sv /proc/self/fd/0 /lib/udev/devices/stdin … … 58 59 ln -sv /proc/kcore /lib/udev/devices/core</userinput></screen> 59 60 60 <para><command>usb_id</command> is known to segfault under certain kernel61 configurations. Fix the issue by applying the following patch:</para>62 63 <screen><userinput remap="pre">patch -Np1 -i ../&udev-usbid-patch;</userinput></screen>64 65 61 <para>Compile the package:</para> 66 62 … … 105 101 </variablelist> 106 102 107 <para>Udev has to be configured in order to work properly, as it only 108 installs a few configuration files by default. First install the 109 commonly-used rules files provided by Udev:</para> 110 111 <screen><userinput remap="install">cp -v etc/udev/rules.d/[0-9]* /etc/udev/rules.d/</userinput></screen> 112 113 <para>Now install the LFS-specific rules files:</para> 103 <para>Udev has to be configured in order to work properly, as its default 104 configuration does not cover all devices. Install the (LFS-specific) 105 custom rules files:</para> 114 106 115 107 <screen><userinput remap="install">cd &udev-config; … … 130 122 131 123 <screen><userinput remap="install">cd .. 124 install -dv /usr/share/doc/udev-&udev-version; 132 125 install -m644 -v docs/writing_udev_rules/index.html \ 133 126 /usr/share/doc/udev-&udev-version;/index.html</userinput></screen> … … 144 137 145 138 <seglistitem> 146 <seg>ata_id, cdrom_id, create_floppy_devices, edd_id, firmware.sh, 147 path_id, scsi_id, udevcontrol, udevd, udevinfo, udevmonitor, udevsettle, 148 udevtest, udevtrigger, usb_id, vol_id, write_cd_rules, and 149 write_net_rules</seg> 139 <seg>ata_id, cdrom_id, collect, create_floppy_devices, edd_id, 140 firmware.sh, fstab_import, path_id, scsi_id, udevadm, udevd, 141 usb_id, vol_id, write_cd_rules, and write_net_rules</seg> 150 142 <seg>libvolume_id</seg> 151 143 <seg>/etc/udev</seg> … … 180 172 </varlistentry> 181 173 174 <varlistentry id="collect"> 175 <term><command>collect</command></term> 176 <listitem> 177 <para>Given an ID for the current uevent and a list of 178 IDs (for all target uevents), registers the current ID 179 and indicates whether all target IDs have been registered</para> 180 <indexterm zone="ch-system-udev collect"> 181 <primary sortas="b-collect">collect</primary> 182 </indexterm> 183 </listitem> 184 </varlistentry> 185 182 186 <varlistentry id="create_floppy_devices"> 183 187 <term><command>create_floppy_devices</command></term> … … 206 210 <indexterm zone="ch-system-udev firmware.sh"> 207 211 <primary sortas="b-firmware.sh">firmware.sh</primary> 212 </indexterm> 213 </listitem> 214 </varlistentry> 215 216 <varlistentry id="fstab_import"> 217 <term><command>fstab_import</command></term> 218 <listitem> 219 <para>Finds an entry in <filename>/etc/fstab</filename> that 220 matches the current device, and provides its information to 221 Udev</para> 222 <indexterm zone="ch-system-udev fstab_import"> 223 <primary sortas="b-fstab_import">fstab_import</primary> 208 224 </indexterm> 209 225 </listitem> … … 233 249 </varlistentry> 234 250 235 <varlistentry id="udevcontrol"> 236 <term><command>udevcontrol</command></term> 237 <listitem> 238 <para>Configures a number of options for the running 239 <command>udevd</command> daemon, such as the log level.</para> 240 <indexterm zone="ch-system-udev udevcontrol"> 241 <primary sortas="b-udevcontrol">udevcontrol</primary> 251 <varlistentry id="udevadm"> 252 <term><command>udevadm</command></term> 253 <listitem> 254 <para>Generic udev administration tool: controls the udevd daemon, 255 provides info from the Udev database, monitors uevents, waits for 256 uevents to finish, tests Udev configuration, and triggers uevents 257 for a given device</para> 258 <indexterm zone="ch-system-udev udevadm"> 259 <primary sortas="b-udevadm">udevadm</primary> 242 260 </indexterm> 243 261 </listitem> … … 256 274 </varlistentry> 257 275 258 <varlistentry id="udevinfo">259 <term><command>udevinfo</command></term>260 <listitem>261 <para>Allows users to query the Udev database for262 information on any device currently present on the system; it also263 provides a way to query any device in the <systemitem264 class="filesystem">sysfs</systemitem> tree to help create udev265 rules</para>266 <indexterm zone="ch-system-udev udevinfo">267 <primary sortas="b-udevinfo">udevinfo</primary>268 </indexterm>269 </listitem>270 </varlistentry>271 272 <varlistentry id="udevmonitor">273 <term><command>udevmonitor</command></term>274 <listitem>275 <para>Prints the event received from the kernel and the environment276 which Udev sends out after rule processing</para>277 <indexterm zone="ch-system-udev udevmonitor">278 <primary sortas="b-udevmonitor">udevmonitor</primary>279 </indexterm>280 </listitem>281 </varlistentry>282 283 <varlistentry id="udevsettle">284 <term><command>udevsettle</command></term>285 <listitem>286 <para>Watches the Udev event queue and exits if all current uevents287 have been handled</para>288 <indexterm zone="ch-system-udev udevsettle">289 <primary sortas="b-udevsettle">udevsettle</primary>290 </indexterm>291 </listitem>292 </varlistentry>293 294 <varlistentry id="udevtest">295 <term><command>udevtest</command></term>296 <listitem>297 <para>Simulates a uevent for the given device, and prints out the298 name of the node the real <command>udevd</command> would have created,299 or the name of the renamed network interface</para>300 <indexterm zone="ch-system-udev udevtest">301 <primary sortas="b-udevtest">udevtest</primary>302 </indexterm>303 </listitem>304 </varlistentry>305 306 <varlistentry id="udevtrigger">307 <term><command>udevtrigger</command></term>308 <listitem>309 <para>Triggers kernel device uevents to be replayed</para>310 <indexterm zone="ch-system-udev udevtrigger">311 <primary sortas="b-udevtrigger">udevtrigger</primary>312 </indexterm>313 </listitem>314 </varlistentry>315 316 276 <varlistentry id="usb_id"> 317 277 <term><command>usb_id</command></term> -
chapter07/network.xml
r1c6f1c1 r61e63d3 40 40 same devices at every boot, including the first:</para> 41 41 42 <screen><userinput>/lib/udev/write_net_rules all_interfaces</userinput></screen> 42 <screen><userinput>for NIC in /sys/class/net/* ; do 43 INTERFACE=${NIC##*/} udevadm test --action=add --subsystem=net $NIC 44 done</userinput></screen> 43 45 44 46 <para>Now, inspect the <filename>/etc/udev/rules.d/70-persistent-net.rules</filename> … … 49 51 <para>The file begins with a comment block followed by two lines for each 50 52 NIC. The first line for each NIC is a commented description showing its 51 hardware IDs (e.g. its PC vendor and device IDs, if it's a PCI card),53 hardware IDs (e.g. its PCI vendor and device IDs, if it's a PCI card), 52 54 along with its driver in parentheses, if the driver can be found. Neither 53 55 the hardware ID nor the driver is used to determine which name to give an 54 interface . The second line is the Udev rule that matches this NIC and55 actually assigns it a name.</para>56 interface; this information is only for reference. The second line is the 57 Udev rule that matches this NIC and actually assigns it a name.</para> 56 58 57 59 <para>All Udev rules are made up of several keys, separated by commas and 58 optional whitespace. This rule's keys and an explanation sof each of them60 optional whitespace. This rule's keys and an explanation of each of them 59 61 are as follows:</para> 60 62 … … 63 65 <para><literal>SUBSYSTEM=="net"</literal> - This tells Udev to ignore 64 66 devices that are not network cards.</para> 67 </listitem> 68 <listitem> 69 <para><literal>ACTION=="add"</literal> - This tells Udev to ignore this 70 rule for a uevent that isn't an add ("remove" and "change" uevents also 71 happen, but don't need to rename network interfaces).</para> 65 72 </listitem> 66 73 <listitem> … … 71 78 </listitem> 72 79 <listitem> 73 <para><literal>ATTRS{type}=="1"</literal> - Optional. This key will 74 only be added if this NIC is a wireless NIC whose driver creates 75 multiple virtual interfaces; it ensures the rule only matches the 76 primary interface. The secondary interfaces are not matched for the 77 same reason that VLAN and bridge sub-interfaces are not matched: there 78 would be a name collision.</para> 79 </listitem> 80 <listitem> 81 <para><literal>ATTRS{address}</literal> - The value of this key is the 80 <para><literal>ATTR{address}</literal> - The value of this key is the 82 81 NIC's MAC address.</para> 82 </listitem> 83 <listitem> 84 <para><literal>ATTR{type}=="1"</literal> - This ensures the rule only 85 matches the primary interface in the case of certain wireless drivers, 86 which create multiple virtual interfaces. The secondary interfaces are 87 skipped for the same reason that VLAN and bridge sub-interfaces are 88 skipped: there would be a name collision otherwise.</para> 89 </listitem> 90 <listitem> 91 <para><literal>KERNEL=="eth*"</literal> - This key was added to the 92 Udev rule generator to handle machines that have multiple network 93 interfaces, all with the same MAC address (the PS3 is one such 94 machine). If the independent interfaces have different basenames, 95 this key will allow Udev to tell them apart. This is generally not 96 necessary for most Linux From Scratch users, but does not hurt.</para> 83 97 </listitem> 84 98 <listitem> -
chapter07/symlinks.xml
r1c6f1c1 r61e63d3 64 64 run a command similar to the following:</para> 65 65 66 <screen role="nodump"><userinput>udev test /sys/block/hdd</userinput></screen>66 <screen role="nodump"><userinput>udevadm test /sys/block/hdd</userinput></screen> 67 67 68 68 <para>Look at the lines containing the output of various *_id programs. … … 125 125 vendor and product IDs and/or serial numbers work):</para> 126 126 127 <screen role="nodump"><userinput>udev info -a -p /sys/class/video4linux/video0</userinput></screen>127 <screen role="nodump"><userinput>udevadm info -a -p /sys/class/video4linux/video0</userinput></screen> 128 128 129 129 <para>Then write rules that create the symlinks, e.g.:</para> -
chapter07/udev.xml
r1c6f1c1 r61e63d3 106 106 class="directory">/dev</filename>. This is necessary because some devices, 107 107 directories, and symlinks are needed before the dynamic device handling 108 processes are available during the early stages of booting a system .109 Creating static device nodes in <filename110 class="directory">/lib/udev/devices</filename> also provides an easy111 workaround for devices that are not supported by the dynamic device112 handling infrastructure. The bootscript then starts the Udev daemon,113 <command>udevd</command>, which will act on any uevents it receives.114 Finally, the bootscript forces the kernel to replay uevents for any115 devices that have already been registered and then waits for108 processes are available during the early stages of booting a system, or 109 are required by <command>udevd</command> itself. Creating static device 110 nodes in <filename class="directory">/lib/udev/devices</filename> also 111 provides an easy workaround for devices that are not supported by the 112 dynamic device handling infrastructure. The bootscript then starts the 113 Udev daemon, <command>udevd</command>, which will act on any uevents it 114 receives. Finally, the bootscript forces the kernel to replay uevents for 115 any devices that have already been registered and then waits for 116 116 <command>udevd</command> to handle them.</para> 117 117 … … 156 156 might contain the string 157 157 <quote>pci:v00001319d00000801sv00001319sd00001319bc04sc01i00</quote>. 158 The rules that LFS installs will cause <command>udevd</command> to call159 out to <command>/sbin/modprobe</command> with the contents of the160 <envar>MODALIAS</envar> uevent environment variable ( thatshould be the158 The default rules provided with Udev will cause <command>udevd</command> 159 to call out to <command>/sbin/modprobe</command> with the contents of the 160 <envar>MODALIAS</envar> uevent environment variable (which should be the 161 161 same as the contents of the <filename>modalias</filename> file in sysfs), 162 162 thus loading all modules whose aliases match this string after wildcard … … 269 269 example, a poorly-writen rule can match both a SCSI disk (as desired) 270 270 and the corresponding SCSI generic device (incorrectly) by vendor. 271 Find the offending rule and make it more specific.</para> 271 Find the offending rule and make it more specific, with the help of the 272 <command>udevadm info</command> command.</para> 272 273 273 274 </sect3> … … 282 283 <systemitem class="filesystem">sysfs</systemitem> attribute and appending 283 284 it to the <filename>/etc/udev/rules.d/10-wait_for_sysfs.rules</filename> 284 file . Please notify the LFS Development list if you do so and it285 helps.</para>285 file (create this file if it does not exist). Please notify the LFS 286 Development list if you do so and it helps.</para> 286 287 287 288 </sect3> -
general.ent
r1c6f1c1 r61e63d3 1 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!ENTITY version "SVN-20080 423">3 <!ENTITY releasedate " April 23, 2008">2 <!ENTITY version "SVN-20080522"> 3 <!ENTITY releasedate "May 22, 2008"> 4 4 <!ENTITY milestone "7.0"> 5 5 <!ENTITY generic-version "development"> <!-- Use "development", "testing", or "x.y[-pre{x}]" --> -
packages.ent
r1c6f1c1 r61e63d3 284 284 <!ENTITY less-ch6-sbu "0.1 SBU"> 285 285 286 <!ENTITY lfs-bootscripts-version "200 70813">287 <!ENTITY lfs-bootscripts-size " 39KB">286 <!ENTITY lfs-bootscripts-version "20080522"> 287 <!ENTITY lfs-bootscripts-size "42 KB"> 288 288 <!ENTITY lfs-bootscripts-url "&downloads-root;lfs-bootscripts-&lfs-bootscripts-version;.tar.bz2"> 289 <!ENTITY lfs-bootscripts-md5 " 0ecbdd3b774d519fc535a0a595aa5b86">289 <!ENTITY lfs-bootscripts-md5 "2f29eb04b3373de58b770e3946575751"> 290 290 <!ENTITY lfs-bootscripts-home " "> 291 291 <!ENTITY lfs-bootscripts-ch7-du "0.4 MB"> … … 489 489 <!ENTITY texinfo-ch6-sbu "0.2 SBU"> 490 490 491 <!ENTITY udev-version "1 13">492 <!ENTITY udev-size " 191KB">491 <!ENTITY udev-version "122"> 492 <!ENTITY udev-size "207 KB"> 493 493 <!ENTITY udev-url "&kernel;linux/utils/kernel/hotplug/udev-&udev-version;.tar.bz2"> 494 <!ENTITY udev-md5 " cb9a227206b9d85ae8cfc88fc51c1710">494 <!ENTITY udev-md5 "aca509d0a286c06d897f9de67f527ace"> 495 495 <!ENTITY udev-home "&kernel;linux/utils/kernel/hotplug/udev.html"> 496 <!ENTITY udev-ch6-du " 5.8MB">496 <!ENTITY udev-ch6-du "7.6 MB"> 497 497 <!ENTITY udev-ch6-sbu "0.1 SBU"> 498 498 499 <!ENTITY udev-config "udev-config-200 70731">499 <!ENTITY udev-config "udev-config-20080522"> 500 500 <!ENTITY udev-config-size "13 KB"> 501 501 <!ENTITY udev-config-url "&downloads-root;&udev-config;.tar.bz2"> 502 <!ENTITY udev-config-md5 " 49c72e712f38c18884bd11a9a3b7e968">502 <!ENTITY udev-config-md5 "cb5126322dacf38fe1770c28119208d5"> 503 503 <!ENTITY udev-config-home " "> 504 504 -
patches.ent
r1c6f1c1 r61e63d3 105 105 106 106 107 <!ENTITY udev-usbid-patch "udev-&udev-version;-usb_id-1.patch">108 <!ENTITY udev-usbid-md5 "247614818827422b99672ea8bf3909ec">109 <!ENTITY udev-usbid-patch-size "3.2 KB">110 111 112 107 <!ENTITY vim-fixes-patch "vim-&vim-version;-fixes-6.patch"> 113 108 <!ENTITY vim-fixes-patch-md5 "a1e9ed80bac0ac8175bc3ed89867ca2e">
Note:
See TracChangeset
for help on using the changeset viewer.