[2442205] | 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>
|
---|
[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 |
|
---|
[17c46c2] | 46 | <screen><userinput remap="configure">./configure --prefix=/usr \
|
---|
| 47 | --sysconfdir=/etc \
|
---|
| 48 | --with-xz \
|
---|
[edd83dc] | 49 | --with-zstd \
|
---|
[9f5aaf7] | 50 | --with-zlib</userinput></screen>
|
---|
[2442205] | 51 |
|
---|
| 52 | <variablelist>
|
---|
| 53 | <title>The meaning of the configure options:</title>
|
---|
| 54 |
|
---|
| 55 | <varlistentry>
|
---|
[edd83dc] | 56 | <term><parameter>--with-xz, --with-zlib, --with-zstd</parameter></term>
|
---|
[2442205] | 57 | <listitem>
|
---|
[0844c14] | 58 | <para>These options enable Kmod to handle compressed kernel modules.</para>
|
---|
[2442205] | 59 | </listitem>
|
---|
[a4d96cea] | 60 | </varlistentry>
|
---|
[aa976fe] | 61 |
|
---|
[2442205] | 62 | </variablelist>
|
---|
| 63 |
|
---|
| 64 | <para>Compile the package:</para>
|
---|
| 65 |
|
---|
| 66 | <screen><userinput remap="make">make</userinput></screen>
|
---|
| 67 |
|
---|
[fd162f6] | 68 | <para>This package does not come with a test suite that can be run in the
|
---|
| 69 | LFS chroot environment. At a minimum the git program is required and
|
---|
| 70 | several tests will not run outside of a git repository. </para>
|
---|
| 71 |
|
---|
[6dfcfecc] | 72 | <para>Install the package and create symlinks for
|
---|
[e043985] | 73 | compatibility with Module-Init-Tools (the package that previously handled
|
---|
[fba870f] | 74 | Linux kernel modules):</para>
|
---|
[2442205] | 75 |
|
---|
[4ea67ff] | 76 | <screen><userinput remap="install">make install
|
---|
[9f5aaf7] | 77 |
|
---|
[c31e35b] | 78 | for target in depmod insmod modinfo modprobe rmmod; do
|
---|
[e3471c8] | 79 | ln -sfv ../bin/kmod /usr/sbin/$target
|
---|
[2442205] | 80 | done
|
---|
[9f5aaf7] | 81 |
|
---|
[dc90d888] | 82 | ln -sfv kmod /usr/bin/lsmod</userinput></screen>
|
---|
[2442205] | 83 |
|
---|
| 84 | </sect2>
|
---|
| 85 |
|
---|
[6dfcfecc] | 86 | <!-- - - - - - - - - - -->
|
---|
| 87 | <!-- Multilib - 32bit -->
|
---|
| 88 | <!-- - - - - - - - - - -->
|
---|
[fd48baa] | 89 |
|
---|
| 90 | <sect2 arch="ml_32,ml_all" role="installation">
|
---|
[6dfcfecc] | 91 | <title>Installation of Kmod - 32bit</title>
|
---|
[b3f1ebb3] | 92 |
|
---|
[6dfcfecc] | 93 | <para>Clean previous build but keep man pages as they cannot
|
---|
| 94 | be recreated since xsltproc isn't installed yet:</para>
|
---|
[b3f1ebb3] | 95 |
|
---|
[6dfcfecc] | 96 | <screen><userinput remap="pre">sed -e "s/^CLEANFILES =.*/CLEANFILES =/" -i man/Makefile
|
---|
[b3f1ebb3] | 97 | make clean</userinput></screen>
|
---|
| 98 |
|
---|
| 99 | <para>Prepare Kmod for compilation:</para>
|
---|
| 100 |
|
---|
[6dfcfecc] | 101 | <screen><userinput remap="configure">CC="gcc -m32" ./configure \
|
---|
[70aadfb] | 102 | --host=i686-pc-linux-gnu \
|
---|
[6dfcfecc] | 103 | --prefix=/usr \
|
---|
[70aadfb] | 104 | --libdir=/usr/lib32 \
|
---|
[6dfcfecc] | 105 | --sysconfdir=/etc \
|
---|
| 106 | --with-xz \
|
---|
| 107 | --with-zlib \
|
---|
[0ebda11] | 108 | --with-rootlibdir=/usr/lib32</userinput></screen>
|
---|
[b3f1ebb3] | 109 |
|
---|
| 110 | <para>Compile the package:</para>
|
---|
| 111 |
|
---|
| 112 | <screen><userinput remap="make">make</userinput></screen>
|
---|
| 113 |
|
---|
| 114 | <para>Install the package:</para>
|
---|
| 115 |
|
---|
| 116 | <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install
|
---|
[0ebda11] | 117 | cp -Rv DESTDIR/usr/lib32/* /usr/lib32
|
---|
[b3f1ebb3] | 118 | rm -rf DESTDIR</userinput></screen>
|
---|
| 119 |
|
---|
[6dfcfecc] | 120 | </sect2><!-- m32 -->
|
---|
[b3f1ebb3] | 121 |
|
---|
[6dfcfecc] | 122 | <!-- - - - - - - - - - -->
|
---|
| 123 | <!-- Multilib - x32bit -->
|
---|
| 124 | <!-- - - - - - - - - - -->
|
---|
[fd48baa] | 125 |
|
---|
| 126 | <sect2 arch="ml_x32,ml_all" role="installation">
|
---|
[6dfcfecc] | 127 | <title>Installation of Kmod - x32bit</title>
|
---|
[b3f1ebb3] | 128 |
|
---|
[6dfcfecc] | 129 | <para>Clean previous build but keep man pages as they cannot
|
---|
| 130 | be recreated since xsltproc isn't installed yet:</para>
|
---|
[b3f1ebb3] | 131 |
|
---|
[6dfcfecc] | 132 | <screen><userinput remap="pre">sed -e "s/^CLEANFILES =.*/CLEANFILES =/" -i man/Makefile
|
---|
[b3f1ebb3] | 133 | make clean</userinput></screen>
|
---|
| 134 |
|
---|
| 135 | <para>Prepare Kmod for compilation:</para>
|
---|
| 136 |
|
---|
[6dfcfecc] | 137 | <screen><userinput remap="configure">CC="gcc -mx32" ./configure \
|
---|
[70aadfb] | 138 | --host=x86_64-pc-linux-gnux32 \
|
---|
[b3f1ebb3] | 139 | --prefix=/usr \
|
---|
[0ebda11] | 140 | --libdir=/usr/libx32 \
|
---|
[b3f1ebb3] | 141 | --sysconfdir=/etc \
|
---|
| 142 | --with-xz \
|
---|
| 143 | --with-zlib \
|
---|
[0ebda11] | 144 | --with-rootlibdir=/usr/libx32</userinput></screen>
|
---|
[b3f1ebb3] | 145 |
|
---|
| 146 | <para>Compile the package:</para>
|
---|
| 147 |
|
---|
| 148 | <screen><userinput remap="make">make</userinput></screen>
|
---|
| 149 |
|
---|
| 150 | <para>Install the package:</para>
|
---|
| 151 |
|
---|
| 152 | <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install
|
---|
[0ebda11] | 153 | cp -Rv DESTDIR/usr/libx32/* /usr/libx32
|
---|
[b3f1ebb3] | 154 | rm -rf DESTDIR</userinput></screen>
|
---|
| 155 |
|
---|
[6dfcfecc] | 156 | </sect2><!-- mx32 -->
|
---|
[b3f1ebb3] | 157 |
|
---|
[2442205] | 158 | <sect2 id="contents-kmod" role="content">
|
---|
| 159 | <title>Contents of Kmod</title>
|
---|
| 160 |
|
---|
| 161 | <segmentedlist>
|
---|
| 162 | <segtitle>Installed programs</segtitle>
|
---|
[1d6f204] | 163 | <segtitle>Installed library</segtitle>
|
---|
[2442205] | 164 |
|
---|
| 165 | <seglistitem>
|
---|
[b5b97081] | 166 | <seg>depmod (link to kmod), insmod (link to kmod), kmod,
|
---|
[2442205] | 167 | lsmod (link to kmod), modinfo (link to kmod), modprobe (link to kmod),
|
---|
| 168 | and rmmod (link to kmod)</seg>
|
---|
[5aabbac4] | 169 | <seg>libkmod.so</seg>
|
---|
[2442205] | 170 | </seglistitem>
|
---|
| 171 | </segmentedlist>
|
---|
| 172 |
|
---|
| 173 | <variablelist>
|
---|
| 174 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 175 | <?dbfo list-presentation="list"?>
|
---|
| 176 | <?dbhtml list-presentation="table"?>
|
---|
| 177 |
|
---|
| 178 | <varlistentry id="depmod">
|
---|
| 179 | <term><command>depmod</command></term>
|
---|
| 180 | <listitem>
|
---|
| 181 | <para>Creates a dependency file based on the symbols it finds in the
|
---|
| 182 | existing set of modules; this dependency file is used by
|
---|
| 183 | <command>modprobe</command> to automatically load the required
|
---|
| 184 | modules</para>
|
---|
| 185 | <indexterm zone="ch-system-kmod depmod">
|
---|
| 186 | <primary sortas="b-depmod">depmod</primary>
|
---|
| 187 | </indexterm>
|
---|
| 188 | </listitem>
|
---|
| 189 | </varlistentry>
|
---|
| 190 |
|
---|
| 191 | <varlistentry id="insmod">
|
---|
| 192 | <term><command>insmod</command></term>
|
---|
| 193 | <listitem>
|
---|
| 194 | <para>Installs a loadable module in the running kernel</para>
|
---|
| 195 | <indexterm zone="ch-system-kmod insmod">
|
---|
| 196 | <primary sortas="b-insmod">insmod</primary>
|
---|
| 197 | </indexterm>
|
---|
| 198 | </listitem>
|
---|
| 199 | </varlistentry>
|
---|
| 200 |
|
---|
| 201 | <varlistentry id="kmod">
|
---|
| 202 | <term><command>kmod</command></term>
|
---|
| 203 | <listitem>
|
---|
| 204 | <para>Loads and unloads kernel modules</para>
|
---|
| 205 | <indexterm zone="ch-system-kmod kmod">
|
---|
| 206 | <primary sortas="b-kmod">kmod</primary>
|
---|
| 207 | </indexterm>
|
---|
| 208 | </listitem>
|
---|
| 209 | </varlistentry>
|
---|
| 210 |
|
---|
| 211 | <varlistentry id="lsmod">
|
---|
| 212 | <term><command>lsmod</command></term>
|
---|
| 213 | <listitem>
|
---|
| 214 | <para>Lists currently loaded modules</para>
|
---|
| 215 | <indexterm zone="ch-system-kmod lsmod">
|
---|
| 216 | <primary sortas="b-lsmod">lsmod</primary>
|
---|
| 217 | </indexterm>
|
---|
| 218 | </listitem>
|
---|
| 219 | </varlistentry>
|
---|
| 220 |
|
---|
| 221 | <varlistentry id="modinfo">
|
---|
| 222 | <term><command>modinfo</command></term>
|
---|
| 223 | <listitem>
|
---|
| 224 | <para>Examines an object file associated with a kernel module and
|
---|
| 225 | displays any information that it can glean</para>
|
---|
| 226 | <indexterm zone="ch-system-kmod modinfo">
|
---|
| 227 | <primary sortas="b-modinfo">modinfo</primary>
|
---|
| 228 | </indexterm>
|
---|
| 229 | </listitem>
|
---|
| 230 | </varlistentry>
|
---|
| 231 |
|
---|
| 232 | <varlistentry id="modprobe">
|
---|
| 233 | <term><command>modprobe</command></term>
|
---|
| 234 | <listitem>
|
---|
| 235 | <para>Uses a dependency file, created by
|
---|
| 236 | <command>depmod</command>, to automatically load relevant modules</para>
|
---|
| 237 | <indexterm zone="ch-system-kmod modprobe">
|
---|
| 238 | <primary sortas="b-modprobe">modprobe</primary>
|
---|
| 239 | </indexterm>
|
---|
| 240 | </listitem>
|
---|
| 241 | </varlistentry>
|
---|
| 242 |
|
---|
| 243 | <varlistentry id="rmmod">
|
---|
| 244 | <term><command>rmmod</command></term>
|
---|
| 245 | <listitem>
|
---|
| 246 | <para>Unloads modules from the running kernel</para>
|
---|
| 247 | <indexterm zone="ch-system-kmod rmmod">
|
---|
| 248 | <primary sortas="b-rmmod">rmmod</primary>
|
---|
| 249 | </indexterm>
|
---|
| 250 | </listitem>
|
---|
| 251 | </varlistentry>
|
---|
| 252 |
|
---|
[5aabbac4] | 253 | <varlistentry id="libkmod">
|
---|
| 254 | <term><filename class="libraryfile">libkmod</filename></term>
|
---|
| 255 | <listitem>
|
---|
| 256 | <para>This library is used by other programs to load and unload kernel
|
---|
| 257 | modules</para>
|
---|
| 258 | <indexterm zone="ch-system-kmod">
|
---|
| 259 | <primary sortas="c-libkmod">libkmod</primary>
|
---|
| 260 | </indexterm>
|
---|
| 261 | </listitem>
|
---|
| 262 | </varlistentry>
|
---|
| 263 |
|
---|
[2442205] | 264 | </variablelist>
|
---|
| 265 |
|
---|
| 266 | </sect2>
|
---|
| 267 |
|
---|
| 268 | </sect1>
|
---|
| 269 |
|
---|