summaryrefslogtreecommitdiff
path: root/util/kconfig/patches/0014-util-kconfig-Move-Kconfig-deps-back-into-build-confi.patch
diff options
context:
space:
mode:
authorMartin Roth <gaumless@gmail.com>2022-11-13 15:27:08 -0700
committerMartin L Roth <gaumless@gmail.com>2022-11-20 17:29:32 +0000
commitb7f92a0b6a0f776d00cf7843156034c22f403c78 (patch)
tree5cf0737b733c5b92d9fdfe752cd07be457828198 /util/kconfig/patches/0014-util-kconfig-Move-Kconfig-deps-back-into-build-confi.patch
parentbfdb489032702f9e3ec8eab1c4a0998ad06c9a3f (diff)
util/kconfig: Add patch to move Kconfig deps to build/config
The change being reverted [1] caused all the Kconfig dependency files to be generated at the top level of coreboot's build directory. This reverts that behavior and puts the dependencies back where we're used to them being. [1] https://web.archive.org/web/20220316120807/https://github.com/torvalds/linux/commit/1b9e740a81f91ae338b29ed70455719804957b80 Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: Ic4b48831705c3206e7c2e09f01d072d1cde9c9c4 Reviewed-on: https://review.coreboot.org/c/coreboot/+/69535 Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com> Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'util/kconfig/patches/0014-util-kconfig-Move-Kconfig-deps-back-into-build-confi.patch')
-rw-r--r--util/kconfig/patches/0014-util-kconfig-Move-Kconfig-deps-back-into-build-confi.patch64
1 files changed, 64 insertions, 0 deletions
diff --git a/util/kconfig/patches/0014-util-kconfig-Move-Kconfig-deps-back-into-build-confi.patch b/util/kconfig/patches/0014-util-kconfig-Move-Kconfig-deps-back-into-build-confi.patch
new file mode 100644
index 0000000000..fb85035a7c
--- /dev/null
+++ b/util/kconfig/patches/0014-util-kconfig-Move-Kconfig-deps-back-into-build-confi.patch
@@ -0,0 +1,64 @@
+From 2a44aa33d6506a29b14d9c429410ad582d1d6636 Mon Sep 17 00:00:00 2001
+From: Martin Roth <gaumless@gmail.com>
+Date: Sun, 13 Nov 2022 15:20:57 -0700
+Subject: [PATCH] util/kconfig: Move Kconfig deps back into build/config
+
+revert commit 1b9e740a8 (kconfig: fix failing to generate auto.conf) [1]
+
+The above change caused all of the enabled kconfig options to be written
+into the top level build directory. We don't want that, so go back to
+the old behavior for the coreboot tree.
+
+[1] https://web.archive.org/web/20220316120807/https://github.com/torvalds/linux/commit/1b9e740a81f91ae338b29ed70455719804957b80
+
+Signed-off-by: Martin Roth <gaumless@gmail.com>
+Change-Id: I2904f69a5d85337ad0a6b48590ccd4b4a6e38b70
+---
+ util/kconfig/confdata.c | 20 +++++++++++---------
+ 1 file changed, 11 insertions(+), 9 deletions(-)
+
+diff --git a/util/kconfig/confdata.c b/util/kconfig/confdata.c
+index 95fb960179..3da9e8b38d 100644
+--- a/util/kconfig/confdata.c
++++ b/util/kconfig/confdata.c
+@@ -230,6 +230,13 @@ static const char *conf_get_autoheader_name(void)
+ return name ? name : "include/generated/autoconf.h";
+ }
+
++static const char *conf_get_autobase_name(void)
++{
++ char *name = getenv("KCONFIG_SPLITCONFIG");
++
++ return name ? name : "include/config/";
++}
++
+ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p)
+ {
+ char *p2;
+@@ -1024,19 +1031,14 @@ static int conf_write_autoconf_cmd(const char *autoconf_name)
+
+ static int conf_touch_deps(void)
+ {
+- const char *name, *tmp;
++ const char *name;
+ struct symbol *sym;
+ int res, i;
+
+- name = conf_get_autoconfig_name();
+- tmp = strrchr(name, '/');
+- depfile_prefix_len = tmp ? tmp - name + 1 : 0;
+- if (depfile_prefix_len + 1 > sizeof(depfile_path))
+- return -1;
+-
+- strncpy(depfile_path, name, depfile_prefix_len);
+- depfile_path[depfile_prefix_len] = 0;
++ strcpy(depfile_path, conf_get_autobase_name());
++ depfile_prefix_len = strlen(depfile_path);
+
++ name = conf_get_autoconfig_name();
+ conf_read_simple(name, S_DEF_AUTO);
+ sym_calc_value(modules_sym);
+
+--
+2.30.2
+