source: chapter08/kmod.xml@ 9282602

multilib
Last change on this file since 9282602 was 9282602, checked in by Thomas Trepl (Moody) <thomas@…>, 22 months ago

Adopt change instructions to m32/mx32

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