summaryrefslogtreecommitdiff
path: root/util/kconfig/patches/0002-Kconfig-Change-symbol-override-from-warning-to-notic.patch
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@google.com>2019-11-22 16:55:58 +0100
committerPatrick Georgi <pgeorgi@google.com>2021-07-13 20:28:14 +0000
commit53ea1d44f0435ca419de04e275e08b1bd296922c (patch)
treec1a3a39c36e9b53d0129f0e24a9a032bfea066ca /util/kconfig/patches/0002-Kconfig-Change-symbol-override-from-warning-to-notic.patch
parent8585eabc5d5b516f46b2980a40b25f49eef5e056 (diff)
util/kconfig: Uprev to Linux 5.13's kconfig
This was originally several commits that had to be squashed into one because the intermediate states weren't able to build coreboot: - one to remove everything that wasn't our own code, leaving only regex.[ch], toada.c, description.md and Makefile.inc. - one to copy in Linux 5.13's scripts/kconfig and adapt Makefile.inc to make the original Makefile work again. - adapt abuild to use olddefconfig, simplifying matters. - apply patches in util/kconfig/patches. - Some more adaptations to the libpayload build system. The patches are now in util/kconfig/patches/, reverse applying them should lead to a util/kconfig/ tree that contains exactly the Linux version + our own 5 files. Change-Id: Ia0e8fe4e9022b278f34ab113a433ef4d45e5c355 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/37152 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Raul Rangel <rrangel@chromium.org>
Diffstat (limited to 'util/kconfig/patches/0002-Kconfig-Change-symbol-override-from-warning-to-notic.patch')
-rw-r--r--util/kconfig/patches/0002-Kconfig-Change-symbol-override-from-warning-to-notic.patch69
1 files changed, 69 insertions, 0 deletions
diff --git a/util/kconfig/patches/0002-Kconfig-Change-symbol-override-from-warning-to-notic.patch b/util/kconfig/patches/0002-Kconfig-Change-symbol-override-from-warning-to-notic.patch
new file mode 100644
index 0000000000..4ce52da64a
--- /dev/null
+++ b/util/kconfig/patches/0002-Kconfig-Change-symbol-override-from-warning-to-notic.patch
@@ -0,0 +1,69 @@
+From 20df4491aa88eb4a7f97090fbc4ff53f81926861 Mon Sep 17 00:00:00 2001
+From: Martin Roth <martinroth@google.com>
+Date: Wed, 21 Sep 2016 14:27:26 -0600
+Subject: [PATCH] Kconfig: Change symbol override from warning to notice
+
+Overriding symbols within a .config is pretty common when doing
+automated builds with various different options. The warning
+text makes it sound like this is an issue, so change it to say
+'notice' instead. We could get rid of it completely, but it's
+not a bad thing to know that we have two copies of the same symbol
+in the .config.
+
+BUG=chrome-os-partner:54059
+TEST=copy a disabled kconfig option to the end and set it to y.
+See notice text instead of warning.
+
+Signed-off-by: Martin Roth <martinroth@google.com>
+---
+ util/kconfig/confdata.c | 16 +++++++++++++---
+ 1 file changed, 13 insertions(+), 3 deletions(-)
+
+Index: kconfig/confdata.c
+===================================================================
+--- kconfig.orig/confdata.c
++++ kconfig/confdata.c
+@@ -184,6 +184,16 @@ static void conf_warning(const char *fmt
+ conf_warnings++;
+ }
+
++static void conf_notice(const char *fmt, ...)
++{
++ va_list ap;
++ va_start(ap, fmt);
++ fprintf(stderr, "%s:%d:notice: ", conf_filename, conf_lineno);
++ vfprintf(stderr, fmt, ap);
++ fprintf(stderr, "\n");
++ va_end(ap);
++}
++
+ static void conf_default_message_callback(const char *s)
+ {
+ printf("#\n# ");
+@@ -449,7 +459,7 @@ load:
+ sym->type = S_BOOLEAN;
+ }
+ if (sym->flags & def_flags) {
+- conf_warning("override: reassigning to symbol %s", sym->name);
++ conf_notice("override: reassigning to symbol %s", sym->name);
+ }
+ switch (sym->type) {
+ case S_BOOLEAN:
+@@ -488,7 +498,7 @@ load:
+ }
+
+ if (sym->flags & def_flags) {
+- conf_warning("override: reassigning to symbol %s", sym->name);
++ conf_notice("override: reassigning to symbol %s", sym->name);
+ }
+ if (conf_set_sym_val(sym, def, def_flags, p))
+ continue;
+@@ -513,7 +523,7 @@ load:
+ break;
+ case yes:
+ if (cs->def[def].tri != no)
+- conf_warning("override: %s changes choice state", sym->name);
++ conf_notice("override: %s changes choice state", sym->name);
+ cs->def[def].val = sym;
+ break;
+ }