source: chapter08/kmod.xml@ 42a56cd

multilib xry111/multilib
Last change on this file since 42a56cd was 42a56cd, checked in by Thomas Trepl <thomas@…>, 4 weeks ago

Automatic merge of trunk into multilib

  • Property mode set to 100644
File size: 9.2 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 --with-rootlibdir=/usr/lib32</userinput></screen>
139
140 <para>Compile the package:</para>
141
142<screen><userinput remap="make">make</userinput></screen>
143
144 <para>Install the package:</para>
145
146<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install
147cp -Rv DESTDIR/usr/lib32/* /usr/lib32
148rm -rf DESTDIR</userinput></screen>
149
150 </sect2><!-- m32 -->
151
152 <!-- - - - - - - - - - -->
153 <!-- Multilib - x32bit -->
154 <!-- - - - - - - - - - -->
155
156 <sect2 arch="ml_x32,ml_all" role="installation">
157 <title>Installation of Kmod - x32bit</title>
158
159 <para>Clean previous build but keep man pages as they cannot
160 be recreated since xsltproc isn't installed yet:</para>
161
162<screen><userinput remap="pre">sed -e "s/^CLEANFILES =.*/CLEANFILES =/" -i man/Makefile
163make clean</userinput></screen>
164
165 <para>Prepare Kmod for compilation:</para>
166
167<screen><userinput remap="configure">CC="gcc -mx32" ./configure \
168 --host=x86_64-pc-linux-gnux32 \
169 --prefix=/usr \
170 --libdir=/usr/libx32 \
171 --sysconfdir=/etc \
172 --with-openssl \
173 --with-xz \
174 --with-zstd \
175 --with-zlib \
176 --with-rootlibdir=/usr/libx32</userinput></screen>
177
178 <para>Compile the package:</para>
179
180<screen><userinput remap="make">make</userinput></screen>
181
182 <para>Install the package:</para>
183
184<screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install
185cp -Rv DESTDIR/usr/libx32/* /usr/libx32
186rm -rf DESTDIR</userinput></screen>
187
188 </sect2><!-- mx32 -->
189
190 <sect2 id="contents-kmod" role="content">
191 <title>Contents of Kmod</title>
192
193 <segmentedlist>
194 <segtitle>Installed programs</segtitle>
195 <segtitle>Installed library</segtitle>
196
197 <seglistitem>
198 <seg>depmod (link to kmod), insmod (link to kmod), kmod,
199 lsmod (link to kmod), modinfo (link to kmod), modprobe (link to kmod),
200 and rmmod (link to kmod)</seg>
201 <seg>libkmod.so</seg>
202 </seglistitem>
203 </segmentedlist>
204
205 <variablelist>
206 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
207 <?dbfo list-presentation="list"?>
208 <?dbhtml list-presentation="table"?>
209
210 <varlistentry id="depmod">
211 <term><command>depmod</command></term>
212 <listitem>
213 <para>Creates a dependency file based on the symbols it finds in the
214 existing set of modules; this dependency file is used by
215 <command>modprobe</command> to automatically load the required
216 modules</para>
217 <indexterm zone="ch-system-kmod depmod">
218 <primary sortas="b-depmod">depmod</primary>
219 </indexterm>
220 </listitem>
221 </varlistentry>
222
223 <varlistentry id="insmod">
224 <term><command>insmod</command></term>
225 <listitem>
226 <para>Installs a loadable module in the running kernel</para>
227 <indexterm zone="ch-system-kmod insmod">
228 <primary sortas="b-insmod">insmod</primary>
229 </indexterm>
230 </listitem>
231 </varlistentry>
232
233 <varlistentry id="kmod">
234 <term><command>kmod</command></term>
235 <listitem>
236 <para>Loads and unloads kernel modules</para>
237 <indexterm zone="ch-system-kmod kmod">
238 <primary sortas="b-kmod">kmod</primary>
239 </indexterm>
240 </listitem>
241 </varlistentry>
242
243 <varlistentry id="lsmod">
244 <term><command>lsmod</command></term>
245 <listitem>
246 <para>Lists currently loaded modules</para>
247 <indexterm zone="ch-system-kmod lsmod">
248 <primary sortas="b-lsmod">lsmod</primary>
249 </indexterm>
250 </listitem>
251 </varlistentry>
252
253 <varlistentry id="modinfo">
254 <term><command>modinfo</command></term>
255 <listitem>
256 <para>Examines an object file associated with a kernel module and
257 displays any information that it can glean</para>
258 <indexterm zone="ch-system-kmod modinfo">
259 <primary sortas="b-modinfo">modinfo</primary>
260 </indexterm>
261 </listitem>
262 </varlistentry>
263
264 <varlistentry id="modprobe">
265 <term><command>modprobe</command></term>
266 <listitem>
267 <para>Uses a dependency file, created by
268 <command>depmod</command>, to automatically load relevant modules</para>
269 <indexterm zone="ch-system-kmod modprobe">
270 <primary sortas="b-modprobe">modprobe</primary>
271 </indexterm>
272 </listitem>
273 </varlistentry>
274
275 <varlistentry id="rmmod">
276 <term><command>rmmod</command></term>
277 <listitem>
278 <para>Unloads modules from the running kernel</para>
279 <indexterm zone="ch-system-kmod rmmod">
280 <primary sortas="b-rmmod">rmmod</primary>
281 </indexterm>
282 </listitem>
283 </varlistentry>
284
285 <varlistentry id="libkmod">
286 <term><filename class="libraryfile">libkmod</filename></term>
287 <listitem>
288 <para>This library is used by other programs to load and unload kernel
289 modules</para>
290 <indexterm zone="ch-system-kmod">
291 <primary sortas="c-libkmod">libkmod</primary>
292 </indexterm>
293 </listitem>
294 </varlistentry>
295
296 </variablelist>
297
298 </sect2>
299
300</sect1>
301
Note: See TracBrowser for help on using the repository browser.