mirror of
https://github.com/LCTT/LFS-BOOK-7.7-systemd.git
synced 2026-01-14 00:49:09 +00:00
318 lines
10 KiB
HTML
318 lines
10 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content=
|
|
"application/xhtml+xml; charset=utf-8" />
|
|
<title>
|
|
6.59. Kmod-19
|
|
</title>
|
|
<link rel="stylesheet" type="text/css" href="../stylesheets/lfs.css" />
|
|
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
|
|
<link rel="stylesheet" href="../stylesheets/lfs-print.css" type="text/css"
|
|
media="print" />
|
|
</head>
|
|
<body class="lfs" id="lfs-7.7-systemd">
|
|
<div class="navheader">
|
|
<h4>
|
|
Linux From Scratch - Version 7.7-systemd
|
|
</h4>
|
|
<h3>
|
|
Chapter 6. Installing Basic System Software
|
|
</h3>
|
|
<ul>
|
|
<li class="prev">
|
|
<a accesskey="p" href="kbd.html" title="Kbd-2.0.2">Prev</a>
|
|
<p>
|
|
Kbd-2.0.2
|
|
</p>
|
|
</li>
|
|
<li class="next">
|
|
<a accesskey="n" href="libpipeline.html" title=
|
|
"Libpipeline-1.4.0">Next</a>
|
|
<p>
|
|
Libpipeline-1.4.0
|
|
</p>
|
|
</li>
|
|
<li class="up">
|
|
<a accesskey="u" href="chapter06.html" title=
|
|
"Chapter 6. Installing Basic System Software">Up</a>
|
|
</li>
|
|
<li class="home">
|
|
<a accesskey="h" href="../index.html" title=
|
|
"Linux From Scratch - Version 7.7-systemd">Home</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="wrap" lang="en" xml:lang="en">
|
|
<h1 class="sect1">
|
|
<a id="ch-system-kmod" name="ch-system-kmod"></a>6.59. Kmod-19
|
|
</h1>
|
|
<div class="package" lang="en" xml:lang="en">
|
|
<p>
|
|
The Kmod package contains libraries and utilities for loading
|
|
kernel modules
|
|
</p>
|
|
<div class="segmentedlist">
|
|
<div class="seglistitem">
|
|
<div class="seg">
|
|
<strong class="segtitle">Approximate build time:</strong>
|
|
<span class="segbody">0.1 SBU</span>
|
|
</div>
|
|
<div class="seg">
|
|
<strong class="segtitle">Required disk space:</strong>
|
|
<span class="segbody">37 MB</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="installation" lang="en" xml:lang="en">
|
|
<h2 class="sect2">
|
|
6.59.1. Installation of Kmod
|
|
</h2>
|
|
<p>
|
|
Prepare Kmod for compilation:
|
|
</p>
|
|
<pre class="userinput">
|
|
<kbd class="command">./configure --prefix=/usr \
|
|
--bindir=/bin \
|
|
--sysconfdir=/etc \
|
|
--with-rootlibdir=/lib \
|
|
--with-xz \
|
|
--with-zlib</kbd>
|
|
</pre>
|
|
<div class="variablelist">
|
|
<p class="title">
|
|
<strong>The meaning of the configure options:</strong>
|
|
</p>
|
|
<dl class="variablelist">
|
|
<dt>
|
|
<span class="term"><em class="parameter"><code>--with-xz,
|
|
--with-zlib</code></em></span>
|
|
</dt>
|
|
<dd>
|
|
<p>
|
|
These options enable Kmod to handle compressed kernel
|
|
modules.
|
|
</p>
|
|
</dd>
|
|
<dt>
|
|
<span class="term"><em class=
|
|
"parameter"><code>--with-rootlibdir=/lib</code></em></span>
|
|
</dt>
|
|
<dd>
|
|
<p>
|
|
This option ensures different library related files are
|
|
placed in the correct directories.
|
|
</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<p>
|
|
Compile the package:
|
|
</p>
|
|
<pre class="userinput">
|
|
<kbd class="command">make</kbd>
|
|
</pre>
|
|
<p>
|
|
To test the results, issue:
|
|
</p>
|
|
<pre class="userinput">
|
|
<kbd class="command">make check</kbd>
|
|
</pre>
|
|
<p>
|
|
Install the package, and create symlinks for compatibility with
|
|
Module-Init-Tools (the package that previously handled Linux kernel
|
|
modules):
|
|
</p>
|
|
<pre class="userinput">
|
|
<kbd class="command">make install
|
|
|
|
for target in depmod insmod lsmod modinfo modprobe rmmod; do
|
|
ln -sv ../bin/kmod /sbin/$target
|
|
done
|
|
|
|
ln -sv kmod /bin/lsmod</kbd>
|
|
</pre>
|
|
</div>
|
|
<div class="content" lang="en" xml:lang="en">
|
|
<h2 class="sect2">
|
|
<a id="contents-kmod" name="contents-kmod"></a>6.59.2. Contents of
|
|
Kmod
|
|
</h2>
|
|
<div class="segmentedlist">
|
|
<div class="seglistitem">
|
|
<div class="seg">
|
|
<strong class="segtitle">Installed programs:</strong>
|
|
<span class="segbody">depmod (link to kmod), insmod (link to
|
|
kmod), kmod, lsmod (link to kmod), modinfo (link to kmod),
|
|
modprobe (link to kmod), and rmmod (link to kmod)</span>
|
|
</div>
|
|
<div class="seg">
|
|
<strong class="segtitle">Installed library:</strong>
|
|
<span class="segbody">libkmod.so</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="variablelist">
|
|
<h3>
|
|
Short Descriptions
|
|
</h3>
|
|
<table border="0" class="variablelist">
|
|
<colgroup>
|
|
<col align="left" valign="top" />
|
|
<col />
|
|
</colgroup>
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a id="depmod" name="depmod"></a><span class=
|
|
"term"><span class=
|
|
"command"><strong>depmod</strong></span></span>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Creates a dependency file based on the symbols it finds
|
|
in the existing set of modules; this dependency file is
|
|
used by <span class=
|
|
"command"><strong>modprobe</strong></span> to
|
|
automatically load the required modules
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a id="insmod" name="insmod"></a><span class=
|
|
"term"><span class=
|
|
"command"><strong>insmod</strong></span></span>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Installs a loadable module in the running kernel
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a id="kmod" name="kmod"></a><span class=
|
|
"term"><span class=
|
|
"command"><strong>kmod</strong></span></span>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Loads and unloads kernel modules
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a id="lsmod" name="lsmod"></a><span class=
|
|
"term"><span class=
|
|
"command"><strong>lsmod</strong></span></span>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Lists currently loaded modules
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a id="modinfo" name="modinfo"></a><span class=
|
|
"term"><span class=
|
|
"command"><strong>modinfo</strong></span></span>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Examines an object file associated with a kernel module
|
|
and displays any information that it can glean
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a id="modprobe" name="modprobe"></a><span class=
|
|
"term"><span class=
|
|
"command"><strong>modprobe</strong></span></span>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Uses a dependency file, created by <span class=
|
|
"command"><strong>depmod</strong></span>, to
|
|
automatically load relevant modules
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a id="rmmod" name="rmmod"></a><span class=
|
|
"term"><span class=
|
|
"command"><strong>rmmod</strong></span></span>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Unloads modules from the running kernel
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a id="libkmod" name="libkmod"></a><span class=
|
|
"term"><code class="filename">libkmod</code></span>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
This library is used by other programs to load and unload
|
|
kernel modules
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="navfooter">
|
|
<ul>
|
|
<li class="prev">
|
|
<a accesskey="p" href="kbd.html" title="Kbd-2.0.2">Prev</a>
|
|
<p>
|
|
Kbd-2.0.2
|
|
</p>
|
|
</li>
|
|
<li class="next">
|
|
<a accesskey="n" href="libpipeline.html" title=
|
|
"Libpipeline-1.4.0">Next</a>
|
|
<p>
|
|
Libpipeline-1.4.0
|
|
</p>
|
|
</li>
|
|
<li class="up">
|
|
<a accesskey="u" href="chapter06.html" title=
|
|
"Chapter 6. Installing Basic System Software">Up</a>
|
|
</li>
|
|
<li class="home">
|
|
<a accesskey="h" href="../index.html" title=
|
|
"Linux From Scratch - Version 7.7-systemd">Home</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</body>
|
|
</html>
|