Lucas De Marchi c9f80c49b1 libkmod: Add ELF notes to compression libraries
Follow the new spec for ELF notes as detailed in
https://systemd.io/ELF_PACKAGE_METADATA/.

We can copy mostly verbatim the macros from systemd codebase.

Example output:

	$ meson setup --native-file build-dev.ini -Dxz=disabled -Ddlopen=zlib build
	...
	    dlopen           : zlib

	    features         : +ZSTD -XZ +ZLIB +OPENSSL

	$ dlopen-notes.py build/libkmod.so.2
	# build/libkmod.so.2
	[
	  {
	    "feature": "xz",
	    "description": "Support for uncompressing xz-compressed modules",
	    "priority": "recommended",
	    "soname": [
	      "liblzma.so.5"
	    ]
	  }
	]

Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/262
2024-12-06 13:16:28 -08:00
2024-12-04 11:35:22 -06:00
2024-10-18 14:00:27 -05:00
2024-07-03 10:14:47 -05:00
2014-10-09 01:26:34 -03:00
2024-08-16 17:05:43 -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 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 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

Hacking

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

meson setup --native-file build-dev.ini 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.

Description
kmod - Linux kernel module handling
Readme 8.1 MiB
Languages
C 92.2%
Meson 3.8%
Shell 3.6%
Makefile 0.4%