[8a75933] | 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 |
|
---|
[35a5259] | 8 | <sect1 id="ch-system-eudev" role="wrap" revision="sysv">
|
---|
[8a75933] | 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-ch6-sbu;</seg>
|
---|
| 35 | <seg>&eudev-ch6-du;</seg>
|
---|
| 36 | </seglistitem>
|
---|
| 37 | </segmentedlist>
|
---|
| 38 | </sect2>
|
---|
| 39 |
|
---|
| 40 | <sect2 role="installation">
|
---|
| 41 | <title>Installation of Eudev</title>
|
---|
[de6905d] | 42 | <!--
|
---|
[3aee2ac2] | 43 | <para>First, fix a test script:</para>
|
---|
[8a75933] | 44 |
|
---|
[3aee2ac2] | 45 | <screen><userinput remap="pre">sed -r -i 's|/usr(/bin/test)|\1|' test/udev-test.pl</userinput></screen>
|
---|
[de6905d] | 46 | -->
|
---|
[8da63ab] | 47 | <!--
|
---|
[3e92f82] | 48 | <para>Next, remove an unneeded line that causes a build failure:</para>
|
---|
| 49 |
|
---|
| 50 | <screen><userinput remap="pre">sed -i '/keyboard_lookup_key/d' src/udev/udev-builtin-keyboard.c</userinput></screen>
|
---|
[8da63ab] | 51 | -->
|
---|
[5066dee] | 52 | <!--
|
---|
[f5ae110a] | 53 | <para>First, add a workaround to prevent the /tools directory from being
|
---|
[99dd957] | 54 | hard coded into Eudev binary files library locations:</para>
|
---|
| 55 |
|
---|
| 56 | <screen><userinput remap="pre">cat > config.cache << "EOF"
|
---|
| 57 | HAVE_BLKID=1
|
---|
| 58 | BLKID_LIBS="-lblkid"
|
---|
| 59 | BLKID_CFLAGS="-I/tools/include"
|
---|
| 60 | EOF</userinput></screen>
|
---|
[5066dee] | 61 | -->
|
---|
[8a75933] | 62 | <para>Prepare Eudev for compilation:</para>
|
---|
| 63 |
|
---|
[99dd957] | 64 | <screen><userinput remap="configure">./configure --prefix=/usr \
|
---|
[8a75933] | 65 | --bindir=/sbin \
|
---|
| 66 | --sbindir=/sbin \
|
---|
| 67 | --libdir=/usr/lib \
|
---|
| 68 | --sysconfdir=/etc \
|
---|
| 69 | --libexecdir=/lib \
|
---|
| 70 | --with-rootprefix= \
|
---|
| 71 | --with-rootlibdir=/lib \
|
---|
[54dfb280] | 72 | --enable-manpages \
|
---|
[5066dee] | 73 | --disable-static</userinput></screen>
|
---|
| 74 | <!-- - -config-cache</userinput></screen> -->
|
---|
[53366411] | 75 |
|
---|
[8a75933] | 76 | <para>Compile the package:</para>
|
---|
| 77 |
|
---|
[5066dee] | 78 | <screen><userinput remap="make">make</userinput></screen>
|
---|
| 79 | <!--
|
---|
[99dd957] | 80 | <screen><userinput remap="make">LIBRARY_PATH=/tools/lib make</userinput></screen>
|
---|
[8a75933] | 81 |
|
---|
[8b3e141] | 82 | <note><para>The LIBRARY_PATH variable here and the LD_LIBRARY_PATH variable
|
---|
| 83 | below are needed to allow the use of libraries that were installed in /tools,
|
---|
| 84 | but have not yet been installed in the main system. LIBRARY_PATH is
|
---|
| 85 | used to find libraries during the linking process. LD_LIBRARY_PATH is
|
---|
| 86 | used to find libraries during program execution.</para></note>
|
---|
[5066dee] | 87 | -->
|
---|
[8a75933] | 88 | <para>Create some directories now that are needed for tests, but
|
---|
| 89 | will also be used as a part of installation:</para>
|
---|
| 90 |
|
---|
[1a96a4ed] | 91 | <screen><userinput remap="test">mkdir -pv /lib/udev/rules.d
|
---|
[8a75933] | 92 | mkdir -pv /etc/udev/rules.d</userinput></screen>
|
---|
| 93 |
|
---|
[1a96a4ed] | 94 | <para>To test the results, issue:</para>
|
---|
[8a75933] | 95 |
|
---|
[5066dee] | 96 | <screen><userinput remap="test">make check</userinput></screen>
|
---|
| 97 | <!--<screen><userinput remap="test">make LD_LIBRARY_PATH=/tools/lib check</userinput></screen>-->
|
---|
[8a75933] | 98 |
|
---|
[1a96a4ed] | 99 | <para>Install the package:</para>
|
---|
[8a75933] | 100 |
|
---|
[5066dee] | 101 | <screen><userinput remap="install">make install</userinput></screen>
|
---|
| 102 | <!--<screen><userinput remap="install">make LD_LIBRARY_PATH=/tools/lib install</userinput></screen>-->
|
---|
[8a75933] | 103 |
|
---|
[99dd957] | 104 | <para>Install some custom rules and support files useful in an LFS
|
---|
[8aa7fde] | 105 | environment:</para>
|
---|
[111bb20] | 106 |
|
---|
[be00729f] | 107 | <screen><userinput remap="install">tar -xvf ../&udev-lfs-version;.tar.xz
|
---|
[8aa7fde] | 108 | make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
|
---|
[111bb20] | 109 |
|
---|
[8a75933] | 110 | </sect2>
|
---|
| 111 |
|
---|
[b3f1ebb3] | 112 | <!-- ~~~~~~~~~~~~~~~~~~~~ ABI 32 ~~~~~~~~~~~~~~~~~~~~ -->
|
---|
| 113 |
|
---|
[fd48baa] | 114 | <sect2 arch="ml_32,ml_all" role="installation">
|
---|
[b3f1ebb3] | 115 | <title>Installation of Eudev - 32-bit</title>
|
---|
| 116 |
|
---|
| 117 | <para>Clean previous build:</para>
|
---|
| 118 |
|
---|
| 119 | <screen><userinput remap="pre">make distclean</userinput></screen>
|
---|
| 120 |
|
---|
| 121 | <para>Prepare Eudev for compilation:</para>
|
---|
| 122 |
|
---|
| 123 | <screen><userinput remap="configure">CC="gcc -m32" \
|
---|
| 124 | ./configure --host=i686-pc-linux-gnu \
|
---|
| 125 | --prefix=/usr \
|
---|
| 126 | --bindir=/sbin \
|
---|
| 127 | --sbindir=/sbin \
|
---|
| 128 | --libdir=/usr/lib32 \
|
---|
| 129 | --sysconfdir=/etc \
|
---|
| 130 | --libexecdir=/lib32 \
|
---|
| 131 | --with-rootprefix= \
|
---|
| 132 | --with-rootlibdir=/usr/lib32 \
|
---|
| 133 | --disable-manpages \
|
---|
| 134 | --disable-static \
|
---|
| 135 | --config-cache</userinput></screen>
|
---|
| 136 |
|
---|
| 137 | <para>Compile the package:</para>
|
---|
| 138 |
|
---|
| 139 | <screen><userinput remap="make">make</userinput></screen>
|
---|
| 140 |
|
---|
| 141 | <para>Install the package:</para>
|
---|
| 142 |
|
---|
| 143 | <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install
|
---|
| 144 | cp -Rv DESTDIR/usr/lib32/* /usr/lib32
|
---|
| 145 | rm -rf DESTDIR</userinput></screen>
|
---|
| 146 |
|
---|
| 147 | </sect2>
|
---|
| 148 |
|
---|
| 149 | <!-- ~~~~~~~~~~~~~~~~~~~~ ABI x32 ~~~~~~~~~~~~~~~~~~~~ -->
|
---|
| 150 |
|
---|
[fd48baa] | 151 | <sect2 arch="ml_x32,ml_all" role="installation">
|
---|
[b3f1ebb3] | 152 | <title>Installation of Eudev - x32-bit</title>
|
---|
| 153 |
|
---|
| 154 | <para>Clean previous build:</para>
|
---|
| 155 |
|
---|
| 156 | <screen><userinput remap="pre">make distclean</userinput></screen>
|
---|
| 157 |
|
---|
| 158 | <para>Prepare Eudev for compilation:</para>
|
---|
| 159 |
|
---|
| 160 | <screen><userinput remap="configure">CC="gcc -mx32" \
|
---|
| 161 | ./configure --prefix=/usr \
|
---|
| 162 | --bindir=/sbin \
|
---|
| 163 | --sbindir=/sbin \
|
---|
| 164 | --libdir=/usr/libx32 \
|
---|
| 165 | --sysconfdir=/etc \
|
---|
| 166 | --libexecdir=/libx32 \
|
---|
| 167 | --with-rootprefix= \
|
---|
| 168 | --with-rootlibdir=/usr/libx32 \
|
---|
| 169 | --disable-manpages \
|
---|
| 170 | --disable-static \
|
---|
| 171 | --config-cache</userinput></screen>
|
---|
| 172 |
|
---|
| 173 | <para>Compile the package:</para>
|
---|
| 174 |
|
---|
| 175 | <screen><userinput remap="make">make</userinput></screen>
|
---|
| 176 |
|
---|
| 177 | <para>Install the package:</para>
|
---|
| 178 |
|
---|
| 179 | <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install
|
---|
| 180 | cp -Rv DESTDIR/usr/libx32/* /usr/libx32
|
---|
| 181 | rm -rf DESTDIR</userinput></screen>
|
---|
| 182 |
|
---|
| 183 | </sect2>
|
---|
| 184 |
|
---|
[1a96a4ed] | 185 | <sect2 id="conf-eudev" role="configuration">
|
---|
| 186 | <title>Configuring Eudev</title>
|
---|
| 187 |
|
---|
| 188 | <indexterm zone="conf-eudev">
|
---|
| 189 | <primary sortas="a-Eudev">Eudev</primary>
|
---|
| 190 | <secondary>configuring</secondary>
|
---|
| 191 | </indexterm>
|
---|
| 192 |
|
---|
| 193 | <indexterm zone="conf-eudev">
|
---|
| 194 | <primary sortas="e-/etc/udev/hwdb.bin">/etc/udev/hwdb.bin</primary>
|
---|
| 195 | </indexterm>
|
---|
| 196 |
|
---|
| 197 | <para>Information about hardware devices is maintained in the
|
---|
| 198 | <filename class="directory">/etc/udev/hwdb.d</filename> and
|
---|
[a0c056c] | 199 | <filename class="directory">/lib/udev/hwdb.d</filename> directories.
|
---|
[1a96a4ed] | 200 | <application>Eudev</application> needs that information to be compiled
|
---|
| 201 | into a binary database <filename>/etc/udev/hwdb.bin</filename>. Create the
|
---|
| 202 | initial database:</para>
|
---|
| 203 |
|
---|
[5066dee] | 204 | <!--<screen><userinput>LD_LIBRARY_PATH=/tools/lib udevadm hwdb - -update</userinput></screen>-->
|
---|
| 205 | <screen><userinput>udevadm hwdb --update</userinput></screen>
|
---|
[1a96a4ed] | 206 |
|
---|
| 207 | <para>This command needs to be run each time the hardware information is
|
---|
| 208 | updated.</para>
|
---|
| 209 |
|
---|
| 210 | </sect2>
|
---|
| 211 |
|
---|
[8a75933] | 212 | <sect2 id="contents-eudev" role="content">
|
---|
| 213 | <title>Contents of Eudev</title>
|
---|
| 214 |
|
---|
| 215 | <segmentedlist>
|
---|
| 216 | <segtitle>Installed programs</segtitle>
|
---|
| 217 | <segtitle>Installed libraries</segtitle>
|
---|
| 218 | <segtitle>Installed directories</segtitle>
|
---|
| 219 |
|
---|
| 220 | <seglistitem>
|
---|
| 221 | <seg><!-- These are in /lib/udev and not to be called by the user:
|
---|
| 222 | accelerometer, ata_id, cdrom_id, collect, mtd_probe,
|
---|
| 223 | scsi_id, v4l_id,--> udevadm and udevd</seg>
|
---|
| 224 |
|
---|
| 225 | <seg>libudev.so</seg>
|
---|
| 226 |
|
---|
[aa8729c] | 227 | <seg>/etc/udev, /lib/udev, and /usr/share/doc/udev-&udev-lfs-version;</seg>
|
---|
[8a75933] | 228 | </seglistitem>
|
---|
| 229 | </segmentedlist>
|
---|
| 230 |
|
---|
| 231 | <variablelist>
|
---|
| 232 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 233 | <?dbfo list-presentation="list"?>
|
---|
| 234 | <?dbhtml list-presentation="table"?>
|
---|
[35a5259] | 235 | <varlistentry id="udevadm" revision="sysv">
|
---|
[8a75933] | 236 | <term><command>udevadm</command></term>
|
---|
| 237 | <listitem>
|
---|
| 238 | <para>Generic udev administration tool: controls the udevd daemon,
|
---|
| 239 | provides info from the Udev database, monitors uevents, waits for
|
---|
| 240 | uevents to finish, tests Udev configuration, and triggers uevents
|
---|
| 241 | for a given device</para>
|
---|
| 242 | <indexterm zone="ch-system-eudev udevadm">
|
---|
| 243 | <primary sortas="b-udevadm">udevadm</primary>
|
---|
| 244 | </indexterm>
|
---|
| 245 | </listitem>
|
---|
| 246 | </varlistentry>
|
---|
| 247 |
|
---|
| 248 | <varlistentry id="udevd">
|
---|
| 249 | <term><command>udevd</command></term>
|
---|
| 250 | <listitem>
|
---|
| 251 | <para>A daemon that listens for uevents on the netlink socket,
|
---|
| 252 | creates devices and runs the configured external programs in
|
---|
| 253 | response to these uevents</para>
|
---|
| 254 | <indexterm zone="ch-system-eudev udevd">
|
---|
| 255 | <primary sortas="b-udevd">udevd</primary>
|
---|
| 256 | </indexterm>
|
---|
| 257 | </listitem>
|
---|
| 258 | </varlistentry>
|
---|
| 259 |
|
---|
| 260 | <varlistentry id="libudev">
|
---|
| 261 | <term><filename class="libraryfile">libudev</filename></term>
|
---|
| 262 | <listitem>
|
---|
| 263 | <para>A library interface to udev device information</para>
|
---|
| 264 | <indexterm zone="ch-system-eudev libudev">
|
---|
| 265 | <primary sortas="c-libudev">libudev</primary>
|
---|
| 266 | </indexterm>
|
---|
| 267 | </listitem>
|
---|
| 268 | </varlistentry>
|
---|
| 269 |
|
---|
| 270 | <varlistentry id="etc-udev">
|
---|
| 271 | <term><filename class="directory">/etc/udev</filename></term>
|
---|
| 272 | <listitem>
|
---|
| 273 | <para>Contains Udev configuration files,
|
---|
| 274 | device permissions, and rules for device naming</para>
|
---|
| 275 | <indexterm zone="ch-system-eudev etc-udev">
|
---|
| 276 | <primary sortas="e-/etc/udev">/etc/udev</primary>
|
---|
| 277 | </indexterm>
|
---|
| 278 | </listitem>
|
---|
| 279 | </varlistentry>
|
---|
| 280 |
|
---|
| 281 | </variablelist>
|
---|
| 282 |
|
---|
| 283 | </sect2>
|
---|
| 284 |
|
---|
| 285 | </sect1>
|
---|