[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>
|
---|
[fb386e0] | 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 |
|
---|
| 114 | <sect2 id="contents-kmod" role="content">
|
---|
| 115 | <title>Contents of Kmod</title>
|
---|
| 116 |
|
---|
| 117 | <segmentedlist>
|
---|
| 118 | <segtitle>Installed programs</segtitle>
|
---|
[1d6f204] | 119 | <segtitle>Installed library</segtitle>
|
---|
[2442205] | 120 |
|
---|
| 121 | <seglistitem>
|
---|
[d672ab7] | 122 | <seg>depmod (link to kmod), insmod (link to kmod), kmod,
|
---|
[2442205] | 123 | lsmod (link to kmod), modinfo (link to kmod), modprobe (link to kmod),
|
---|
| 124 | and rmmod (link to kmod)</seg>
|
---|
[5aabbac4] | 125 | <seg>libkmod.so</seg>
|
---|
[2442205] | 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 |
|
---|
[5aabbac4] | 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 |
|
---|
[2442205] | 220 | </variablelist>
|
---|
| 221 |
|
---|
| 222 | </sect2>
|
---|
| 223 |
|
---|
| 224 | </sect1>
|
---|
| 225 |
|
---|