source: chapter06/udev.xml@ 2a698a6

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 12.2 12.2-rc1 6.3 6.4 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/loongarch-12.2 xry111/mips64el xry111/multilib xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 2a698a6 was 09043c0, checked in by Matthew Burgess <matthew@…>, 19 years ago

Stop the Udev build process from killing the hosts' udevd process

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

  • Property mode set to 100644
File size: 7.6 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
3 <!ENTITY % general-entities SYSTEM "../general.ent">
4 <!ENTITY % patches-entities SYSTEM "../patches.ent">
5 %general-entities;
6 %patches-entities;
7]>
8<sect1 id="ch-system-udev" role="wrap">
9<title>Udev-&udev-version;</title>
10<?dbhtml filename="udev.html"?>
11
12<indexterm zone="ch-system-udev"><primary sortas="a-Udev">Udev</primary></indexterm>
13
14<sect2 role="package"><title/>
15<para>The Udev package contains programs for dynamic creation of device nodes.</para>
16
17<segmentedlist>
18<segtitle>&buildtime;</segtitle>
19<segtitle>&diskspace;</segtitle>
20<seglistitem><seg>0.1 SBU</seg><seg>3.8 MB</seg></seglistitem>
21</segmentedlist>
22
23<segmentedlist>
24<segtitle>&dependencies;</segtitle>
25<seglistitem><seg>Coreutils and Make</seg></seglistitem>
26</segmentedlist>
27
28</sect2>
29
30<sect2 role="installation">
31<title>Installation of Udev</title>
32
33<para>Compile the package:</para>
34
35<screen><userinput>make EXTRAS=extras/run_directory</userinput></screen>
36
37<para>The meaning of the make option:</para>
38
39<variablelist>
40 <varlistentry>
41 <term><parameter>EXTRAS=extras/run_directory</parameter>
42 </term>
43 <listitem>
44 <para>This builds the <command>udev_run_devd</command> and
45 <command>udev_run_hotplugd</command> binaries, which are required for
46 correct handling of hotpluggable devices.
47 </para>
48 </listitem>
49 </varlistentry>
50</variablelist>
51
52<para>To test the results, issue:
53<userinput>make test</userinput>.</para>
54
55<para>Install the package:</para>
56
57<screen><userinput>make DESTDIR=/ EXTRAS=extras/run_directory install</userinput></screen>
58
59<para>The meaning of the make option:</para>
60
61<variablelist>
62 <varlistentry>
63 <term><parameter>DESTDIR=/</parameter>
64 </term>
65 <listitem>
66 <para>This prevents the Udev build process from killing any
67 <command>udevd</command> processes that may be running on the host
68 system.
69 </para>
70 </listitem>
71 </varlistentry>
72</variablelist>
73
74<para>Udev's configuration is far from ideal by default, so install
75the configuration files here:</para>
76
77<screen><userinput>cp -v ../&udev-config-file; /etc/udev/rules.d/25-lfs.rules</userinput></screen>
78
79<para>Install the documentation that explains how to create Udev rules:</para>
80
81<screen><userinput>install -m644 -D -v docs/writing_udev_rules/index.html /usr/share/doc/udev-&udev-version;/index.html</userinput></screen>
82
83<!-- Edit Me -->
84<para>Run the <command>udevstart</command> program to create our full
85complement of device nodes.</para>
86
87<screen><userinput>/sbin/udevstart</userinput></screen>
88
89</sect2>
90
91<sect2 id="contents-udev" role="content"><title>Contents of Udev</title>
92
93<segmentedlist>
94<segtitle>Installed programs</segtitle>
95<segtitle>Installed directory</segtitle>
96<seglistitem><seg>udev, udev_run_devd, udev_run_hotplugd, udevcontrol, udevd,
97udevinfo, udevmonitor, udevsend, udevstart, and udevtest</seg>
98<seg>/etc/udev</seg></seglistitem>
99</segmentedlist>
100
101<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
102<?dbfo list-presentation="list"?>
103<?dbhtml list-presentation="table"?>
104
105<varlistentry id="udev">
106<term><command>udev</command></term>
107<listitem>
108<para>Creates device nodes in <filename
109class="directory">/dev</filename> or renames network interfaces (not
110in LFS) in response to hotplug events</para>
111<indexterm zone="ch-system-udev udev"><primary sortas="b-udev">udev</primary></indexterm>
112</listitem></varlistentry>
113
114<varlistentry id="udev_run_devd">
115 <term><command>udev_run_devd</command></term>
116 <listitem>
117 <para>Executes programs and scripts in the
118 <filename class="directory">/etc/dev.d/</filename> directory in response
119 to hotplug events
120 </para>
121 <indexterm zone="ch-system-udev udev_run_devd">
122 <primary sortas="b-udev_run_devd">udev_run_devd</primary>
123 </indexterm>
124 </listitem>
125</varlistentry>
126
127<varlistentry id="udev_run_hotplugd">
128 <term><command>udev_run_hotplugd</command></term>
129 <listitem>
130 <para>Executes programs and scripts in the
131 <filename class="directory">/etc/hotplug.d/</filename> directory in
132 response to hotplug events
133 </para>
134 <indexterm zone="ch-system-udev udev_run_hotplugd">
135 <primary sortas="b-udev_run_hotplugd">udev_run_hotplugd</primary>
136 </indexterm>
137 </listitem>
138</varlistentry>
139
140<varlistentry id="udevcontrol">
141<term><command>udevcontrol</command></term>
142<listitem>
143<para>Configures a number of options for the running <command>udevd</command>
144daemon, such as the log level.</para>
145<indexterm zone="ch-system-udev udevcontrol"><primary sortas="b-udevcontrol">udevcontrol</primary>
146</indexterm>
147</listitem></varlistentry>
148
149<varlistentry id="udevd">
150<term><command>udevd</command></term>
151<listitem>
152<para>A daemon that reorders hotplug events before submitting them to
153<command>udev</command>,
154thus avoiding various race conditions</para>
155<indexterm zone="ch-system-udev udevd"><primary sortas="b-udevd">udevd</primary></indexterm>
156</listitem></varlistentry>
157
158<varlistentry id="udevinfo">
159<term><command>udevinfo</command></term>
160<listitem>
161<para>Allows users to query the <command>udev</command> database for
162information on any device currently present on the system; it also
163provides a way to query any device in the <systemitem
164class="filesystem">sysfs</systemitem> tree to help create udev
165rules</para>
166<indexterm zone="ch-system-udev udevinfo"><primary sortas="b-udevinfo">udevinfo</primary></indexterm>
167</listitem></varlistentry>
168
169<varlistentry id="udevmonitor">
170<term><command>udevmonitor</command></term>
171<listitem>
172<para>Prints the event received from the kernel and the event which
173<command>udev</command> sends out after rule processing</para>
174<indexterm zone="ch-system-udev udevmonitor"><primary sortas="b-udevmonitor">udevmonitor</primary>
175</indexterm>
176</listitem></varlistentry>
177
178<varlistentry id="udevsend">
179<term><command>udevsend</command></term>
180<listitem>
181<para>Delivers hotplug events to <command>udevd</command></para>
182<indexterm zone="ch-system-udev udevsend"><primary sortas="b-udevsend">udevsend</primary></indexterm>
183</listitem></varlistentry>
184
185<varlistentry id="udevstart">
186<term><command>udevstart</command></term>
187<listitem>
188<para>Creates device nodes in <filename
189class="directory">/dev</filename> that correspond to drivers compiled directly
190into the kernel; it performs that task by simulating hotplug events presumably
191dropped by the kernel before invocation of this program (e.g., because the root
192filesystem has not been mounted) and submitting such synthetic hotplug events
193to <command>udev</command></para>
194<indexterm zone="ch-system-udev udevstart"><primary sortas="b-udevstart">udevstart</primary></indexterm>
195</listitem>
196</varlistentry>
197
198<varlistentry id="udevtest">
199<term><command>udevtest</command></term>
200<listitem>
201<para>Simulates a <command>udev</command> run for the given device,
202and prints out the name of the node the real <command>udev</command> would
203have created or (not in LFS) the name of the renamed network interface</para>
204<indexterm zone="ch-system-udev udevtest"><primary sortas="b-udevtest">udevtest</primary></indexterm>
205</listitem></varlistentry>
206
207<varlistentry id="etc-udev">
208<term><filename class="directory">/etc/udev</filename></term>
209<listitem>
210<para>Contains <command>udev</command> configuation files,
211device permissions, and rules for device naming</para>
212<indexterm zone="ch-system-udev etc-udev"><primary sortas="e-/etc/udev">/etc/udev</primary></indexterm>
213</listitem></varlistentry>
214</variablelist>
215</sect2>
216
217</sect1>
218
Note: See TracBrowser for help on using the repository browser.