udev.xml 6.8 KB

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