aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2021-03-19 03:35:50 +0100
committerThomas Deutschmann <whissi@gentoo.org>2021-03-19 03:45:48 +0100
commit588d9254f66d090e593033da2aa9a257d6e3bfce (patch)
tree3695fd584c1ed9c010bfcc42963a1b3c5c0fa81b
parentgenkernel: fix used kernel.config (diff)
downloadgenkernel-588d9254f66d090e593033da2aa9a257d6e3bfce.tar.gz
genkernel-588d9254f66d090e593033da2aa9a257d6e3bfce.tar.bz2
genkernel-588d9254f66d090e593033da2aa9a257d6e3bfce.zip
gen_configkernel.sh: config_kernel(): Warn when kernel config did not change
When user requests to modify kernel config, i.e. `genkernel --menuconfig` but kernel config did not change, show a warning to allow user to notice. This can happen for example when user loaded a different kernel config in dialog but forgot to save to $KERNEL_OUTPUTDIR/.config which is required in that case. Link 1: https://forums.gentoo.org/viewtopic-p-8588232.html#8588232 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
-rwxr-xr-xgen_configkernel.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/gen_configkernel.sh b/gen_configkernel.sh
index 00eab73..bff3fdc 100755
--- a/gen_configkernel.sh
+++ b/gen_configkernel.sh
@@ -334,8 +334,17 @@ config_kernel() {
if [ -n "${add_config}" ]
then
+ local kconfig_md5sum_old="$(md5sum < "${KERNEL_OUTPUTDIR}/.config")"
+
print_info 1 "$(get_indent 1)>> Invoking ${add_config} ..."
compile_generic ${add_config} kernelruntask
+
+ local kconfig_md5sum_new="$(md5sum < "${KERNEL_OUTPUTDIR}/.config")"
+ if [[ "${kconfig_md5sum_old}" == "${kconfig_md5sum_new}" ]]
+ then
+ print_warning 1 "$(get_indent 1)>> Kernel config was not modified!"
+ fi
+ unset kconfig_md5sum_old kconfig_md5sum_new
fi
local -a required_kernel_options