[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 |
|
---|
[3380af3] | 46 | <screen><userinput remap="configure">liblzma_CFLAGS="-I/usr/include" \
|
---|
| 47 | liblzma_LIBS="-L/lib -llzma" \
|
---|
[3d6999c] | 48 | zlib_CFLAGS="-I/usr/include" \
|
---|
[3380af3] | 49 | zlib_LIBS="-L/lib -lz" \
|
---|
[9f5aaf7] | 50 | ./configure --prefix=/usr \
|
---|
| 51 | --bindir=/bin \
|
---|
| 52 | --libdir=/lib \
|
---|
| 53 | --sysconfdir=/etc \
|
---|
| 54 | --with-xz \
|
---|
| 55 | --with-zlib</userinput></screen>
|
---|
[2442205] | 56 |
|
---|
| 57 | <variablelist>
|
---|
| 58 | <title>The meaning of the configure options:</title>
|
---|
| 59 |
|
---|
| 60 | <varlistentry>
|
---|
| 61 | <term><parameter>lib* and --with-*</parameter></term>
|
---|
| 62 | <listitem>
|
---|
| 63 | <para>These options enable Kmod to handle compressed kernel modules.
|
---|
| 64 | The shell variables are required in order for the xz and zlib headers
|
---|
| 65 | and libraries to be found in the absence of pkg-config.</para>
|
---|
| 66 | </listitem>
|
---|
| 67 | </varlistentry>
|
---|
| 68 |
|
---|
| 69 | </variablelist>
|
---|
| 70 |
|
---|
| 71 | <para>Compile the package:</para>
|
---|
| 72 |
|
---|
| 73 | <screen><userinput remap="make">make</userinput></screen>
|
---|
| 74 |
|
---|
| 75 | <para>To test the results, issue:</para>
|
---|
| 76 |
|
---|
[661b744] | 77 | <screen><userinput remap="test">make check</userinput></screen>
|
---|
[2442205] | 78 |
|
---|
| 79 | <para>Install the package, and create symlinks for compatibility with
|
---|
| 80 | Module-Init-Tools, the package that previously handled Linux kernel modules:
|
---|
| 81 | </para>
|
---|
| 82 |
|
---|
[f365e1e] | 83 | <screen><userinput remap="install">make pkgconfigdir=/usr/lib/pkgconfig install
|
---|
[9f5aaf7] | 84 |
|
---|
[9a4c854] | 85 | for target in depmod insmod modinfo modprobe rmmod; do
|
---|
[2442205] | 86 | ln -sv ../bin/kmod /sbin/$target
|
---|
| 87 | done
|
---|
[9f5aaf7] | 88 |
|
---|
[2442205] | 89 | ln -sv kmod /bin/lsmod</userinput></screen>
|
---|
| 90 |
|
---|
| 91 | </sect2>
|
---|
| 92 |
|
---|
| 93 | <sect2 id="contents-kmod" role="content">
|
---|
| 94 | <title>Contents of Kmod</title>
|
---|
| 95 |
|
---|
| 96 | <segmentedlist>
|
---|
| 97 | <segtitle>Installed programs</segtitle>
|
---|
| 98 | <segtitle>Installed libraries</segtitle>
|
---|
| 99 |
|
---|
| 100 | <seglistitem>
|
---|
| 101 | <seg>depmod (link to kmod), insmod (link to kmod), kmod, kmod-nolib,
|
---|
| 102 | lsmod (link to kmod), modinfo (link to kmod), modprobe (link to kmod),
|
---|
| 103 | and rmmod (link to kmod)</seg>
|
---|
| 104 | <seg>/lib/kmod.so</seg>
|
---|
| 105 | </seglistitem>
|
---|
| 106 | </segmentedlist>
|
---|
| 107 |
|
---|
| 108 | <variablelist>
|
---|
| 109 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 110 | <?dbfo list-presentation="list"?>
|
---|
| 111 | <?dbhtml list-presentation="table"?>
|
---|
| 112 |
|
---|
| 113 | <varlistentry id="depmod">
|
---|
| 114 | <term><command>depmod</command></term>
|
---|
| 115 | <listitem>
|
---|
| 116 | <para>Creates a dependency file based on the symbols it finds in the
|
---|
| 117 | existing set of modules; this dependency file is used by
|
---|
| 118 | <command>modprobe</command> to automatically load the required
|
---|
| 119 | modules</para>
|
---|
| 120 | <indexterm zone="ch-system-kmod depmod">
|
---|
| 121 | <primary sortas="b-depmod">depmod</primary>
|
---|
| 122 | </indexterm>
|
---|
| 123 | </listitem>
|
---|
| 124 | </varlistentry>
|
---|
| 125 |
|
---|
| 126 | <varlistentry id="insmod">
|
---|
| 127 | <term><command>insmod</command></term>
|
---|
| 128 | <listitem>
|
---|
| 129 | <para>Installs a loadable module in the running kernel</para>
|
---|
| 130 | <indexterm zone="ch-system-kmod insmod">
|
---|
| 131 | <primary sortas="b-insmod">insmod</primary>
|
---|
| 132 | </indexterm>
|
---|
| 133 | </listitem>
|
---|
| 134 | </varlistentry>
|
---|
| 135 |
|
---|
| 136 | <varlistentry id="kmod">
|
---|
| 137 | <term><command>kmod</command></term>
|
---|
| 138 | <listitem>
|
---|
| 139 | <para>Loads and unloads kernel modules</para>
|
---|
| 140 | <indexterm zone="ch-system-kmod kmod">
|
---|
| 141 | <primary sortas="b-kmod">kmod</primary>
|
---|
| 142 | </indexterm>
|
---|
| 143 | </listitem>
|
---|
| 144 | </varlistentry>
|
---|
| 145 |
|
---|
| 146 | <varlistentry id="libkmod">
|
---|
| 147 | <term><filename class="libraryfile">libkmod</filename></term>
|
---|
| 148 | <listitem>
|
---|
| 149 | <para>This library is used by other programs to load and unload kernel
|
---|
| 150 | modules</para>
|
---|
| 151 | <indexterm zone="ch-system-kmod">
|
---|
| 152 | <primary sortas="c-libkmod">libkmod</primary>
|
---|
| 153 | </indexterm>
|
---|
| 154 | </listitem>
|
---|
| 155 | </varlistentry>
|
---|
| 156 |
|
---|
| 157 | <varlistentry id="lsmod">
|
---|
| 158 | <term><command>lsmod</command></term>
|
---|
| 159 | <listitem>
|
---|
| 160 | <para>Lists currently loaded modules</para>
|
---|
| 161 | <indexterm zone="ch-system-kmod lsmod">
|
---|
| 162 | <primary sortas="b-lsmod">lsmod</primary>
|
---|
| 163 | </indexterm>
|
---|
| 164 | </listitem>
|
---|
| 165 | </varlistentry>
|
---|
| 166 |
|
---|
| 167 | <varlistentry id="modinfo">
|
---|
| 168 | <term><command>modinfo</command></term>
|
---|
| 169 | <listitem>
|
---|
| 170 | <para>Examines an object file associated with a kernel module and
|
---|
| 171 | displays any information that it can glean</para>
|
---|
| 172 | <indexterm zone="ch-system-kmod modinfo">
|
---|
| 173 | <primary sortas="b-modinfo">modinfo</primary>
|
---|
| 174 | </indexterm>
|
---|
| 175 | </listitem>
|
---|
| 176 | </varlistentry>
|
---|
| 177 |
|
---|
| 178 | <varlistentry id="modprobe">
|
---|
| 179 | <term><command>modprobe</command></term>
|
---|
| 180 | <listitem>
|
---|
| 181 | <para>Uses a dependency file, created by
|
---|
| 182 | <command>depmod</command>, to automatically load relevant modules</para>
|
---|
| 183 | <indexterm zone="ch-system-kmod modprobe">
|
---|
| 184 | <primary sortas="b-modprobe">modprobe</primary>
|
---|
| 185 | </indexterm>
|
---|
| 186 | </listitem>
|
---|
| 187 | </varlistentry>
|
---|
| 188 |
|
---|
| 189 | <varlistentry id="rmmod">
|
---|
| 190 | <term><command>rmmod</command></term>
|
---|
| 191 | <listitem>
|
---|
| 192 | <para>Unloads modules from the running kernel</para>
|
---|
| 193 | <indexterm zone="ch-system-kmod rmmod">
|
---|
| 194 | <primary sortas="b-rmmod">rmmod</primary>
|
---|
| 195 | </indexterm>
|
---|
| 196 | </listitem>
|
---|
| 197 | </varlistentry>
|
---|
| 198 |
|
---|
| 199 | </variablelist>
|
---|
| 200 |
|
---|
| 201 | </sect2>
|
---|
| 202 |
|
---|
| 203 | </sect1>
|
---|
| 204 |
|
---|