udev.xml 8.8 KB

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