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