[9dfc02f] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[b06ca36] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[9dfc02f] | 4 | <!ENTITY % general-entities SYSTEM "../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 | ]>
|
---|
[ddd5542] | 7 |
|
---|
[a001133] | 8 | <sect1 id="ch-system-udev" role="wrap">
|
---|
[ddd5542] | 9 | <?dbhtml filename="udev.html"?>
|
---|
| 10 |
|
---|
| 11 | <title>Udev-&udev-version;</title>
|
---|
| 12 |
|
---|
| 13 | <indexterm zone="ch-system-udev">
|
---|
| 14 | <primary sortas="a-Udev">Udev</primary>
|
---|
| 15 | </indexterm>
|
---|
| 16 |
|
---|
| 17 | <sect2 role="package">
|
---|
| 18 | <title/>
|
---|
[9dfc02f] | 19 |
|
---|
[ddd5542] | 20 | <para>The Udev package contains programs for dynamic creation of device
|
---|
| 21 | nodes.</para>
|
---|
[9dfc02f] | 22 |
|
---|
[ddd5542] | 23 | <segmentedlist>
|
---|
| 24 | <segtitle>&buildtime;</segtitle>
|
---|
| 25 | <segtitle>&diskspace;</segtitle>
|
---|
[9dfc02f] | 26 |
|
---|
[ddd5542] | 27 | <seglistitem>
|
---|
[e4a5635] | 28 | <seg>&udev-ch6-sbu;</seg>
|
---|
| 29 | <seg>&udev-ch6-du;</seg>
|
---|
[ddd5542] | 30 | </seglistitem>
|
---|
| 31 | </segmentedlist>
|
---|
[9dfc02f] | 32 |
|
---|
[ddd5542] | 33 | </sect2>
|
---|
[9dfc02f] | 34 |
|
---|
[ddd5542] | 35 | <sect2 role="installation">
|
---|
| 36 | <title>Installation of Udev</title>
|
---|
| 37 |
|
---|
[7d6d34b] | 38 | <para>The udev-config tarball contains LFS-specific files used to configure
|
---|
[e1060de] | 39 | Udev. Unpack it into the Udev source directory:</para>
|
---|
[7d6d34b] | 40 |
|
---|
[b0c8f4a6] | 41 | <screen><userinput>tar -xvf ../&udev-config;.tar.bz2</userinput></screen>
|
---|
[7d6d34b] | 42 |
|
---|
[d2c332bc] | 43 | <para>Create some devices and directories that Udev cannot handle due to
|
---|
| 44 | them being required very early in the boot process:</para>
|
---|
| 45 |
|
---|
| 46 | <screen><userinput>install -dv /lib/{firmware,udev/devices/{pts,shm}}
|
---|
| 47 | mknod -m0666 /lib/udev/devices/null c 1 3
|
---|
| 48 | ln -sv /proc/self/fd /lib/udev/devices/fd
|
---|
| 49 | ln -sv /proc/self/fd/0 /lib/udev/devices/stdin
|
---|
| 50 | ln -sv /proc/self/fd/1 /lib/udev/devices/stdout
|
---|
| 51 | ln -sv /proc/self/fd/2 /lib/udev/devices/stderr
|
---|
| 52 | ln -sv /proc/kcore /lib/udev/devices/core</userinput></screen>
|
---|
| 53 |
|
---|
[ddd5542] | 54 | <para>Compile the package:</para>
|
---|
[9dfc02f] | 55 |
|
---|
[8536c02] | 56 | <screen><userinput>make EXTRAS="`echo extras/*/`"</userinput></screen>
|
---|
[81fd230] | 57 |
|
---|
[ddd5542] | 58 | <variablelist>
|
---|
| 59 | <title>The meaning of the make option:</title>
|
---|
| 60 |
|
---|
| 61 | <varlistentry>
|
---|
[d2c332bc] | 62 | <term><parameter>EXTRAS=...</parameter></term>
|
---|
[ddd5542] | 63 | <listitem>
|
---|
[8536c02] | 64 | <para>This builds the helper binaries that can aid in writing custom
|
---|
[d2c332bc] | 65 | Udev rules.</para>
|
---|
[ddd5542] | 66 | </listitem>
|
---|
| 67 | </varlistentry>
|
---|
[09043c0] | 68 |
|
---|
[ddd5542] | 69 | </variablelist>
|
---|
[09043c0] | 70 |
|
---|
[ddd5542] | 71 | <para>To test the results, issue:
|
---|
| 72 | <userinput>make test</userinput>.</para>
|
---|
[81fd230] | 73 |
|
---|
[c226182] | 74 | <para>Note that the Udev testsuite will produce numerous messages in
|
---|
| 75 | the host system's logs. These are harmless and can be ignored.</para>
|
---|
| 76 |
|
---|
[ddd5542] | 77 | <para>Install the package:</para>
|
---|
[9dfc02f] | 78 |
|
---|
[8536c02] | 79 | <screen><userinput>make DESTDIR=/ EXTRAS="`echo extras/*/`" install</userinput></screen>
|
---|
[09043c0] | 80 |
|
---|
[ddd5542] | 81 | <variablelist>
|
---|
| 82 | <title>The meaning of the make parameter:</title>
|
---|
[09043c0] | 83 |
|
---|
[ddd5542] | 84 | <varlistentry>
|
---|
| 85 | <term><parameter>DESTDIR=/</parameter></term>
|
---|
| 86 | <listitem>
|
---|
| 87 | <para>This prevents the Udev build process from killing any
|
---|
| 88 | <command>udevd</command> processes that may be running on the
|
---|
| 89 | host system.</para>
|
---|
| 90 | </listitem>
|
---|
| 91 | </varlistentry>
|
---|
[9dfc02f] | 92 |
|
---|
[ddd5542] | 93 | </variablelist>
|
---|
| 94 |
|
---|
[23732c83] | 95 | <para>Udev has to be configured in order to work properly, as it only
|
---|
| 96 | installs a few configuration files by default. First install the
|
---|
[dbfd971] | 97 | commonly-used rules files provided by Udev:</para>
|
---|
[18da154] | 98 |
|
---|
[7e6fb44] | 99 | <screen><userinput>cp -v etc/udev/rules.d/[0-9]* /etc/udev/rules.d/</userinput></screen>
|
---|
[18da154] | 100 |
|
---|
[dbfd971] | 101 | <para>Now install the LFS-specific rules files:</para>
|
---|
[7eac3e32] | 102 |
|
---|
[7e6fb44] | 103 | <screen><userinput>cd &udev-config;
|
---|
| 104 | make install</userinput></screen>
|
---|
| 105 |
|
---|
| 106 | <para>Install the documentation that explains the LFS-specific rules
|
---|
| 107 | files:</para>
|
---|
| 108 |
|
---|
| 109 | <screen><userinput>make install-doc</userinput></screen>
|
---|
| 110 |
|
---|
[dbfd971] | 111 | <para>Install the documentation that explains the commonly-used rules
|
---|
| 112 | files provided by Udev:</para>
|
---|
[7e6fb44] | 113 |
|
---|
| 114 | <screen><userinput>make install-extra-doc</userinput></screen>
|
---|
| 115 |
|
---|
| 116 | <para>Install the documentation that explains how to create custom Udev
|
---|
| 117 | rules:</para>
|
---|
| 118 |
|
---|
| 119 | <screen><userinput>cd ..
|
---|
[997a8b7] | 120 | install -m644 -v docs/writing_udev_rules/index.html \
|
---|
[2c558d69] | 121 | /usr/share/doc/udev-&udev-version;/index.html</userinput></screen>
|
---|
[7eac3e32] | 122 |
|
---|
[ddd5542] | 123 | </sect2>
|
---|
| 124 |
|
---|
| 125 | <sect2 id="contents-udev" role="content">
|
---|
| 126 | <title>Contents of Udev</title>
|
---|
| 127 |
|
---|
| 128 | <segmentedlist>
|
---|
| 129 | <segtitle>Installed programs</segtitle>
|
---|
| 130 | <segtitle>Installed directory</segtitle>
|
---|
| 131 |
|
---|
| 132 | <seglistitem>
|
---|
[d2c332bc] | 133 | <seg>ata_id, cdrom_id, create_floppy_devices, edd_id, firmware_helper,
|
---|
[7d6d34b] | 134 | path_id, scsi_id, udevcontrol, udevd, udevinfo, udevmonitor, udevsettle,
|
---|
| 135 | udevtest, udevtrigger, usb_id, vol_id, and write_cd_aliases</seg>
|
---|
[ddd5542] | 136 | <seg>/etc/udev</seg>
|
---|
| 137 | </seglistitem>
|
---|
| 138 | </segmentedlist>
|
---|
| 139 |
|
---|
| 140 | <variablelist>
|
---|
| 141 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 142 | <?dbfo list-presentation="list"?>
|
---|
| 143 | <?dbhtml list-presentation="table"?>
|
---|
| 144 |
|
---|
[d2c332bc] | 145 | <varlistentry id="ata_id">
|
---|
| 146 | <term><command>ata_id</command></term>
|
---|
| 147 | <listitem>
|
---|
| 148 | <para>Provides Udev with a unique string and
|
---|
| 149 | additional information (uuid, label) for an ATA drive</para>
|
---|
| 150 | <indexterm zone="ch-system-udev ata_id">
|
---|
| 151 | <primary sortas="b-ata_id">ata_id</primary>
|
---|
| 152 | </indexterm>
|
---|
| 153 | </listitem>
|
---|
| 154 | </varlistentry>
|
---|
| 155 |
|
---|
| 156 | <varlistentry id="cdrom_id">
|
---|
| 157 | <term><command>cdrom_id</command></term>
|
---|
| 158 | <listitem>
|
---|
| 159 | <para>Provides Udev with the capabilities of a
|
---|
| 160 | CD-ROM or DVD-ROM drive</para>
|
---|
| 161 | <indexterm zone="ch-system-udev cdrom_id">
|
---|
| 162 | <primary sortas="b-cdrom_id">cdrom_id</primary>
|
---|
| 163 | </indexterm>
|
---|
| 164 | </listitem>
|
---|
| 165 | </varlistentry>
|
---|
| 166 |
|
---|
| 167 | <varlistentry id="create_floppy_devices">
|
---|
| 168 | <term><command>create_floppy_devices</command></term>
|
---|
[ddd5542] | 169 | <listitem>
|
---|
[d2c332bc] | 170 | <para>Creates all possible floppy devices based on the CMOS type</para>
|
---|
| 171 | <indexterm zone="ch-system-udev create_floppy_devices">
|
---|
| 172 | <primary sortas="b-create_floppy_devices">create_floppy_devices</primary>
|
---|
[ddd5542] | 173 | </indexterm>
|
---|
| 174 | </listitem>
|
---|
| 175 | </varlistentry>
|
---|
| 176 |
|
---|
[d2c332bc] | 177 | <varlistentry id="edd_id">
|
---|
| 178 | <term><command>edd_id</command></term>
|
---|
[ddd5542] | 179 | <listitem>
|
---|
[d2c332bc] | 180 | <para>Provides Udev with the EDD ID for a BIOS disk drive</para>
|
---|
| 181 | <indexterm zone="ch-system-udev edd_id">
|
---|
| 182 | <primary sortas="b-edd_id">edd_id</primary>
|
---|
[ddd5542] | 183 | </indexterm>
|
---|
| 184 | </listitem>
|
---|
| 185 | </varlistentry>
|
---|
| 186 |
|
---|
[d2c332bc] | 187 | <varlistentry id="firmware_helper">
|
---|
| 188 | <term><command>firmware_helper</command></term>
|
---|
[ddd5542] | 189 | <listitem>
|
---|
[d2c332bc] | 190 | <para>Uploads firmware to devices</para>
|
---|
| 191 | <indexterm zone="ch-system-udev firmware_helper">
|
---|
| 192 | <primary sortas="b-firmware_helper">firmware_helper</primary>
|
---|
| 193 | </indexterm>
|
---|
| 194 | </listitem>
|
---|
| 195 | </varlistentry>
|
---|
| 196 |
|
---|
[7d6d34b] | 197 | <varlistentry id="path_id">
|
---|
| 198 | <term><command>path_id</command></term>
|
---|
| 199 | <listitem>
|
---|
| 200 | <para>Provide the shortest possible unique hardware path to a
|
---|
| 201 | device</para>
|
---|
| 202 | <indexterm zone="ch-system-udev path_id">
|
---|
| 203 | <primary sortas="b-path_id">path_id</primary>
|
---|
| 204 | </indexterm>
|
---|
| 205 | </listitem>
|
---|
| 206 | </varlistentry>
|
---|
| 207 |
|
---|
[d2c332bc] | 208 | <varlistentry id="scsi_id">
|
---|
| 209 | <term><command>scsi_id</command></term>
|
---|
| 210 | <listitem>
|
---|
| 211 | <para>Provides Udev with a unique SCSI identifier
|
---|
| 212 | based on the data returned from sending a SCSI INQUIRY command to
|
---|
| 213 | the specified device</para>
|
---|
| 214 | <indexterm zone="ch-system-udev scsi_id">
|
---|
| 215 | <primary sortas="b-scsi_id">scsi_id</primary>
|
---|
[ddd5542] | 216 | </indexterm>
|
---|
| 217 | </listitem>
|
---|
| 218 | </varlistentry>
|
---|
| 219 |
|
---|
| 220 | <varlistentry id="udevcontrol">
|
---|
| 221 | <term><command>udevcontrol</command></term>
|
---|
| 222 | <listitem>
|
---|
| 223 | <para>Configures a number of options for the running
|
---|
| 224 | <command>udevd</command> daemon, such as the log level.</para>
|
---|
| 225 | <indexterm zone="ch-system-udev udevcontrol">
|
---|
| 226 | <primary sortas="b-udevcontrol">udevcontrol</primary>
|
---|
| 227 | </indexterm>
|
---|
| 228 | </listitem>
|
---|
| 229 | </varlistentry>
|
---|
| 230 |
|
---|
| 231 | <varlistentry id="udevd">
|
---|
| 232 | <term><command>udevd</command></term>
|
---|
| 233 | <listitem>
|
---|
[d2c332bc] | 234 | <para>A daemon that listens for uevents on the netlink socket,
|
---|
| 235 | creates devices and runs the configured external programs in
|
---|
| 236 | response to these uevents</para>
|
---|
[ddd5542] | 237 | <indexterm zone="ch-system-udev udevd">
|
---|
| 238 | <primary sortas="b-udevd">udevd</primary>
|
---|
| 239 | </indexterm>
|
---|
| 240 | </listitem>
|
---|
| 241 | </varlistentry>
|
---|
| 242 |
|
---|
| 243 | <varlistentry id="udevinfo">
|
---|
| 244 | <term><command>udevinfo</command></term>
|
---|
| 245 | <listitem>
|
---|
[d2c332bc] | 246 | <para>Allows users to query the Udev database for
|
---|
[ddd5542] | 247 | information on any device currently present on the system; it also
|
---|
| 248 | provides a way to query any device in the <systemitem
|
---|
| 249 | class="filesystem">sysfs</systemitem> tree to help create udev
|
---|
| 250 | rules</para>
|
---|
| 251 | <indexterm zone="ch-system-udev udevinfo">
|
---|
| 252 | <primary sortas="b-udevinfo">udevinfo</primary>
|
---|
| 253 | </indexterm>
|
---|
| 254 | </listitem>
|
---|
| 255 | </varlistentry>
|
---|
| 256 |
|
---|
| 257 | <varlistentry id="udevmonitor">
|
---|
| 258 | <term><command>udevmonitor</command></term>
|
---|
| 259 | <listitem>
|
---|
[d2c332bc] | 260 | <para>Prints the event received from the kernel and the environment
|
---|
| 261 | which Udev sends out after rule processing</para>
|
---|
[ddd5542] | 262 | <indexterm zone="ch-system-udev udevmonitor">
|
---|
| 263 | <primary sortas="b-udevmonitor">udevmonitor</primary>
|
---|
| 264 | </indexterm>
|
---|
| 265 | </listitem>
|
---|
| 266 | </varlistentry>
|
---|
| 267 |
|
---|
[7d6d34b] | 268 | <varlistentry id="udevsettle">
|
---|
| 269 | <term><command>udevsettle</command></term>
|
---|
| 270 | <listitem>
|
---|
| 271 | <para>Watches the Udev event queue and exits if all current uevents
|
---|
| 272 | have been handled</para>
|
---|
| 273 | <indexterm zone="ch-system-udev udevsettle">
|
---|
| 274 | <primary sortas="b-udevsettle">udevsettle</primary>
|
---|
| 275 | </indexterm>
|
---|
| 276 | </listitem>
|
---|
| 277 | </varlistentry>
|
---|
| 278 |
|
---|
[d2c332bc] | 279 | <varlistentry id="udevtest">
|
---|
| 280 | <term><command>udevtest</command></term>
|
---|
[ddd5542] | 281 | <listitem>
|
---|
[d2c332bc] | 282 | <para>Simulates a uevent for the given device, and prints out the
|
---|
| 283 | name of the node the real <command>udevd</command> would have created,
|
---|
| 284 | or the name of the renamed network interface</para>
|
---|
| 285 | <indexterm zone="ch-system-udev udevtest">
|
---|
| 286 | <primary sortas="b-udevtest">udevtest</primary>
|
---|
[ddd5542] | 287 | </indexterm>
|
---|
| 288 | </listitem>
|
---|
| 289 | </varlistentry>
|
---|
| 290 |
|
---|
[7d6d34b] | 291 | <varlistentry id="udevtrigger">
|
---|
| 292 | <term><command>udevtrigger</command></term>
|
---|
| 293 | <listitem>
|
---|
| 294 | <para>Triggers kernel device uevents to be replayed</para>
|
---|
| 295 | <indexterm zone="ch-system-udev udevtrigger">
|
---|
| 296 | <primary sortas="b-udevtrigger">udevtrigger</primary>
|
---|
| 297 | </indexterm>
|
---|
| 298 | </listitem>
|
---|
| 299 | </varlistentry>
|
---|
| 300 |
|
---|
[d2c332bc] | 301 | <varlistentry id="usb_id">
|
---|
| 302 | <term><command>usb_id</command></term>
|
---|
[ddd5542] | 303 | <listitem>
|
---|
[d2c332bc] | 304 | <para>Provides Udev with information about USB
|
---|
| 305 | devices</para>
|
---|
| 306 | <indexterm zone="ch-system-udev usb_id">
|
---|
| 307 | <primary sortas="b-usb_id">usb_id</primary>
|
---|
[ddd5542] | 308 | </indexterm>
|
---|
| 309 | </listitem>
|
---|
| 310 | </varlistentry>
|
---|
| 311 |
|
---|
[d2c332bc] | 312 | <varlistentry id="vol_id">
|
---|
| 313 | <term><command>vol_id</command></term>
|
---|
[ddd5542] | 314 | <listitem>
|
---|
[d2c332bc] | 315 | <para>Provides Udev with the label and uuid of a
|
---|
| 316 | filesystem</para>
|
---|
| 317 | <indexterm zone="ch-system-udev vol_id">
|
---|
| 318 | <primary sortas="b-vol_id">vol_id</primary>
|
---|
[ddd5542] | 319 | </indexterm>
|
---|
| 320 | </listitem>
|
---|
| 321 | </varlistentry>
|
---|
| 322 |
|
---|
| 323 | <varlistentry id="etc-udev">
|
---|
| 324 | <term><filename class="directory">/etc/udev</filename></term>
|
---|
| 325 | <listitem>
|
---|
[d2c332bc] | 326 | <para>Contains Udev configuation files,
|
---|
[ddd5542] | 327 | device permissions, and rules for device naming</para>
|
---|
| 328 | <indexterm zone="ch-system-udev etc-udev">
|
---|
| 329 | <primary sortas="e-/etc/udev">/etc/udev</primary>
|
---|
| 330 | </indexterm>
|
---|
| 331 | </listitem>
|
---|
| 332 | </varlistentry>
|
---|
| 333 |
|
---|
| 334 | </variablelist>
|
---|
| 335 |
|
---|
| 336 | </sect2>
|
---|
[9dfc02f] | 337 |
|
---|
| 338 | </sect1>
|
---|