source: chapter06/udev.xml@ bb8939c

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.5 6.6 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 bb8939c was bb8939c, checked in by Bryan Kadzban <bryan@…>, 15 years ago
  • Install udev's 40-isdn.rules to handle ISDN (CAPI) devices; remove udev-config rules for them. Fixes more of #2297.
  • Use the dialout group instead of uucp. Udev has moved to a Debian-like setup, where the uucp group is for a UUCP daemon, and dialout is for devices. (This undoes much of r8428 as well.) Fixes the rest of #2314, and more of #2297.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@8841 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;</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<screen><userinput remap="configure">./configure --prefix=/usr \
64 --exec-prefix= \
65 --sysconfdir=/etc</userinput></screen>
66
67 <para>Compile the package:</para>
68
69<screen><userinput remap="make">make</userinput></screen>
70
71 <para>This package does not come with a test suite.</para>
72
73 <para>Install the package:</para>
74
75<screen><userinput remap="install">make install</userinput></screen>
76
77 <para>Udev has to be configured in order to work properly, as its default
78 configuration does not cover all devices. First install two extra rules
79 files from Udev to help support device-mapper and RAID setups:</para>
80
81<screen><userinput remap="install">install -m644 -v rules/packages/64-*.rules \
82 /lib/udev/rules.d/</userinput></screen>
83
84 <para>Now install a file to create symlinks for certain hand-held devices:</para>
85
86<screen><userinput remap="install">install -m644 -v rules/packages/40-pilot-links.rules \
87 /lib/udev/rules.d/</userinput></screen>
88
89 <para>Now install a file to handle ISDN devices:</para>
90
91<screen><userinput remap="install">install -m644 -v rules/packages/40-isdn.rules \
92 /lib/udev/rules.d/</userinput></screen>
93
94 <!-- There are more files available in the packages/ directory, if we want
95 to consider using them. Most are probably irrelevant to LFS though.
96 "alsa" isn't, but we already have those rules, using a better set of
97 matches. Most of the files in packages/ are for other architectures. -->
98
99 <para>Now install the LFS-specific custom rules files:</para>
100
101<screen><userinput remap="install">cd &udev-config;
102make install</userinput></screen>
103
104 <para>Install the documentation that explains the LFS-specific rules
105 files:</para>
106
107<screen><userinput remap="install">make install-doc</userinput></screen>
108
109 <para>Install the documentation that explains the commonly-used rules
110 files provided by Udev:</para>
111
112<screen><userinput remap="install">make install-extra-doc</userinput></screen>
113
114 <para>Install the documentation that explains how to create custom Udev
115 rules:</para>
116
117<screen><userinput remap="install">cd ..
118install -m644 -v -D docs/writing_udev_rules/index.html \
119 /usr/share/doc/udev-&udev-version;/index.html</userinput></screen>
120
121 </sect2>
122
123 <sect2 id="contents-udev" role="content">
124 <title>Contents of Udev</title>
125
126 <segmentedlist>
127 <segtitle>Installed programs</segtitle>
128 <segtitle>Installed libraries</segtitle>
129 <segtitle>Installed directory</segtitle>
130
131 <seglistitem>
132 <seg>ata_id, cdrom_id, collect, create_floppy_devices, edd_id,
133 firmware.sh, fstab_import, path_id, scsi_id, udevadm, udevd,
134 usb_id, vol_id, write_cd_rules, and write_net_rules</seg>
135 <seg>libudev and libvolume_id</seg>
136 <seg>/etc/udev</seg>
137 </seglistitem>
138 </segmentedlist>
139
140 <variablelist>
141 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
142 <?dbfo list-presentation="list"?>
143 <?dbhtml list-presentation="table"?>
144
145 <varlistentry id="ata_id">
146 <term><command>ata_id</command></term>
147 <listitem>
148 <para>Provides Udev with a unique string and
149 additional information (uuid, label) for an ATA drive</para>
150 <indexterm zone="ch-system-udev ata_id">
151 <primary sortas="b-ata_id">ata_id</primary>
152 </indexterm>
153 </listitem>
154 </varlistentry>
155
156 <varlistentry id="cdrom_id">
157 <term><command>cdrom_id</command></term>
158 <listitem>
159 <para>Provides Udev with the capabilities of a
160 CD-ROM or DVD-ROM drive</para>
161 <indexterm zone="ch-system-udev cdrom_id">
162 <primary sortas="b-cdrom_id">cdrom_id</primary>
163 </indexterm>
164 </listitem>
165 </varlistentry>
166
167 <varlistentry id="collect">
168 <term><command>collect</command></term>
169 <listitem>
170 <para>Given an ID for the current uevent and a list of
171 IDs (for all target uevents), registers the current ID
172 and indicates whether all target IDs have been registered</para>
173 <indexterm zone="ch-system-udev collect">
174 <primary sortas="b-collect">collect</primary>
175 </indexterm>
176 </listitem>
177 </varlistentry>
178
179 <varlistentry id="create_floppy_devices">
180 <term><command>create_floppy_devices</command></term>
181 <listitem>
182 <para>Creates all possible floppy devices based on the CMOS type</para>
183 <indexterm zone="ch-system-udev create_floppy_devices">
184 <primary sortas="b-create_floppy_devices">create_floppy_devices</primary>
185 </indexterm>
186 </listitem>
187 </varlistentry>
188
189 <varlistentry id="edd_id">
190 <term><command>edd_id</command></term>
191 <listitem>
192 <para>Provides Udev with the EDD ID for a BIOS disk drive</para>
193 <indexterm zone="ch-system-udev edd_id">
194 <primary sortas="b-edd_id">edd_id</primary>
195 </indexterm>
196 </listitem>
197 </varlistentry>
198
199 <varlistentry id="firmware.sh">
200 <term><command>firmware.sh</command></term>
201 <listitem>
202 <para>Uploads firmware to devices</para>
203 <indexterm zone="ch-system-udev firmware.sh">
204 <primary sortas="b-firmware.sh">firmware.sh</primary>
205 </indexterm>
206 </listitem>
207 </varlistentry>
208
209 <varlistentry id="fstab_import">
210 <term><command>fstab_import</command></term>
211 <listitem>
212 <para>Finds an entry in <filename>/etc/fstab</filename> that
213 matches the current device, and provides its information to
214 Udev</para>
215 <indexterm zone="ch-system-udev fstab_import">
216 <primary sortas="b-fstab_import">fstab_import</primary>
217 </indexterm>
218 </listitem>
219 </varlistentry>
220
221 <varlistentry id="path_id">
222 <term><command>path_id</command></term>
223 <listitem>
224 <para>Provides the shortest possible unique hardware path to a
225 device</para>
226 <indexterm zone="ch-system-udev path_id">
227 <primary sortas="b-path_id">path_id</primary>
228 </indexterm>
229 </listitem>
230 </varlistentry>
231
232 <varlistentry id="scsi_id">
233 <term><command>scsi_id</command></term>
234 <listitem>
235 <para>Provides Udev with a unique SCSI identifier
236 based on the data returned from sending a SCSI INQUIRY command to
237 the specified device</para>
238 <indexterm zone="ch-system-udev scsi_id">
239 <primary sortas="b-scsi_id">scsi_id</primary>
240 </indexterm>
241 </listitem>
242 </varlistentry>
243
244 <varlistentry id="udevadm">
245 <term><command>udevadm</command></term>
246 <listitem>
247 <para>Generic udev administration tool: controls the udevd daemon,
248 provides info from the Udev database, monitors uevents, waits for
249 uevents to finish, tests Udev configuration, and triggers uevents
250 for a given device</para>
251 <indexterm zone="ch-system-udev udevadm">
252 <primary sortas="b-udevadm">udevadm</primary>
253 </indexterm>
254 </listitem>
255 </varlistentry>
256
257 <varlistentry id="udevd">
258 <term><command>udevd</command></term>
259 <listitem>
260 <para>A daemon that listens for uevents on the netlink socket,
261 creates devices and runs the configured external programs in
262 response to these uevents</para>
263 <indexterm zone="ch-system-udev udevd">
264 <primary sortas="b-udevd">udevd</primary>
265 </indexterm>
266 </listitem>
267 </varlistentry>
268
269 <varlistentry id="usb_id">
270 <term><command>usb_id</command></term>
271 <listitem>
272 <para>Provides Udev with information about USB
273 devices</para>
274 <indexterm zone="ch-system-udev usb_id">
275 <primary sortas="b-usb_id">usb_id</primary>
276 </indexterm>
277 </listitem>
278 </varlistentry>
279
280 <varlistentry id="vol_id">
281 <term><command>vol_id</command></term>
282 <listitem>
283 <para>Provides Udev with the label and uuid of a
284 filesystem</para>
285 <indexterm zone="ch-system-udev vol_id">
286 <primary sortas="b-vol_id">vol_id</primary>
287 </indexterm>
288 </listitem>
289 </varlistentry>
290
291 <varlistentry id="write_cd_rules">
292 <term><command>write_cd_rules</command></term>
293 <listitem>
294 <para>A script which generates Udev rules to provide stable names for
295 optical drives (see also <xref linkend="ch-scripts-symlinks"/>)</para>
296 <indexterm zone="ch-system-udev write_cd_rules">
297 <primary sortas="b-write_cd_rules">write_cd_rules</primary>
298 </indexterm>
299 </listitem>
300 </varlistentry>
301
302 <varlistentry id="write_net_rules">
303 <term><command>write_net_rules</command></term>
304 <listitem>
305 <para>A script which generates rules to provide stable names for
306 network interfaces (see also <xref linkend="ch-scripts-network"/>)
307 </para>
308 <indexterm zone="ch-system-udev write_net_rules">
309 <primary sortas="b-write_net_rules">write_net_rules</primary>
310 </indexterm>
311 </listitem>
312 </varlistentry>
313
314 <varlistentry id="libudev">
315 <term><command>libudev</command></term>
316 <listitem>
317 <para>A library interface to udev device information</para>
318 <indexterm zone="ch-system-udev libudev">
319 <primary sortas="c-libudev">libudev</primary>
320 </indexterm>
321 </listitem>
322 </varlistentry>
323
324 <varlistentry id="libvolume_id">
325 <term><command>libvolume_id</command></term>
326 <listitem>
327 <para>A library interface to read volume labels and uuids</para>
328 <indexterm zone="ch-system-udev libvolume_id">
329 <primary sortas="c-libvolume_id">libvolume_id</primary>
330 </indexterm>
331 </listitem>
332 </varlistentry>
333
334 <varlistentry id="etc-udev">
335 <term><filename class="directory">/etc/udev</filename></term>
336 <listitem>
337 <para>Contains Udev configuration files,
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>
348
349</sect1>
Note: See TracBrowser for help on using the repository browser.