coreboot-kgpe-d16/util/kconfig/patches/0011-remove-include-config-hardcodes.patch
Patrick Georgi 53ea1d44f0 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>
2021-07-13 20:28:14 +00:00

39 lines
1.1 KiB
Diff

Index: kconfig/confdata.c
===================================================================
--- kconfig.orig/confdata.c
+++ kconfig/confdata.c
@@ -241,6 +241,13 @@ static const char *conf_get_autoconfig_n
return name ? name : "include/config/auto.conf";
}
+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,7 +1031,7 @@ static int conf_touch_deps(void)
struct symbol *sym;
int res, i;
- strcpy(depfile_path, "include/config/");
+ strcpy(depfile_path, conf_get_autobase_name());
depfile_prefix_len = strlen(depfile_path);
name = conf_get_autoconfig_name();
@@ -1102,7 +1109,10 @@ int conf_write_autoconf(int overwrite)
if (!overwrite && is_present(autoconf_name))
return 0;
- conf_write_dep("include/config/auto.conf.cmd");
+ char autoconfcmd_path[PATH_MAX];
+ snprintf(autoconfcmd_path, sizeof(autoconfcmd_path), "%s%s",
+ conf_get_autobase_name(), "auto.conf.cmd");
+ conf_write_dep(autoconfcmd_path);
if (conf_touch_deps())
return 1;