| 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
 | 
|---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
 | 
|---|
| 3 |   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
 | 
|---|
| 4 |   <!ENTITY % general-entities SYSTEM "../../general.ent">
 | 
|---|
| 5 |   %general-entities;
 | 
|---|
| 6 | ]>
 | 
|---|
| 7 | 
 | 
|---|
| 8 | <sect1 id="ch-system-udev" role="wrap">
 | 
|---|
| 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/>
 | 
|---|
| 19 | 
 | 
|---|
| 20 |     <para>The Udev package contains programs for dynamic creation of device
 | 
|---|
| 21 |     nodes.</para>
 | 
|---|
| 22 | 
 | 
|---|
| 23 |   </sect2>
 | 
|---|
| 24 | 
 | 
|---|
| 25 |   <sect2 role="installation">
 | 
|---|
| 26 |     <title>Installation of Udev</title>
 | 
|---|
| 27 | 
 | 
|---|
| 28 |     <para os="a">Compile the package:</para>
 | 
|---|
| 29 | 
 | 
|---|
| 30 | <screen os="b"><userinput>make CROSS_COMPILE="${CLFS_TARGET}-" CC="${CC}" LD="${CC}" \
 | 
|---|
| 31 |     EXTRAS="extras/ata_id extras/cdrom_id extras/collect \
 | 
|---|
| 32 |     extras/edd_id extras/firmware extras/floppy extras/path_id extras/rule_generator \
 | 
|---|
| 33 |     extras/scsi_id extras/usb_id extras/volume_id" udevdir=/dev</userinput></screen>
 | 
|---|
| 34 | 
 | 
|---|
| 35 |     <variablelist os="c">
 | 
|---|
| 36 |       <title>The meaning of the make parameter:</title>
 | 
|---|
| 37 | 
 | 
|---|
| 38 |       <varlistentry>
 | 
|---|
| 39 |       <term><parameter>EXTRAS="extras/ata_id extras/cdrom_id extras/collect
 | 
|---|
| 40 |       extras/edd_id extras/firmware extras/floppy extras/path_id extras/rule_generator
 | 
|---|
| 41 |       extras/scsi_id extras/usb_id extras/volume_id"</parameter></term>
 | 
|---|
| 42 |         <listitem>
 | 
|---|
| 43 |           <para>This builds the helper applications that are used with
 | 
|---|
| 44 |           udev. The helper programs assist in correct handling of devices.</para>
 | 
|---|
| 45 |         </listitem>
 | 
|---|
| 46 |       </varlistentry>
 | 
|---|
| 47 | 
 | 
|---|
| 48 |     </variablelist>
 | 
|---|
| 49 | 
 | 
|---|
| 50 |     <para os="c">Install the package:</para>
 | 
|---|
| 51 | 
 | 
|---|
| 52 | <screen os="d"><userinput>make DESTDIR="${CLFS}" \
 | 
|---|
| 53 |     EXTRAS="extras/ata_id extras/cdrom_id extras/collect \
 | 
|---|
| 54 |     extras/edd_id extras/firmware extras/floppy extras/path_id extras/rule_generator \
 | 
|---|
| 55 |     extras/scsi_id extras/usb_id extras/volume_id" udevdir=/dev install</userinput></screen>
 | 
|---|
| 56 | 
 | 
|---|
| 57 |     <para os="g">Install the documentation:</para>
 | 
|---|
| 58 | 
 | 
|---|
| 59 | <screen os="h"><userinput>install -v -m644 -D docs/writing_udev_rules/index.html \
 | 
|---|
| 60 |     ${CLFS}/usr/share/doc/udev-&udev-version;/index.html</userinput></screen>
 | 
|---|
| 61 | 
 | 
|---|
| 62 |     <para os="i">Create a directory for storing firmware that can be
 | 
|---|
| 63 |     loaded by <command>udev</command>:</para>
 | 
