kmod.xml 8.6 KB

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