source: chapter06/udev.xml@ a1708ee

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

Spelling

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

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