source: chapter06/kmod.xml@ ee1a413

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

Change profiling attribute to enable selection of m32 and/or mx32. Fixes #4452.

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

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