commit: 2192d8130e11d5aeca1d49c02f76edca5e96895c
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 16 16:20:19 2020 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Jul 16 16:20:19 2020 +0000
URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=2192d813
gen_configkernel.sh: config_kernel(): Ensure that CONFIG_INITRAMFS_SOURCE is
always unset
config_kernel() runs only once. For this run, even when --integrated-initramfs
is set,
the kernel option CONFIG_INITRAMFS_SOURCE should be unset *when* we are also
tasked to
create an initramfs.
Otherwise, functions like set_initramfs_compression_method() can fail when used
kernel
config had integrated initramfs but new kernel doesn't.
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
gen_configkernel.sh | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/gen_configkernel.sh b/gen_configkernel.sh
index b76d1b7..ba6d401 100755
--- a/gen_configkernel.sh
+++ b/gen_configkernel.sh
@@ -348,17 +348,17 @@ config_kernel() {
kconfig_set_opt "${KERNEL_OUTPUTDIR}/.config"
"CONFIG_UNIX98_PTYS" "y" \
&& required_kernel_options+=( 'CONFIG_UNIX98_PTYS' )
- # --integrated-initramfs handling
- if isTrue "${INTEGRATED_INITRAMFS}"
+ # Make sure that CONFIG_INITRAMFS_SOURCE is unset so we don't
clash
+ # with any other genkernel functionality.
+ local cfg_CONFIG_INITRAMFS_SOURCE=$(kconfig_get_opt
"${KERNEL_OUTPUTDIR}/.config" "CONFIG_INITRAMFS_SOURCE")
+ if [[ -n "${cfg_CONFIG_INITRAMFS_SOURCE}" &&
${#cfg_CONFIG_INITRAMFS_SOURCE} -gt 2 ]]
then
- local cfg_CONFIG_INITRAMFS_SOURCE=$(kconfig_get_opt
"${KERNEL_OUTPUTDIR}/.config" "CONFIG_INITRAMFS_SOURCE")
- if [[ -n "${cfg_CONFIG_INITRAMFS_SOURCE}" &&
${#cfg_CONFIG_INITRAMFS_SOURCE} -gt 2 ]]
- then
- # Checking value length to allow
'CONFIG_INITRAMFS_SOURCE=' and 'CONFIG_INITRAMFS_SOURCE=""'
- print_info 2 "$(get_indent 1)>>
CONFIG_INITRAMFS_SOURCE is already set; Unsetting to avoid clashing with
--integrated-initramfs ..."
- kconfig_set_opt "${KERNEL_OUTPUTDIR}/.config"
"CONFIG_INITRAMFS_SOURCE" ""
- fi
- elif isTrue "${COMPRESS_INITRD}"
+ # Checking value length to allow
'CONFIG_INITRAMFS_SOURCE=' and 'CONFIG_INITRAMFS_SOURCE=""'
+ print_info 2 "$(get_indent 1)>> CONFIG_INITRAMFS_SOURCE
is set; Unsetting to avoid problems ..."
+ kconfig_set_opt "${KERNEL_OUTPUTDIR}/.config"
"CONFIG_INITRAMFS_SOURCE" ""
+ fi
+
+ if isTrue "${COMPRESS_INITRD}"
then
set_initramfs_compression_method
"${KERNEL_OUTPUTDIR}/.config"
fi