source: chapter08/kmod.xml@ 9051797

multilib xry111/multilib
Last change on this file since 9051797 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
RevLine 
[7152faa]1<?xml version="1.0" encoding="UTF-8"?>
[2442205]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>
[6dfcfecc]34 <seg>&kmod-fin-sbu;</seg>
35 <seg>&kmod-fin-du;</seg>
[2442205]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
[17c46c2]46<screen><userinput remap="configure">./configure --prefix=/usr \
47 --sysconfdir=/etc \
[f5923aa]48 --with-openssl \
[17c46c2]49 --with-xz \
[edd83dc]50 --with-zstd \
[9f5aaf7]51 --with-zlib</userinput></screen>
[2442205]52
53 <variablelist>
54 <title>The meaning of the configure options:</title>
55
56 <varlistentry>
[f5923aa]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>
[2442205]72 <listitem>
[0844c14]73 <para>These options enable Kmod to handle compressed kernel modules.</para>
[2442205]74 </listitem>
[a4d96cea]75 </varlistentry>
[aa976fe]76
[2442205]77 </variablelist>
78
79 <para>Compile the package:</para>
80
81<screen><userinput remap="make">make</userinput></screen>
82
[f26f74cb]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>
[fd162f6]86
[e723142]87 <para>Install the package and recreate some symlinks for
[e043985]88 compatibility with Module-Init-Tools (the package that previously handled
[e2d3b4b]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>
[2442205]93
[4ea67ff]94<screen><userinput remap="install">make install
[9f5aaf7]95
[c31e35b]96for target in depmod insmod modinfo modprobe rmmod; do
[e3471c8]97 ln -sfv ../bin/kmod /usr/sbin/$target
[dcf5543]98 rm -fv /usr/bin/$target
[e723142]99done</userinput></screen>
[2442205]100
101 </sect2>
102
[6dfcfecc]103 <!-- - - - - - - - - - -->
104 <!-- Multilib - 32bit -->
105 <!-- - - - - - - - - - -->
[fd48baa]106
107 <sect2 arch="ml_32,ml_all" role="installation">
[6dfcfecc]108 <title>Installation of Kmod - 32bit</title>
[b3f1ebb3]109
[6dfcfecc]110 <para>Clean previous build but keep man pages as they cannot
111 be recreated since xsltproc isn't installed yet:</para>
[b3f1ebb3]112
[6dfcfecc]113<screen><userinput remap="pre">sed -e "s/^CLEANFILES =.*/CLEANFILES =/" -i man/Makefile
[b3f1ebb3]114make clean</userinput></screen>
115
116 <para>Prepare Kmod for compilation:</para>
117
[6dfcfecc]118<screen><userinput remap="configure">CC="gcc -m32" ./configure \
[70aadfb]119 --host=i686-pc-linux-gnu \
[6dfcfecc]120 --prefix=/usr \
[70aadfb]121 --libdir=/usr/lib32 \
[6dfcfecc]122 --sysconfdir=/etc \
[9282602]123 --with-openssl \
[6dfcfecc]124 --with-xz \
[9ea5b3d]125 --with-zstd \
[6dfcfecc]126 --with-zlib \
[0ebda11]127 --with-rootlibdir=/usr/lib32</userinput></screen>
[b3f1ebb3]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
[0ebda11]136cp -Rv DESTDIR/usr/lib32/* /usr/lib32
[b3f1ebb3]137rm -rf DESTDIR</userinput></screen>
138
[6dfcfecc]139 </sect2><!-- m32 -->
[b3f1ebb3]140
[6dfcfecc]141 <!-- - - - - - - - - - -->
142 <!-- Multilib - x32bit -->
143 <!-- - - - - - - - - - -->
[fd48baa]144
145 <sect2 arch="ml_x32,ml_all" role="installation">
[6dfcfecc]146 <title>Installation of Kmod - x32bit</title>
[b3f1ebb3]147
[6dfcfecc]148 <para>Clean previous build but keep man pages as they cannot
149 be recreated since xsltproc isn't installed yet:</para>
[b3f1ebb3]150
[6dfcfecc]151<screen><userinput remap="pre">sed -e "s/^CLEANFILES =.*/CLEANFILES =/" -i man/Makefile
[b3f1ebb3]152make clean</userinput></screen>
153
154 <para>Prepare Kmod for compilation:</para>
155
[6dfcfecc]156<screen><userinput remap="configure">CC="gcc -mx32" ./configure \
[70aadfb]157 --host=x86_64-pc-linux-gnux32 \
[b3f1ebb3]158 --prefix=/usr \
[0ebda11]159 --libdir=/usr/libx32 \
[b3f1ebb3]160 --sysconfdir=/etc \
[9282602]161 --with-openssl \
[b3f1ebb3]162 --with-xz \
[9ea5b3d]163 --with-zstd \
[b3f1ebb3]164 --with-zlib \
[0ebda11]165 --with-rootlibdir=/usr/libx32</userinput></screen>
[b3f1ebb3]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
[0ebda11]174cp -Rv DESTDIR/usr/libx32/* /usr/libx32
[b3f1ebb3]175rm -rf DESTDIR</userinput></screen>
176
[6dfcfecc]177 </sect2><!-- mx32 -->
[b3f1ebb3]178
[2442205]179 <sect2 id="contents-kmod" role="content">
180 <title>Contents of Kmod</title>
181
182 <segmentedlist>
183 <segtitle>Installed programs</segtitle>
[1d6f204]184 <segtitle>Installed library</segtitle>
[2442205]185
186 <seglistitem>
[d672ab7]187 <seg>depmod (link to kmod), insmod (link to kmod), kmod,
[2442205]188 lsmod (link to kmod), modinfo (link to kmod), modprobe (link to kmod),
189 and rmmod (link to kmod)</seg>
[5aabbac4]190 <seg>libkmod.so</seg>
[2442205]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
[5aabbac4]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
[2442205]285 </variablelist>
286
287 </sect2>
288
289</sect1>
290
Note: See TracBrowser for help on using the repository browser.