source: chapter06/udev.xml@ 3fa7ca4

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 3fa7ca4 was d75c123, checked in by DJ Lucas <dj@…>, 16 years ago

Updated udev instructions following upstream recommendations.

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

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