kmod.xml 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  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. --with-xz \
  39. --with-zlib</userinput></screen>
  40. <variablelist>
  41. <title>The meaning of the configure options:</title>
  42. <varlistentry>
  43. <term><parameter>--with-xz, --with-zlib</parameter></term>
  44. <listitem>
  45. <para>These options enable Kmod to handle compressed kernel modules.</para>
  46. </listitem>
  47. </varlistentry>
  48. <varlistentry>
  49. <term><parameter>--with-rootlibdir=/lib</parameter></term>
  50. <listitem>
  51. <para>This option ensures different library related files are placed
  52. in the correct directories.</para>
  53. </listitem>
  54. </varlistentry>
  55. </variablelist>
  56. <para>Compile the package:</para>
  57. <screen><userinput remap="make">make</userinput></screen>
  58. <para>This package does not come with a test suite that can be run in the
  59. LFS chroot environment. At a minimum the git program is required and
  60. several tests will not run outside of a git repository. </para>
  61. <!--
  62. <para>To test the results, issue:</para>
  63. <screen><userinput remap="test">make check</userinput></screen>
  64. -->
  65. <para>Install the package, and create symlinks for
  66. compatibility with Module-Init-Tools (the package that previously handled
  67. Linux kernel modules):</para>
  68. <screen><userinput remap="install">make install
  69. for target in depmod insmod lsmod modinfo modprobe rmmod; do
  70. ln -sfv ../bin/kmod /sbin/$target
  71. done
  72. ln -sfv kmod /bin/lsmod</userinput></screen>
  73. </sect2>
  74. <!-- ~~~~~~~~~~~~~~~~~~~~ ABI 32 ~~~~~~~~~~~~~~~~~~~~ -->
  75. <sect2 arch="ml_32,ml_all" role="installation">
  76. <title>Installation of Kmod - 32-bit</title>
  77. <para>Clean previous build but keep man pages as they cannot be recreated
  78. since xsltproc isn't installed yet:</para>
  79. <screen><userinput>sed -e "s/^CLEANFILES =.*/CLEANFILES =/" -i man/Makefile
  80. make clean</userinput></screen>
  81. <para>Prepare Kmod for compilation:</para>
  82. <screen><userinput remap="configure">CC="gcc -m32" ./configure \
  83. --prefix=/usr \
  84. --bindir=/bin \
  85. --libdir=/usr/lib32 \
  86. --sysconfdir=/etc \
  87. --with-xz --with-zlib \
  88. --host=i686-pc-linux-gnu \
  89. --with-rootlibdir=/usr/lib32</userinput></screen>
  90. <para>Compile the package:</para>
  91. <screen><userinput remap="make">make</userinput></screen>
  92. <para>Install the package:</para>
  93. <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install
  94. cp -Rv DESTDIR/usr/lib32/* /usr/lib32
  95. rm -rf DESTDIR</userinput></screen>
  96. </sect2>
  97. <!-- ~~~~~~~~~~~~~~~~~~~~ ABI x32 ~~~~~~~~~~~~~~~~~~~~ -->
  98. <sect2 arch="ml_x32,ml_all" role="installation">
  99. <title>Installation of Kmod - x32-bit</title>
  100. <para>Clean previous build:</para>
  101. <screen><userinput>sed -e "s/^CLEANFILES =.*/CLEANFILES =/" -i man/Makefile
  102. make clean</userinput></screen>
  103. <para>Prepare Kmod for compilation:</para>
  104. <screen><userinput remap="configure">CC="gcc -mx32" ./configure \
  105. --prefix=/usr \
  106. --bindir=/bin \
  107. --libdir=/usr/libx32 \
  108. --sysconfdir=/etc \
  109. --with-xz \
  110. --with-zlib \
  111. --host=x86_64-pc-linux-gnux32 \
  112. --with-rootlibdir=/usr/libx32</userinput></screen>
  113. <para>Compile the package:</para>
  114. <screen><userinput remap="make">make</userinput></screen>
  115. <para>Install the package:</para>
  116. <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install
  117. cp -Rv DESTDIR/usr/libx32/* /usr/libx32
  118. rm -rf DESTDIR</userinput></screen>
  119. </sect2>
  120. <sect2 id="contents-kmod" role="content">
  121. <title>Contents of Kmod</title>
  122. <segmentedlist>
  123. <segtitle>Installed programs</segtitle>
  124. <segtitle>Installed library</segtitle>
  125. <seglistitem>
  126. <seg>depmod (link to kmod), insmod (link to kmod), kmod,
  127. lsmod (link to kmod), modinfo (link to kmod), modprobe (link to kmod),
  128. and rmmod (link to kmod)</seg>
  129. <seg>libkmod.so</seg>
  130. </seglistitem>
  131. </segmentedlist>
  132. <variablelist>
  133. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  134. <?dbfo list-presentation="list"?>
  135. <?dbhtml list-presentation="table"?>
  136. <varlistentry id="depmod">
  137. <term><command>depmod</command></term>
  138. <listitem>
  139. <para>Creates a dependency file based on the symbols it finds in the
  140. existing set of modules; this dependency file is used by
  141. <command>modprobe</command> to automatically load the required
  142. modules</para>
  143. <indexterm zone="ch-system-kmod depmod">
  144. <primary sortas="b-depmod">depmod</primary>
  145. </indexterm>
  146. </listitem>
  147. </varlistentry>
  148. <varlistentry id="insmod">
  149. <term><command>insmod</command></term>
  150. <listitem>
  151. <para>Installs a loadable module in the running kernel</para>
  152. <indexterm zone="ch-system-kmod insmod">
  153. <primary sortas="b-insmod">insmod</primary>
  154. </indexterm>
  155. </listitem>
  156. </varlistentry>
  157. <varlistentry id="kmod">
  158. <term><command>kmod</command></term>
  159. <listitem>
  160. <para>Loads and unloads kernel modules</para>
  161. <indexterm zone="ch-system-kmod kmod">
  162. <primary sortas="b-kmod">kmod</primary>
  163. </indexterm>
  164. </listitem>
  165. </varlistentry>
  166. <varlistentry id="lsmod">
  167. <term><command>lsmod</command></term>
  168. <listitem>
  169. <para>Lists currently loaded modules</para>
  170. <indexterm zone="ch-system-kmod lsmod">
  171. <primary sortas="b-lsmod">lsmod</primary>
  172. </indexterm>
  173. </listitem>
  174. </varlistentry>
  175. <varlistentry id="modinfo">
  176. <term><command>modinfo</command></term>
  177. <listitem>
  178. <para>Examines an object file associated with a kernel module and
  179. displays any information that it can glean</para>
  180. <indexterm zone="ch-system-kmod modinfo">
  181. <primary sortas="b-modinfo">modinfo</primary>
  182. </indexterm>
  183. </listitem>
  184. </varlistentry>
  185. <varlistentry id="modprobe">
  186. <term><command>modprobe</command></term>
  187. <listitem>
  188. <para>Uses a dependency file, created by
  189. <command>depmod</command>, to automatically load relevant modules</para>
  190. <indexterm zone="ch-system-kmod modprobe">
  191. <primary sortas="b-modprobe">modprobe</primary>
  192. </indexterm>
  193. </listitem>
  194. </varlistentry>
  195. <varlistentry id="rmmod">
  196. <term><command>rmmod</command></term>
  197. <listitem>
  198. <para>Unloads modules from the running kernel</para>
  199. <indexterm zone="ch-system-kmod rmmod">
  200. <primary sortas="b-rmmod">rmmod</primary>
  201. </indexterm>
  202. </listitem>
  203. </varlistentry>
  204. <varlistentry id="libkmod">
  205. <term><filename class="libraryfile">libkmod</filename></term>
  206. <listitem>
  207. <para>This library is used by other programs to load and unload kernel
  208. modules</para>
  209. <indexterm zone="ch-system-kmod">
  210. <primary sortas="c-libkmod">libkmod</primary>
  211. </indexterm>
  212. </listitem>
  213. </varlistentry>
  214. </variablelist>
  215. </sect2>
  216. </sect1>