source: chapter08/kmod.xml@ 716db1f

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

Merge upstream

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