source: chapter06/kmod.xml@ 8eb3fe4

multilib-10.1
Last change on this file since 8eb3fe4 was 8eb3fe4, checked in by Thomas Trepl <thomas@…>, 5 years ago

First apply of multilib-patch of April 1st, 2019

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/multilib@11566 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

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