2015-06-12 00:59:54 +08:00
|
|
|
## kmod - Linux kernel module handling
|
|
|
|
|
2021-01-21 10:50:33 +08:00
|
|
|
OVERVIEW
|
|
|
|
========
|
|
|
|
|
|
|
|
kmod is a set of tools to handle common tasks with Linux kernel modules like
|
|
|
|
insert, remove, list, check properties, resolve dependencies and aliases.
|
|
|
|
|
|
|
|
These tools are designed on top of libkmod, a library that is shipped with
|
|
|
|
kmod. See libkmod/README for more details on this library and how to use it.
|
|
|
|
The aim is to be compatible with tools, configurations and indexes from
|
|
|
|
module-init-tools project.
|
|
|
|
|
2024-09-08 02:50:10 +08:00
|
|
|
|
|
|
|
Links
|
|
|
|
=====
|
|
|
|
- Mailing list (no subscription needed): linux-modules@vger.kernel.org
|
|
|
|
- Mailing list archives: https://lore.kernel.org/linux-modules/
|
|
|
|
|
|
|
|
- Signed packages: http://www.kernel.org/pub/linux/utils/kernel/kmod/
|
|
|
|
|
|
|
|
- Git:
|
|
|
|
- Official: https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git
|
|
|
|
- Mirror: https://github.com/kmod-project/kmod
|
|
|
|
- Mirror: https://kernel.googlesource.com/pub/scm/utils/kernel/kmod/kmod.git
|
|
|
|
|
|
|
|
- License:
|
|
|
|
- LGPLv2.1+ for libkmod, testsuite and helper libraries
|
|
|
|
- GPLv2+ for tools/*
|
|
|
|
|
|
|
|
- Irc: `#kmod` on irc.oftc.net
|
|
|
|
|
|
|
|
- Issues: https://github.com/kmod-project/kmod/issues
|
|
|
|
|
|
|
|
|
2021-01-21 10:50:33 +08:00
|
|
|
Compilation and installation
|
|
|
|
============================
|
|
|
|
|
2024-07-12 21:24:49 +08:00
|
|
|
In order to compile the source code you need the following software packages:
|
2024-09-08 02:30:49 +08:00
|
|
|
- GCC/CLANG compiler
|
|
|
|
- GNU C library / musl / uClibc
|
2021-01-21 10:50:33 +08:00
|
|
|
|
2024-11-05 02:45:52 +08:00
|
|
|
Optional dependencies, required with the default build configuration:
|
2024-09-08 02:30:49 +08:00
|
|
|
- ZLIB library
|
|
|
|
- LZMA library
|
|
|
|
- ZSTD library
|
|
|
|
- OPENSSL library (signature handling in modinfo)
|
2021-01-21 10:50:33 +08:00
|
|
|
|
2024-09-09 22:10:38 +08:00
|
|
|
Typical configuration and installation
|
|
|
|
|
|
|
|
meson setup builddir/
|
|
|
|
meson compile -C builddir/
|
|
|
|
sudo meson install -C builddir/
|
|
|
|
|
2024-11-02 04:04:30 +08:00
|
|
|
For end-user and distributions builds, it's recommended to use:
|
|
|
|
|
|
|
|
meson setup --buildtype release builddir/
|
|
|
|
|
2024-09-09 22:10:38 +08:00
|
|
|
Alternatively you can try autotools build.
|
|
|
|
NOTE: The autotools build is slated for removal with kmod v35
|
2024-09-08 02:30:49 +08:00
|
|
|
|
|
|
|
./configure CFLAGS="-g -O2" --prefix=/usr \
|
|
|
|
--sysconfdir=/etc --libdir=/usr/lib
|
|
|
|
make && make install
|
2021-01-21 10:50:33 +08:00
|
|
|
|
|
|
|
Hacking
|
|
|
|
=======
|
|
|
|
|
2024-09-09 22:10:38 +08:00
|
|
|
When working on kmod, use the included `build-dev.ini` file, as:
|
|
|
|
|
|
|
|
meson setup --native-file build-dev.ini builddir/
|
2021-01-21 10:50:33 +08:00
|
|
|
|
2024-09-09 23:14:54 +08:00
|
|
|
Make sure to read [our contributing guide](CONTRIBUTING.md) and the other
|
|
|
|
READMEs: [libkmod](libkmod/README) and [testsuite](testsuite/README).
|
2021-01-21 10:50:33 +08:00
|
|
|
|
|
|
|
Compatibility with module-init-tools
|
|
|
|
====================================
|
|
|
|
|
2024-07-12 21:24:49 +08:00
|
|
|
kmod replaced module-init-tools, which was EOL'ed in 2011. All the tools were
|
|
|
|
rewritten on top of libkmod and they can be used as drop in replacements.
|
|
|
|
Along the years there were a few behavior changes and new features implemented,
|
|
|
|
following feedback from Linux kernel community and distros.
|