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