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">
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>
17 <title>Kmod-&kmod-version;</title>
19 <indexterm zone="ch-system-kmod">
20 <primary sortas="a-Kmod">Kmod</primary>
23 <sect2 role="package">
26 <para>The Kmod package contains libraries and utilities for loading kernel
30 <segtitle>&buildtime;</segtitle>
31 <segtitle>&diskspace;</segtitle>
34 <seg>&kmod-fin-sbu;</seg>
35 <seg>&kmod-fin-du;</seg>
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 \
49 --with-rootlibdir=/lib \
52 --with-zlib</userinput></screen>
55 <title>The meaning of the configure options:</title>
58 <term><parameter>--with-xz, --with-zlib, --with-zstd</parameter></term>
60 <para>These options enable Kmod to handle compressed kernel modules.</para>
65 <term><parameter>--with-rootlibdir=/lib</parameter></term>
67 <para>This option ensures different library related files are placed
68 in the correct directories.</para>
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
92 ln -sfv kmod /bin/lsmod</userinput></screen>
96 <sect2 id="contents-kmod" role="content">
97 <title>Contents of Kmod</title>
100 <segtitle>Installed programs</segtitle>
101 <segtitle>Installed library</segtitle>
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>
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>
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
123 <indexterm zone="ch-system-kmod depmod">
124 <primary sortas="b-depmod">depmod</primary>
129 <varlistentry id="insmod">
130 <term><command>insmod</command></term>
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>
139 <varlistentry id="kmod">
140 <term><command>kmod</command></term>
142 <para>Loads and unloads kernel modules</para>
143 <indexterm zone="ch-system-kmod kmod">
144 <primary sortas="b-kmod">kmod</primary>
149 <varlistentry id="lsmod">
150 <term><command>lsmod</command></term>
152 <para>Lists currently loaded modules</para>
153 <indexterm zone="ch-system-kmod lsmod">
154 <primary sortas="b-lsmod">lsmod</primary>
159 <varlistentry id="modinfo">
160 <term><command>modinfo</command></term>
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>
170 <varlistentry id="modprobe">
171 <term><command>modprobe</command></term>
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>
181 <varlistentry id="rmmod">
182 <term><command>rmmod</command></term>
184 <para>Unloads modules from the running kernel</para>
185 <indexterm zone="ch-system-kmod rmmod">
186 <primary sortas="b-rmmod">rmmod</primary>
191 <varlistentry id="libkmod">
192 <term><filename class="libraryfile">libkmod</filename></term>
194 <para>This library is used by other programs to load and unload kernel
196 <indexterm zone="ch-system-kmod">
197 <primary sortas="c-libkmod">libkmod</primary>