source: chapter08/kmod.xml@ 37e35d2

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

Update to new lfs structure

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

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