eudev.xml 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  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. <sect1 id="ch-system-eudev" role="wrap" revision="sysv">
  8. <?dbhtml filename="eudev.html"?>
  9. <sect1info condition="script">
  10. <productname>eudev</productname>
  11. <productnumber>&eudev-version;</productnumber>
  12. <address>&eudev-url;</address>
  13. </sect1info>
  14. <title>Eudev-&eudev-version;</title>
  15. <indexterm zone="ch-system-eudev">
  16. <primary sortas="a-Eudev">Eudev</primary>
  17. </indexterm>
  18. <sect2 role="package">
  19. <title/>
  20. <para>The Eudev package contains programs for dynamic creation of device
  21. nodes.</para>
  22. <segmentedlist>
  23. <segtitle>&buildtime;</segtitle>
  24. <segtitle>&diskspace;</segtitle>
  25. <seglistitem>
  26. <seg>&eudev-ch6-sbu;</seg>
  27. <seg>&eudev-ch6-du;</seg>
  28. </seglistitem>
  29. </segmentedlist>
  30. </sect2>
  31. <sect2 role="installation">
  32. <title>Installation of Eudev</title>
  33. <!--
  34. <para>First, fix a test script:</para>
  35. <screen><userinput remap="pre">sed -r -i 's|/usr(/bin/test)|\1|' test/udev-test.pl</userinput></screen>
  36. -->
  37. <!--
  38. <para>Next, remove an unneeded line that causes a build failure:</para>
  39. <screen><userinput remap="pre">sed -i '/keyboard_lookup_key/d' src/udev/udev-builtin-keyboard.c</userinput></screen>
  40. -->
  41. <para>First, add a workaround to prevent the /tools directory from being
  42. hard coded into Eudev binary files library locations:</para>
  43. <screen><userinput remap="pre">cat &gt; config.cache &lt;&lt; "EOF"
  44. HAVE_BLKID=1
  45. BLKID_LIBS="-lblkid"
  46. BLKID_CFLAGS="-I/tools/include"
  47. EOF</userinput></screen>
  48. <para>Prepare Eudev for compilation:</para>
  49. <screen><userinput remap="configure">./configure --prefix=/usr \
  50. --bindir=/sbin \
  51. --sbindir=/sbin \
  52. --libdir=/usr/lib \
  53. --sysconfdir=/etc \
  54. --libexecdir=/lib \
  55. --with-rootprefix= \
  56. --with-rootlibdir=/lib \
  57. --enable-manpages \
  58. --disable-static \
  59. --config-cache</userinput></screen>
  60. <para>Compile the package:</para>
  61. <screen><userinput remap="make">LIBRARY_PATH=/tools/lib make</userinput></screen>
  62. <note><para>The LIBRARY_PATH variable here and the LD_LIBRARY_PATH variable
  63. below are needed to allow the use of libraries that were installed in /tools,
  64. but have not yet been installed in the main system. LIBRARY_PATH is
  65. used to find libraries during the linking process. LD_LIBRARY_PATH is
  66. used to find libraries during program execution.</para></note>
  67. <para>Create some directories now that are needed for tests, but
  68. will also be used as a part of installation:</para>
  69. <screen><userinput remap="test">mkdir -pv /lib/udev/rules.d
  70. mkdir -pv /etc/udev/rules.d</userinput></screen>
  71. <para>To test the results, issue:</para>
  72. <screen><userinput remap="test">make LD_LIBRARY_PATH=/tools/lib check</userinput></screen>
  73. <para>Install the package:</para>
  74. <screen><userinput remap="install">make LD_LIBRARY_PATH=/tools/lib install</userinput></screen>
  75. <para>Install some custom rules and support files useful in an LFS
  76. environment:</para>
  77. <screen><userinput remap="install">tar -xvf ../&udev-lfs-version;.tar.bz2
  78. make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
  79. </sect2>
  80. <!-- ~~~~~~~~~~~~~~~~~~~~ ABI 32 ~~~~~~~~~~~~~~~~~~~~ -->
  81. <sect2 arch="ml_32,ml_all" role="installation">
  82. <title>Installation of Eudev - 32-bit</title>
  83. <para>Clean previous build:</para>
  84. <screen><userinput remap="pre">make distclean</userinput></screen>
  85. <para>Prepare Eudev for compilation:</para>
  86. <screen><userinput remap="configure">CC="gcc -m32" \
  87. ./configure --host=i686-pc-linux-gnu \
  88. --prefix=/usr \
  89. --bindir=/sbin \
  90. --sbindir=/sbin \
  91. --libdir=/usr/lib32 \
  92. --sysconfdir=/etc \
  93. --libexecdir=/lib32 \
  94. --with-rootprefix= \
  95. --with-rootlibdir=/usr/lib32 \
  96. --disable-manpages \
  97. --disable-static \
  98. --config-cache</userinput></screen>
  99. <para>Compile the package:</para>
  100. <screen><userinput remap="make">make</userinput></screen>
  101. <para>Install the package:</para>
  102. <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install
  103. cp -Rv DESTDIR/usr/lib32/* /usr/lib32
  104. rm -rf DESTDIR</userinput></screen>
  105. </sect2>
  106. <!-- ~~~~~~~~~~~~~~~~~~~~ ABI x32 ~~~~~~~~~~~~~~~~~~~~ -->
  107. <sect2 arch="ml_x32,ml_all" role="installation">
  108. <title>Installation of Eudev - x32-bit</title>
  109. <para>Clean previous build:</para>
  110. <screen><userinput remap="pre">make distclean</userinput></screen>
  111. <para>Prepare Eudev for compilation:</para>
  112. <screen><userinput remap="configure">CC="gcc -mx32" \
  113. ./configure --prefix=/usr \
  114. --bindir=/sbin \
  115. --sbindir=/sbin \
  116. --libdir=/usr/libx32 \
  117. --sysconfdir=/etc \
  118. --libexecdir=/libx32 \
  119. --with-rootprefix= \
  120. --with-rootlibdir=/usr/libx32 \
  121. --disable-manpages \
  122. --disable-static \
  123. --config-cache</userinput></screen>
  124. <para>Compile the package:</para>
  125. <screen><userinput remap="make">make</userinput></screen>
  126. <para>Install the package:</para>
  127. <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install
  128. cp -Rv DESTDIR/usr/libx32/* /usr/libx32
  129. rm -rf DESTDIR</userinput></screen>
  130. </sect2>
  131. <sect2 id="conf-eudev" role="configuration">
  132. <title>Configuring Eudev</title>
  133. <indexterm zone="conf-eudev">
  134. <primary sortas="a-Eudev">Eudev</primary>
  135. <secondary>configuring</secondary>
  136. </indexterm>
  137. <indexterm zone="conf-eudev">
  138. <primary sortas="e-/etc/udev/hwdb.bin">/etc/udev/hwdb.bin</primary>
  139. </indexterm>
  140. <para>Information about hardware devices is maintained in the
  141. <filename class="directory">/etc/udev/hwdb.d</filename> and
  142. <filename class="directory">/lib/udev/hwdb.d</filename> directories.
  143. <application>Eudev</application> needs that information to be compiled
  144. into a binary database <filename>/etc/udev/hwdb.bin</filename>. Create the
  145. initial database:</para>
  146. <screen><userinput>LD_LIBRARY_PATH=/tools/lib udevadm hwdb --update</userinput></screen>
  147. <para>This command needs to be run each time the hardware information is
  148. updated.</para>
  149. </sect2>
  150. <sect2 id="contents-eudev" role="content">
  151. <title>Contents of Eudev</title>
  152. <segmentedlist>
  153. <segtitle>Installed programs</segtitle>
  154. <segtitle>Installed libraries</segtitle>
  155. <segtitle>Installed directories</segtitle>
  156. <seglistitem>
  157. <seg><!-- These are in /lib/udev and not to be called by the user:
  158. accelerometer, ata_id, cdrom_id, collect, mtd_probe,
  159. scsi_id, v4l_id,--> udevadm and udevd</seg>
  160. <seg>libudev.so</seg>
  161. <seg>/etc/udev, /lib/udev, and /usr/share/doc/udev-&udev-lfs-version;</seg>
  162. </seglistitem>
  163. </segmentedlist>
  164. <variablelist>
  165. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  166. <?dbfo list-presentation="list"?>
  167. <?dbhtml list-presentation="table"?>
  168. <varlistentry id="udevadm" revision="sysv">
  169. <term><command>udevadm</command></term>
  170. <listitem>
  171. <para>Generic udev administration tool: controls the udevd daemon,
  172. provides info from the Udev database, monitors uevents, waits for
  173. uevents to finish, tests Udev configuration, and triggers uevents
  174. for a given device</para>
  175. <indexterm zone="ch-system-eudev udevadm">
  176. <primary sortas="b-udevadm">udevadm</primary>
  177. </indexterm>
  178. </listitem>
  179. </varlistentry>
  180. <varlistentry id="udevd">
  181. <term><command>udevd</command></term>
  182. <listitem>
  183. <para>A daemon that listens for uevents on the netlink socket,
  184. creates devices and runs the configured external programs in
  185. response to these uevents</para>
  186. <indexterm zone="ch-system-eudev udevd">
  187. <primary sortas="b-udevd">udevd</primary>
  188. </indexterm>
  189. </listitem>
  190. </varlistentry>
  191. <varlistentry id="libudev">
  192. <term><filename class="libraryfile">libudev</filename></term>
  193. <listitem>
  194. <para>A library interface to udev device information</para>
  195. <indexterm zone="ch-system-eudev libudev">
  196. <primary sortas="c-libudev">libudev</primary>
  197. </indexterm>
  198. </listitem>
  199. </varlistentry>
  200. <varlistentry id="etc-udev">
  201. <term><filename class="directory">/etc/udev</filename></term>
  202. <listitem>
  203. <para>Contains Udev configuration files,
  204. device permissions, and rules for device naming</para>
  205. <indexterm zone="ch-system-eudev etc-udev">
  206. <primary sortas="e-/etc/udev">/etc/udev</primary>
  207. </indexterm>
  208. </listitem>
  209. </varlistentry>
  210. </variablelist>
  211. </sect2>
  212. </sect1>