source: chapter06/kmod.xml@ 2925b3c

7.5-systemd 7.6-systemd 7.7-systemd 7.8-systemd 7.9-systemd
Last change on this file since 2925b3c was 2925b3c, checked in by Krejzi <krejzi@…>, 10 years ago

Merge some minor stuff from LFS, remove unnecesary command from dbus command explanations and misc fixes.

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/systemd/BOOK@10492 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 6.6 KB
Line 
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
46<screen><userinput remap="configure">./configure --prefix=/usr \
47 --bindir=/bin \
48 --sysconfdir=/etc \
49 --with-rootlibdir=/lib \
50 --disable-manpages \
51 --with-xz \
52 --with-zlib</userinput></screen>
53
54 <variablelist>
55 <title>The meaning of the configure options:</title>
56
57 <varlistentry>
58 <term><parameter>--with-xz, --with-zlib</parameter></term>
59 <listitem>
60 <para>These options enable Kmod to handle compressed kernel modules.</para>
61 </listitem>
62 </varlistentry>
63
64 <varlistentry>
65 <term><parameter>--disable-manpages</parameter></term>
66 <listitem>
67 <para>This option prevents the man pages from being built, as they
68 rely on libxslt, which isn't available in the chroot
69 environment.</para>
70 </listitem>
71 </varlistentry>
72
73 <varlistentry>
74 <term><parameter>--with-rootlibdir=/lib</parameter></term>
75 <listitem>
76 <para>This option ensures different library related files are placed
77 in the correct directories.</para>
78 </listitem>
79 </varlistentry>
80
81 </variablelist>
82
83 <para>Compile the package:</para>
84
85<screen><userinput remap="make">make</userinput></screen>
86
87 <para>To test the results, issue:</para>
88
89<screen><userinput remap="test">make check</userinput></screen>
90
91 <para>Install the package, man pages, and create symlinks for
92 compatibility with Module-Init-Tools (the package that previously handled
93 Linux kernel modules). Also make sure that all libraries are in the
94 correct directory: </para>
95
96<screen><userinput remap="install">make install
97make -C man install
98
99for target in depmod insmod modinfo modprobe rmmod; do
100 ln -sv ../bin/kmod /sbin/$target
101done
102
103ln -sv kmod /bin/lsmod</userinput></screen>
104
105 </sect2>
106
107 <sect2 id="contents-kmod" role="content">
108 <title>Contents of Kmod</title>
109
110 <segmentedlist>
111 <segtitle>Installed programs</segtitle>
112 <segtitle>Installed libraries</segtitle>
113
114 <seglistitem>
115 <seg>depmod (link to kmod), insmod (link to kmod), kmod,
116 lsmod (link to kmod), modinfo (link to kmod), modprobe (link to kmod),
117 and rmmod (link to kmod)</seg>
118 <seg>libkmod.so</seg>
119 </seglistitem>
120 </segmentedlist>
121
122 <variablelist>
123 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
124 <?dbfo list-presentation="list"?>
125 <?dbhtml list-presentation="table"?>
126
127 <varlistentry id="depmod">
128 <term><command>depmod</command></term>
129 <listitem>
130 <para>Creates a dependency file based on the symbols it finds in the
131 existing set of modules; this dependency file is used by
132 <command>modprobe</command> to automatically load the required
133 modules</para>
134 <indexterm zone="ch-system-kmod depmod">
135 <primary sortas="b-depmod">depmod</primary>
136 </indexterm>
137 </listitem>
138 </varlistentry>
139
140 <varlistentry id="insmod">
141 <term><command>insmod</command></term>
142 <listitem>
143 <para>Installs a loadable module in the running kernel</para>
144 <indexterm zone="ch-system-kmod insmod">
145 <primary sortas="b-insmod">insmod</primary>
146 </indexterm>
147 </listitem>
148 </varlistentry>
149
150 <varlistentry id="kmod">
151 <term><command>kmod</command></term>
152 <listitem>
153 <para>Loads and unloads kernel modules</para>
154 <indexterm zone="ch-system-kmod kmod">
155 <primary sortas="b-kmod">kmod</primary>
156 </indexterm>
157 </listitem>
158 </varlistentry>
159
160 <varlistentry id="lsmod">
161 <term><command>lsmod</command></term>
162 <listitem>
163 <para>Lists currently loaded modules</para>
164 <indexterm zone="ch-system-kmod lsmod">
165 <primary sortas="b-lsmod">lsmod</primary>
166 </indexterm>
167 </listitem>
168 </varlistentry>
169
170 <varlistentry id="modinfo">
171 <term><command>modinfo</command></term>
172 <listitem>
173 <para>Examines an object file associated with a kernel module and
174 displays any information that it can glean</para>
175 <indexterm zone="ch-system-kmod modinfo">
176 <primary sortas="b-modinfo">modinfo</primary>
177 </indexterm>
178 </listitem>
179 </varlistentry>
180
181 <varlistentry id="modprobe">
182 <term><command>modprobe</command></term>
183 <listitem>
184 <para>Uses a dependency file, created by
185 <command>depmod</command>, to automatically load relevant modules</para>
186 <indexterm zone="ch-system-kmod modprobe">
187 <primary sortas="b-modprobe">modprobe</primary>
188 </indexterm>
189 </listitem>
190 </varlistentry>
191
192 <varlistentry id="rmmod">
193 <term><command>rmmod</command></term>
194 <listitem>
195 <para>Unloads modules from the running kernel</para>
196 <indexterm zone="ch-system-kmod rmmod">
197 <primary sortas="b-rmmod">rmmod</primary>
198 </indexterm>
199 </listitem>
200 </varlistentry>
201
202 <varlistentry id="libkmod">
203 <term><filename class="libraryfile">libkmod</filename></term>
204 <listitem>
205 <para>This library is used by other programs to load and unload kernel
206 modules</para>
207 <indexterm zone="ch-system-kmod">
208 <primary sortas="c-libkmod">libkmod</primary>
209 </indexterm>
210 </listitem>
211 </varlistentry>
212
213 </variablelist>
214
215 </sect2>
216
217</sect1>
218
Note: See TracBrowser for help on using the repository browser.