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 |
|
---|
8 | <sect1 id="ch-system-kmod" role="wrap">
|
---|
9 | <?dbhtml filename="kmod.html"?>
|
---|
10 |
|
---|
11 | <sect1info condition="script">
|
---|
12 | <productname>kmod</productname>
|
---|
13 | <productnumber>&kmod-version;</productnumber>
|
---|
14 | <address>&kmod-url;</address>
|
---|
15 | </sect1info>
|
---|
16 |
|
---|
17 | <title>Kmod-&kmod-version;</title>
|
---|
18 |
|
---|
19 | <indexterm zone="ch-system-kmod">
|
---|
20 | <primary sortas="a-Kmod">Kmod</primary>
|
---|
21 | </indexterm>
|
---|
22 |
|
---|
23 | <sect2 role="package">
|
---|
24 | <title/>
|
---|
25 |
|
---|
26 | <para>The Kmod package contains libraries and utilities for loading kernel
|
---|
27 | modules</para>
|
---|
28 |
|
---|
29 | <segmentedlist>
|
---|
30 | <segtitle>&buildtime;</segtitle>
|
---|
31 | <segtitle>&diskspace;</segtitle>
|
---|
32 |
|
---|
33 | <seglistitem>
|
---|
34 | <seg>&kmod-fin-sbu;</seg>
|
---|
35 | <seg>&kmod-fin-du;</seg>
|
---|
36 | </seglistitem>
|
---|
37 | </segmentedlist>
|
---|
38 |
|
---|
39 | </sect2>
|
---|
40 |
|
---|
41 | <sect2 role="installation">
|
---|
42 | <title>Installation of Kmod</title>
|
---|
43 |
|
---|
44 | <para>Prepare Kmod for compilation:</para>
|
---|
45 |
|
---|
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>
|
---|
53 |
|
---|
54 | <variablelist>
|
---|
55 | <title>The meaning of the configure options:</title>
|
---|
56 |
|
---|
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>
|
---|
63 |
|
---|
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>
|
---|
71 |
|
---|
72 | </variablelist>
|
---|
73 |
|
---|
74 | <para>Compile the package:</para>
|
---|
75 |
|
---|
76 | <screen><userinput remap="make">make</userinput></screen>
|
---|
77 |
|
---|
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>
|
---|
81 |
|
---|
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>
|
---|
85 |
|
---|
86 | <screen><userinput remap="install">make install
|
---|
87 |
|
---|
88 | for target in depmod insmod lsmod modinfo modprobe rmmod; do
|
---|
89 | ln -sfv ../bin/kmod /sbin/$target
|
---|
90 | done
|
---|
91 |
|
---|
92 | ln -sfv kmod /bin/lsmod</userinput></screen>
|
---|
93 |
|
---|
94 | </sect2>
|
---|
95 |
|
---|
96 | <!-- - - - - - - - - - -->
|
---|
97 | <!-- Multilib - 32bit -->
|
---|
98 | <!-- - - - - - - - - - -->
|
---|
99 |
|
---|
100 | <sect2 arch="ml_32,ml_all" role="installation">
|
---|
101 | <title>Installation of Kmod - 32bit</title>
|
---|
102 |
|
---|
103 | <para>Clean previous build but keep man pages as they cannot
|
---|
104 | be recreated since xsltproc isn't installed yet:</para>
|
---|
105 |
|
---|
106 | <screen><userinput remap="pre">sed -e "s/^CLEANFILES =.*/CLEANFILES =/" -i man/Makefile
|
---|
107 | make clean</userinput></screen>
|
---|
108 |
|
---|
109 | <para>Prepare Kmod for compilation:</para>
|
---|
110 |
|
---|
111 | <screen><userinput remap="configure">CC="gcc -m32" ./configure \
|
---|
112 | --prefix=/usr \
|
---|
113 | --bindir=/bin \
|
---|
114 | --libdir=&usr-lib-m32; \
|
---|
115 | --sysconfdir=/etc \
|
---|
116 | --with-xz \
|
---|
117 | --with-zlib \
|
---|
118 | --host=i686-pc-linux-gnu \
|
---|
119 | --with-rootlibdir=&usr-lib-m32;</userinput></screen>
|
---|
120 |
|
---|
121 | <para>Compile the package:</para>
|
---|
122 |
|
---|
123 | <screen><userinput remap="make">make</userinput></screen>
|
---|
124 |
|
---|
125 | <para>Install the package:</para>
|
---|
126 |
|
---|
127 | <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install
|
---|
128 | cp -Rv DESTDIR&usr-lib-m32;/* &usr-lib-m32;
|
---|
129 | rm -rf DESTDIR</userinput></screen>
|
---|
130 |
|
---|
131 | </sect2><!-- m32 -->
|
---|
132 |
|
---|
133 | <!-- - - - - - - - - - -->
|
---|
134 | <!-- Multilib - x32bit -->
|
---|
135 | <!-- - - - - - - - - - -->
|
---|
136 |
|
---|
137 | <sect2 arch="ml_x32,ml_all" role="installation">
|
---|
138 | <title>Installation of Kmod - x32bit</title>
|
---|
139 |
|
---|
140 | <para>Clean previous build but keep man pages as they cannot
|
---|
141 | be recreated since xsltproc isn't installed yet:</para>
|
---|
142 |
|
---|
143 | <screen><userinput remap="pre">sed -e "s/^CLEANFILES =.*/CLEANFILES =/" -i man/Makefile
|
---|
144 | make clean</userinput></screen>
|
---|
145 |
|
---|
146 | <para>Prepare Kmod for compilation:</para>
|
---|
147 |
|
---|
148 | <screen><userinput remap="configure">CC="gcc -mx32" ./configure \
|
---|
149 | --prefix=/usr \
|
---|
150 | --bindir=/bin \
|
---|
151 | --libdir=&usr-lib-mx32; \
|
---|
152 | --sysconfdir=/etc \
|
---|
153 | --with-xz \
|
---|
154 | --with-zlib \
|
---|
155 | --host=x86_64-pc-linux-gnux32 \
|
---|
156 | --with-rootlibdir=&usr-lib-mx32;</userinput></screen>
|
---|
157 |
|
---|
158 | <para>Compile the package:</para>
|
---|
159 |
|
---|
160 | <screen><userinput remap="make">make</userinput></screen>
|
---|
161 |
|
---|
162 | <para>Install the package:</para>
|
---|
163 |
|
---|
164 | <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install
|
---|
165 | cp -Rv DESTDIR&usr-lib-mx32;/* &usr-lib-mx32;
|
---|
166 | rm -rf DESTDIR</userinput></screen>
|
---|
167 |
|
---|
168 | </sect2><!-- mx32 -->
|
---|
169 |
|
---|
170 | <sect2 id="contents-kmod" role="content">
|
---|
171 | <title>Contents of Kmod</title>
|
---|
172 |
|
---|
173 | <segmentedlist>
|
---|
174 | <segtitle>Installed programs</segtitle>
|
---|
175 | <segtitle>Installed library</segtitle>
|
---|
176 |
|
---|
177 | <seglistitem>
|
---|
178 | <seg>depmod (link to kmod), insmod (link to kmod), kmod,
|
---|
179 | lsmod (link to kmod), modinfo (link to kmod), modprobe (link to kmod),
|
---|
180 | and rmmod (link to kmod)</seg>
|
---|
181 | <seg>libkmod.so</seg>
|
---|
182 | </seglistitem>
|
---|
183 | </segmentedlist>
|
---|
184 |
|
---|
185 | <variablelist>
|
---|
186 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
187 | <?dbfo list-presentation="list"?>
|
---|
188 | <?dbhtml list-presentation="table"?>
|
---|
189 |
|
---|
190 | <varlistentry id="depmod">
|
---|
191 | <term><command>depmod</command></term>
|
---|
192 | <listitem>
|
---|
193 | <para>Creates a dependency file based on the symbols it finds in the
|
---|
194 | existing set of modules; this dependency file is used by
|
---|
195 | <command>modprobe</command> to automatically load the required
|
---|
196 | modules</para>
|
---|
197 | <indexterm zone="ch-system-kmod depmod">
|
---|
198 | <primary sortas="b-depmod">depmod</primary>
|
---|
199 | </indexterm>
|
---|
200 | </listitem>
|
---|
201 | </varlistentry>
|
---|
202 |
|
---|
203 | <varlistentry id="insmod">
|
---|
204 | <term><command>insmod</command></term>
|
---|
205 | <listitem>
|
---|
206 | <para>Installs a loadable module in the running kernel</para>
|
---|
207 | <indexterm zone="ch-system-kmod insmod">
|
---|
208 | <primary sortas="b-insmod">insmod</primary>
|
---|
209 | </indexterm>
|
---|
210 | </listitem>
|
---|
211 | </varlistentry>
|
---|
212 |
|
---|
213 | <varlistentry id="kmod">
|
---|
214 | <term><command>kmod</command></term>
|
---|
215 | <listitem>
|
---|
216 | <para>Loads and unloads kernel modules</para>
|
---|
217 | <indexterm zone="ch-system-kmod kmod">
|
---|
218 | <primary sortas="b-kmod">kmod</primary>
|
---|
219 | </indexterm>
|
---|
220 | </listitem>
|
---|
221 | </varlistentry>
|
---|
222 |
|
---|
223 | <varlistentry id="lsmod">
|
---|
224 | <term><command>lsmod</command></term>
|
---|
225 | <listitem>
|
---|
226 | <para>Lists currently loaded modules</para>
|
---|
227 | <indexterm zone="ch-system-kmod lsmod">
|
---|
228 | <primary sortas="b-lsmod">lsmod</primary>
|
---|
229 | </indexterm>
|
---|
230 | </listitem>
|
---|
231 | </varlistentry>
|
---|
232 |
|
---|
233 | <varlistentry id="modinfo">
|
---|
234 | <term><command>modinfo</command></term>
|
---|
235 | <listitem>
|
---|
236 | <para>Examines an object file associated with a kernel module and
|
---|
237 | displays any information that it can glean</para>
|
---|
238 | <indexterm zone="ch-system-kmod modinfo">
|
---|
239 | <primary sortas="b-modinfo">modinfo</primary>
|
---|
240 | </indexterm>
|
---|
241 | </listitem>
|
---|
242 | </varlistentry>
|
---|
243 |
|
---|
244 | <varlistentry id="modprobe">
|
---|
245 | <term><command>modprobe</command></term>
|
---|
246 | <listitem>
|
---|
247 | <para>Uses a dependency file, created by
|
---|
248 | <command>depmod</command>, to automatically load relevant modules</para>
|
---|
249 | <indexterm zone="ch-system-kmod modprobe">
|
---|
250 | <primary sortas="b-modprobe">modprobe</primary>
|
---|
251 | </indexterm>
|
---|
252 | </listitem>
|
---|
253 | </varlistentry>
|
---|
254 |
|
---|
255 | <varlistentry id="rmmod">
|
---|
256 | <term><command>rmmod</command></term>
|
---|
257 | <listitem>
|
---|
258 | <para>Unloads modules from the running kernel</para>
|
---|
259 | <indexterm zone="ch-system-kmod rmmod">
|
---|
260 | <primary sortas="b-rmmod">rmmod</primary>
|
---|
261 | </indexterm>
|
---|
262 | </listitem>
|
---|
263 | </varlistentry>
|
---|
264 |
|
---|
265 | <varlistentry id="libkmod">
|
---|
266 | <term><filename class="libraryfile">libkmod</filename></term>
|
---|
267 | <listitem>
|
---|
268 | <para>This library is used by other programs to load and unload kernel
|
---|
269 | modules</para>
|
---|
270 | <indexterm zone="ch-system-kmod">
|
---|
271 | <primary sortas="c-libkmod">libkmod</primary>
|
---|
272 | </indexterm>
|
---|
273 | </listitem>
|
---|
274 | </varlistentry>
|
---|
275 |
|
---|
276 | </variablelist>
|
---|
277 |
|
---|
278 | </sect2>
|
---|
279 |
|
---|
280 | </sect1>
|
---|
281 |
|
---|