source: chapter06/udev.xml@ 4398c22

6.5
Last change on this file since 4398c22 was 4398c22, checked in by Matthew Burgess <matthew@…>, 15 years ago

Added switch to install udev documentation in the proper versioned directory. Fixes #2459.

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

  • Property mode set to 100644
File size: 13.6 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
54mknod -m0600 /lib/udev/devices/kmsg c 1 11
55ln -sv /proc/self/fd /lib/udev/devices/fd
56ln -sv /proc/self/fd/0 /lib/udev/devices/stdin
57ln -sv /proc/self/fd/1 /lib/udev/devices/stdout
58ln -sv /proc/self/fd/2 /lib/udev/devices/stderr
59ln -sv /proc/kcore /lib/udev/devices/core</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 --docdir=/usr/share/doc/udev-&udev-version; \
68 --disable-extras</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>--docdir=/usr/share/doc/udev-&udev-version;</parameter></term>
99 <listitem>
100 <para>This option installs the Udev documentation in the
101 proper location with the naming convention consistent with
102 other packages.</para>
103 </listitem>
104 </varlistentry>
105
106 <varlistentry>
107 <term><parameter>--disable-extras</parameter></term>
108 <listitem>
109 <para>This option prevents Udev from installing helper programs and
110 other extras which require more external libraries. These libraries
111 are not part of the base LFS system. See the Udev
112 <filename>README</filename> file for more information.</para>
113 </listitem>
114 </varlistentry>
115 </variablelist>
116
117 <para>Compile the package:</para>
118
119<screen><userinput remap="make">make</userinput></screen>
120
121 <para>This package does not come with a test suite.</para>
122
123 <para>Install the package:</para>
124
125<screen><userinput remap="install">make install</userinput></screen>
126
127 <para>Udev has to be configured in order to work properly, as its default
128 configuration does not cover all devices. First install two extra rules
129 files from Udev to help support device-mapper and RAID setups:</para>
130
131<screen><userinput remap="install">install -m644 -v rules/packages/64-*.rules \
132 /lib/udev/rules.d/</userinput></screen>
133
134 <para>Now install a file to create symlinks for certain hand-held devices:</para>
135
136<screen><userinput remap="install">install -m644 -v rules/packages/40-pilot-links.rules \
137 /lib/udev/rules.d/</userinput></screen>
138
139 <para>Now install a file to handle ISDN devices:</para>
140
141<screen><userinput remap="install">install -m644 -v rules/packages/40-isdn.rules \
142 /lib/udev/rules.d/</userinput></screen>
143
144 <!-- There are more files available in the packages/ directory, if we want
145 to consider using them. Most are probably irrelevant to LFS though.
146 "alsa" isn't, but we already have those rules, using a better set of
147 matches. Most of the files in packages/ are for other architectures. -->
148
149 <para>Now install the LFS-specific custom rules files:</para>
150
151<screen><userinput remap="install">cd &udev-config;
152make install</userinput></screen>
153
154 <para>Install the documentation that explains the LFS-specific rules
155 files:</para>
156
157<screen><userinput remap="install">make install-doc</userinput></screen>
158
159 <para>Install the documentation that explains the commonly-used rules
160 files provided by Udev:</para>
161
162<screen><userinput remap="install">make install-extra-doc</userinput></screen>
163<!--
164 <para>Install the documentation that explains how to create custom Udev
165 rules:</para>
166
167<screen><userinput remap="install">cd ..
168install -m644 -v -D docs/writing_udev_rules/index.html \
169 /usr/share/doc/udev-&udev-version;/index.html</userinput></screen>
170-->
171 </sect2>
172
173 <sect2 id="contents-udev" role="content">
174 <title>Contents of Udev</title>
175
176 <segmentedlist>
177 <segtitle>Installed programs</segtitle>
178 <segtitle>Installed libraries</segtitle>
179 <segtitle>Installed directory</segtitle>
180
181 <seglistitem>
182 <seg>ata_id, cdrom_id, collect, create_floppy_devices, edd_id,
183 firmware.sh, fstab_import, path_id, scsi_id, udevadm, udevd,
184 usb_id, write_cd_rules, and write_net_rules</seg>
185 <seg>libudev</seg>
186 <seg>/etc/udev</seg>
187 </seglistitem>
188 </segmentedlist>
189
190 <variablelist>
191 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
192 <?dbfo list-presentation="list"?>
193 <?dbhtml list-presentation="table"?>
194
195 <varlistentry id="ata_id">
196 <term><command>ata_id</command></term>
197 <listitem>
198 <para>Provides Udev with a unique string and
199 additional information (uuid, label) for an ATA drive</para>
200 <indexterm zone="ch-system-udev ata_id">
201 <primary sortas="b-ata_id">ata_id</primary>
202 </indexterm>
203 </listitem>
204 </varlistentry>
205
206 <varlistentry id="cdrom_id">
207 <term><command>cdrom_id</command></term>
208 <listitem>
209 <para>Provides Udev with the capabilities of a
210 CD-ROM or DVD-ROM drive</para>
211 <indexterm zone="ch-system-udev cdrom_id">
212 <primary sortas="b-cdrom_id">cdrom_id</primary>
213 </indexterm>
214 </listitem>
215 </varlistentry>
216
217 <varlistentry id="collect">
218 <term><command>collect</command></term>
219 <listitem>
220 <para>Given an ID for the current uevent and a list of
221 IDs (for all target uevents), registers the current ID
222 and indicates whether all target IDs have been registered</para>
223 <indexterm zone="ch-system-udev collect">
224 <primary sortas="b-collect">collect</primary>
225 </indexterm>
226 </listitem>
227 </varlistentry>
228
229 <varlistentry id="create_floppy_devices">
230 <term><command>create_floppy_devices</command></term>
231 <listitem>
232 <para>Creates all possible floppy devices based on the CMOS type</para>
233 <indexterm zone="ch-system-udev create_floppy_devices">
234 <primary sortas="b-create_floppy_devices">create_floppy_devices</primary>
235 </indexterm>
236 </listitem>
237 </varlistentry>
238
239 <varlistentry id="edd_id">
240 <term><command>edd_id</command></term>
241 <listitem>
242 <para>Provides Udev with the EDD ID for a BIOS disk drive</para>
243 <indexterm zone="ch-system-udev edd_id">
244 <primary sortas="b-edd_id">edd_id</primary>
245 </indexterm>
246 </listitem>
247 </varlistentry>
248
249 <varlistentry id="firmware.sh">
250 <term><command>firmware.sh</command></term>
251 <listitem>
252 <para>Uploads firmware to devices</para>
253 <indexterm zone="ch-system-udev firmware.sh">
254 <primary sortas="b-firmware.sh">firmware.sh</primary>
255 </indexterm>
256 </listitem>
257 </varlistentry>
258
259 <varlistentry id="fstab_import">
260 <term><command>fstab_import</command></term>
261 <listitem>
262 <para>Finds an entry in <filename>/etc/fstab</filename> that
263 matches the current device, and provides its information to
264 Udev</para>
265 <indexterm zone="ch-system-udev fstab_import">
266 <primary sortas="b-fstab_import">fstab_import</primary>
267 </indexterm>
268 </listitem>
269 </varlistentry>
270
271 <varlistentry id="path_id">
272 <term><command>path_id</command></term>
273 <listitem>
274 <para>Provides the shortest possible unique hardware path to a
275 device</para>
276 <indexterm zone="ch-system-udev path_id">
277 <primary sortas="b-path_id">path_id</primary>
278 </indexterm>
279 </listitem>
280 </varlistentry>
281
282 <varlistentry id="scsi_id">
283 <term><command>scsi_id</command></term>
284 <listitem>
285 <para>Provides Udev with a unique SCSI identifier
286 based on the data returned from sending a SCSI INQUIRY command to
287 the specified device</para>
288 <indexterm zone="ch-system-udev scsi_id">
289 <primary sortas="b-scsi_id">scsi_id</primary>
290 </indexterm>
291 </listitem>
292 </varlistentry>
293
294 <varlistentry id="udevadm">
295 <term><command>udevadm</command></term>
296 <listitem>
297 <para>Generic udev administration tool: controls the udevd daemon,
298 provides info from the Udev database, monitors uevents, waits for
299 uevents to finish, tests Udev configuration, and triggers uevents
300 for a given device</para>
301 <indexterm zone="ch-system-udev udevadm">
302 <primary sortas="b-udevadm">udevadm</primary>
303 </indexterm>
304 </listitem>
305 </varlistentry>
306
307 <varlistentry id="udevd">
308 <term><command>udevd</command></term>
309 <listitem>
310 <para>A daemon that listens for uevents on the netlink socket,
311 creates devices and runs the configured external programs in
312 response to these uevents</para>
313 <indexterm zone="ch-system-udev udevd">
314 <primary sortas="b-udevd">udevd</primary>
315 </indexterm>
316 </listitem>
317 </varlistentry>
318
319 <varlistentry id="usb_id">
320 <term><command>usb_id</command></term>
321 <listitem>
322 <para>Provides Udev with information about USB
323 devices</para>
324 <indexterm zone="ch-system-udev usb_id">
325 <primary sortas="b-usb_id">usb_id</primary>
326 </indexterm>
327 </listitem>
328 </varlistentry>
329
330 <varlistentry id="write_cd_rules">
331 <term><command>write_cd_rules</command></term>
332 <listitem>
333 <para>A script which generates Udev rules to provide stable names for
334 optical drives (see also <xref linkend="ch-scripts-symlinks"/>)</para>
335 <indexterm zone="ch-system-udev write_cd_rules">
336 <primary sortas="b-write_cd_rules">write_cd_rules</primary>
337 </indexterm>
338 </listitem>
339 </varlistentry>
340
341 <varlistentry id="write_net_rules">
342 <term><command>write_net_rules</command></term>
343 <listitem>
344 <para>A script which generates rules to provide stable names for
345 network interfaces (see also <xref linkend="ch-scripts-network"/>)
346 </para>
347 <indexterm zone="ch-system-udev write_net_rules">
348 <primary sortas="b-write_net_rules">write_net_rules</primary>
349 </indexterm>
350 </listitem>
351 </varlistentry>
352
353 <varlistentry id="libudev">
354 <term><command>libudev</command></term>
355 <listitem>
356 <para>A library interface to udev device information</para>
357 <indexterm zone="ch-system-udev libudev">
358 <primary sortas="c-libudev">libudev</primary>
359 </indexterm>
360 </listitem>
361 </varlistentry>
362
363 <varlistentry id="etc-udev">
364 <term><filename class="directory">/etc/udev</filename></term>
365 <listitem>
366 <para>Contains Udev configuration files,
367 device permissions, and rules for device naming</para>
368 <indexterm zone="ch-system-udev etc-udev">
369 <primary sortas="e-/etc/udev">/etc/udev</primary>
370 </indexterm>
371 </listitem>
372 </varlistentry>
373
374 </variablelist>
375
376 </sect2>
377
378</sect1>
Note: See TracBrowser for help on using the repository browser.