systemd.xml 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  4. <!ENTITY % general-entities SYSTEM "../general.ent">
  5. %general-entities;
  6. ]>
  7. <sect1 id="ch-system-udev" role="wrap">
  8. <?dbhtml filename="udev.html"?>
  9. <sect1info condition="script">
  10. <productname>udev</productname>
  11. <productnumber>&systemd-version;</productnumber>
  12. <address>&systemd-url;</address>
  13. </sect1info>
  14. <title>Udev-&systemd-version; (Extracted from systemd-&systemd-version;)</title>
  15. <indexterm zone="ch-system-udev">
  16. <primary sortas="a-Udev">Udev</primary>
  17. </indexterm>
  18. <sect2 role="package">
  19. <title/>
  20. <para>The Udev package contains programs for dynamic creation of device
  21. nodes. The development of udev has been merged with systemd, but
  22. most of systemd is incompatible with LFS. Here we build and install just
  23. the needed udev files.</para>
  24. <segmentedlist>
  25. <segtitle>&buildtime;</segtitle>
  26. <segtitle>&diskspace;</segtitle>
  27. <seglistitem>
  28. <seg>&systemd-ch6-sbu;</seg>
  29. <seg>&systemd-ch6-du;</seg>
  30. </seglistitem>
  31. </segmentedlist>
  32. </sect2>
  33. <sect2 role="installation">
  34. <title>Installation of Udev</title>
  35. <note><para>This package is a little different from other packages. The
  36. initial package that is extracted is
  37. <filename>systemd-&systemd-version;.tar.xz</filename> even though the
  38. application we are installing is udev. After changing to the
  39. systemd directory, follow the instructions below.</para></note>
  40. <para>The udev-lfs tarball contains LFS-specific files used to build
  41. Udev. Unpack it into the systemd source directory:</para>
  42. <screen><userinput remap="pre">tar -xvf ../&udev-lfs;.tar.bz2</userinput></screen>
  43. <para>Create two symbolic links to header files and set an
  44. environment variable to properly use <xref linkend="ch-tools-util-linux"/>.</para>
  45. <screen><userinput remap="pre">ln -svf /tools/include/blkid /usr/include
  46. ln -svf /tools/include/uuid /usr/include
  47. export LD_LIBRARY_PATH=/tools/lib</userinput></screen>
  48. <para>Install the package:</para>
  49. <screen><userinput remap="make">make -f &udev-lfs;/Makefile.lfs</userinput></screen>
  50. <para>Install the package:</para>
  51. <screen><userinput remap="install">make -f &udev-lfs;/Makefile.lfs install</userinput></screen>
  52. <caution><para>There are several places within the
  53. <application>systemd</application> source code that have explicit directory
  54. paths embedded. For instance, the binary version of the hardware
  55. database's path and file name used at run time,
  56. <filename>/etc/udev/hwdb.bin</filename>, cannot be changed without explicit
  57. changes to the source code.</para></caution>
  58. <para>Now initialize the hardware database:</para>
  59. <screen><userinput remap="install">build/udevadm hwdb --update</userinput></screen>
  60. <para>Finally set up the persistent network udev rules. This task will be
  61. explained in detail in <xref linkend='stable-net-names'/>. Note that the
  62. <filename class='directory'>/sys</filename> and <filename
  63. class='directory'>/proc</filename> filesystems must be mounted in the
  64. chroot environment as explained at the beginning of this chapter for the
  65. following script to work.</para>
  66. <screen><userinput remap="install">bash &udev-lfs;/init-net-rules.sh</userinput></screen>
  67. <para>Do some cleanup:</para>
  68. <screen><userinput remap="install">rm -fv /usr/include/{uuid,blkid}
  69. unset LD_LIBRARY_PATH</userinput></screen>
  70. </sect2>
  71. <sect2 id="contents-udev" role="content">
  72. <title>Contents of Udev</title>
  73. <segmentedlist>
  74. <segtitle>Installed programs</segtitle>
  75. <segtitle>Installed libraries</segtitle>
  76. <segtitle>Installed directories</segtitle>
  77. <seglistitem>
  78. <seg>accelerometer, ata_id, cdrom_id, collect, mtd_probe,
  79. scsi_id, v4l_id, udevadm, and udevd</seg>
  80. <seg>libudev.so</seg>
  81. <seg>/etc/udev, /lib/udev, /lib/firmware, /usr/share/doc/udev</seg>
  82. </seglistitem>
  83. </segmentedlist>
  84. <variablelist>
  85. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  86. <?dbfo list-presentation="list"?>
  87. <?dbhtml list-presentation="table"?>
  88. <varlistentry id="ata_id">
  89. <term><command>ata_id</command></term>
  90. <listitem>
  91. <para>Provides Udev with a unique string and
  92. additional information (uuid, label) for an ATA drive</para>
  93. <indexterm zone="ch-system-udev ata_id">
  94. <primary sortas="b-ata_id">ata_id</primary>
  95. </indexterm>
  96. </listitem>
  97. </varlistentry>
  98. <varlistentry id="cdrom_id">
  99. <term><command>cdrom_id</command></term>
  100. <listitem>
  101. <para>Provides Udev with the capabilities of a
  102. CD-ROM or DVD-ROM drive</para>
  103. <indexterm zone="ch-system-udev cdrom_id">
  104. <primary sortas="b-cdrom_id">cdrom_id</primary>
  105. </indexterm>
  106. </listitem>
  107. </varlistentry>
  108. <varlistentry id="collect">
  109. <term><command>collect</command></term>
  110. <listitem>
  111. <para>Given an ID for the current uevent and a list of
  112. IDs (for all target uevents), registers the current ID
  113. and indicates whether all target IDs have been registered</para>
  114. <indexterm zone="ch-system-udev collect">
  115. <primary sortas="b-collect">collect</primary>
  116. </indexterm>
  117. </listitem>
  118. </varlistentry>
  119. <varlistentry id="scsi_id">
  120. <term><command>scsi_id</command></term>
  121. <listitem>
  122. <para>Provides Udev with a unique SCSI identifier
  123. based on the data returned from sending a SCSI INQUIRY command to
  124. the specified device</para>
  125. <indexterm zone="ch-system-udev scsi_id">
  126. <primary sortas="b-scsi_id">scsi_id</primary>
  127. </indexterm>
  128. </listitem>
  129. </varlistentry>
  130. <varlistentry id="udevadm">
  131. <term><command>udevadm</command></term>
  132. <listitem>
  133. <para>Generic udev administration tool: controls the udevd daemon,
  134. provides info from the Udev database, monitors uevents, waits for
  135. uevents to finish, tests Udev configuration, and triggers uevents
  136. for a given device</para>
  137. <indexterm zone="ch-system-udev udevadm">
  138. <primary sortas="b-udevadm">udevadm</primary>
  139. </indexterm>
  140. </listitem>
  141. </varlistentry>
  142. <varlistentry id="udevd">
  143. <term><command>udevd</command></term>
  144. <listitem>
  145. <para>A daemon that listens for uevents on the netlink socket,
  146. creates devices and runs the configured external programs in
  147. response to these uevents</para>
  148. <indexterm zone="ch-system-udev udevd">
  149. <primary sortas="b-udevd">udevd</primary>
  150. </indexterm>
  151. </listitem>
  152. </varlistentry>
  153. <varlistentry id="libudev">
  154. <term><filename class="libraryfile">libudev</filename></term>
  155. <listitem>
  156. <para>A library interface to udev device information</para>
  157. <indexterm zone="ch-system-udev libudev">
  158. <primary sortas="c-libudev">libudev</primary>
  159. </indexterm>
  160. </listitem>
  161. </varlistentry>
  162. <varlistentry id="etc-udev">
  163. <term><filename class="directory">/etc/udev</filename></term>
  164. <listitem>
  165. <para>Contains Udev configuration files,
  166. device permissions, and rules for device naming</para>
  167. <indexterm zone="ch-system-udev etc-udev">
  168. <primary sortas="e-/etc/udev">/etc/udev</primary>
  169. </indexterm>
  170. </listitem>
  171. </varlistentry>
  172. </variablelist>
  173. </sect2>
  174. </sect1>