|---|
| 64 | 
 | 
|---|
| 65 | <screen os="j"><userinput>install -dv ${CLFS}/lib/firmware</userinput></screen>
 | 
|---|
| 66 | 
 | 
|---|
| 67 |   </sect2>
 | 
|---|
| 68 | 
 | 
|---|
| 69 |   <sect2 id="contents-udev" role="content">
 | 
|---|
| 70 |     <title>Contents of Udev</title>
 | 
|---|
| 71 | 
 | 
|---|
| 72 |     <segmentedlist>
 | 
|---|
| 73 |       <segtitle>Installed programs</segtitle>
 | 
|---|
| 74 |       <segtitle>Installed directory</segtitle>
 | 
|---|
| 75 | 
 | 
|---|
| 76 |       <seglistitem>
 | 
|---|
| 77 |         <seg>udevcontrol, udevd, udevinfo, udevmonitor, udevsend,
 | 
|---|
| 78 |         udevtest, and udevtrigger</seg>
 | 
|---|
| 79 |         <seg>/etc/udev</seg>
 | 
|---|
| 80 |       </seglistitem>
 | 
|---|
| 81 |     </segmentedlist>
 | 
|---|
| 82 | 
 | 
|---|
| 83 |     <variablelist>
 | 
|---|
| 84 |       <bridgehead renderas="sect3">Short Descriptions</bridgehead>
 | 
|---|
| 85 |       <?dbfo list-presentation="list"?>
 | 
|---|
| 86 |       <?dbhtml list-presentation="table"?>
 | 
|---|
| 87 | 
 | 
|---|
| 88 |       <varlistentry id="udevcontrol">
 | 
|---|
| 89 |         <term><command>udevcontrol</command></term>
 | 
|---|
| 90 |         <listitem>
 | 
|---|
| 91 |           <para>Configures a number of options for the running
 | 
|---|
| 92 |           <command>udevd</command> daemon, such as the log level.</para>
 | 
|---|
| 93 |           <indexterm zone="ch-system-udev udevcontrol">
 | 
|---|
| 94 |             <primary sortas="b-udevcontrol">udevcontrol</primary>
 | 
|---|
| 95 |           </indexterm>
 | 
|---|
| 96 |         </listitem>
 | 
|---|
| 97 |       </varlistentry>
 | 
|---|
| 98 | 
 | 
|---|
| 99 |       <varlistentry id="udevd">
 | 
|---|
| 100 |         <term><command>udevd</command></term>
 | 
|---|
| 101 |         <listitem>
 | 
|---|
| 102 |           <para>A daemon that reorders hotplug events before submitting them to
 | 
|---|
| 103 |           <command>udev</command>,
 | 
|---|
| 104 |           thus avoiding various race conditions</para>
 | 
|---|
| 105 |           <indexterm zone="ch-system-udev udevd">
 | 
|---|
| 106 |             <primary sortas="b-udevd">udevd</primary>
 | 
|---|
| 107 |           </indexterm>
 | 
|---|
| 108 |         </listitem>
 | 
|---|
| 109 |       </varlistentry>
 | 
|---|
| 110 | 
 | 
|---|
| 111 |       <varlistentry id="udevinfo">
 | 
|---|
| 112 |         <term><command>udevinfo</command></term>
 | 
|---|
| 113 |         <listitem>
 | 
|---|
| 114 |           <para>Allows users to query the <command>udev</command> database for
 | 
|---|
| 115 |           information on any device currently present on the system; it also
 | 
|---|
| 116 |           provides a way to query any device in the <systemitem
 | 
|---|
| 117 |           class="filesystem">sysfs</systemitem> tree to help create udev
 | 
|---|
| 118 |           rules</para>
 | 
|---|
| 119 |           <indexterm zone="ch-system-udev udevinfo">
 | 
|---|
| 120 |             <primary sortas="b-udevinfo">udevinfo</primary>
 | 
