eudev.xml 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  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. <!--
  42. <para>First, add a workaround to prevent the /tools directory from being
  43. hard coded into Eudev binary files library locations:</para>
  44. <screen><userinput remap="pre">cat &gt; config.cache &lt;&lt; "EOF"
  45. HAVE_BLKID=1
  46. BLKID_LIBS="-lblkid"
  47. BLKID_CFLAGS="-I/tools/include"
  48. EOF</userinput></screen>
  49. -->
  50. <para>Prepare Eudev for compilation:</para>
  51. <screen><userinput remap="configure">./configure --prefix=/usr \
  52. --bindir=/sbin \
  53. --sbindir=/sbin \
  54. --libdir=/usr/lib \
  55. --sysconfdir=/etc \
  56. --libexecdir=/lib \
  57. --with-rootprefix= \
  58. --with-rootlibdir=/lib \
  59. --enable-manpages \
  60. --disable-static</userinput></screen>
  61. <!-- - -config-cache</userinput></screen> -->
  62. <para>Compile the package:</para>
  63. <screen><userinput remap="make">make</userinput></screen>
  64. <!--
  65. <screen><userinput remap="make">LIBRARY_PATH=/tools/lib make</userinput></screen>
  66. <note><para>The LIBRARY_PATH variable here and the LD_LIBRARY_PATH variable
  67. below are needed to allow the use of libraries that were installed in /tools,
  68. but have not yet been installed in the main system. LIBRARY_PATH is
  69. used to find libraries during the linking process. LD_LIBRARY_PATH is
  70. used to find libraries during program execution.</para></note>
  71. -->
  72. <para>Create some directories now that are needed for tests, but
  73. will also be used as a part of installation:</para>
  74. <screen><userinput remap="test">mkdir -pv /lib/udev/rules.d
  75. mkdir -pv /etc/udev/rules.d</userinput></screen>
  76. <para>To test the results, issue:</para>
  77. <screen><userinput remap="test">make check</userinput></screen>
  78. <!--<screen><userinput remap="test">make LD_LIBRARY_PATH=/tools/lib check</userinput></screen>-->
  79. <para>Install the package:</para>
  80. <screen><userinput remap="install">make install</userinput></screen>
  81. <!--<screen><userinput remap="install">make LD_LIBRARY_PATH=/tools/lib install</userinput></screen>-->
  82. <para>Install some custom rules and support files useful in an LFS
  83. environment:</para>
  84. <screen><userinput remap="install">tar -xvf ../&udev-lfs-version;.tar.xz
  85. make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
  86. </sect2>
  87. <sect2 id="conf-eudev" role="configuration">
  88. <title>Configuring Eudev</title>
  89. <indexterm zone="conf-eudev">
  90. <primary sortas="a-Eudev">Eudev</primary>
  91. <secondary>configuring</secondary>
  92. </indexterm>
  93. <indexterm zone="conf-eudev">
  94. <primary sortas="e-/etc/udev/hwdb.bin">/etc/udev/hwdb.bin</primary>
  95. </indexterm>
  96. <para>Information about hardware devices is maintained in the
  97. <filename class="directory">/etc/udev/hwdb.d</filename> and
  98. <filename class="directory">/lib/udev/hwdb.d</filename> directories.
  99. <application>Eudev</application> needs that information to be compiled
  100. into a binary database <filename>/etc/udev/hwdb.bin</filename>. Create the
  101. initial database:</para>
  102. <!--<screen><userinput>LD_LIBRARY_PATH=/tools/lib udevadm hwdb - -update</userinput></screen>-->
  103. <screen><userinput>udevadm hwdb --update</userinput></screen>
  104. <para>This command needs to be run each time the hardware information is
  105. updated.</para>
  106. </sect2>
  107. <sect2 id="contents-eudev" role="content">
  108. <title>Contents of Eudev</title>
  109. <segmentedlist>
  110. <segtitle>Installed programs</segtitle>
  111. <segtitle>Installed libraries</segtitle>
  112. <segtitle>Installed directories</segtitle>
  113. <seglistitem>
  114. <seg><!-- These are in /lib/udev and not to be called by the user:
  115. accelerometer, ata_id, cdrom_id, collect, mtd_probe,
  116. scsi_id, v4l_id,--> udevadm and udevd</seg>
  117. <seg>libudev.so</seg>
  118. <seg>/etc/udev, /lib/udev, and /usr/share/doc/udev-&udev-lfs-version;</seg>
  119. </seglistitem>
  120. </segmentedlist>
  121. <variablelist>
  122. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  123. <?dbfo list-presentation="list"?>
  124. <?dbhtml list-presentation="table"?>
  125. <varlistentry id="udevadm" revision="sysv">
  126. <term><command>udevadm</command></term>
  127. <listitem>
  128. <para>Generic udev administration tool: controls the udevd daemon,
  129. provides info from the Udev database, monitors uevents, waits for
  130. uevents to finish, tests Udev configuration, and triggers uevents
  131. for a given device</para>
  132. <indexterm zone="ch-system-eudev udevadm">
  133. <primary sortas="b-udevadm">udevadm</primary>
  134. </indexterm>
  135. </listitem>
  136. </varlistentry>
  137. <varlistentry id="udevd">
  138. <term><command>udevd</command></term>
  139. <listitem>
  140. <para>A daemon that listens for uevents on the netlink socket,
  141. creates devices and runs the configured external programs in
  142. response to these uevents</para>
  143. <indexterm zone="ch-system-eudev udevd">
  144. <primary sortas="b-udevd">udevd</primary>
  145. </indexterm>
  146. </listitem>
  147. </varlistentry>
  148. <varlistentry id="libudev">
  149. <term><filename class="libraryfile">libudev</filename></term>
  150. <listitem>
  151. <para>A library interface to udev device information</para>
  152. <indexterm zone="ch-system-eudev libudev">
  153. <primary sortas="c-libudev">libudev</primary>
  154. </indexterm>
  155. </listitem>
  156. </varlistentry>
  157. <varlistentry id="etc-udev">
  158. <term><filename class="directory">/etc/udev</filename></term>
  159. <listitem>
  160. <para>Contains Udev configuration files,
  161. device permissions, and rules for device naming</para>
  162. <indexterm zone="ch-system-eudev etc-udev">
  163. <primary sortas="e-/etc/udev">/etc/udev</primary>
  164. </indexterm>
  165. </listitem>
  166. </varlistentry>
  167. </variablelist>
  168. </sect2>
  169. </sect1>