kmod.xml 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  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-kmod" role="wrap">
  8. <?dbhtml filename="kmod.html"?>
  9. <sect1info condition="script">
  10. <productname>kmod</productname>
  11. <productnumber>&kmod-version;</productnumber>
  12. <address>&kmod-url;</address>
  13. </sect1info>
  14. <title>Kmod-&kmod-version;</title>
  15. <indexterm zone="ch-system-kmod">
  16. <primary sortas="a-Kmod">Kmod</primary>
  17. </indexterm>
  18. <sect2 role="package">
  19. <title/>
  20. <para>The Kmod package contains libraries and utilities for loading kernel
  21. modules</para>
  22. <segmentedlist>
  23. <segtitle>&buildtime;</segtitle>
  24. <segtitle>&diskspace;</segtitle>
  25. <seglistitem>
  26. <seg>&kmod-ch6-sbu;</seg>
  27. <seg>&kmod-ch6-du;</seg>
  28. </seglistitem>
  29. </segmentedlist>
  30. </sect2>
  31. <sect2 role="installation">
  32. <title>Installation of Kmod</title>
  33. <para>Prepare Kmod for compilation:</para>
  34. <screen><userinput remap="configure">./configure --prefix=/usr \
  35. --bindir=/bin \
  36. --sysconfdir=/etc \
  37. --with-rootlibdir=/lib \
  38. --disable-manpages \
  39. --with-xz \
  40. --with-zlib</userinput></screen>
  41. <variablelist>
  42. <title>The meaning of the configure options:</title>
  43. <varlistentry>
  44. <term><parameter>--with-xz, --with-zlib</parameter></term>
  45. <listitem>
  46. <para>These options enable Kmod to handle compressed kernel modules.</para>
  47. </listitem>
  48. </varlistentry>
  49. <varlistentry>
  50. <term><parameter>- -disable-manpages</parameter></term>
  51. <listitem>
  52. <para>This option prevents the man pages from being built, as they
  53. rely on libxslt, which isn't available in the chroot
  54. environment.</para>
  55. </listitem>
  56. </varlistentry>
  57. <varlistentry>
  58. <term><parameter>--with-rootlibdir=/lib</parameter></term>
  59. <listitem>
  60. <para>This option ensures different library related files are placed
  61. in the correct directories.</para>
  62. </listitem>
  63. </varlistentry>
  64. </variablelist>
  65. <para>Compile the package:</para>
  66. <screen><userinput remap="make">make</userinput></screen>
  67. <para>To test the results, issue:</para>
  68. <screen><userinput remap="test">make check</userinput></screen>
  69. <para>Install the package, create symlinks for compatibility with
  70. Module-Init-Tools (the package that previously handled Linux kernel
  71. modules), and manually install the man pages. Also make sure that all
  72. libraries are in the correct directory: </para>
  73. <screen><userinput remap="install">make install
  74. for target in depmod insmod modinfo modprobe rmmod; do
  75. ln -sv ../bin/kmod /sbin/$target
  76. done
  77. ln -sv kmod /bin/lsmod
  78. cp -v man/*.5 /usr/share/man/man5
  79. cp -v man/*.8 /usr/share/man/man8</userinput></screen>
  80. </sect2>
  81. <sect2 id="contents-kmod" role="content">
  82. <title>Contents of Kmod</title>
  83. <segmentedlist>
  84. <segtitle>Installed programs</segtitle>
  85. <segtitle>Installed libraries</segtitle>
  86. <seglistitem>
  87. <seg>depmod (link to kmod), insmod (link to kmod), kmod,
  88. lsmod (link to kmod), modinfo (link to kmod), modprobe (link to kmod),
  89. and rmmod (link to kmod)</seg>
  90. <seg>libkmod.so</seg>
  91. </seglistitem>
  92. </segmentedlist>
  93. <variablelist>
  94. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  95. <?dbfo list-presentation="list"?>
  96. <?dbhtml list-presentation="table"?>
  97. <varlistentry id="depmod">
  98. <term><command>depmod</command></term>
  99. <listitem>
  100. <para>Creates a dependency file based on the symbols it finds in the
  101. existing set of modules; this dependency file is used by
  102. <command>modprobe</command> to automatically load the required
  103. modules</para>
  104. <indexterm zone="ch-system-kmod depmod">
  105. <primary sortas="b-depmod">depmod</primary>
  106. </indexterm>
  107. </listitem>
  108. </varlistentry>
  109. <varlistentry id="insmod">
  110. <term><command>insmod</command></term>
  111. <listitem>
  112. <para>Installs a loadable module in the running kernel</para>
  113. <indexterm zone="ch-system-kmod insmod">
  114. <primary sortas="b-insmod">insmod</primary>
  115. </indexterm>
  116. </listitem>
  117. </varlistentry>
  118. <varlistentry id="kmod">
  119. <term><command>kmod</command></term>
  120. <listitem>
  121. <para>Loads and unloads kernel modules</para>
  122. <indexterm zone="ch-system-kmod kmod">
  123. <primary sortas="b-kmod">kmod</primary>
  124. </indexterm>
  125. </listitem>
  126. </varlistentry>
  127. <varlistentry id="lsmod">
  128. <term><command>lsmod</command></term>
  129. <listitem>
  130. <para>Lists currently loaded modules</para>
  131. <indexterm zone="ch-system-kmod lsmod">
  132. <primary sortas="b-lsmod">lsmod</primary>
  133. </indexterm>
  134. </listitem>
  135. </varlistentry>
  136. <varlistentry id="modinfo">
  137. <term><command>modinfo</command></term>
  138. <listitem>
  139. <para>Examines an object file associated with a kernel module and
  140. displays any information that it can glean</para>
  141. <indexterm zone="ch-system-kmod modinfo">
  142. <primary sortas="b-modinfo">modinfo</primary>
  143. </indexterm>
  144. </listitem>
  145. </varlistentry>
  146. <varlistentry id="modprobe">
  147. <term><command>modprobe</command></term>
  148. <listitem>
  149. <para>Uses a dependency file, created by
  150. <command>depmod</command>, to automatically load relevant modules</para>
  151. <indexterm zone="ch-system-kmod modprobe">
  152. <primary sortas="b-modprobe">modprobe</primary>
  153. </indexterm>
  154. </listitem>
  155. </varlistentry>
  156. <varlistentry id="rmmod">
  157. <term><command>rmmod</command></term>
  158. <listitem>
  159. <para>Unloads modules from the running kernel</para>
  160. <indexterm zone="ch-system-kmod rmmod">
  161. <primary sortas="b-rmmod">rmmod</primary>
  162. </indexterm>
  163. </listitem>
  164. </varlistentry>
  165. <varlistentry id="libkmod">
  166. <term><filename class="libraryfile">libkmod</filename></term>
  167. <listitem>
  168. <para>This library is used by other programs to load and unload kernel
  169. modules</para>
  170. <indexterm zone="ch-system-kmod">
  171. <primary sortas="c-libkmod">libkmod</primary>
  172. </indexterm>
  173. </listitem>
  174. </varlistentry>
  175. </variablelist>
  176. </sect2>
  177. </sect1>