kmod.xml 8.6 KB

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