mb/google/trulo/var/uldrenite: Add fw_config probe for touchscreen
[coreboot2.git] / util / kconfig / patches / 0014-util-kconfig-Move-Kconfig-deps-back-into-build-confi.patch
blob62835cc215d22b9dd4504d3d7516290f0709963a
1 From 2a44aa33d6506a29b14d9c429410ad582d1d6636 Mon Sep 17 00:00:00 2001
2 From: Martin Roth <gaumless@gmail.com>
3 Date: Sun, 13 Nov 2022 15:20:57 -0700
4 Subject: [PATCH] util/kconfig: Move Kconfig deps back into build/config
6 revert commit 1b9e740a8 (kconfig: fix failing to generate auto.conf) [1]
8 The above change caused all of the enabled kconfig options to be written
9 into the top level build directory. We don't want that, so go back to
10 the old behavior for the coreboot tree.
12 [1] https://web.archive.org/web/20220316120807/https://github.com/torvalds/linux/commit/1b9e740a81f91ae338b29ed70455719804957b80
14 Signed-off-by: Martin Roth <gaumless@gmail.com>
15 Change-Id: I2904f69a5d85337ad0a6b48590ccd4b4a6e38b70
16 ---
17 util/kconfig/confdata.c | 20 +++++++++++---------
18 1 file changed, 11 insertions(+), 9 deletions(-)
20 Index: kconfig/confdata.c
21 ===================================================================
22 --- kconfig.orig/confdata.c
23 +++ kconfig/confdata.c
24 @@ -244,6 +244,13 @@ static const char *conf_get_rustccfg_nam
25 return name ? name : "include/generated/rustc_cfg";
28 +static const char *conf_get_autobase_name(void)
30 + char *name = getenv("KCONFIG_SPLITCONFIG");
32 + return name ? name : "include/config/";
35 static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p)
37 char *p2;
38 @@ -1099,19 +1106,19 @@ static int conf_write_autoconf_cmd(const
40 static int conf_touch_deps(void)
42 - const char *name, *tmp;
43 + const char *name;
44 struct symbol *sym;
45 int res, i;
47 - name = conf_get_autoconfig_name();
48 - tmp = strrchr(name, '/');
49 - depfile_prefix_len = tmp ? tmp - name + 1 : 0;
50 - if (depfile_prefix_len + 1 > sizeof(depfile_path))
51 - return -1;
53 - strncpy(depfile_path, name, depfile_prefix_len);
54 - depfile_path[depfile_prefix_len] = 0;
55 + /*
56 + * Upstream Kconfig sets depfile_path based on the directory
57 + * prefix of the autoconfig path, but coreboot overrides this
58 + * using the KCONFIG_SPLITCONFIG environment variable
59 + */
60 + strcpy(depfile_path, conf_get_autobase_name());
61 + depfile_prefix_len = strlen(depfile_path);
63 + name = conf_get_autoconfig_name();
64 conf_read_simple(name, S_DEF_AUTO);
65 sym_calc_value(modules_sym);