summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Georgi <patrick@coreboot.org>2023-11-20 18:07:18 +0100
committerPatrick Georgi <patrick@coreboot.org>2023-11-24 16:50:09 +0000
commit54cec706502bef3763840353d5bff1519e72c44f (patch)
tree85c37af2017e9d7bc25571ec5bbd1155c8de353b
parent7eab8ef8b720e8744eea3c6c771bccc217fbe5ed (diff)
util/kconfig: Uprev to Linux 6.3's kconfig
Minor bugfix, plus stuff that doesn't really affect us. TEST=`util/abuild/abuild -C` output (config.h and config.build) remains the same Change-Id: I0af0c2ae4cb11bb58457830ffcd8bb8c2422a3d1 Signed-off-by: Patrick Georgi <patrick@coreboot.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79180 Reviewed-by: Martin L Roth <gaumless@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rw-r--r--util/kconfig/confdata.c6
-rwxr-xr-xutil/kconfig/merge_config.sh25
2 files changed, 20 insertions, 11 deletions
diff --git a/util/kconfig/confdata.c b/util/kconfig/confdata.c
index 726a96e182..b5c6da3453 100644
--- a/util/kconfig/confdata.c
+++ b/util/kconfig/confdata.c
@@ -1269,10 +1269,12 @@ static void (*conf_changed_callback)(void);
void conf_set_changed(bool val)
{
- if (conf_changed_callback && conf_changed != val)
- conf_changed_callback();
+ bool changed = conf_changed != val;
conf_changed = val;
+
+ if (conf_changed_callback && changed)
+ conf_changed_callback();
}
bool conf_get_changed(void)
diff --git a/util/kconfig/merge_config.sh b/util/kconfig/merge_config.sh
index e5b46980c2..902eb429b9 100755
--- a/util/kconfig/merge_config.sh
+++ b/util/kconfig/merge_config.sh
@@ -29,6 +29,7 @@ usage() {
echo " -y make builtin have precedence over modules"
echo " -O dir to put generated output files. Consider setting \$KCONFIG_CONFIG instead."
echo " -s strict mode. Fail if the fragment redefines any value."
+ echo " -Q disable warning messages for overridden options."
echo
echo "Used prefix: '$CONFIG_PREFIX'. You can redefine it with \$CONFIG_ environment variable."
}
@@ -40,6 +41,7 @@ BUILTIN=false
OUTPUT=.
STRICT=false
CONFIG_PREFIX=${CONFIG_-CONFIG_}
+WARNOVERRIDE=echo
while true; do
case $1 in
@@ -82,6 +84,11 @@ while true; do
shift
continue
;;
+ "-Q")
+ WARNOVERRIDE=true
+ shift
+ continue
+ ;;
*)
break
;;
@@ -138,21 +145,21 @@ for ORIG_MERGE_FILE in $MERGE_LIST ; do
NEW_VAL=$(grep -w $CFG $MERGE_FILE)
BUILTIN_FLAG=false
if [ "$BUILTIN" = "true" ] && [ "${NEW_VAL#CONFIG_*=}" = "m" ] && [ "${PREV_VAL#CONFIG_*=}" = "y" ]; then
- echo Previous value: $PREV_VAL
- echo New value: $NEW_VAL
- echo -y passed, will not demote y to m
- echo
+ ${WARNOVERRIDE} Previous value: $PREV_VAL
+ ${WARNOVERRIDE} New value: $NEW_VAL
+ ${WARNOVERRIDE} -y passed, will not demote y to m
+ ${WARNOVERRIDE}
BUILTIN_FLAG=true
elif [ "x$PREV_VAL" != "x$NEW_VAL" ] ; then
- echo Value of $CFG is redefined by fragment $ORIG_MERGE_FILE:
- echo Previous value: $PREV_VAL
- echo New value: $NEW_VAL
- echo
+ ${WARNOVERRIDE} Value of $CFG is redefined by fragment $ORIG_MERGE_FILE:
+ ${WARNOVERRIDE} Previous value: $PREV_VAL
+ ${WARNOVERRIDE} New value: $NEW_VAL
+ ${WARNOVERRIDE}
if [ "$STRICT" = "true" ]; then
STRICT_MODE_VIOLATED=true
fi
elif [ "$WARNREDUN" = "true" ]; then
- echo Value of $CFG is redundant by fragment $ORIG_MERGE_FILE:
+ ${WARNOVERRIDE} Value of $CFG is redundant by fragment $ORIG_MERGE_FILE:
fi
if [ "$BUILTIN_FLAG" = "false" ]; then
sed -i "/$CFG[ =]/d" $TMP_FILE