udev.xml 4.7 KB

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