source: chapter08/kmod.xml@ df462a9

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

Merge pre-LFS-11-0 changes

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