source: chapter08/kmod.xml@ 738a4c1

multilib
Last change on this file since 738a4c1 was 2590473, checked in by Thomas Trepl (Moody) <thomas@…>, 2 years ago

Automatic merge of trunk into multilib

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