[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 |
|
---|
[e747759] | 11 | <sect1info condition="script">
|
---|
| 12 | <productname>udev</productname>
|
---|
| 13 | <productnumber>&udev-version;</productnumber>
|
---|
| 14 | <address>&udev-url;</address>
|
---|
| 15 | </sect1info>
|
---|
| 16 |
|
---|
[ddd5542] | 17 | <title>Udev-&udev-version;</title>
|
---|
| 18 |
|
---|
| 19 | <indexterm zone="ch-system-udev">
|
---|
| 20 | <primary sortas="a-Udev">Udev</primary>
|
---|
| 21 | </indexterm>
|
---|
| 22 |
|
---|
| 23 | <sect2 role="package">
|
---|
| 24 | <title/>
|
---|
[9dfc02f] | 25 |
|
---|
[ddd5542] | 26 | <para>The Udev package contains programs for dynamic creation of device
|
---|
| 27 | nodes.</para>
|
---|
[9dfc02f] | 28 |
|
---|
[ddd5542] | 29 | <segmentedlist>
|
---|
| 30 | <segtitle>&buildtime;</segtitle>
|
---|
| 31 | <segtitle>&diskspace;</segtitle>
|
---|
[9dfc02f] | 32 |
|
---|
[ddd5542] | 33 | <seglistitem>
|
---|
[e4a5635] | 34 | <seg>&udev-ch6-sbu;</seg>
|
---|
[f70b664] | 35 | <seg>&udev-ch6-du;</seg>
|
---|
[ddd5542] | 36 | </seglistitem>
|
---|
| 37 | </segmentedlist>
|
---|
| 38 | </sect2>
|
---|
[9dfc02f] | 39 |
|
---|
[ddd5542] | 40 | <sect2 role="installation">
|
---|
| 41 | <title>Installation of Udev</title>
|
---|
| 42 |
|
---|
[7d6d34b] | 43 | <para>The udev-config tarball contains LFS-specific files used to configure
|
---|
[e1060de] | 44 | Udev. Unpack it into the Udev source directory:</para>
|
---|
[7d6d34b] | 45 |
|
---|
[0445a3d] | 46 | <screen><userinput remap="pre">tar -xvf ../&udev-config;.tar.bz2</userinput></screen>
|
---|
[7d6d34b] | 47 |
|
---|
[d2c332bc] | 48 | <para>Create some devices and directories that Udev cannot handle due to
|
---|
[61e63d3] | 49 | them being required very early in the boot process, or by Udev itself:</para>
|
---|
[d2c332bc] | 50 |
|
---|
[7eae78f] | 51 | <screen><userinput remap="install">install -dv /lib/{firmware,udev/devices/pts}
|
---|
[f2ca25f] | 52 | mknod -m0666 /lib/udev/devices/null c 1 3</userinput></screen>
|
---|
[d2c332bc] | 53 |
|
---|
[166a9db] | 54 | <para>Prepare the package for compilation:</para>
|
---|
[81fd230] | 55 |
|
---|
[3a34893] | 56 | <!-- Note that "libdir=/usr/lib64" would be required for multilib. -->
|
---|
[450e682e] | 57 | <screen><userinput remap="configure">./configure --prefix=/usr \
|
---|
[6b13ebc6] | 58 | --with-rootprefix='' \
|
---|
| 59 | --bindir=/sbin \
|
---|
| 60 | --sysconfdir=/etc \
|
---|
| 61 | --libexecdir=/lib \
|
---|
| 62 | --enable-rule_generator \
|
---|
| 63 | --disable-introspection \
|
---|
| 64 | --disable-keymap \
|
---|
| 65 | --disable-gudev \
|
---|
| 66 | --with-usb-ids-path=no \
|
---|
| 67 | --with-pci-ids-path=no \
|
---|
| 68 | --with-systemdsystemunitdir=no</userinput></screen>
|
---|
[3a34893] | 69 |
|
---|
| 70 | <variablelist>
|
---|
| 71 | <title>The meaning of the new configure options</title>
|
---|
| 72 |
|
---|
[f70b664] | 73 | <!-- Note that libexecdir *MUST* stay /lib, even on a 64-bit
|
---|
| 74 | / multilib system where udev is compiled for 64-bit. The udev
|
---|
| 75 | configure system automatically adds "udev" onto this path, and other
|
---|
| 76 | packages require /lib/udev; the udev maintainers have
|
---|
| 77 | said this is part of the udev API. -->
|
---|
[3a34893] | 78 | <varlistentry>
|
---|
[f70b664] | 79 | <term><parameter>--libexecdir=/lib</parameter></term>
|
---|
[3a34893] | 80 | <listitem>
|
---|
[f70b664] | 81 | <para>This controls where Udev-internal rules and helper programs
|
---|
| 82 | are installed.</para>
|
---|
[3a34893] | 83 | </listitem>
|
---|
| 84 | </varlistentry>
|
---|
| 85 |
|
---|
| 86 | <varlistentry>
|
---|
[f70b664] | 87 | <term><parameter>--enable-rule_generator</parameter></term>
|
---|
[3a34893] | 88 | <listitem>
|
---|
[f70b664] | 89 | <para>This allows persistent rules to be generated for network and
|
---|
| 90 | optical media devices</para>
|
---|
[3a34893] | 91 | </listitem>
|
---|
| 92 | </varlistentry>
|
---|
| 93 |
|
---|
| 94 | <varlistentry>
|
---|
[f70b664] | 95 | <term><parameter>--disable-* and --with-*</parameter></term>
|
---|
[3a34893] | 96 | <listitem>
|
---|
[283fea13] | 97 | <para>These options prevent Udev from installing helper programs and
|
---|
[3a34893] | 98 | other extras which require more external libraries. These libraries
|
---|
| 99 | are not part of the base LFS system. See the Udev
|
---|
| 100 | <filename>README</filename> file for more information.</para>
|
---|
| 101 | </listitem>
|
---|
| 102 | </varlistentry>
|
---|
| 103 | </variablelist>
|
---|
[ddd5542] | 104 |
|
---|
[166a9db] | 105 | <para>Compile the package:</para>
|
---|
[0445a3d] | 106 |
|
---|
[166a9db] | 107 | <screen><userinput remap="make">make</userinput></screen>
|
---|
[81fd230] | 108 |
|
---|
[281b7d9] | 109 | <para>Test the package.</para>
|
---|
| 110 |
|
---|
| 111 | <screen><userinput remap="test">make check</userinput></screen>
|
---|
[c226182] | 112 |
|
---|
[ddd5542] | 113 | <para>Install the package:</para>
|
---|
[9dfc02f] | 114 |
|
---|
[166a9db] | 115 | <screen><userinput remap="install">make install</userinput></screen>
|
---|
[09043c0] | 116 |
|
---|
[7ae8d79] | 117 | <para>Remove an empty documentation directory:</para>
|
---|
| 118 |
|
---|
[a2f7ad07] | 119 | <screen><userinput remap="install">rmdir -v /usr/share/doc/udev</userinput></screen>
|
---|
[7ae8d79] | 120 |
|
---|
[9faa3e2] | 121 | <para>Now install the LFS-specific custom rules files:</para>
|
---|
[7eac3e32] | 122 |
|
---|
[0445a3d] | 123 | <screen><userinput remap="install">cd &udev-config;
|
---|
[7e6fb44] | 124 | make install</userinput></screen>
|
---|
| 125 |
|
---|
| 126 | <para>Install the documentation that explains the LFS-specific rules
|
---|
| 127 | files:</para>
|
---|
| 128 |
|
---|
[0445a3d] | 129 | <screen><userinput remap="install">make install-doc</userinput></screen>
|
---|
[7e6fb44] | 130 |
|
---|
[ddd5542] | 131 | </sect2>
|
---|
| 132 |
|
---|
| 133 | <sect2 id="contents-udev" role="content">
|
---|
| 134 | <title>Contents of Udev</title>
|
---|
| 135 |
|
---|
| 136 | <segmentedlist>
|
---|
| 137 | <segtitle>Installed programs</segtitle>
|
---|
[2791a8e] | 138 | <segtitle>Installed libraries</segtitle>
|
---|
[fe05b08] | 139 | <segtitle>Installed directories</segtitle>
|
---|
[ddd5542] | 140 |
|
---|
| 141 | <seglistitem>
|
---|
[61e63d3] | 142 | <seg>ata_id, cdrom_id, collect, create_floppy_devices, edd_id,
|
---|
| 143 | firmware.sh, fstab_import, path_id, scsi_id, udevadm, udevd,
|
---|
[3a34893] | 144 | usb_id, write_cd_rules, and write_net_rules</seg>
|
---|
[5f7456b] | 145 | <seg>libudev.{a,so}</seg>
|
---|
[3119ddc] | 146 | <seg>/etc/udev, /lib/udev, /lib/firmware, /usr/share/doc/udev-config,
|
---|
| 147 | /usr/share/gtk-doc/html/libudev</seg>
|
---|
[ddd5542] | 148 | </seglistitem>
|
---|
| 149 | </segmentedlist>
|
---|
| 150 |
|
---|
| 151 | <variablelist>
|
---|
| 152 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 153 | <?dbfo list-presentation="list"?>
|
---|
| 154 | <?dbhtml list-presentation="table"?>
|
---|
| 155 |
|
---|
[d2c332bc] | 156 | <varlistentry id="ata_id">
|
---|
| 157 | <term><command>ata_id</command></term>
|
---|
| 158 | <listitem>
|
---|
| 159 | <para>Provides Udev with a unique string and
|
---|
| 160 | additional information (uuid, label) for an ATA drive</para>
|
---|
| 161 | <indexterm zone="ch-system-udev ata_id">
|
---|
| 162 | <primary sortas="b-ata_id">ata_id</primary>
|
---|
| 163 | </indexterm>
|
---|
| 164 | </listitem>
|
---|
| 165 | </varlistentry>
|
---|
| 166 |
|
---|
| 167 | <varlistentry id="cdrom_id">
|
---|
| 168 | <term><command>cdrom_id</command></term>
|
---|
| 169 | <listitem>
|
---|
| 170 | <para>Provides Udev with the capabilities of a
|
---|
| 171 | CD-ROM or DVD-ROM drive</para>
|
---|
| 172 | <indexterm zone="ch-system-udev cdrom_id">
|
---|
| 173 | <primary sortas="b-cdrom_id">cdrom_id</primary>
|
---|
| 174 | </indexterm>
|
---|
| 175 | </listitem>
|
---|
| 176 | </varlistentry>
|
---|
| 177 |
|
---|
[61e63d3] | 178 | <varlistentry id="collect">
|
---|
| 179 | <term><command>collect</command></term>
|
---|
| 180 | <listitem>
|
---|
| 181 | <para>Given an ID for the current uevent and a list of
|
---|
| 182 | IDs (for all target uevents), registers the current ID
|
---|
| 183 | and indicates whether all target IDs have been registered</para>
|
---|
| 184 | <indexterm zone="ch-system-udev collect">
|
---|
| 185 | <primary sortas="b-collect">collect</primary>
|
---|
| 186 | </indexterm>
|
---|
| 187 | </listitem>
|
---|
| 188 | </varlistentry>
|
---|
| 189 |
|
---|
[d2c332bc] | 190 | <varlistentry id="create_floppy_devices">
|
---|
| 191 | <term><command>create_floppy_devices</command></term>
|
---|
[ddd5542] | 192 | <listitem>
|
---|
[d2c332bc] | 193 | <para>Creates all possible floppy devices based on the CMOS type</para>
|
---|
| 194 | <indexterm zone="ch-system-udev create_floppy_devices">
|
---|
| 195 | <primary sortas="b-create_floppy_devices">create_floppy_devices</primary>
|
---|
[ddd5542] | 196 | </indexterm>
|
---|
| 197 | </listitem>
|
---|
| 198 | </varlistentry>
|
---|
| 199 |
|
---|
[d2c332bc] | 200 | <varlistentry id="edd_id">
|
---|
| 201 | <term><command>edd_id</command></term>
|
---|
[ddd5542] | 202 | <listitem>
|
---|
[d2c332bc] | 203 | <para>Provides Udev with the EDD ID for a BIOS disk drive</para>
|
---|
| 204 | <indexterm zone="ch-system-udev edd_id">
|
---|
| 205 | <primary sortas="b-edd_id">edd_id</primary>
|
---|
[ddd5542] | 206 | </indexterm>
|
---|
| 207 | </listitem>
|
---|
| 208 | </varlistentry>
|
---|
| 209 |
|
---|
[2791a8e] | 210 | <varlistentry id="firmware.sh">
|
---|
| 211 | <term><command>firmware.sh</command></term>
|
---|
[ddd5542] | 212 | <listitem>
|
---|
[d2c332bc] | 213 | <para>Uploads firmware to devices</para>
|
---|
[2791a8e] | 214 | <indexterm zone="ch-system-udev firmware.sh">
|
---|
| 215 | <primary sortas="b-firmware.sh">firmware.sh</primary>
|
---|
[d2c332bc] | 216 | </indexterm>
|
---|
| 217 | </listitem>
|
---|
| 218 | </varlistentry>
|
---|
| 219 |
|
---|
[61e63d3] | 220 | <varlistentry id="fstab_import">
|
---|
| 221 | <term><command>fstab_import</command></term>
|
---|
| 222 | <listitem>
|
---|
| 223 | <para>Finds an entry in <filename>/etc/fstab</filename> that
|
---|
| 224 | matches the current device, and provides its information to
|
---|
| 225 | Udev</para>
|
---|
| 226 | <indexterm zone="ch-system-udev fstab_import">
|
---|
| 227 | <primary sortas="b-fstab_import">fstab_import</primary>
|
---|
| 228 | </indexterm>
|
---|
| 229 | </listitem>
|
---|
| 230 | </varlistentry>
|
---|
| 231 |
|
---|
[7d6d34b] | 232 | <varlistentry id="path_id">
|
---|
| 233 | <term><command>path_id</command></term>
|
---|
| 234 | <listitem>
|
---|
[9058aa1] | 235 | <para>Provides the shortest possible unique hardware path to a
|
---|
[7d6d34b] | 236 | device</para>
|
---|
| 237 | <indexterm zone="ch-system-udev path_id">
|
---|
| 238 | <primary sortas="b-path_id">path_id</primary>
|
---|
| 239 | </indexterm>
|
---|
| 240 | </listitem>
|
---|
| 241 | </varlistentry>
|
---|
| 242 |
|
---|
[d2c332bc] | 243 | <varlistentry id="scsi_id">
|
---|
| 244 | <term><command>scsi_id</command></term>
|
---|
| 245 | <listitem>
|
---|
| 246 | <para>Provides Udev with a unique SCSI identifier
|
---|
| 247 | based on the data returned from sending a SCSI INQUIRY command to
|
---|
| 248 | the specified device</para>
|
---|
| 249 | <indexterm zone="ch-system-udev scsi_id">
|
---|
| 250 | <primary sortas="b-scsi_id">scsi_id</primary>
|
---|
[ddd5542] | 251 | </indexterm>
|
---|
| 252 | </listitem>
|
---|
| 253 | </varlistentry>
|
---|
| 254 |
|
---|
[61e63d3] | 255 | <varlistentry id="udevadm">
|
---|
| 256 | <term><command>udevadm</command></term>
|
---|
[ddd5542] | 257 | <listitem>
|
---|
[61e63d3] | 258 | <para>Generic udev administration tool: controls the udevd daemon,
|
---|
| 259 | provides info from the Udev database, monitors uevents, waits for
|
---|
| 260 | uevents to finish, tests Udev configuration, and triggers uevents
|
---|
| 261 | for a given device</para>
|
---|
| 262 | <indexterm zone="ch-system-udev udevadm">
|
---|
| 263 | <primary sortas="b-udevadm">udevadm</primary>
|
---|
[ddd5542] | 264 | </indexterm>
|
---|
| 265 | </listitem>
|
---|
| 266 | </varlistentry>
|
---|
| 267 |
|
---|
| 268 | <varlistentry id="udevd">
|
---|
| 269 | <term><command>udevd</command></term>
|
---|
| 270 | <listitem>
|
---|
[d2c332bc] | 271 | <para>A daemon that listens for uevents on the netlink socket,
|
---|
| 272 | creates devices and runs the configured external programs in
|
---|
| 273 | response to these uevents</para>
|
---|
[ddd5542] | 274 | <indexterm zone="ch-system-udev udevd">
|
---|
| 275 | <primary sortas="b-udevd">udevd</primary>
|
---|
| 276 | </indexterm>
|
---|
| 277 | </listitem>
|
---|
| 278 | </varlistentry>
|
---|
| 279 |
|
---|
[d2c332bc] | 280 | <varlistentry id="usb_id">
|
---|
| 281 | <term><command>usb_id</command></term>
|
---|
[ddd5542] | 282 | <listitem>
|
---|
[d2c332bc] | 283 | <para>Provides Udev with information about USB
|
---|
| 284 | devices</para>
|
---|
| 285 | <indexterm zone="ch-system-udev usb_id">
|
---|
| 286 | <primary sortas="b-usb_id">usb_id</primary>
|
---|
[ddd5542] | 287 | </indexterm>
|
---|
| 288 | </listitem>
|
---|
| 289 | </varlistentry>
|
---|
| 290 |
|
---|
[2791a8e] | 291 | <varlistentry id="write_cd_rules">
|
---|
| 292 | <term><command>write_cd_rules</command></term>
|
---|
| 293 | <listitem>
|
---|
| 294 | <para>A script which generates Udev rules to provide stable names for
|
---|
| 295 | optical drives (see also <xref linkend="ch-scripts-symlinks"/>)</para>
|
---|
| 296 | <indexterm zone="ch-system-udev write_cd_rules">
|
---|
| 297 | <primary sortas="b-write_cd_rules">write_cd_rules</primary>
|
---|
| 298 | </indexterm>
|
---|
| 299 | </listitem>
|
---|
| 300 | </varlistentry>
|
---|
| 301 |
|
---|
| 302 | <varlistentry id="write_net_rules">
|
---|
| 303 | <term><command>write_net_rules</command></term>
|
---|
| 304 | <listitem>
|
---|
| 305 | <para>A script which generates rules to provide stable names for
|
---|
| 306 | network interfaces (see also <xref linkend="ch-scripts-network"/>)
|
---|
| 307 | </para>
|
---|
| 308 | <indexterm zone="ch-system-udev write_net_rules">
|
---|
| 309 | <primary sortas="b-write_net_rules">write_net_rules</primary>
|
---|
| 310 | </indexterm>
|
---|
| 311 | </listitem>
|
---|
| 312 | </varlistentry>
|
---|
| 313 |
|
---|
[166a9db] | 314 | <varlistentry id="libudev">
|
---|
[5f7456b] | 315 | <term><filename class="libraryfile">libudev</filename></term>
|
---|
[166a9db] | 316 | <listitem>
|
---|
| 317 | <para>A library interface to udev device information</para>
|
---|
| 318 | <indexterm zone="ch-system-udev libudev">
|
---|
| 319 | <primary sortas="c-libudev">libudev</primary>
|
---|
| 320 | </indexterm>
|
---|
| 321 | </listitem>
|
---|
| 322 | </varlistentry>
|
---|
| 323 |
|
---|
[ddd5542] | 324 | <varlistentry id="etc-udev">
|
---|
| 325 | <term><filename class="directory">/etc/udev</filename></term>
|
---|
| 326 | <listitem>
|
---|
[9058aa1] | 327 | <para>Contains Udev configuration files,
|
---|
[ddd5542] | 328 | device permissions, and rules for device naming</para>
|
---|
| 329 | <indexterm zone="ch-system-udev etc-udev">
|
---|
| 330 | <primary sortas="e-/etc/udev">/etc/udev</primary>
|
---|
| 331 | </indexterm>
|
---|
| 332 | </listitem>
|
---|
| 333 | </varlistentry>
|
---|
| 334 |
|
---|
| 335 | </variablelist>
|
---|
| 336 |
|
---|
| 337 | </sect2>
|
---|
[9dfc02f] | 338 |
|
---|
| 339 | </sect1>
|
---|