diff options
author | Thomas Deutschmann <whissi@gentoo.org> | 2021-09-09 02:16:42 +0200 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2021-09-09 02:59:03 +0200 |
commit | 153a877d333d3b85920267535aef950056c92192 (patch) | |
tree | 49f00909f104fac428d1b69f4215bae7c55ab7b9 /gen_configkernel.sh | |
parent | initrd.scripts: don't skip top level devices with partitions (diff) | |
download | genkernel-153a877d333d3b85920267535aef950056c92192.tar.gz genkernel-153a877d333d3b85920267535aef950056c92192.tar.bz2 genkernel-153a877d333d3b85920267535aef950056c92192.zip |
Refactor (compressed) kernel module handling
To support a specific module compression algorithm, two things are needed:
Used depmod utility on host system building the kernel must support chosen
module compression algorithm to generate proper modules.dep file or
genkernel would be unable to read module dependencies when copying modules
to initramfs.
At runtime, used modprobe utility must be able to handle chosen module
compression algorithm or modules would be unloadable.
To address the first requirement, genkernel will now check if used kmod
utility on host system supports chosen module compression algorithm.
To address the runtime requirement, this commit will switch from BusyBox's
modutils implementation to kmod because BusyBox does not support ZSTD
compression (yet).
Bug: https://bugs.gentoo.org/809344
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'gen_configkernel.sh')
-rwxr-xr-x | gen_configkernel.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gen_configkernel.sh b/gen_configkernel.sh index bff3fdcb..62113dca 100755 --- a/gen_configkernel.sh +++ b/gen_configkernel.sh @@ -347,6 +347,13 @@ config_kernel() { unset kconfig_md5sum_old kconfig_md5sum_new fi + # Check for suitable kmod + determine_KEXT + if ! isTrue "$(is_kext_supported_by_kmod "${KEXT}")" + then + gen_die "${KMOD_CMD} does not support chosen module compression algorithm. Please re-emerge sys-apps/kmod with USE=$(get_kext_kmod_use_flag "${KEXT}") enabled or adjust CONFIG_MODULE_COMPRESS_* kernel option!" + fi + local -a required_kernel_options [ -f "${KCONFIG_MODIFIED_MARKER}" ] && rm "${KCONFIG_MODIFIED_MARKER}" |