udev.xml 5.0 KB

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