6.62. Kmod-20
The Kmod package contains libraries and utilities for loading
kernel modules
Approximate build time:
0.1 SBU
Required disk space:
37 MB
6.62.1. Installation of Kmod
6.62.2. 32-bit Installation
Prepare Kmod for 32-bit compilation:
PKG_CONFIG_PATH=/usr/lib32/pkgconfig \
./configure --prefix=/usr \
--bindir=/bin \
--sysconfdir=/etc \
--libdir=/usr/lib32 \
--with-rootlibdir=/lib32 \
--with-xz \
--with-zlib \
CC="gcc -m32"
The meaning of the configure options:
-
--with-xz,
--with-zlib
-
These options enable Kmod to handle compressed kernel
modules.
-
--with-rootlibdir=/lib32
-
This option ensures different library related files are
placed in the correct directories.
Compile the package:
This package does not come with a test suite that can be run in the
LFS chroot environment. At a minimum the git program is required
and several tests will not run outside of a git repository.
Install the package:
make install
Clean up the build directory before moving on to the next platform:
make mostlyclean
6.62.3. x32 ABI Installation
Prepare Kmod for x32 ABI compilation:
PKG_CONFIG_PATH=/usr/libx32/pkgconfig \
./configure --prefix=/usr \
--bindir=/bin \
--sysconfdir=/etc \
--libdir=/usr/libx32 \
--with-rootlibdir=/libx32 \
--with-xz \
--with-zlib \
CC="gcc -mx32"
The meaning of the configure options:
-
--with-xz,
--with-zlib
-
These options enable Kmod to handle compressed kernel
modules.
-
--with-rootlibdir=/libx32
-
This option ensures different library related files are
placed in the correct directories.
Compile the package:
make
This package does not come with a test suite that can be run in the
LFS chroot environment. At a minimum the git program is required
and several tests will not run outside of a git repository.
Install the package:
make install
Clean up the build directory before moving on to the next platform:
make mostlyclean
6.62.4. 64-bit Installation
Prepare Kmod for 64-bit compilation:
./configure --prefix=/usr \
--bindir=/bin \
--sysconfdir=/etc \
--with-rootlibdir=/lib \
--with-xz \
--with-zlib
The meaning of the configure options:
-
--with-xz,
--with-zlib
-
These options enable Kmod to handle compressed kernel
modules.
-
--with-rootlibdir=/lib
-
This option ensures different library related files are
placed in the correct directories.
Compile the package:
make
This package does not come with a test suite that can be run in the
LFS chroot environment. At a minimum the git program is required
and several tests will not run outside of a git repository.
Install the package, and create symlinks for compatibility with
Module-Init-Tools (the package that previously handled Linux kernel
modules):
make install
for target in depmod insmod lsmod modinfo modprobe rmmod; do
ln -sv ../bin/kmod /sbin/$target
done
ln -sv kmod /bin/lsmod
6.62.5. 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
|