The Kmod package contains libraries and utilities for loading
kernel modules
Approximate build time:
less than 0.1 SBU
Required disk space:
6.7 MB
8.61.1. Installation of Kmod
Prepare Kmod for compilation:
mkdir -p build
cd build
meson setup --prefix=/usr .. \
--buildtype=release \
-D manpages=false
The meaning of the configure options:
-
-D
manpages=false
-
This option disables generating the man pages which requires
an external program.
Compile the package:
ninja
The test suite of this package requires raw kernel headers (not the
“sanitized”
kernel headers installed earlier), which are beyond the scope of
LFS.
Now install the package:
ninja install
8.61.2. Installation of Kmod - 32-bit
Clean previous build:
rm -rf *
Prepare Kmod for compilation:
meson setup --prefix=/usr \
--buildtype=release \
--cross-file=lib32 \
-D manpages=false \
..
Compile the package:
ninja
Install the package:
DESTDIR=$PWD/DESTDIR ninja install
cp -Rv DESTDIR/usr/lib32/* /usr/lib32
rm -rf DESTDIR
8.61.3. Installation of Kmod - x32-bit
Clean previous build:
rm -rf *
Prepare Kmod for compilation:
meson setup --prefix=/usr \
--buildtype=release \
--cross-file=libx32 \
-D manpages=false \
..
Compile the package:
ninja
Install the package:
DESTDIR=$PWD/DESTDIR ninja install
cp -Rv DESTDIR/usr/libx32/* /usr/libx32
rm -rf DESTDIR
8.61.4. Contents of
Kmod
Installed programs:
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)
Installed library:
libkmod.so
Short Descriptions
|
depmod
|
Creates a dependency file based on the symbols it finds
in the existing set of modules; this dependency file is
used by modprobe to
automatically load the required modules
|
|
insmod
|
Installs a loadable module in the running kernel
|
|
kmod
|
Loads and unloads kernel modules
|
|
lsmod
|
Lists currently loaded modules
|
|
modinfo
|
Examines an object file associated with a kernel module
and displays any information that it can glean
|
|
modprobe
|
Uses a dependency file, created by depmod, to
automatically load relevant modules
|
|
rmmod
|
Unloads modules from the running kernel
|
|
libkmod
|
This library is used by other programs to load and unload
kernel modules
|