source: chapter06/udev.xml@ 980a692

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.3 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 980a692 was 65cff7b, checked in by Matthew Burgess <matthew@…>, 18 years ago

Fix a typo. Fixes #1921.

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

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