diff options
author | Thomas Deutschmann <whissi@gentoo.org> | 2019-03-29 00:30:26 +0100 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2019-03-29 00:30:26 +0100 |
commit | cb0d1ec77ef70df93db51ce4fe7b850b8a3ba59f (patch) | |
tree | 2d904d8003c5fa1129d693e7e3e020068d8d4e39 /gen_configkernel.sh | |
parent | append_modules(): add error checking (diff) | |
download | genkernel-cb0d1ec77ef70df93db51ce4fe7b850b8a3ba59f.tar.gz genkernel-cb0d1ec77ef70df93db51ce4fe7b850b8a3ba59f.tar.bz2 genkernel-cb0d1ec77ef70df93db51ce4fe7b850b8a3ba59f.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>
Diffstat (limited to 'gen_configkernel.sh')
-rwxr-xr-x | gen_configkernel.sh | 15 |
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. |