[Buildroot] [PATCH 3/3 v2] package/lmod: add compression support for the host variant

Yann E. MORIN yann.morin.1998 at free.fr
Sun May 3 13:10:01 UTC 2020

The kernel may install compressed modules. At the end of the buid, we
then run depmod, to generate modules.dep and a few assorted files, so
that loadign modules works properly on the target (loading by alias,
loading dependencies...)

However, depmod needs support for compressed modules, or it would
generate empty modules.dep et al.

Systematically adding support for gz and xz, and the required deps, was
deemed too much of a burden [0], so we add too options to enable either
or both compression.

[0] http://lists.busybox.net/pipermail/buildroot/2018-April/218410.html

Yegor Yefremov <yegorslists at googlemail.com>
Cc: Signed-off-by: Yann E. MORIN <yann.morin.1998 at free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
Cc: Lucian Buga <lucianbuga at gmail.com>

Changes v1 -> v2:
  - make compression support optional  (Thomas)
 package/kmod/Config.in.host | 10 ++++++++++
 package/kmod/kmod.mk        | 14 ++++++++++++++
 2 files changed, 24 insertions(+)

diff --git a/package/kmod/Config.in.host b/package/kmod/Config.in.host
index ea99a790f6..810fac3156 100644
--- a/package/kmod/Config.in.host
+++ b/package/kmod/Config.in.host
@@ -4,3 +4,13 @@ config BR2_PACKAGE_HOST_KMOD
 	  kmod is a set of tools to handle common tasks with Linux
 	  kernel modules like insert, remove, list, check properties,
 	  resolve dependencies and aliases.
+	bool "support gzip-compresed modules"
+	bool "support xz-compresed modules"
diff --git a/package/kmod/kmod.mk b/package/kmod/kmod.mk
index cdbfc5a469..979c3e87e6 100644
--- a/package/kmod/kmod.mk
+++ b/package/kmod/kmod.mk
@@ -75,6 +75,20 @@ else
 KMOD_CONF_OPTS += --disable-tools
+HOST_KMOD_CONF_OPTS += --with-zlib
+HOST_KMOD_CONF_OPTS += --without-zlib
+HOST_KMOD_CONF_OPTS += --with-xz
+HOST_KMOD_CONF_OPTS += --without-xz
 # We only install depmod, since that's the only tool used for the
 # host.

More information about the buildroot mailing list