|---|
| 121 |           </indexterm>
 | 
|---|
| 122 |         </listitem>
 | 
|---|
| 123 |       </varlistentry>
 | 
|---|
| 124 | 
 | 
|---|
| 125 |       <varlistentry id="udevmonitor">
 | 
|---|
| 126 |         <term><command>udevmonitor</command></term>
 | 
|---|
| 127 |         <listitem>
 | 
|---|
| 128 |           <para>Prints the event received from the kernel and the event which
 | 
|---|
| 129 |           <command>udev</command> sends out after rule processing</para>
 | 
|---|
| 130 |           <indexterm zone="ch-system-udev udevmonitor">
 | 
|---|
| 131 |             <primary sortas="b-udevmonitor">udevmonitor</primary>
 | 
|---|
| 132 |           </indexterm>
 | 
|---|
| 133 |         </listitem>
 | 
|---|
| 134 |       </varlistentry>
 | 
|---|
| 135 | 
 | 
|---|
| 136 |       <varlistentry id="udevsettle">
 | 
|---|
| 137 |         <term><command>udevsettle</command></term>
 | 
|---|
| 138 |         <listitem>
 | 
|---|
| 139 |           <para>Watches the Udev event queue and exits if all current uevents
 | 
|---|
| 140 |           have been handled</para>
 | 
|---|
| 141 |           <indexterm zone="ch-system-udev udevsettle">
 | 
|---|
| 142 |             <primary sortas="b-udevsettle">udevsettle</primary>
 | 
|---|
| 143 |           </indexterm>
 | 
|---|
| 144 |         </listitem>
 | 
|---|
| 145 |       </varlistentry>
 | 
|---|
| 146 | 
 | 
|---|
| 147 |       <varlistentry id="udevtest">
 | 
|---|
| 148 |         <term><command>udevtest</command></term>
 | 
|---|
| 149 |         <listitem>
 | 
|---|
| 150 |           <para>Simulates a <command>udev</command> run for the given device,
 | 
|---|
| 151 |           and prints out the name of the node the real <command>udev</command>
 | 
|---|
| 152 |           would have created or the name of the renamed network interface</para>
 | 
|---|
| 153 |           <indexterm zone="ch-system-udev udevtest">
 | 
|---|
| 154 |             <primary sortas="b-udevtest">udevtest</primary>
 | 
|---|
| 155 |           </indexterm>
 | 
|---|
| 156 |         </listitem>
 | 
|---|
| 157 |       </varlistentry>
 | 
|---|
| 158 | 
 | 
|---|
| 159 |       <varlistentry id="udevtrigger">
 | 
|---|
| 160 |         <term><command>udevtrigger</command></term>
 | 
|---|
| 161 |         <listitem>
 | 
|---|
| 162 |           <para>Walks the sysfs tree for devices that need to be added to the
 | 
|---|
| 163 |           system.</para>
 | 
|---|
| 164 |           <indexterm zone="ch-system-udev udevtrigger">
 | 
|---|
| 165 |             <primary sortas="b-udevtrigger">udevtrigger</primary>
 | 
|---|
| 166 |           </indexterm>
 | 
|---|
| 167 |         </listitem>
 | 
|---|
| 168 |       </varlistentry>
 | 
|---|
| 169 | 
 | 
|---|
| 170 |  <!-- helpers start here -->
 | 
|---|
| 171 |       <varlistentry id="ata_id">
 | 
|---|
| 172 |         <term><command>ata_id</command></term>
 | 
|---|
| 173 |         <listitem>
 | 
|---|
| 174 |           <para>Provides Udev with a unique string and additional
 | 
|---|
| 175 |           information (uuid, label) for an ATA drive</para>
 | 
|---|
| 176 |           <indexterm zone="ch-system-udev ata_id">
 | 
|---|
| 177 |             <primary sortas="b-ata_id">ata_id</primary>
 | 
