Skip to content

Repository files navigation

kmod — ZainiumOS fork

This is Zainium Dynamics' fork of kmod (upstream: git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git), the tools that handle Linux kernel modules — insert, remove, list, check properties, resolve dependencies and aliases (modprobe, depmod, insmod, rmmod, lsmod, modinfo), built on top of libkmod.

Packaged for ZainiumOS as a syshub package (base OS tier, not userland) — a modular kernel can't load any driver built as a loadable .ko without kmod present at boot, so it ships alongside musl/gcc/binutils as core toolchain, not as an optional userland tool.

What's changed from upstream

  • Module directory default: /overlayer/syshub/drivers/modules instead of upstream's $prefix/lib/modules, matching ZainiumOS's /overlayer/syshub layout (see configure.ac / meson.build, moduledir / MODULE_DIRECTORY). Everything else is unmodified upstream kmod 34.2 — this fork exists purely to carry that one build-time default, not to patch tool behavior.

Building for ZainiumOS

Cross-built against the musl toolchain via the syshub-recipes pipeline (meson, matching upstream's own recommended build path — the autotools build here is present only because it's still upstream's, and is slated for removal in kmod v35). Compression support for .ko.zst / .ko.xz modules is enabled via the already-published zstd / xz / zlib syshub packages.

For a manual/local build, see upstream's own instructions below — nothing about the build process itself is Zainium-specific beyond the moduledir default.

Upstream README

Original kmod README (compilation, links, licensing, module-init-tools compatibility)

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.

Links

Compilation and installation

In order to compile the source code you need the following software packages:

  • GCC/CLANG compiler
  • GNU C library / musl / uClibc

Optional dependencies, required with the default build configuration:

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

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/

Alternatively you can try the autotools build. NOTE: The autotools build is slated for removal with kmod v35.

./configure CFLAGS="-g -O2" --prefix=/usr \
            --sysconfdir=/etc --libdir=/usr/lib
make && make install

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 the Linux kernel community and distros.

About

Linux kernel kmod zainium-dynamics patched

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages