source: chapter06/udev.xml@ 4b12a30

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 4b12a30 was 4b12a30, checked in by Matthew Burgess <matthew@…>, 13 years ago

Upgrade to Udev-173. Fixes #2908.

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

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