[7152faa] | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
[2442205] | 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>
|
---|
[6dfcfecc] | 34 | <seg>&kmod-fin-sbu;</seg>
|
---|
| 35 | <seg>&kmod-fin-du;</seg>
|
---|
[2442205] | 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 |
|
---|
[4c522f3] | 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>
|
---|
[2442205] | 53 |
|
---|
| 54 | <variablelist>
|
---|
| 55 | <title>The meaning of the configure options:</title>
|
---|
| 56 |
|
---|
| 57 | <varlistentry>
|
---|
[f5923aa] | 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>
|
---|
[2442205] | 73 | <listitem>
|
---|
[0844c14] | 74 | <para>These options enable Kmod to handle compressed kernel modules.</para>
|
---|
[2442205] | 75 | </listitem>
|
---|
[a4d96cea] | 76 | </varlistentry>
|
---|
[aa976fe] | 77 |
|
---|
[4c522f3] | 78 | <varlistentry>
|
---|
| 79 | <term>
|
---|
| 80 | <parameter>--disable-manpages</parameter>
|
---|
| 81 | </term>
|
---|
| 82 | <listitem>
|
---|
[8377317] | 83 | <para>This option disables generating the man pages which
|
---|
[4c522f3] | 84 | requires an external program.</para>
|
---|
| 85 | </listitem>
|
---|
| 86 | </varlistentry>
|
---|
| 87 |
|
---|
[2442205] | 88 | </variablelist>
|
---|
| 89 |
|
---|
| 90 | <para>Compile the package:</para>
|
---|
| 91 |
|
---|
| 92 | <screen><userinput remap="make">make</userinput></screen>
|
---|
| 93 |
|
---|
[f26f74cb] | 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>
|
---|
[fd162f6] | 97 |
|
---|
[e723142] | 98 | <para>Install the package and recreate some symlinks for
|
---|
[e043985] | 99 | compatibility with Module-Init-Tools (the package that previously handled
|
---|
[e2d3b4b] | 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>
|
---|
[2442205] | 104 |
|
---|
[4ea67ff] | 105 | <screen><userinput remap="install">make install
|
---|
[9f5aaf7] | 106 |
|
---|
[c31e35b] | 107 | for target in depmod insmod modinfo modprobe rmmod; do
|
---|
[e3471c8] | 108 | ln -sfv ../bin/kmod /usr/sbin/$target
|
---|
[dcf5543] | 109 | rm -fv /usr/bin/$target
|
---|
[e723142] | 110 | done</userinput></screen>
|
---|
[2442205] | 111 |
|
---|
| 112 | </sect2>
|
---|
| 113 |
|
---|
[6dfcfecc] | 114 | <!-- - - - - - - - - - -->
|
---|
| 115 | <!-- Multilib - 32bit -->
|
---|
| 116 | <!-- - - - - - - - - - -->
|
---|
[fd48baa] | 117 |
|
---|
| 118 | <sect2 arch="ml_32,ml_all" role="installation">
|
---|
[6dfcfecc] | 119 | <title>Installation of Kmod - 32bit</title>
|
---|
[b3f1ebb3] | 120 |
|
---|
[6dfcfecc] | 121 | <para>Clean previous build but keep man pages as they cannot
|
---|
| 122 | be recreated since xsltproc isn't installed yet:</para>
|
---|
[b3f1ebb3] | 123 |
|
---|
[6dfcfecc] | 124 | <screen><userinput remap="pre">sed -e "s/^CLEANFILES =.*/CLEANFILES =/" -i man/Makefile
|
---|
[b3f1ebb3] | 125 | make clean</userinput></screen>
|
---|
| 126 |
|
---|
| 127 | <para>Prepare Kmod for compilation:</para>
|
---|
| 128 |
|
---|
[6dfcfecc] | 129 | <screen><userinput remap="configure">CC="gcc -m32" ./configure \
|
---|
[70aadfb] | 130 | --host=i686-pc-linux-gnu \
|
---|
[6dfcfecc] | 131 | --prefix=/usr \
|
---|
[70aadfb] | 132 | --libdir=/usr/lib32 \
|
---|
[6dfcfecc] | 133 | --sysconfdir=/etc \
|
---|
[9282602] | 134 | --with-openssl \
|
---|
[6dfcfecc] | 135 | --with-xz \
|
---|
[9ea5b3d] | 136 | --with-zstd \
|
---|
[6dfcfecc] | 137 | --with-zlib \
|
---|
[b9178d32] | 138 | --disable-manpages \
|
---|
[0ebda11] | 139 | --with-rootlibdir=/usr/lib32</userinput></screen>
|
---|
[b3f1ebb3] | 140 |
|
---|
| 141 | <para>Compile the package:</para>
|
---|
| 142 |
|
---|
| 143 | <screen><userinput remap="make">make</userinput></screen>
|
---|
| 144 |
|
---|
| 145 | <para>Install the package:</para>
|
---|
| 146 |
|
---|
| 147 | <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install
|
---|
[0ebda11] | 148 | cp -Rv DESTDIR/usr/lib32/* /usr/lib32
|
---|
[b3f1ebb3] | 149 | rm -rf DESTDIR</userinput></screen>
|
---|
| 150 |
|
---|
[6dfcfecc] | 151 | </sect2><!-- m32 -->
|
---|
[b3f1ebb3] | 152 |
|
---|
[6dfcfecc] | 153 | <!-- - - - - - - - - - -->
|
---|
| 154 | <!-- Multilib - x32bit -->
|
---|
| 155 | <!-- - - - - - - - - - -->
|
---|
[fd48baa] | 156 |
|
---|
| 157 | <sect2 arch="ml_x32,ml_all" role="installation">
|
---|
[6dfcfecc] | 158 | <title>Installation of Kmod - x32bit</title>
|
---|
[b3f1ebb3] | 159 |
|
---|
[6dfcfecc] | 160 | <para>Clean previous build but keep man pages as they cannot
|
---|
| 161 | be recreated since xsltproc isn't installed yet:</para>
|
---|
[b3f1ebb3] | 162 |
|
---|
[6dfcfecc] | 163 | <screen><userinput remap="pre">sed -e "s/^CLEANFILES =.*/CLEANFILES =/" -i man/Makefile
|
---|
[b3f1ebb3] | 164 | make clean</userinput></screen>
|
---|
| 165 |
|
---|
| 166 | <para>Prepare Kmod for compilation:</para>
|
---|
| 167 |
|
---|
[6dfcfecc] | 168 | <screen><userinput remap="configure">CC="gcc -mx32" ./configure \
|
---|
[70aadfb] | 169 | --host=x86_64-pc-linux-gnux32 \
|
---|
[b3f1ebb3] | 170 | --prefix=/usr \
|
---|
[0ebda11] | 171 | --libdir=/usr/libx32 \
|
---|
[b3f1ebb3] | 172 | --sysconfdir=/etc \
|
---|
[9282602] | 173 | --with-openssl \
|
---|
[b3f1ebb3] | 174 | --with-xz \
|
---|
[9ea5b3d] | 175 | --with-zstd \
|
---|
[b3f1ebb3] | 176 | --with-zlib \
|
---|
[b9178d32] | 177 | --disable-manpages \
|
---|
[0ebda11] | 178 | --with-rootlibdir=/usr/libx32</userinput></screen>
|
---|
[b3f1ebb3] | 179 |
|
---|
| 180 | <para>Compile the package:</para>
|
---|
| 181 |
|
---|
| 182 | <screen><userinput remap="make">make</userinput></screen>
|
---|
| 183 |
|
---|
| 184 | <para>Install the package:</para>
|
---|
| 185 |
|
---|
| 186 | <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install
|
---|
[0ebda11] | 187 | cp -Rv DESTDIR/usr/libx32/* /usr/libx32
|
---|
[b3f1ebb3] | 188 | rm -rf DESTDIR</userinput></screen>
|
---|
| 189 |
|
---|
[6dfcfecc] | 190 | </sect2><!-- mx32 -->
|
---|
[b3f1ebb3] | 191 |
|
---|
[2442205] | 192 | <sect2 id="contents-kmod" role="content">
|
---|
| 193 | <title>Contents of Kmod</title>
|
---|
| 194 |
|
---|
| 195 | <segmentedlist>
|
---|
| 196 | <segtitle>Installed programs</segtitle>
|
---|
[1d6f204] | 197 | <segtitle>Installed library</segtitle>
|
---|
[2442205] | 198 |
|
---|
| 199 | <seglistitem>
|
---|
[d672ab7] | 200 | <seg>depmod (link to kmod), insmod (link to kmod), kmod,
|
---|
[2442205] | 201 | lsmod (link to kmod), modinfo (link to kmod), modprobe (link to kmod),
|
---|
| 202 | and rmmod (link to kmod)</seg>
|
---|
[5aabbac4] | 203 | <seg>libkmod.so</seg>
|
---|
[2442205] | 204 | </seglistitem>
|
---|
| 205 | </segmentedlist>
|
---|
| 206 |
|
---|
| 207 | <variablelist>
|
---|
| 208 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 209 | <?dbfo list-presentation="list"?>
|
---|
| 210 | <?dbhtml list-presentation="table"?>
|
---|
| 211 |
|
---|
| 212 | <varlistentry id="depmod">
|
---|
| 213 | <term><command>depmod</command></term>
|
---|
| 214 | <listitem>
|
---|
| 215 | <para>Creates a dependency file based on the symbols it finds in the
|
---|
| 216 | existing set of modules; this dependency file is used by
|
---|
| 217 | <command>modprobe</command> to automatically load the required
|
---|
| 218 | modules</para>
|
---|
| 219 | <indexterm zone="ch-system-kmod depmod">
|
---|
| 220 | <primary sortas="b-depmod">depmod</primary>
|
---|
| 221 | </indexterm>
|
---|
| 222 | </listitem>
|
---|
| 223 | </varlistentry>
|
---|
| 224 |
|
---|
| 225 | <varlistentry id="insmod">
|
---|
| 226 | <term><command>insmod</command></term>
|
---|
| 227 | <listitem>
|
---|
| 228 | <para>Installs a loadable module in the running kernel</para>
|
---|
| 229 | <indexterm zone="ch-system-kmod insmod">
|
---|
| 230 | <primary sortas="b-insmod">insmod</primary>
|
---|
| 231 | </indexterm>
|
---|
| 232 | </listitem>
|
---|
| 233 | </varlistentry>
|
---|
| 234 |
|
---|
| 235 | <varlistentry id="kmod">
|
---|
| 236 | <term><command>kmod</command></term>
|
---|
| 237 | <listitem>
|
---|
| 238 | <para>Loads and unloads kernel modules</para>
|
---|
| 239 | <indexterm zone="ch-system-kmod kmod">
|
---|
| 240 | <primary sortas="b-kmod">kmod</primary>
|
---|
| 241 | </indexterm>
|
---|
| 242 | </listitem>
|
---|
| 243 | </varlistentry>
|
---|
| 244 |
|
---|
| 245 | <varlistentry id="lsmod">
|
---|
| 246 | <term><command>lsmod</command></term>
|
---|
| 247 | <listitem>
|
---|
| 248 | <para>Lists currently loaded modules</para>
|
---|
| 249 | <indexterm zone="ch-system-kmod lsmod">
|
---|
| 250 | <primary sortas="b-lsmod">lsmod</primary>
|
---|
| 251 | </indexterm>
|
---|
| 252 | </listitem>
|
---|
| 253 | </varlistentry>
|
---|
| 254 |
|
---|
| 255 | <varlistentry id="modinfo">
|
---|
| 256 | <term><command>modinfo</command></term>
|
---|
| 257 | <listitem>
|
---|
| 258 | <para>Examines an object file associated with a kernel module and
|
---|
| 259 | displays any information that it can glean</para>
|
---|
| 260 | <indexterm zone="ch-system-kmod modinfo">
|
---|
| 261 | <primary sortas="b-modinfo">modinfo</primary>
|
---|
| 262 | </indexterm>
|
---|
| 263 | </listitem>
|
---|
| 264 | </varlistentry>
|
---|
| 265 |
|
---|
| 266 | <varlistentry id="modprobe">
|
---|
| 267 | <term><command>modprobe</command></term>
|
---|
| 268 | <listitem>
|
---|
| 269 | <para>Uses a dependency file, created by
|
---|
| 270 | <command>depmod</command>, to automatically load relevant modules</para>
|
---|
| 271 | <indexterm zone="ch-system-kmod modprobe">
|
---|
| 272 | <primary sortas="b-modprobe">modprobe</primary>
|
---|
| 273 | </indexterm>
|
---|
| 274 | </listitem>
|
---|
| 275 | </varlistentry>
|
---|
| 276 |
|
---|
| 277 | <varlistentry id="rmmod">
|
---|
| 278 | <term><command>rmmod</command></term>
|
---|
| 279 | <listitem>
|
---|
| 280 | <para>Unloads modules from the running kernel</para>
|
---|
| 281 | <indexterm zone="ch-system-kmod rmmod">
|
---|
| 282 | <primary sortas="b-rmmod">rmmod</primary>
|
---|
| 283 | </indexterm>
|
---|
| 284 | </listitem>
|
---|
| 285 | </varlistentry>
|
---|
| 286 |
|
---|
[5aabbac4] | 287 | <varlistentry id="libkmod">
|
---|
| 288 | <term><filename class="libraryfile">libkmod</filename></term>
|
---|
| 289 | <listitem>
|
---|
| 290 | <para>This library is used by other programs to load and unload kernel
|
---|
| 291 | modules</para>
|
---|
| 292 | <indexterm zone="ch-system-kmod">
|
---|
| 293 | <primary sortas="c-libkmod">libkmod</primary>
|
---|
| 294 | </indexterm>
|
---|
| 295 | </listitem>
|
---|
| 296 | </varlistentry>
|
---|
| 297 |
|
---|
[2442205] | 298 | </variablelist>
|
---|
| 299 |
|
---|
| 300 | </sect2>
|
---|
| 301 |
|
---|
| 302 | </sect1>
|
---|
| 303 |
|
---|