source: chapter06/udev.xml@ 9749dc51

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 9749dc51 was 9749dc51, checked in by Bryan Kadzban <bryan@…>, 18 years ago

Update to udev-102 and udev-config-20061014.

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

  • Property mode set to 100644
File size: 11.2 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. Install the
102 LFS-specific configuration files:</para>
103
104<screen><userinput>cp -v &udev-config;/[0-9]* /etc/udev/rules.d/</userinput></screen>
105
106 <para>Install the documentation that explains how to create Udev rules:</para>
107
108<screen><userinput>install -m644 -D -v docs/writing_udev_rules/index.html \
109 /usr/share/doc/udev-&udev-version;/index.html</userinput></screen>
110
111 </sect2>
112
113 <sect2 id="contents-udev" role="content">
114 <title>Contents of Udev</title>
115
116 <segmentedlist>
117 <segtitle>Installed programs</segtitle>
118 <segtitle>Installed directory</segtitle>
119
120 <seglistitem>
121 <seg>ata_id, cdrom_id, create_floppy_devices, edd_id, firmware_helper,
122 path_id, scsi_id, udevcontrol, udevd, udevinfo, udevmonitor, udevsettle,
123 udevtest, udevtrigger, usb_id, vol_id, and write_cd_aliases</seg>
124 <seg>/etc/udev</seg>
125 </seglistitem>
126 </segmentedlist>
127
128 <variablelist>
129 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
130 <?dbfo list-presentation="list"?>
131 <?dbhtml list-presentation="table"?>
132
133 <varlistentry id="ata_id">
134 <term><command>ata_id</command></term>
135 <listitem>
136 <para>Provides Udev with a unique string and
137 additional information (uuid, label) for an ATA drive</para>
138 <indexterm zone="ch-system-udev ata_id">
139 <primary sortas="b-ata_id">ata_id</primary>
140 </indexterm>
141 </listitem>
142 </varlistentry>
143
144 <varlistentry id="cdrom_id">
145 <term><command>cdrom_id</command></term>
146 <listitem>
147 <para>Provides Udev with the capabilities of a
148 CD-ROM or DVD-ROM drive</para>
149 <indexterm zone="ch-system-udev cdrom_id">
150 <primary sortas="b-cdrom_id">cdrom_id</primary>
151 </indexterm>
152 </listitem>
153 </varlistentry>
154
155 <varlistentry id="create_floppy_devices">
156 <term><command>create_floppy_devices</command></term>
157 <listitem>
158 <para>Creates all possible floppy devices based on the CMOS type</para>
159 <indexterm zone="ch-system-udev create_floppy_devices">
160 <primary sortas="b-create_floppy_devices">create_floppy_devices</primary>
161 </indexterm>
162 </listitem>
163 </varlistentry>
164
165 <varlistentry id="edd_id">
166 <term><command>edd_id</command></term>
167 <listitem>
168 <para>Provides Udev with the EDD ID for a BIOS disk drive</para>
169 <indexterm zone="ch-system-udev edd_id">
170 <primary sortas="b-edd_id">edd_id</primary>
171 </indexterm>
172 </listitem>
173 </varlistentry>
174
175 <varlistentry id="firmware_helper">
176 <term><command>firmware_helper</command></term>
177 <listitem>
178 <para>Uploads firmware to devices</para>
179 <indexterm zone="ch-system-udev firmware_helper">
180 <primary sortas="b-firmware_helper">firmware_helper</primary>
181 </indexterm>
182 </listitem>
183 </varlistentry>
184
185 <varlistentry id="path_id">
186 <term><command>path_id</command></term>
187 <listitem>
188 <para>Provide the shortest possible unique hardware path to a
189 device</para>
190 <indexterm zone="ch-system-udev path_id">
191 <primary sortas="b-path_id">path_id</primary>
192 </indexterm>
193 </listitem>
194 </varlistentry>
195
196 <varlistentry id="scsi_id">
197 <term><command>scsi_id</command></term>
198 <listitem>
199 <para>Provides Udev with a unique SCSI identifier
200 based on the data returned from sending a SCSI INQUIRY command to
201 the specified device</para>
202 <indexterm zone="ch-system-udev scsi_id">
203 <primary sortas="b-scsi_id">scsi_id</primary>
204 </indexterm>
205 </listitem>
206 </varlistentry>
207
208 <varlistentry id="udevcontrol">
209 <term><command>udevcontrol</command></term>
210 <listitem>
211 <para>Configures a number of options for the running
212 <command>udevd</command> daemon, such as the log level.</para>
213 <indexterm zone="ch-system-udev udevcontrol">
214 <primary sortas="b-udevcontrol">udevcontrol</primary>
215 </indexterm>
216 </listitem>
217 </varlistentry>
218
219 <varlistentry id="udevd">
220 <term><command>udevd</command></term>
221 <listitem>
222 <para>A daemon that listens for uevents on the netlink socket,
223 creates devices and runs the configured external programs in
224 response to these uevents</para>
225 <indexterm zone="ch-system-udev udevd">
226 <primary sortas="b-udevd">udevd</primary>
227 </indexterm>
228 </listitem>
229 </varlistentry>
230
231 <varlistentry id="udevinfo">
232 <term><command>udevinfo</command></term>
233 <listitem>
234 <para>Allows users to query the Udev database for
235 information on any device currently present on the system; it also
236 provides a way to query any device in the <systemitem
237 class="filesystem">sysfs</systemitem> tree to help create udev
238 rules</para>
239 <indexterm zone="ch-system-udev udevinfo">
240 <primary sortas="b-udevinfo">udevinfo</primary>
241 </indexterm>
242 </listitem>
243 </varlistentry>
244
245 <varlistentry id="udevmonitor">
246 <term><command>udevmonitor</command></term>
247 <listitem>
248 <para>Prints the event received from the kernel and the environment
249 which Udev sends out after rule processing</para>
250 <indexterm zone="ch-system-udev udevmonitor">
251 <primary sortas="b-udevmonitor">udevmonitor</primary>
252 </indexterm>
253 </listitem>
254 </varlistentry>
255
256 <varlistentry id="udevsettle">
257 <term><command>udevsettle</command></term>
258 <listitem>
259 <para>Watches the Udev event queue and exits if all current uevents
260 have been handled</para>
261 <indexterm zone="ch-system-udev udevsettle">
262 <primary sortas="b-udevsettle">udevsettle</primary>
263 </indexterm>
264 </listitem>
265 </varlistentry>
266
267 <varlistentry id="udevtest">
268 <term><command>udevtest</command></term>
269 <listitem>
270 <para>Simulates a uevent for the given device, and prints out the
271 name of the node the real <command>udevd</command> would have created,
272 or the name of the renamed network interface</para>
273 <indexterm zone="ch-system-udev udevtest">
274 <primary sortas="b-udevtest">udevtest</primary>
275 </indexterm>
276 </listitem>
277 </varlistentry>
278
279 <varlistentry id="udevtrigger">
280 <term><command>udevtrigger</command></term>
281 <listitem>
282 <para>Triggers kernel device uevents to be replayed</para>
283 <indexterm zone="ch-system-udev udevtrigger">
284 <primary sortas="b-udevtrigger">udevtrigger</primary>
285 </indexterm>
286 </listitem>
287 </varlistentry>
288
289 <varlistentry id="usb_id">
290 <term><command>usb_id</command></term>
291 <listitem>
292 <para>Provides Udev with information about USB
293 devices</para>
294 <indexterm zone="ch-system-udev usb_id">
295 <primary sortas="b-usb_id">usb_id</primary>
296 </indexterm>
297 </listitem>
298 </varlistentry>
299
300 <varlistentry id="vol_id">
301 <term><command>vol_id</command></term>
302 <listitem>
303 <para>Provides Udev with the label and uuid of a
304 filesystem</para>
305 <indexterm zone="ch-system-udev vol_id">
306 <primary sortas="b-vol_id">vol_id</primary>
307 </indexterm>
308 </listitem>
309 </varlistentry>
310
311 <varlistentry id="etc-udev">
312 <term><filename class="directory">/etc/udev</filename></term>
313 <listitem>
314 <para>Contains Udev configuation files,
315 device permissions, and rules for device naming</para>
316 <indexterm zone="ch-system-udev etc-udev">
317 <primary sortas="e-/etc/udev">/etc/udev</primary>
318 </indexterm>
319 </listitem>
320 </varlistentry>
321
322 </variablelist>
323
324 </sect2>
325
326</sect1>
Note: See TracBrowser for help on using the repository browser.