Update installed programs for perl
[linux_from_scratch.git] / chapter06 / kmod.xml
blob6cc3eb168c8a83ec7b376acd8ffe7c47001d3e0e
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 ]>
8 <sect1 id="ch-system-kmod" role="wrap">
9   <?dbhtml filename="kmod.html"?>
11   <sect1info condition="script">
12     <productname>kmod</productname>
13     <productnumber>&kmod-version;</productnumber>
14     <address>&kmod-url;</address>
15   </sect1info>
17   <title>Kmod-&kmod-version;</title>
19   <indexterm zone="ch-system-kmod">
20     <primary sortas="a-Kmod">Kmod</primary>
21   </indexterm>
23   <sect2 role="package">
24     <title/>
26     <para>The Kmod package contains libraries and utilities for loading kernel
27     modules</para>
29     <segmentedlist>
30       <segtitle>&buildtime;</segtitle>
31       <segtitle>&diskspace;</segtitle>
33       <seglistitem>
34         <seg>&kmod-ch6-sbu;</seg>
35         <seg>&kmod-ch6-du;</seg>
36       </seglistitem>
37     </segmentedlist>
39   </sect2>
41   <sect2 role="installation">
42     <title>Installation of Kmod</title>
44     <para>Prepare Kmod for compilation:</para>
46 <screen><userinput remap="configure">./configure --prefix=/usr          \
47             --bindir=/bin          \
48             --sysconfdir=/etc      \
49             --with-rootlibdir=/lib \
50             --with-xz              \
51             --with-zlib</userinput></screen>
53     <variablelist>
54       <title>The meaning of the configure options:</title>
56       <varlistentry>
57         <term><parameter>--with-xz, --with-zlib</parameter></term>
58         <listitem>
59           <para>These options enable Kmod to handle compressed kernel modules.</para>
60         </listitem>
61       </varlistentry>
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>
71     </variablelist>
73     <para>Compile the package:</para>
75 <screen><userinput remap="make">make</userinput></screen>
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>
81 <!--
82     <para>To test the results, issue:</para>
84 <screen><userinput remap="test">make check</userinput></screen>
85 -->
86     <para>Install the package, and create symlinks for
87     compatibility with Module-Init-Tools (the package that previously handled
88     Linux kernel modules):</para>
90 <screen><userinput remap="install">make install
92 for target in depmod insmod lsmod modinfo modprobe rmmod; do
93   ln -sfv ../bin/kmod /sbin/$target
94 done
96 ln -sfv kmod /bin/lsmod</userinput></screen>
98   </sect2>
100   <sect2 id="contents-kmod" role="content">
101     <title>Contents of Kmod</title>
103     <segmentedlist>
104       <segtitle>Installed programs</segtitle>
105       <segtitle>Installed library</segtitle>
107       <seglistitem>
108         <seg>depmod (link to kmod), insmod (link to kmod), kmod, 
109         lsmod (link to kmod), modinfo (link to kmod), modprobe (link to kmod),
110         and rmmod (link to kmod)</seg>
111         <seg>libkmod.so</seg>
112       </seglistitem>
113     </segmentedlist>
115     <variablelist>
116       <bridgehead renderas="sect3">Short Descriptions</bridgehead>
117       <?dbfo list-presentation="list"?>
118       <?dbhtml list-presentation="table"?>
120       <varlistentry id="depmod">
121         <term><command>depmod</command></term>
122         <listitem>
123           <para>Creates a dependency file based on the symbols it finds in the
124           existing set of modules; this dependency file is used by
125           <command>modprobe</command> to automatically load the required
126           modules</para>
127           <indexterm zone="ch-system-kmod depmod">
128             <primary sortas="b-depmod">depmod</primary>
129           </indexterm>
130         </listitem>
131       </varlistentry>
133       <varlistentry id="insmod">
134         <term><command>insmod</command></term>
135         <listitem>
136           <para>Installs a loadable module in the running kernel</para>
137           <indexterm zone="ch-system-kmod insmod">
138             <primary sortas="b-insmod">insmod</primary>
139           </indexterm>
140         </listitem>
141       </varlistentry>
143       <varlistentry id="kmod">
144         <term><command>kmod</command></term>
145         <listitem>
146           <para>Loads and unloads kernel modules</para>
147           <indexterm zone="ch-system-kmod kmod">
148             <primary sortas="b-kmod">kmod</primary>
149           </indexterm>
150         </listitem>
151       </varlistentry>
153       <varlistentry id="lsmod">
154         <term><command>lsmod</command></term>
155         <listitem>
156           <para>Lists currently loaded modules</para>
157           <indexterm zone="ch-system-kmod lsmod">
158             <primary sortas="b-lsmod">lsmod</primary>
159           </indexterm>
160         </listitem>
161       </varlistentry>
163       <varlistentry id="modinfo">
164         <term><command>modinfo</command></term>
165         <listitem>
166           <para>Examines an object file associated with a kernel module and
167           displays any information that it can glean</para>
168           <indexterm zone="ch-system-kmod modinfo">
169             <primary sortas="b-modinfo">modinfo</primary>
170           </indexterm>
171         </listitem>
172       </varlistentry>
174       <varlistentry id="modprobe">
175         <term><command>modprobe</command></term>
176         <listitem>
177           <para>Uses a dependency file, created by
178           <command>depmod</command>, to automatically load relevant modules</para>
179           <indexterm zone="ch-system-kmod modprobe">
180             <primary sortas="b-modprobe">modprobe</primary>
181           </indexterm>
182         </listitem>
183       </varlistentry>
185       <varlistentry id="rmmod">
186         <term><command>rmmod</command></term>
187         <listitem>
188           <para>Unloads modules from the running kernel</para>
189           <indexterm zone="ch-system-kmod rmmod">
190             <primary sortas="b-rmmod">rmmod</primary>
191           </indexterm>
192         </listitem>
193       </varlistentry>
195       <varlistentry id="libkmod">
196         <term><filename class="libraryfile">libkmod</filename></term>
197         <listitem>
198           <para>This library is used by other programs to load and unload kernel
199            modules</para>
200           <indexterm zone="ch-system-kmod">
201             <primary sortas="c-libkmod">libkmod</primary>
202           </indexterm>
203         </listitem>
204       </varlistentry>
206     </variablelist>
208   </sect2>
210 </sect1>