|---|
| 178 |           </indexterm>
 | 
|---|
| 179 |         </listitem>
 | 
|---|
| 180 |       </varlistentry>
 | 
|---|
| 181 | 
 | 
|---|
| 182 |       <varlistentry id="cdrom_id">
 | 
|---|
| 183 |         <term><command>cdrom_id</command></term>
 | 
|---|
| 184 |         <listitem>
 | 
|---|
| 185 |           <para>Print the capabilities of a CDROM or DVDROM drive.</para>
 | 
|---|
| 186 |           <indexterm zone="ch-system-udev cdrom_id">
 | 
|---|
| 187 |             <primary sortas="b-cdrom_id">cdrom_id</primary>
 | 
|---|
| 188 |           </indexterm>
 | 
|---|
| 189 |         </listitem>
 | 
|---|
| 190 |       </varlistentry>
 | 
|---|
| 191 | 
 | 
|---|
| 192 |       <varlistentry id="create_floppy_devices">
 | 
|---|
| 193 |         <term><command>create_floppy_devices</command></term>
 | 
|---|
| 194 |         <listitem>
 | 
|---|
| 195 |           <para>Creates all possible floppy devices based on the CMOS type</para>
 | 
|---|
| 196 |           <indexterm zone="ch-system-udev create_floppy_devices">
 | 
|---|
| 197 |             <primary sortas="b-create_floppy_devices">create_floppy_devices</primary>
 | 
|---|
| 198 |           </indexterm>
 | 
|---|
| 199 |         </listitem>
 | 
|---|
| 200 |       </varlistentry>
 | 
|---|
| 201 | 
 | 
|---|
| 202 |       <varlistentry id="dasd_id">
 | 
|---|
| 203 |         <term><command>dasd_id</command></term>
 | 
|---|
| 204 |         <listitem>
 | 
|---|
| 205 |           <para>Read the label from an s390 block device.</para>
 | 
|---|
| 206 |           <indexterm zone="ch-system-udev dasd_id">
 | 
|---|
| 207 |             <primary sortas="b-dasd_id">dasd_id</primary>
 | 
|---|
| 208 |           </indexterm>
 | 
|---|
| 209 |         </listitem>
 | 
|---|
| 210 |       </varlistentry>
 | 
|---|
| 211 | 
 | 
|---|
| 212 |       <varlistentry id="edd_id">
 | 
|---|
| 213 |         <term><command>edd_id</command></term>
 | 
|---|
| 214 |         <listitem>
 | 
|---|
| 215 |           <para>Identify x86 disk drives from Enhanced Disk Drive calls.</para>
 | 
|---|
| 216 |           <indexterm zone="ch-system-udev edd_id">
 | 
|---|
| 217 |             <primary sortas="b-edd_id">edd_id</primary>
 | 
|---|
| 218 |           </indexterm>
 | 
|---|
| 219 |         </listitem>
 | 
|---|
| 220 |       </varlistentry>
 | 
|---|
| 221 | 
 | 
|---|
| 222 |       <varlistentry id="firmware.sh">
 | 
|---|
| 223 |         <term><command>firmware.sh</command></term>
 | 
|---|
| 224 |         <listitem>
 | 
|---|
| 225 |           <para>Script to load firmware for a device</para>
 | 
|---|
| 226 |           <indexterm zone="ch-system-udev firmware.sh">
 | 
|---|
| 227 |             <primary sortas="b-firmware.sh">firmware.sh</primary>
 | 
|---|
| 228 |           </indexterm>
 | 
|---|
| 229 |         </listitem>
 | 
|---|
| 230 |       </varlistentry>
 | 
|---|
| 231 | 
 | 
|---|
| 232 |       <varlistentry id="path_id">
 | 
|---|
| 233 |         <term><command>path_id</command></term>
 | 
|---|
| 234 |         <listitem>
 | 
