udev.xml 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
  3. <!ENTITY % general-entities SYSTEM "../general.ent">
  4. %general-entities;
  5. ]>
  6. <sect1 id="ch-system-udev" role="wrap">
  7. <title>Udev-&udev-version;</title>
  8. <?dbhtml filename="udev.html"?>
  9. <indexterm zone="ch-system-udev"><primary sortas="a-Udev">Udev</primary></indexterm>
  10. <sect2 role="package"><title/>
  11. <para>The Udev package contains programs for dynamic creation of device nodes.</para>
  12. <segmentedlist>
  13. <segtitle>&buildtime;</segtitle>
  14. <segtitle>&diskspace;</segtitle>
  15. <seglistitem><seg>0.2 SBU</seg><seg>5.2 MB</seg></seglistitem>
  16. </segmentedlist>
  17. </sect2>
  18. <sect2 role="installation">
  19. <title>Installation of Udev</title>
  20. <para>Compile Udev:</para>
  21. <screen><userinput>make udevdir=/dev</userinput></screen>
  22. <variablelist>
  23. <varlistentry>
  24. <term><parameter>udevdir=/dev</parameter></term>
  25. <listitem><para>This tells <command>udev</command> which directory it is to
  26. create device nodes in.</para></listitem>
  27. </varlistentry>
  28. </variablelist>
  29. <para>Install it:</para>
  30. <screen><userinput>make udevdir=/dev install</userinput></screen>
  31. <para>Udev's configuration is far from ideal by default, so we install our own
  32. configuration files here:</para>
  33. <screen><userinput>cp ../udev-config-2.permissions /etc/udev/permissions.d/25-lfs.permissions
  34. cp ../udev-config-1.rules /etc/udev/rules.d/25-lfs.rules</userinput></screen>
  35. <para>Finally, we'll allow udev to create the full compliment of device
  36. nodes, since earlier we only created a minimal set.</para>
  37. <screen><userinput>/sbin/udevstart</userinput></screen>
  38. </sect2>
  39. <sect2 id="contents-udev" role="content"><title>Contents of Udev</title>
  40. <segmentedlist>
  41. <segtitle>Installed programs</segtitle>
  42. <seglistitem><seg>udev, udevd, udevsend, udevstart, udevinfo, udevtest</seg></seglistitem>
  43. </segmentedlist>
  44. <variablelist><title>Short descriptions</title>
  45. <varlistentry id="udev">
  46. <term><command>udev</command></term>
  47. <listitem><indexterm zone="ch-system-udev udev"><primary
  48. sortas="b-udev">udev</primary></indexterm>
  49. <para>is used to create device nodes in <filename
  50. class="directory">/dev</filename> or to rename network interfaces (not in LFS)
  51. in response to hotplug events.</para>
  52. </listitem></varlistentry>
  53. <varlistentry id="udevd">
  54. <term><command>udevd</command></term>
  55. <listitem> <indexterm zone="ch-system-udev udevd"><primary
  56. sortas="b-udevd">udevd</primary></indexterm>
  57. <para>is a daemon that reorders hotplug events before submitting them to
  58. <command>udev</command>,
  59. thus avoiding various race conditions.</para>
  60. </listitem></varlistentry>
  61. <varlistentry id="udevsend">
  62. <term><command>udevsend</command></term>
  63. <listitem> <indexterm zone="ch-system-udev udevsend"><primary
  64. sortas="b-udevsend">udevsend</primary></indexterm>
  65. <para>is used to deliver hotplug events to <command>udevd</command>.</para>
  66. </listitem></varlistentry>
  67. <varlistentry id="udevstart">
  68. <term><command>udevstart</command></term>
  69. <listitem> <indexterm zone="ch-system-udev udevstart"><primary
  70. sortas="b-udevstart">udevstart</primary></indexterm>
  71. <para>is used to create device nodes in <filename
  72. class="directory">/dev</filename> that correspond to drivers compiled directly
  73. into the kernel. It performs that task by simulating hotplug events presumably
  74. dropped by the kernel before invocation of this program (e.g. because the root
  75. filesystem has not been mounted) and submitting such synthetic hotplug events
  76. to <command>udev</command>.</para>
  77. </listitem>
  78. </varlistentry>
  79. <varlistentry id="udevinfo">
  80. <term><command>udevinfo</command></term>
  81. <listitem> <indexterm zone="ch-system-udev udevinfo"><primary
  82. sortas="b-udevinfo">udevinfo</primary></indexterm>
  83. <para>allows users to query the <command>udev</command> database for
  84. information on any device currently present on the system. It also
  85. provides a way to query any device in the sysfs tree to help creating udev
  86. rules.</para>
  87. </listitem></varlistentry>
  88. <varlistentry id="udevtest">
  89. <term><command>udevtest</command></term>
  90. <listitem> <indexterm zone="ch-system-udev udevtest"><primary
  91. sortas="b-udevtest">udevtest</primary></indexterm>
  92. <para>simulates a <command>udev</command> run for the given device,
  93. and prints out the name of the node the real <command>udev</command> would
  94. have created, or (not in LFS) the name of the renamed network interface.</para>
  95. </listitem></varlistentry>
  96. <varlistentry id="etc-dev-d">
  97. <term><filename class="directory">/etc/dev.d</filename></term>
  98. <listitem> <indexterm zone="ch-system-udev etc-dev-d"><primary
  99. sortas="e-etc-dev-d">/etc/dev.d</primary></indexterm>
  100. <para>directory is supposed to contain user-written handlers for device
  101. creation hotplug events.</para>
  102. </listitem></varlistentry>
  103. <varlistentry id="etc-udev">
  104. <term><filename class="directory">/etc/udev</filename></term>
  105. <listitem> <indexterm zone="ch-system-udev etc-udev"><primary
  106. sortas="e-etc-udev">/etc/udev</primary></indexterm>
  107. <para>directory contains <command>udev</command> configuration files,
  108. device permissions and rules for device naming.</para>
  109. </listitem></varlistentry>
  110. </variablelist>
  111. </sect2>
  112. </sect1>