source: chapter08/eudev.xml@ b870799

multilib xry111/multilib
Last change on this file since b870799 was 5e61857, checked in by Thomas Trepl <thomas@…>, 16 months ago

Automatic merge of trunk into multilib

  • Property mode set to 100644
File size: 8.7 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-eudev" role="wrap" revision="sysv">
9 <?dbhtml filename="eudev.html"?>
10
11 <sect1info condition="script">
12 <productname>eudev</productname>
13 <productnumber>&eudev-version;</productnumber>
14 <address>&eudev-url;</address>
15 </sect1info>
16
17 <title>Eudev-&eudev-version;</title>
18
19 <indexterm zone="ch-system-eudev">
20 <primary sortas="a-Eudev">Eudev</primary>
21 </indexterm>
22
23 <sect2 role="package">
24 <title/>
25
26 <para>The Eudev 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>&eudev-fin-sbu;</seg>
35 <seg>&eudev-fin-du;</seg>
36 </seglistitem>
37 </segmentedlist>
38 </sect2>
39
40 <sect2 role="installation">
41 <title>Installation of Eudev</title>
42 <!-- No longer seems needed. bdubbs 5/18/23
43 <para>First fix the location of udev rules in the .pc file:</para>
44
45<screen><userinput remap="pre">sed -i '/udevdir/a udev_dir=${udevdir}' src/udev/udev.pc.in</userinput></screen>
46-->
47 <!-- different from systemd: we do not have a render group and file is
48 named differently -->
49 <para>Remove an unneeded group
50 <systemitem class="groupname">sgx</systemitem>, from the default udev
51 rules:</para>
52
53<screen><userinput remap="pre">sed -i -e 's/GROUP="sgx", //' rules/50-udev-default.rules</userinput></screen>
54
55 <para>Prepare Eudev for compilation:</para>
56
57<screen><userinput remap="configure">./configure --prefix=/usr \
58 --bindir=/usr/sbin \
59 --sysconfdir=/etc \
60 --enable-manpages \
61 --disable-static</userinput></screen>
62
63 <para>Compile the package:</para>
64
65<screen><userinput remap="make">make</userinput></screen>
66
67 <para>Create some directories now that are needed for tests, but
68 will also be used as a part of installation:</para>
69
70<screen><userinput remap="test">mkdir -pv /usr/lib/udev/rules.d
71mkdir -pv /etc/udev/rules.d</userinput></screen>
72
73 <para>To test the results, issue:</para>
74
75<screen><userinput remap="test">make check</userinput></screen>
76
77 <para>Install the package:</para>
78
79<screen><userinput remap="install">make install</userinput></screen>
80
81 <para>Install some custom rules and support files useful in an LFS
82 environment:</para>
83
84<screen><userinput remap="install">tar -xvf ../&udev-lfs-version;.tar.xz
85make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
86
87 </sect2>
88
89 <!-- - - - - - - - - - -->
90 <!-- Multilib - 32bit -->
91 <!-- - - - - - - - - - -->
92
93 <sect2 arch="ml_32,ml_all" role="installation">
94 <title>Installation of Eudev - 32bit</title>
95
96 <para>Clean previous build:</para>
97
98<screen><userinput remap="pre">make distclean</userinput></screen>
99
100 <para>Prepare Eudev for compilation:</para>
101
102<screen><userinput remap="configure">CC="gcc -m32" \
103./configure --host=i686-pc-linux-gnu \
104 --prefix=/usr \
105 --bindir=/usr/sbin \
106 --libdir=/usr/lib32 \
107 --sysconfdir=/etc \
108 --disable-manpages \
109 --disable-static</userinput></screen>
110
111 <para>Compile the package:</para>
112
113<screen><userinput remap="make">make</userinput></screen>
114
115 <para>Install the package:</para>
116
117<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install
118cp -Rv DESTDIR/usr/lib32/* /usr/lib32
119rm -rf DESTDIR</userinput></screen>
120
121 </sect2><!-- m32 -->
122
123 <!-- - - - - - - - - - -->
124 <!-- Multilib - x32bit -->
125 <!-- - - - - - - - - - -->
126
127 <sect2 arch="ml_x32,ml_all" role="installation">
128 <title>Installation of Eudev - x32bit</title>
129
130 <para>Clean previous build:</para>
131
132<screen><userinput remap="pre">make distclean</userinput></screen>
133
134 <para>Prepare Eudev for compilation:</para>
135
136<screen><userinput remap="configure">CC="gcc -mx32" \
137./configure --host=x86_64-lfs-linux-gnux32 \
138 --prefix=/usr \
139 --bindir=/usr/sbin \
140 --libdir=/usr/libx32 \
141 --sysconfdir=/etc \
142 --disable-manpages \
143 --disable-static</userinput></screen>
144
145 <para>Compile the package:</para>
146
147<screen><userinput remap="make">make</userinput></screen>
148
149 <para>Install the package:</para>
150
151<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install
152cp -Rv DESTDIR/usr/libx32/* /usr/libx32
153rm -rf DESTDIR</userinput></screen>
154
155 </sect2><!-- mx32 -->
156
157 <sect2 id="conf-eudev" role="configuration">
158 <title>Configuring Eudev</title>
159
160 <indexterm zone="conf-eudev">
161 <primary sortas="a-Eudev">Eudev</primary>
162 <secondary>configuring</secondary>
163 </indexterm>
164
165 <indexterm zone="conf-eudev">
166 <primary sortas="e-/etc/udev/rules.d/65-kvm.rules">/etc/udev/rules.d/65-kvm.rules</primary>
167 </indexterm>
168
169 <para>
170 The default udev rule installed by Eudev would allow all users to
171 access <filename class='devicefile'>/dev/kvm</filename>. The editors
172 consider it dangerous. Create a configuration file to override it:
173 </para>
174
175<screen><userinput>cat > /etc/udev/rules.d/65-kvm.rules &lt;&lt; "EOF"
176<literal>KERNEL=="kvm", GROUP="kvm", MODE="0660", TAG+="uaccess"</literal>
177EOF</userinput></screen>
178
179 <indexterm zone="conf-eudev">
180 <primary sortas="e-/etc/udev/hwdb.bin">/etc/udev/hwdb.bin</primary>
181 </indexterm>
182
183 <para>Information about hardware devices is maintained in the
184 <filename class="directory">/etc/udev/hwdb.d</filename> and
185 <filename class="directory">/usr/lib/udev/hwdb.d</filename> directories.
186 <application>Eudev</application> needs that information to be compiled
187 into a binary database <filename>/etc/udev/hwdb.bin</filename>. Create the
188 initial database:</para>
189
190<screen><userinput>udevadm hwdb --update</userinput></screen>
191
192 <para>This command needs to be run each time the hardware information is
193 updated.</para>
194
195 </sect2>
196
197 <sect2 id="contents-eudev" role="content">
198 <title>Contents of Eudev</title>
199
200 <segmentedlist>
201 <segtitle>Installed programs</segtitle>
202 <segtitle>Installed libraries</segtitle>
203 <segtitle>Installed directories</segtitle>
204
205 <seglistitem>
206 <seg><!-- These are in /usr/lib/udev and not to be called by the user:
207 accelerometer, ata_id, cdrom_id, collect, mtd_probe,
208 scsi_id, v4l_id,--> udevadm and udevd</seg>
209
210 <seg>libudev.so</seg>
211
212 <seg>/etc/udev, /usr/lib/udev, and /usr/share/doc/udev-&udev-lfs-version;</seg>
213 </seglistitem>
214 </segmentedlist>
215
216 <variablelist>
217 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
218 <?dbfo list-presentation="list"?>
219 <?dbhtml list-presentation="table"?>
220 <varlistentry id="udevadm" revision="sysv">
221 <term><command>udevadm</command></term>
222 <listitem>
223 <para>Generic udev administration tool: controls the udevd daemon,
224 provides info from the Udev database, monitors uevents, waits for
225 uevents to finish, tests Udev configuration, and triggers uevents
226 for a given device</para>
227 <indexterm zone="ch-system-eudev udevadm">
228 <primary sortas="b-udevadm">udevadm</primary>
229 </indexterm>
230 </listitem>
231 </varlistentry>
232
233 <varlistentry id="udevd">
234 <term><command>udevd</command></term>
235 <listitem>
236 <para>A daemon that listens for uevents on the netlink socket,
237 creates devices and runs the configured external programs in
238 response to these uevents</para>
239 <indexterm zone="ch-system-eudev udevd">
240 <primary sortas="b-udevd">udevd</primary>
241 </indexterm>
242 </listitem>
243 </varlistentry>
244
245 <varlistentry id="libudev">
246 <term><filename class="libraryfile">libudev</filename></term>
247 <listitem>
248 <para>A library interface to udev device information</para>
249 <indexterm zone="ch-system-eudev libudev">
250 <primary sortas="c-libudev">libudev</primary>
251 </indexterm>
252 </listitem>
253 </varlistentry>
254
255 <varlistentry id="etc-udev">
256 <term><filename class="directory">/etc/udev</filename></term>
257 <listitem>
258 <para>Contains Udev configuration files,
259 device permissions, and rules for device naming</para>
260 <indexterm zone="ch-system-eudev etc-udev">
261 <primary sortas="e-/etc/udev">/etc/udev</primary>
262 </indexterm>
263 </listitem>
264 </varlistentry>
265
266 </variablelist>
267
268 </sect2>
269
270</sect1>
Note: See TracBrowser for help on using the repository browser.