Martin L Roth has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/69536 )
Change subject: util/kconfig: Move Kconfig deps back into build/config ......................................................................
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...
Signed-off-by: Martin Roth gaumless@gmail.com Change-Id: I2904f69a5d85337ad0a6b48590ccd4b4a6e38b70 --- M util/kconfig/confdata.c 1 file changed, 29 insertions(+), 9 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/36/69536/1
diff --git a/util/kconfig/confdata.c b/util/kconfig/confdata.c index 95fb960..3da9e8b 100644 --- a/util/kconfig/confdata.c +++ b/util/kconfig/confdata.c @@ -230,6 +230,13 @@ 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_touch_deps(void) { - const char *name, *tmp; + const char *name; struct symbol *sym; int res, i;
+ strcpy(depfile_path, conf_get_autobase_name()); + depfile_prefix_len = strlen(depfile_path); + 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; - conf_read_simple(name, S_DEF_AUTO); sym_calc_value(modules_sym);