source: chapter06/udev.xml@ a263c7a

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 a263c7a was a263c7a, checked in by Dan Nichilson <dnicholson@…>, 18 years ago

Updated to udev-096 and udev-config-20060712. Closes #1804.

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

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