source: chapter08/kmod.xml@ b9178d32

multilib xry111/multilib r12.2-rc1-ml
Last change on this file since b9178d32 was b9178d32, checked in by Thomas Trepl <thomas@…>, 4 weeks ago

Disable manpages in m?32 too

  • Property mode set to 100644
File size: 9.3 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
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 --sysconfdir=/etc \
48 --with-openssl \
49 --with-xz \
50 --with-zstd \
51 --with-zlib \
52 --disable-manpages</userinput></screen>
53
54 <variablelist>
55 <title>The meaning of the configure options:</title>
56
57 <varlistentry>
58 <term>
59 <parameter>--with-openssl</parameter>
60 </term>
61 <listitem>
62 <para>This option enables Kmod to handle PKCS7 signatures for
63 kernel modules.</para>
64 </listitem>
65 </varlistentry>
66
67 <varlistentry>
68 <term>
69 <parameter>--with-xz</parameter>,
70 <parameter>--with-zlib</parameter>, and
71 <parameter>--with-zstd</parameter>
72 </term>
73 <listitem>
74 <para>These options enable Kmod to handle compressed kernel modules.</para>
75 </listitem>
76 </varlistentry>
77
78 <varlistentry>
79 <term>
80 <parameter>--disable-manpages</parameter>
81 </term>
82 <listitem>
83 <para>This option disables generating the manpages which
84 requires an external program.</para>
85 </listitem>
86 </varlistentry>
87
88 </variablelist>
89
90 <para>Compile the package:</para>
91
92<screen><userinput remap="make">make</userinput></screen>
93
94 <para>The test suite of this package requires raw kernel headers
95 (not the <quote>sanitized</quote> kernel headers installed earlier),
96 which are beyond the scope of LFS.</para>
97
98 <para>Install the package and recreate some symlinks for
99 compatibility with Module-Init-Tools (the package that previously handled
100 Linux kernel modules). The building system will create all these
101 symlinks in <filename class='directory'>/usr/bin</filename>, but we
102 only want <command>lsmod</command> there and all other symlinks in
103 <filename class='directory'>/usr/sbin</filename> instead:</para>
104
105<screen><userinput remap="install">make install
106
107for target in depmod insmod modinfo modprobe rmmod; do
108 ln -sfv ../bin/kmod /usr/sbin/$target
109 rm -fv /usr/bin/$target
110done</userinput></screen>
111
112 </sect2>
113
114 <!-- - - - - - - - - - -->
115 <!-- Multilib - 32bit -->
116 <!-- - - - - - - - - - -->
117
118 <sect2 arch="ml_32,ml_all" role="installation">
119 <title>Installation of Kmod - 32bit</title>
120
121 <para>Clean previous build but keep man pages as they cannot
122 be recreated since xsltproc isn't installed yet:</para>
123
124<screen><userinput remap="pre">sed -e "s/^CLEANFILES =.*/CLEANFILES =/" -i man/Makefile
125make clean</userinput></screen>
126
127 <para>Prepare Kmod for compilation:</para>
128
129<screen><userinput remap="configure">CC="gcc -m32" ./configure \
130 --host=i686-pc-linux-gnu \
131 --prefix=/usr \
132 --libdir=/usr/lib32 \
133 --sysconfdir=/etc \
134 --with-openssl \
135 --with-xz \
136 --with-zstd \
137 --with-zlib \
138 --disable-manpages \
139 --with-rootlibdir=/usr/lib32</userinput></screen>
140
141 <para>Compile the package:</para>
142
143<screen><userinput remap="make">make</userinput></screen>
144
145 <para>Install the package:</para>
146
147<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install
148cp -Rv DESTDIR/usr/lib32/* /usr/lib32
149rm -rf DESTDIR</userinput></screen>
150
151 </sect2><!-- m32 -->
152
153 <!-- - - - - - - - - - -->
154 <!-- Multilib - x32bit -->
155 <!-- - - - - - - - - - -->
156
157 <sect2 arch="ml_x32,ml_all" role="installation">
158 <title>Installation of Kmod - x32bit</title>
159
160 <para>Clean previous build but keep man pages as they cannot
161 be recreated since xsltproc isn't installed yet:</para>
162
163<screen><userinput remap="pre">sed -e "s/^CLEANFILES =.*/CLEANFILES =/" -i man/Makefile
164make clean</userinput></screen>
165
166 <para>Prepare Kmod for compilation:</para>
167
168<screen><userinput remap="configure">CC="gcc -mx32" ./configure \
169 --host=x86_64-pc-linux-gnux32 \
170 --prefix=/usr \
171 --libdir=/usr/libx32 \
172 --sysconfdir=/etc \
173 --with-openssl \
174 --with-xz \
175 --with-zstd \
176 --with-zlib \
177 --disable-manpages \
178 --with-rootlibdir=/usr/libx32</userinput></screen>
179
180 <para>Compile the package:</para>
181
182<screen><userinput remap="make">make</userinput></screen>
183
184 <para>Install the package:</para>
185
186<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install
187cp -Rv DESTDIR/usr/libx32/* /usr/libx32
188rm -rf DESTDIR</userinput></screen>
189
190 </sect2><!-- mx32 -->
191
192 <sect2 id="contents-kmod" role="content">
193 <title>Contents of Kmod</title>
194
195 <segmentedlist>
196 <segtitle>Installed programs</segtitle>
197 <segtitle>Installed library</segtitle>
198
199 <seglistitem>
200 <seg>depmod (link to kmod), insmod (link to kmod), kmod,
201 lsmod (link to kmod), modinfo (link to kmod), modprobe (link to kmod),
202 and rmmod (link to kmod)</seg>
203 <seg>libkmod.so</seg>
204 </seglistitem>
205 </segmentedlist>
206
207 <variablelist>
208 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
209 <?dbfo list-presentation="list"?>
210 <?dbhtml list-presentation="table"?>
211
212 <varlistentry id="depmod">
213 <term><command>depmod</command></term>
214 <listitem>
215 <para>Creates a dependency file based on the symbols it finds in the
216 existing set of modules; this dependency file is used by
217 <command>modprobe</command> to automatically load the required
218 modules</para>
219 <indexterm zone="ch-system-kmod depmod">
220 <primary sortas="b-depmod">depmod</primary>
221 </indexterm>
222 </listitem>
223 </varlistentry>
224
225 <varlistentry id="insmod">
226 <term><command>insmod</command></term>
227 <listitem>
228 <para>Installs a loadable module in the running kernel</para>
229 <indexterm zone="ch-system-kmod insmod">
230 <primary sortas="b-insmod">insmod</primary>
231 </indexterm>
232 </listitem>
233 </varlistentry>
234
235 <varlistentry id="kmod">
236 <term><command>kmod</command></term>
237 <listitem>
238 <para>Loads and unloads kernel modules</para>
239 <indexterm zone="ch-system-kmod kmod">
240 <primary sortas="b-kmod">kmod</primary>
241 </indexterm>
242 </listitem>
243 </varlistentry>
244
245 <varlistentry id="lsmod">
246 <term><command>lsmod</command></term>
247 <listitem>
248 <para>Lists currently loaded modules</para>
249 <indexterm zone="ch-system-kmod lsmod">
250 <primary sortas="b-lsmod">lsmod</primary>
251 </indexterm>
252 </listitem>
253 </varlistentry>
254
255 <varlistentry id="modinfo">
256 <term><command>modinfo</command></term>
257 <listitem>
258 <para>Examines an object file associated with a kernel module and
259 displays any information that it can glean</para>
260 <indexterm zone="ch-system-kmod modinfo">
261 <primary sortas="b-modinfo">modinfo</primary>
262 </indexterm>
263 </listitem>
264 </varlistentry>
265
266 <varlistentry id="modprobe">
267 <term><command>modprobe</command></term>
268 <listitem>
269 <para>Uses a dependency file, created by
270 <command>depmod</command>, to automatically load relevant modules</para>
271 <indexterm zone="ch-system-kmod modprobe">
272 <primary sortas="b-modprobe">modprobe</primary>
273 </indexterm>
274 </listitem>
275 </varlistentry>
276
277 <varlistentry id="rmmod">
278 <term><command>rmmod</command></term>
279 <listitem>
280 <para>Unloads modules from the running kernel</para>
281 <indexterm zone="ch-system-kmod rmmod">
282 <primary sortas="b-rmmod">rmmod</primary>
283 </indexterm>
284 </listitem>
285 </varlistentry>
286
287 <varlistentry id="libkmod">
288 <term><filename class="libraryfile">libkmod</filename></term>
289 <listitem>
290 <para>This library is used by other programs to load and unload kernel
291 modules</para>
292 <indexterm zone="ch-system-kmod">
293 <primary sortas="c-libkmod">libkmod</primary>
294 </indexterm>
295 </listitem>
296 </varlistentry>
297
298 </variablelist>
299
300 </sect2>
301
302</sect1>
303
Note: See TracBrowser for help on using the repository browser.