source: chapter08/kmod.xml@ 9113316

multilib xry111/multilib
Last change on this file since 9113316 was 6269ece, checked in by Thomas Trepl <thomas@…>, 6 months ago

Automatic merge of trunk into multilib

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