1
0
Fork 0
mirror of git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git synced 2026-09-19 07:30:07 +00:00
No description
  • C 92.2%
  • Shell 3.7%
  • Meson 3.7%
  • Makefile 0.4%
Find a file
Lucas De Marchi 65ac890492 meson: Add 'man' alias target
Allow to build all man pages without depending on the rest of the build.

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/455
Signed-off-by: Lucas De Marchi <demarchi@kernel.org>
2026-08-10 10:44:08 -05:00
.github ci: Allow to generate docs for past release 2026-08-10 10:44:08 -05:00
libkmod meson: Add a 'docs' alias target 2026-08-10 10:44:08 -05:00
man meson: Add 'man' alias target 2026-08-10 10:44:08 -05:00
scripts testsuite: test-modprobe: modprobe with blacklist 2026-08-10 08:42:07 -05:00
shared Use DECLARE_STRBUF where possible 2026-08-10 08:49:47 -05:00
shell-completion Remove double-space in Copyright boilerplate 2026-07-28 09:11:03 -05:00
testsuite Use DECLARE_STRBUF where possible 2026-08-10 08:49:47 -05:00
tools modinfo: rework parm string length validation 2026-08-10 08:49:47 -05:00
.clang-format testsuite: flip testsuite iteration order 2026-07-28 09:11:03 -05:00
.codespellignore .codespellignore: remove caf instance 2026-08-10 08:49:47 -05:00
.editorconfig ci: add more SPDX copyright/license identifiers 2024-09-27 23:08:09 -05:00
.gitignore .gitignore: remove majority of listings 2026-02-02 22:59:03 -06:00
.mailmap .mailmap: Forward to my personal email 2024-06-14 13:49:03 -05:00
build-dev.ini ci: enable mbedtls by default for most instances 2026-06-20 11:13:26 -05:00
CODING-STYLE.md CODING-STYLE.md: mention clang-format 2026-02-02 22:59:06 -06:00
CONTRIBUTING.md CONTRIBUTING: mention ninja clang-format 2026-08-10 08:42:31 -05:00
COPYING COPYING: drop double-space the Copyright example 2026-07-28 09:11:03 -05:00
meson.build shared: rename tmpfile-util -> tmpfile 2026-07-28 09:11:03 -05:00
meson_options.txt ci: enable mbedtls by default for most instances 2026-06-20 11:13:26 -05:00
NEWS NEWS: squash a couple of typos 2025-03-11 13:44:23 -05:00
README.md mbedlts: add as alternative to openssl 2026-06-20 11:13:26 -05:00

kmod - Linux kernel module handling

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.md 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.

Links

Compilation and installation

In order to compile the source code you need:

  • C11 compiler, supporting a range of GNU extensions - GCC 8+, Clang 6+
  • POSIX.1-2008 C runtime library - Bionic, GNU C library, musl

Optional dependencies, required with the default build configuration:

  • ZLIB library
  • LZMA library
  • ZSTD library
  • OPENSSL library (signature handling in modinfo)
  • MBEDTLS library (signature handling in modinfo)

All the optional dependencies are loaded on demand via dlopen by default. This can be changed via the dlopen build option. Typical configuration and installation:

meson setup builddir/
meson compile -C builddir/
sudo meson install -C builddir/

For end-user and distributions builds, it's recommended to use:

meson setup --buildtype release builddir/

Hacking

When working on kmod, use the included build-dev.ini file, as:

meson setup --native-file build-dev.ini builddir/

The testsuite can be executed with:

meson test -C builddir

It builds test kernel modules, so kernel headers need to be pre-installed. By default it tries to use the kernel header for the currently running kernel. KDIR=any environment variable can be used to tell it to use any installed kernel header or KDIR=/path/to/specific/headers when a specific one is needed. Example:

KDIR=any meson test -C builddir

Make sure to read our contributing guide and the other READMEs: libkmod and testsuite.

Compatibility with module-init-tools

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.