Update to tcl-8.6.11
[linux_from_scratch.git] / BOOK / chapter08 / kmod.xml
blob58c9ba99546e3fd85a97a79ca9437c91f7562156
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 ]>
8 <sect1 id="ch-system-kmod" role="wrap">
9   <?dbhtml filename="kmod.html"?>
11   <sect1info condition="script">
12     <productname>kmod</productname>
13     <productnumber>&kmod-version;</productnumber>
14     <address>&kmod-url;</address>
15   </sect1info>
17   <title>Kmod-&kmod-version;</title>
19   <indexterm zone="ch-system-kmod">
20     <primary sortas="a-Kmod">Kmod</primary>
21   </indexterm>
23   <sect2 role="package">
24     <title/>
26     <para>The Kmod package contains libraries and utilities for loading kernel
27     modules</para>
29     <segmentedlist>
30       <segtitle>&buildtime;</segtitle>
31       <segtitle>&diskspace;</segtitle>
33       <seglistitem>
34         <seg>&kmod-fin-sbu;</seg>
35         <seg>&kmod-fin-du;</seg>
36       </seglistitem>
37     </segmentedlist>
39   </sect2>
41   <sect2 role="installation">
42     <title>Installation of Kmod</title>
44     <para>Prepare Kmod for compilation:</para>
46 <screen><userinput remap="configure">./configure --prefix=/usr          \
47             --bindir=/bin          \
48             --sysconfdir=/etc      \
49             --with-rootlibdir=/lib \
50             --with-xz              \
51             --with-zstd            \
52             --with-zlib</userinput></screen>
54     <variablelist>
55       <title>The meaning of the configure options:</title>
57       <varlistentry>
58         <term><parameter>--with-xz, --with-zlib, --with-zstd</parameter></term>
59         <listitem>
60           <para>These options enable Kmod to handle compressed kernel modules.</para>
61         </listitem>
62       </varlistentry>
64       <varlistentry>
65         <term><parameter>--with-rootlibdir=/lib</parameter></term>
66         <listitem>
67           <para>This option ensures different library related files are placed 
68           in the correct directories.</para>
69         </listitem>
70       </varlistentry>
72     </variablelist>
74     <para>Compile the package:</para>
76 <screen><userinput remap="make">make</userinput></screen>
78     <para>This package does not come with a test suite that can be run in the
79     LFS chroot environment.  At a minimum the git program is required and
80     several tests will not run outside of a git repository. </para>
82     <para>Install the package and create symlinks for
83     compatibility with Module-Init-Tools (the package that previously handled
84     Linux kernel modules):</para>
86 <screen><userinput remap="install">make install
88 for target in depmod insmod lsmod modinfo modprobe rmmod; do
89   ln -sfv ../bin/kmod /sbin/$target
90 done
92 ln -sfv kmod /bin/lsmod</userinput></screen>
94   </sect2>
96   <sect2 id="contents-kmod" role="content">
97     <title>Contents of Kmod</title>
99     <segmentedlist>
100       <segtitle>Installed programs</segtitle>
101       <segtitle>Installed library</segtitle>
103       <seglistitem>
104         <seg>depmod (link to kmod), insmod (link to kmod), kmod, 
105         lsmod (link to kmod), modinfo (link to kmod), modprobe (link to kmod),
106         and rmmod (link to kmod)</seg>
107         <seg>libkmod.so</seg>
108       </seglistitem>
109     </segmentedlist>
111     <variablelist>
112       <bridgehead renderas="sect3">Short Descriptions</bridgehead>
113       <?dbfo list-presentation="list"?>
114       <?dbhtml list-presentation="table"?>
116       <varlistentry id="depmod">
117         <term><command>depmod</command></term>
118         <listitem>
119           <para>Creates a dependency file based on the symbols it finds in the
120           existing set of modules; this dependency file is used by
121           <command>modprobe</command> to automatically load the required
122           modules</para>
123           <indexterm zone="ch-system-kmod depmod">
124             <primary sortas="b-depmod">depmod</primary>
125           </indexterm>
126         </listitem>
127       </varlistentry>
129       <varlistentry id="insmod">
130         <term><command>insmod</command></term>
131         <listitem>
132           <para>Installs a loadable module in the running kernel</para>
133           <indexterm zone="ch-system-kmod insmod">
134             <primary sortas="b-insmod">insmod</primary>
135           </indexterm>
136         </listitem>
137       </varlistentry>
139       <varlistentry id="kmod">
140         <term><command>kmod</command></term>
141         <listitem>
142           <para>Loads and unloads kernel modules</para>
143           <indexterm zone="ch-system-kmod kmod">
144             <primary sortas="b-kmod">kmod</primary>
145           </indexterm>
146         </listitem>
147       </varlistentry>
149       <varlistentry id="lsmod">
150         <term><command>lsmod</command></term>
151         <listitem>
152           <para>Lists currently loaded modules</para>
153           <indexterm zone="ch-system-kmod lsmod">
154             <primary sortas="b-lsmod">lsmod</primary>
155           </indexterm>
156         </listitem>
157       </varlistentry>
159       <varlistentry id="modinfo">
160         <term><command>modinfo</command></term>
161         <listitem>
162           <para>Examines an object file associated with a kernel module and
163           displays any information that it can glean</para>
164           <indexterm zone="ch-system-kmod modinfo">
165             <primary sortas="b-modinfo">modinfo</primary>
166           </indexterm>
167         </listitem>
168       </varlistentry>
170       <varlistentry id="modprobe">
171         <term><command>modprobe</command></term>
172         <listitem>
173           <para>Uses a dependency file, created by
174           <command>depmod</command>, to automatically load relevant modules</para>
175           <indexterm zone="ch-system-kmod modprobe">
176             <primary sortas="b-modprobe">modprobe</primary>
177           </indexterm>
178         </listitem>
179       </varlistentry>
181       <varlistentry id="rmmod">
182         <term><command>rmmod</command></term>
183         <listitem>
184           <para>Unloads modules from the running kernel</para>
185           <indexterm zone="ch-system-kmod rmmod">
186             <primary sortas="b-rmmod">rmmod</primary>
187           </indexterm>
188         </listitem>
189       </varlistentry>
191       <varlistentry id="libkmod">
192         <term><filename class="libraryfile">libkmod</filename></term>
193         <listitem>
194           <para>This library is used by other programs to load and unload kernel
195            modules</para>
196           <indexterm zone="ch-system-kmod">
197             <primary sortas="c-libkmod">libkmod</primary>
198           </indexterm>
199         </listitem>
200       </varlistentry>
202     </variablelist>
204   </sect2>
206 </sect1>