udev.xml 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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>First 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/00-lfs.permissions
  34. cp ../udev-config-1.rules /etc/udev/rules.d/00-lfs.rules</userinput></screen>
  35. </sect2>
  36. <sect2 id="contents-udev" role="content"><title>Contents of Udev</title>
  37. <segmentedlist>
  38. <segtitle>Installed programs</segtitle>
  39. <seglistitem><seg>udev, udevd, udevsend, udevstart, udevinfo, udevtest</seg></seglistitem>
  40. </segmentedlist>
  41. <variablelist><title>Short descriptions</title>
  42. <varlistentry id="udev">
  43. <term><command>udev</command></term>
  44. <listitem><indexterm zone="ch-system-udev udev"><primary
  45. sortas="b-udev">udev</primary></indexterm>
  46. <para>is used to create device nodes in <filename
  47. class="directory">/dev</filename> or to rename network interfaces (not in LFS)
  48. in response to hotplug events.</para>
  49. </listitem></varlistentry>
  50. <varlistentry id="udevd">
  51. <term><command>udevd</command></term>
  52. <listitem> <indexterm zone="ch-system-udev udevd"><primary
  53. sortas="b-udevd">udevd</primary></indexterm>
  54. <para>is a daemon that reorders hotplug events before submitting them to
  55. <command>udev</command>,
  56. thus avoiding various race conditions.</para>
  57. </listitem></varlistentry>
  58. <varlistentry id="udevsend">
  59. <term><command>udevsend</command></term>
  60. <listitem> <indexterm zone="ch-system-udev udevsend"><primary
  61. sortas="b-udevsend">udevsend</primary></indexterm>
  62. <para>is used to deliver hotplug events to <command>udevd</command>.</para>
  63. </listitem></varlistentry>
  64. <varlistentry id="udevstart">
  65. <term><command>udevstart</command></term>
  66. <listitem> <indexterm zone="ch-system-udev udevstart"><primary
  67. sortas="b-udevstart">udevstart</primary></indexterm>
  68. <para>is used to create device nodes in <filename
  69. class="directory">/dev</filename> that correspond to drivers compiled directly
  70. into the kernel. It performs that task by simulating hotplug events presumably
  71. dropped by the kernel before invocation of this program (e.g. because the root
  72. filesystem has not been mounted) and submitting such synthetic hotplug events
  73. to <command>udev</command>.</para>
  74. </listitem>
  75. </varlistentry>
  76. <varlistentry id="udevinfo">
  77. <term><command>udevinfo</command></term>
  78. <listitem> <indexterm zone="ch-system-udev udevinfo"><primary
  79. sortas="b-udevinfo">udevinfo</primary></indexterm>
  80. <para>allows users to query the <command>udev</command> database for
  81. information on any device currently present on the system. It also
  82. provides a way to query any device in the sysfs tree to help creating udev
  83. rules.</para>
  84. </listitem></varlistentry>
  85. <varlistentry id="udevtest">
  86. <term><command>udevtest</command></term>
  87. <listitem> <indexterm zone="ch-system-udev udevtest"><primary
  88. sortas="b-udevtest">udevtest</primary></indexterm>
  89. <para>simulates a <command>udev</command> run for the given device,
  90. and prints out the name of the node the real <command>udev</command> would
  91. have created, or (not in LFS) the name of the renamed network interface.</para>
  92. </listitem></varlistentry>
  93. <varlistentry id="etc-dev-d">
  94. <term><filename class="directory">/etc/dev.d</filename></term>
  95. <listitem> <indexterm zone="ch-system-udev etc-dev-d"><primary
  96. sortas="e-etc-dev-d">/etc/dev.d</primary></indexterm>
  97. <para>directory is supposed to contain user-written handlers for device
  98. creation hotplug events.</para>
  99. </listitem></varlistentry>
  100. <varlistentry id="etc-udev">
  101. <term><filename class="directory">/etc/udev</filename></term>
  102. <listitem> <indexterm zone="ch-system-udev etc-udev"><primary
  103. sortas="e-etc-udev">/etc/udev</primary></indexterm>
  104. <para>directory contains <command>udev</command> configuation files,
  105. device permissions and rules for device naming.</para>
  106. </listitem></varlistentry>
  107. </variablelist>
  108. </sect2>
  109. </sect1>