udev.xml 5.1 KB

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