source: chapter08/kmod.xml

trunk
Last change on this file was e2d3b4b, checked in by Xi Ruoyao <xry111@…>, 6 weeks ago

kmod: Use a more natural expression for symlink location issue

  • Property mode set to 100644
File size: 6.6 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
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-openssl \
49 --with-xz \
50 --with-zstd \
51 --with-zlib</userinput></screen>
52
53 <variablelist>
54 <title>The meaning of the configure options:</title>
55
56 <varlistentry>
57 <term>
58 <parameter>--with-openssl</parameter>
59 </term>
60 <listitem>
61 <para>This option enables Kmod to handle PKCS7 signatures for
62 kernel modules.</para>
63 </listitem>
64 </varlistentry>
65
66 <varlistentry>
67 <term>
68 <parameter>--with-xz</parameter>,
69 <parameter>--with-zlib</parameter>, and
70 <parameter>--with-zstd</parameter>
71 </term>
72 <listitem>
73 <para>These options enable Kmod to handle compressed kernel modules.</para>
74 </listitem>
75 </varlistentry>
76
77 </variablelist>
78
79 <para>Compile the package:</para>
80
81<screen><userinput remap="make">make</userinput></screen>
82
83 <para>The test suite of this package requires raw kernel headers
84 (not the <quote>sanitized</quote> kernel headers installed earlier),
85 which are beyond the scope of LFS.</para>
86
87 <para>Install the package and recreate some symlinks for
88 compatibility with Module-Init-Tools (the package that previously handled
89 Linux kernel modules). The building system will create all these
90 symlinks in <filename class='directory'>/usr/bin</filename>, but we
91 only want <command>lsmod</command> there and all other symlinks in
92 <filename class='directory'>/usr/sbin</filename> instead:</para>
93
94<screen><userinput remap="install">make install
95
96for target in depmod insmod modinfo modprobe rmmod; do
97 ln -sfv ../bin/kmod /usr/sbin/$target
98 rm -fv /usr/bin/$target
99done</userinput></screen>
100
101 </sect2>
102
103 <sect2 id="contents-kmod" role="content">
104 <title>Contents of Kmod</title>
105
106 <segmentedlist>
107 <segtitle>Installed programs</segtitle>
108 <segtitle>Installed library</segtitle>
109
110 <seglistitem>
111 <seg>depmod (link to kmod), insmod (link to kmod), kmod,
112 lsmod (link to kmod), modinfo (link to kmod), modprobe (link to kmod),
113 and rmmod (link to kmod)</seg>
114 <seg>libkmod.so</seg>
115 </seglistitem>
116 </segmentedlist>
117
118 <variablelist>
119 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
120 <?dbfo list-presentation="list"?>
121 <?dbhtml list-presentation="table"?>
122
123 <varlistentry id="depmod">
124 <term><command>depmod</command></term>
125 <listitem>
126 <para>Creates a dependency file based on the symbols it finds in the
127 existing set of modules; this dependency file is used by
128 <command>modprobe</command> to automatically load the required
129 modules</para>
130 <indexterm zone="ch-system-kmod depmod">
131 <primary sortas="b-depmod">depmod</primary>
132 </indexterm>
133 </listitem>
134 </varlistentry>
135
136 <varlistentry id="insmod">
137 <term><command>insmod</command></term>
138 <listitem>
139 <para>Installs a loadable module in the running kernel</para>
140 <indexterm zone="ch-system-kmod insmod">
141 <primary sortas="b-insmod">insmod</primary>
142 </indexterm>
143 </listitem>
144 </varlistentry>
145
146 <varlistentry id="kmod">
147 <term><command>kmod</command></term>
148 <listitem>
149 <para>Loads and unloads kernel modules</para>
150 <indexterm zone="ch-system-kmod kmod">
151 <primary sortas="b-kmod">kmod</primary>
152 </indexterm>
153 </listitem>
154 </varlistentry>
155
156 <varlistentry id="lsmod">
157 <term><command>lsmod</command></term>
158 <listitem>
159 <para>Lists currently loaded modules</para>
160 <indexterm zone="ch-system-kmod lsmod">
161 <primary sortas="b-lsmod">lsmod</primary>
162 </indexterm>
163 </listitem>
164 </varlistentry>
165
166 <varlistentry id="modinfo">
167 <term><command>modinfo</command></term>
168 <listitem>
169 <para>Examines an object file associated with a kernel module and
170 displays any information that it can glean</para>
171 <indexterm zone="ch-system-kmod modinfo">
172 <primary sortas="b-modinfo">modinfo</primary>
173 </indexterm>
174 </listitem>
175 </varlistentry>
176
177 <varlistentry id="modprobe">
178 <term><command>modprobe</command></term>
179 <listitem>
180 <para>Uses a dependency file, created by
181 <command>depmod</command>, to automatically load relevant modules</para>
182 <indexterm zone="ch-system-kmod modprobe">
183 <primary sortas="b-modprobe">modprobe</primary>
184 </indexterm>
185 </listitem>
186 </varlistentry>
187
188 <varlistentry id="rmmod">
189 <term><command>rmmod</command></term>
190 <listitem>
191 <para>Unloads modules from the running kernel</para>
192 <indexterm zone="ch-system-kmod rmmod">
193 <primary sortas="b-rmmod">rmmod</primary>
194 </indexterm>
195 </listitem>
196 </varlistentry>
197
198 <varlistentry id="libkmod">
199 <term><filename class="libraryfile">libkmod</filename></term>
200 <listitem>
201 <para>This library is used by other programs to load and unload kernel
202 modules</para>
203 <indexterm zone="ch-system-kmod">
204 <primary sortas="c-libkmod">libkmod</primary>
205 </indexterm>
206 </listitem>
207 </varlistentry>
208
209 </variablelist>
210
211 </sect2>
212
213</sect1>
214
Note: See TracBrowser for help on using the repository browser.