source: chapter06/udev.xml@ f874424

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 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 f874424 was f874424, checked in by Bruce Dubbs <bdubbs@…>, 13 years ago

Rename /etc/sysconfig/init_params to /etc/sysconfig/rc.site.
Move network services to /lib/services.
Move init-functions to /lib/lsb.
Make /lib/lsb a symlink to /lib/services.
Create convenience symlink /etc/init.d->/etc/rc.d/init.d
Add help and man pages to ifup/ifdown.

Append /run/var/bootlog to /var/log/boot.log at the end of
the boot sequence.

Add capability to step through the boot scripts at boot time.

Optionally allow environment variables in sysconfig directory's
console, network, and clock files to be placed in rc.site.

Add an optional FASTBOOT parameter to set /fastboot when rebooting.

Remove a minor warning message from udev that is triggered
by the udev_retry boot script.

Add SKIPTMPCLEAN as an optional parameter to skip cleaning /tmp at boot time.

Add a page to Chapter 7 documenting rc.site.

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

  • Property mode set to 100644
File size: 12.2 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; plus &udev-testfiles-du; for testfiles</seg>
36 </seglistitem>
37 </segmentedlist>
38
39 </sect2>
40
41 <sect2 role="installation">
42 <title>Installation of Udev</title>
43
44 <para>Optionally remove an unneeded warning message that shows up in this
45 version of udev at boot time.</para>
46
47<screen><userinput remap="pre">sed -i -e '/deprecated/d' udev/udevadm-trigger.c</userinput></screen>
48
49
50 <para>The udev-config tarball contains LFS-specific files used to configure
51 Udev. Unpack it into the Udev source directory:</para>
52
53<screen><userinput remap="pre">tar -xvf ../&udev-config;.tar.bz2</userinput></screen>
54
55 <para>The udev-testfiles tarball contains files needed to test udev. The
56 file expands to an apparent size of about 37MB but the actual disk usage
57 is less than 7MB.</para>
58
59<screen><userinput remap="pre">tar -xvf ../udev-&udev-version;-testfiles.tar.bz2 --strip-components=1</userinput></screen>
60
61 <para>Create some devices and directories that Udev cannot handle due to
62 them being required very early in the boot process, or by Udev itself:</para>
63
64<screen><userinput remap="install">install -dv /lib/{firmware,udev/devices/pts}
65mknod -m0666 /lib/udev/devices/null c 1 3</userinput></screen>
66
67 <para>Prepare the package for compilation:</para>
68
69<!-- Note that "libdir=/usr/lib64" would be required for multilib. -->
70<screen><userinput remap="configure">./configure --prefix=/usr \
71 --sysconfdir=/etc --sbindir=/sbin \
72 --with-rootlibdir=/lib --libexecdir=/lib/udev \
73 --disable-hwdb --disable-introspection \
74 --disable-keymap</userinput></screen>
75
76 <variablelist>
77 <title>The meaning of the new configure options</title>
78
79 <varlistentry>
80 <term><parameter>--with-rootlibdir=/lib</parameter></term>
81 <listitem>
82 <para>This controls where the <filename
83 class="libraryfile">libudev</filename> library is installed. The
84 library needs to be in <filename class="directory">/lib</filename>
85 because it's used by Udev at boot time, before <filename
86 class="directory">/usr</filename> might be available, and the default
87 --rootlibdir is <filename class="directory">/usr/lib</filename>.</para>
88 </listitem>
89 </varlistentry>
90
91 <!-- Note that libexecdir *MUST* stay /lib/udev, even on a 64-bit
92 / multilib system where udev is compiled for 64-bit. Other
93 packages require this exact path; the udev maintainers have
94 said this is part of the udev API. -->
95 <varlistentry>
96 <term><parameter>--libexecdir=/lib/udev</parameter></term>
97 <listitem>
98 <para>This controls where Udev-internal rules and helper programs
99 are installed.</para>
100 </listitem>
101 </varlistentry>
102
103 <varlistentry>
104 <term><parameter>--disable-*</parameter></term>
105 <listitem>
106 <para>These options prevent Udev from installing helper programs and
107 other extras which require more external libraries. These libraries
108 are not part of the base LFS system. See the Udev
109 <filename>README</filename> file for more information.</para>
110 </listitem>
111 </varlistentry>
112 </variablelist>
113
114 <para>Compile the package:</para>
115
116<screen><userinput remap="make">make</userinput></screen>
117
118 <para>Test the package.</para>
119
120<screen><userinput remap="test">make check</userinput></screen>
121
122 <para>Install the package:</para>
123
124<screen><userinput remap="install">make install</userinput></screen>
125
126 <para>Remove an empty documentation directory:</para>
127
128<screen><userinput remap="install">rmdir -v /usr/share/doc/udev</userinput></screen>
129
130 <para>Now install the LFS-specific custom rules files:</para>
131
132<screen><userinput remap="install">cd &udev-config;
133make install</userinput></screen>
134
135 <para>Install the documentation that explains the LFS-specific rules
136 files:</para>
137
138<screen><userinput remap="install">make install-doc</userinput></screen>
139
140 </sect2>
141
142 <sect2 id="contents-udev" role="content">
143 <title>Contents of Udev</title>
144
145 <segmentedlist>
146 <segtitle>Installed programs</segtitle>
147 <segtitle>Installed libraries</segtitle>
148 <segtitle>Installed directories</segtitle>
149
150 <seglistitem>
151 <seg>ata_id, cdrom_id, collect, create_floppy_devices, edd_id,
152 firmware.sh, fstab_import, path_id, scsi_id, udevadm, udevd,
153 usb_id, write_cd_rules, and write_net_rules</seg>
154 <seg>libudev.{a,so}</seg>
155 <seg>/etc/udev, /lib/udev, /lib/firmware</seg>
156 </seglistitem>
157 </segmentedlist>
158
159 <variablelist>
160 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
161 <?dbfo list-presentation="list"?>
162 <?dbhtml list-presentation="table"?>
163
164 <varlistentry id="ata_id">
165 <term><command>ata_id</command></term>
166 <listitem>
167 <para>Provides Udev with a unique string and
168 additional information (uuid, label) for an ATA drive</para>
169 <indexterm zone="ch-system-udev ata_id">
170 <primary sortas="b-ata_id">ata_id</primary>
171 </indexterm>
172 </listitem>
173 </varlistentry>
174
175 <varlistentry id="cdrom_id">
176 <term><command>cdrom_id</command></term>
177 <listitem>
178 <para>Provides Udev with the capabilities of a
179 CD-ROM or DVD-ROM drive</para>
180 <indexterm zone="ch-system-udev cdrom_id">
181 <primary sortas="b-cdrom_id">cdrom_id</primary>
182 </indexterm>
183 </listitem>
184 </varlistentry>
185
186 <varlistentry id="collect">
187 <term><command>collect</command></term>
188 <listitem>
189 <para>Given an ID for the current uevent and a list of
190 IDs (for all target uevents), registers the current ID
191 and indicates whether all target IDs have been registered</para>
192 <indexterm zone="ch-system-udev collect">
193 <primary sortas="b-collect">collect</primary>
194 </indexterm>
195 </listitem>
196 </varlistentry>
197
198 <varlistentry id="create_floppy_devices">
199 <term><command>create_floppy_devices</command></term>
200 <listitem>
201 <para>Creates all possible floppy devices based on the CMOS type</para>
202 <indexterm zone="ch-system-udev create_floppy_devices">
203 <primary sortas="b-create_floppy_devices">create_floppy_devices</primary>
204 </indexterm>
205 </listitem>
206 </varlistentry>
207
208 <varlistentry id="edd_id">
209 <term><command>edd_id</command></term>
210 <listitem>
211 <para>Provides Udev with the EDD ID for a BIOS disk drive</para>
212 <indexterm zone="ch-system-udev edd_id">
213 <primary sortas="b-edd_id">edd_id</primary>
214 </indexterm>
215 </listitem>
216 </varlistentry>
217
218 <varlistentry id="firmware.sh">
219 <term><command>firmware.sh</command></term>
220 <listitem>
221 <para>Uploads firmware to devices</para>
222 <indexterm zone="ch-system-udev firmware.sh">
223 <primary sortas="b-firmware.sh">firmware.sh</primary>
224 </indexterm>
225 </listitem>
226 </varlistentry>
227
228 <varlistentry id="fstab_import">
229 <term><command>fstab_import</command></term>
230 <listitem>
231 <para>Finds an entry in <filename>/etc/fstab</filename> that
232 matches the current device, and provides its information to
233 Udev</para>
234 <indexterm zone="ch-system-udev fstab_import">
235 <primary sortas="b-fstab_import">fstab_import</primary>
236 </indexterm>
237 </listitem>
238 </varlistentry>
239
240 <varlistentry id="path_id">
241 <term><command>path_id</command></term>
242 <listitem>
243 <para>Provides the shortest possible unique hardware path to a
244 device</para>
245 <indexterm zone="ch-system-udev path_id">
246 <primary sortas="b-path_id">path_id</primary>
247 </indexterm>
248 </listitem>
249 </varlistentry>
250
251 <varlistentry id="scsi_id">
252 <term><command>scsi_id</command></term>
253 <listitem>
254 <para>Provides Udev with a unique SCSI identifier
255 based on the data returned from sending a SCSI INQUIRY command to
256 the specified device</para>
257 <indexterm zone="ch-system-udev scsi_id">
258 <primary sortas="b-scsi_id">scsi_id</primary>
259 </indexterm>
260 </listitem>
261 </varlistentry>
262
263 <varlistentry id="udevadm">
264 <term><command>udevadm</command></term>
265 <listitem>
266 <para>Generic udev administration tool: controls the udevd daemon,
267 provides info from the Udev database, monitors uevents, waits for
268 uevents to finish, tests Udev configuration, and triggers uevents
269 for a given device</para>
270 <indexterm zone="ch-system-udev udevadm">
271 <primary sortas="b-udevadm">udevadm</primary>
272 </indexterm>
273 </listitem>
274 </varlistentry>
275
276 <varlistentry id="udevd">
277 <term><command>udevd</command></term>
278 <listitem>
279 <para>A daemon that listens for uevents on the netlink socket,
280 creates devices and runs the configured external programs in
281 response to these uevents</para>
282 <indexterm zone="ch-system-udev udevd">
283 <primary sortas="b-udevd">udevd</primary>
284 </indexterm>
285 </listitem>
286 </varlistentry>
287
288 <varlistentry id="usb_id">
289 <term><command>usb_id</command></term>
290 <listitem>
291 <para>Provides Udev with information about USB
292 devices</para>
293 <indexterm zone="ch-system-udev usb_id">
294 <primary sortas="b-usb_id">usb_id</primary>
295 </indexterm>
296 </listitem>
297 </varlistentry>
298
299 <varlistentry id="write_cd_rules">
300 <term><command>write_cd_rules</command></term>
301 <listitem>
302 <para>A script which generates Udev rules to provide stable names for
303 optical drives (see also <xref linkend="ch-scripts-symlinks"/>)</para>
304 <indexterm zone="ch-system-udev write_cd_rules">
305 <primary sortas="b-write_cd_rules">write_cd_rules</primary>
306 </indexterm>
307 </listitem>
308 </varlistentry>
309
310 <varlistentry id="write_net_rules">
311 <term><command>write_net_rules</command></term>
312 <listitem>
313 <para>A script which generates rules to provide stable names for
314 network interfaces (see also <xref linkend="ch-scripts-network"/>)
315 </para>
316 <indexterm zone="ch-system-udev write_net_rules">
317 <primary sortas="b-write_net_rules">write_net_rules</primary>
318 </indexterm>
319 </listitem>
320 </varlistentry>
321
322 <varlistentry id="libudev">
323 <term><filename class="libraryfile">libudev</filename></term>
324 <listitem>
325 <para>A library interface to udev device information</para>
326 <indexterm zone="ch-system-udev libudev">
327 <primary sortas="c-libudev">libudev</primary>
328 </indexterm>
329 </listitem>
330 </varlistentry>
331
332 <varlistentry id="etc-udev">
333 <term><filename class="directory">/etc/udev</filename></term>
334 <listitem>
335 <para>Contains Udev configuration files,
336 device permissions, and rules for device naming</para>
337 <indexterm zone="ch-system-udev etc-udev">
338 <primary sortas="e-/etc/udev">/etc/udev</primary>
339 </indexterm>
340 </listitem>
341 </varlistentry>
342
343 </variablelist>
344
345 </sect2>
346
347</sect1>
Note: See TracBrowser for help on using the repository browser.