source: chapter06/udev.xml@ 8536c02

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 8536c02 was 8536c02, checked in by Matthew Burgess <matthew@…>, 17 years ago

Upgrade to Udev-108. Fixes #1976.

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

  • Property mode set to 100644
File size: 11.3 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 <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 -xvf ../&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="`echo extras/*/`"</userinput></screen>
57
58 <variablelist>
59 <title>The meaning of the make option:</title>
60
61 <varlistentry>
62 <term><parameter>EXTRAS=...</parameter></term>
63 <listitem>
64 <para>This builds the helper binaries that can aid in writing custom
65 Udev rules.</para>
66 </listitem>
67 </varlistentry>
68
69 </variablelist>
70
71 <para>To test the results, issue:
72 <userinput>make test</userinput>.</para>
73
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
77 <para>Install the package:</para>
78
79<screen><userinput>make DESTDIR=/ EXTRAS="`echo extras/*/`" install</userinput></screen>
80
81 <variablelist>
82 <title>The meaning of the make parameter:</title>
83
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>
92
93 </variablelist>
94
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
97 commonly-used rules files provided by Udev:</para>
98
99<screen><userinput>cp -v etc/udev/rules.d/[0-9]* /etc/udev/rules.d/</userinput></screen>
100
101 <para>Now install the LFS-specific rules files:</para>
102
103<screen><userinput>cd &udev-config;
104make 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
111 <para>Install the documentation that explains the commonly-used rules
112 files provided by Udev:</para>
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 ..
120install -m644 -v docs/writing_udev_rules/index.html \
121 /usr/share/doc/udev-&udev-version;/index.html</userinput></screen>
122
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>
133 <seg>ata_id, cdrom_id, create_floppy_devices, edd_id, firmware_helper,
134 path_id, scsi_id, udevcontrol, udevd, udevinfo, udevmonitor, udevsettle,
135 udevtest, udevtrigger, usb_id, vol_id, and write_cd_aliases</seg>
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
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>
169 <listitem>
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>
173 </indexterm>
174 </listitem>
175 </varlistentry>
176
177 <varlistentry id="edd_id">
178 <term><command>edd_id</command></term>
179 <listitem>
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>
183 </indexterm>
184 </listitem>
185 </varlistentry>
186
187 <varlistentry id="firmware_helper">
188 <term><command>firmware_helper</command></term>
189 <listitem>
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
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
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>
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>
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>
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>
246 <para>Allows users to query the Udev database for
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>
260 <para>Prints the event received from the kernel and the environment
261 which Udev sends out after rule processing</para>
262 <indexterm zone="ch-system-udev udevmonitor">
263 <primary sortas="b-udevmonitor">udevmonitor</primary>
264 </indexterm>
265 </listitem>
266 </varlistentry>
267
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
279 <varlistentry id="udevtest">
280 <term><command>udevtest</command></term>
281 <listitem>
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>
287 </indexterm>
288 </listitem>
289 </varlistentry>
290
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
301 <varlistentry id="usb_id">
302 <term><command>usb_id</command></term>
303 <listitem>
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>
308 </indexterm>
309 </listitem>
310 </varlistentry>
311
312 <varlistentry id="vol_id">
313 <term><command>vol_id</command></term>
314 <listitem>
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>
319 </indexterm>
320 </listitem>
321 </varlistentry>
322
323 <varlistentry id="etc-udev">
324 <term><filename class="directory">/etc/udev</filename></term>
325 <listitem>
326 <para>Contains Udev configuation files,
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>
337
338</sect1>
Note: See TracBrowser for help on using the repository browser.