aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2019-03-29 00:30:26 +0100
committerThomas Deutschmann <whissi@gentoo.org>2019-03-29 00:30:26 +0100
commitcb0d1ec77ef70df93db51ce4fe7b850b8a3ba59f (patch)
tree2d904d8003c5fa1129d693e7e3e020068d8d4e39
parentappend_modules(): add error checking (diff)
downloadgenkernel-cb0d1ec7.tar.gz
genkernel-cb0d1ec7.tar.bz2
genkernel-cb0d1ec7.zip
config_kernel(): Force --static and --no-ramdisk-modules
...if kernel doesn't support modules to avoid that genkernel will run into errors when trying to call 'make modules' or expects to build initramfs with modules when there aren't any modules. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
-rwxr-xr-xgen_configkernel.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/gen_configkernel.sh b/gen_configkernel.sh
index abc2f616..541a3a81 100755
--- a/gen_configkernel.sh
+++ b/gen_configkernel.sh
@@ -187,6 +187,21 @@ config_kernel() {
else
# no, we do NOT support modules, set 'y' for new stuff.
newcfg_setting='y'
+
+ if ! isTrue "${BUILD_STATIC}"
+ then
+ local _no_modules_support_warning="$(getIndent 1)>> Forcing --static "
+ if isTrue "${BUILD_RAMDISK}" && isTrue "${RAMDISKMODULES}"
+ then
+ _no_modules_support_warning+="and --no-ramdisk-modules "
+ RAMDISKMODULES="no"
+ fi
+
+ _no_modules_support_warning+="to avoid genkernel failures because kernel does NOT support modules..."
+
+ print_warning 1 "${_no_modules_support_warning}"
+ BUILD_STATIC="yes"
+ fi
fi
# If the user has configured DM as built-in, we need to respect that.