commit: ea29977b438633337a5ef69d8be318c038fd96b6
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 26 03:39:06 2019 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue Mar 26 07:12:05 2019 +0000
URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=ea29977b
config_kernel(): rewrite --genzimage handling
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
gen_configkernel.sh | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/gen_configkernel.sh b/gen_configkernel.sh
index b115344..a8627b4 100755
--- a/gen_configkernel.sh
+++ b/gen_configkernel.sh
@@ -127,8 +127,24 @@ config_kernel() {
# Force this on if we are using --genzimage
if isTrue "${CMD_GENZIMAGE}"
then
+ print_info 1 "$(getIndent 1)>> Ensure that required kernel
options for --genzimage are set..."
# Make sure Ext2 support is on...
- kconfig_set_opt "${KERNEL_OUTPUTDIR}/.config" "CONFIG_EXT2_FS"
"y"
+ cfg_CONFIG_EXT2_FS=$(kconfig_get_opt
"${KERNEL_OUTPUTDIR}/.config" "CONFIG_EXT2_FS")
+ if ! isTrue "${cfg_CONFIG_EXT2_FS}"
+ then
+ cfg_CONFIG_EXT4_USE_FOR_EXT2=$(kconfig_get_opt
"${KERNEL_OUTPUTDIR}/.config" "CONFIG_EXT4_USE_FOR_EXT2")
+ if ! isTrue "${cfg_CONFIG_EXT4_USE_FOR_EXT2}"
+ then
+ cfg_CONFIG_EXT4_FS=$(kconfig_get_opt
"${KERNEL_OUTPUTDIR}/.config" "CONFIG_EXT4_FS")
+ if isTrue "${cfg_CONFIG_EXT4_FS}"
+ then
+ kconfig_set_opt
"${KERNEL_OUTPUTDIR}/.config" "CONFIG_EXT4_USE_FOR_EXT2" "y"
+ else
+ kconfig_set_opt
"${KERNEL_OUTPUTDIR}/.config" "CONFIG_BLOCK" "y"
+ kconfig_set_opt
"${KERNEL_OUTPUTDIR}/.config" "CONFIG_EXT2_FS" "y"
+ fi
+ fi
+ fi
fi
# Do we support modules at all?