source: chapter06/udev.xml@ bc5f39a

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.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 bc5f39a was 744dcc9, checked in by Matthew Burgess <matthew@…>, 14 years ago

Upgrade to Udev-154. Fixes #2639.

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

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