commit: cb0d1ec77ef70df93db51ce4fe7b850b8a3ba59f Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> AuthorDate: Thu Mar 28 23:30:26 2019 +0000 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> CommitDate: Thu Mar 28 23:30:26 2019 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=cb0d1ec7
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 <AT> gentoo.org> gen_configkernel.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/gen_configkernel.sh b/gen_configkernel.sh index abc2f61..541a3a8 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.