source: chapter08/kmod.xml@ 9ea5b3d

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

Fix instructions

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