source: chapter06/udev.xml@ 2b596c0b

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
Last change on this file since 2b596c0b was 2b596c0b, checked in by Manuel Canales Esparcia <manuel@…>, 17 years ago

Fixed a @remap attribute.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@8395 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

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