source: chapter06/kmod.xml@ f365e1e

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 7.1 7.2 7.3 7.4 7.5 7.5-systemd 7.6 7.6-systemd 7.7 7.7-systemd 7.8 7.8-systemd 7.9 7.9-systemd 8.0 8.1 8.2 8.3 8.4 9.0 9.1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since f365e1e was f365e1e, checked in by Matthew Burgess <matthew@…>, 12 years ago

Install Kmod's and Xz's pkgconfig files in the correct location.

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

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