aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2021-03-15 21:57:46 +0100
committerThomas Deutschmann <whissi@gentoo.org>2021-03-15 22:02:24 +0100
commit7436269f07727daf13eabef57c6cc936e4e294e2 (patch)
treecaeb0ebd8a64a5d86d71e3894e276a2d29bb9ae6
parentgenkernel: show warning when CONFIG_CMDLINE_OVERRIDE=y is set (diff)
downloadgenkernel-7436269f07727daf13eabef57c6cc936e4e294e2.tar.gz
genkernel-7436269f07727daf13eabef57c6cc936e4e294e2.tar.bz2
genkernel-7436269f07727daf13eabef57c6cc936e4e294e2.zip
genkernel: fix used kernel.config
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
-rwxr-xr-xgenkernel12
1 files changed, 7 insertions, 5 deletions
diff --git a/genkernel b/genkernel
index 046e0e3..e6424ba 100755
--- a/genkernel
+++ b/genkernel
@@ -478,8 +478,10 @@ fi
if isTrue "${BUILD_RAMDISK}"
then
+ kconfig_file_used="${KERNEL_OUTPUTDIR}/.config"
if ! isTrue "${BUILD_KERNEL}"
then
+ kconfig_file_used="${KERNEL_CONFIG}"
INITRAMFS_FILE="${TMPDIR}/${GK_FILENAME_TEMP_INITRAMFS}"
isTrue "${CMD_INSTALL}" && INITRAMFS_FILE="${BOOTDIR}/${GK_FILENAME_INITRAMFS}"
@@ -524,8 +526,8 @@ then
print_warning 1 '"man genkernel" explains "dozfs" in detail.'
fi
- CONFGREP_CMD=$(get_grep_cmd_for_file "${KERNEL_CONFIG}")
- if [ $("${CONFGREP_CMD}" 'CONFIG_EXT[0-9]_FS=' "${KERNEL_CONFIG}" | wc -l) -ge 2 ]
+ CONFGREP_CMD=$(get_grep_cmd_for_file "${kconfig_file_used}")
+ if [ $("${CONFGREP_CMD}" 'CONFIG_EXT[0-9]_FS=' "${kconfig_file_used}" | wc -l) -ge 2 ]
then
print_warning 1 ''
print_warning 1 'With support for several ext* filesystems available, it may be needed to'
@@ -533,17 +535,17 @@ then
fi
unset CONFGREP_CMD
- cfg_CONFIG_CMDLINE_OVERRIDE=$(kconfig_get_opt "${KERNEL_CONFIG}" CONFIG_CMDLINE_OVERRIDE)
+ cfg_CONFIG_CMDLINE_OVERRIDE=$(kconfig_get_opt "${kconfig_file_used}" CONFIG_CMDLINE_OVERRIDE)
if [ "${cfg_CONFIG_CMDLINE_OVERRIDE}" = "y" ]
then
- cfg_CONFIG_CMDLINE=$(kconfig_get_opt "${KERNEL_CONFIG}" CONFIG_CMDLINE)
+ cfg_CONFIG_CMDLINE=$(kconfig_get_opt "${kconfig_file_used}" CONFIG_CMDLINE)
print_warning 1 ''
print_warning 1 "${BOLD}Note:${NORMAL}"
print_warning 1 'You have set CONFIG_CMDLINE_OVERRIDE=y.'
print_warning 1 "You will be unable to alter set kernel parameters (${cfg_CONFIG_CMDLINE}) at runtime!"
unset cfg_CONFIG_CMDLINE
fi
- unset cfg_CONFIG_CMDLINE_OVERRIDE
+ unset cfg_CONFIG_CMDLINE_OVERRIDE kconfig_file_used
fi
isTrue "${CMD_INSTALL}" && restore_boot_mount_state