|---|
| 235 |           <para>Provide the shortest possible unique hardware path to a
 | 
|---|
| 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 | 
 | 
|---|
| 243 |       <varlistentry id="scsi_id">
 | 
|---|
| 244 |         <term><command>scsi_id</command></term>
 | 
|---|
| 245 |         <listitem>
 | 
|---|
| 246 |           <para>Retrieve or generate a unique SCSI identifier.</para>
 | 
|---|
| 247 |           <indexterm zone="ch-system-udev scsi_id">
 | 
|---|
| 248 |             <primary sortas="b-scsi_id">scsi_id</primary>
 | 
|---|
| 249 |           </indexterm>
 | 
|---|
| 250 |         </listitem>
 | 
|---|
| 251 |       </varlistentry>
 | 
|---|
| 252 | 
 | 
|---|
| 253 |       <varlistentry id="usb_id">
 | 
|---|
| 254 |         <term><command>usb_id</command></term>
 | 
|---|
| 255 |         <listitem>
 | 
|---|
| 256 |           <para>Identify a USB block device.</para>
 | 
|---|
| 257 |           <indexterm zone="ch-system-udev usb_id">
 | 
|---|
| 258 |             <primary sortas="b-usb_id">usb_id</primary>
 | 
|---|
| 259 |           </indexterm>
 | 
|---|
| 260 |         </listitem>
 | 
|---|
| 261 |       </varlistentry>
 | 
|---|
| 262 | 
 | 
|---|
| 263 |       <varlistentry id="vol_id">
 | 
|---|
| 264 |         <term><command>vol_id</command></term>
 | 
|---|
| 265 |         <listitem>
 | 
|---|
| 266 |           <para>Probe filesystem type and read label and uuid.</para>
 | 
|---|
| 267 |           <indexterm zone="ch-system-udev vol_id">
 | 
|---|
| 268 |             <primary sortas="b-vol_id">vol_id</primary>
 | 
|---|
| 269 |           </indexterm>
 | 
|---|
| 270 |         </listitem>
 | 
|---|
| 271 |       </varlistentry>
 | 
|---|
| 272 | 
 | 
|---|
| 273 |       <varlistentry id="etc-udev">
 | 
|---|
| 274 |         <term><filename class="directory">/etc/udev</filename></term>
 | 
|---|
| 275 |         <listitem>
 | 
|---|
| 276 |           <para>Contains <command>udev</command> configuration files,
 | 
|---|
| 277 |           device permissions, and rules for device naming</para>
 | 
|---|
| 278 |           <indexterm zone="ch-system-udev etc-udev">
 | 
|---|
| 279 |             <primary sortas="e-/etc/udev">/etc/udev</primary>
 | 
|---|
| 280 |           </indexterm>
 | 
|---|
| 281 |         </listitem>
 | 
|---|
| 282 |       </varlistentry>
 | 
|---|
| 283 | 
 | 
|---|
| 284 |       <varlistentry id="lib-udev">
 | 
|---|
| 285 |         <term><filename class="directory">/lib/udev</filename></term>
 | 
|---|
| 286 |         <listitem>
 | 
|---|
| 287 |           <para>Contains <command>udev</command> helper programs
 | 
|---|
| 288 |           and static devices which get copied to /dev when booted.</para>
 | 
|---|
| 289 |           <indexterm zone="ch-system-udev lib-udev">
 | 
|---|
| 290 |             <primary sortas="e-/lib/udev">/lib/udev</primary>
 | 
|---|
| 291 |           </indexterm>
 | 
|---|
| 292 |         </listitem>
 | 
|---|
| 293 |       </varlistentry>
 | 
|---|
| 294 |     </variablelist>
 | 
|---|
| 295 | 
 | 
|---|
| 296 |   </sect2>
 | 
|---|
| 297 | 
 | 
|---|
| 298 | </sect1>
 | 
|---|