From eaa9c94c75748265b9260691d5f59c9d3711f7d4 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Fri, 23 Jul 2021 01:32:38 +0200 Subject: generic: Kconfig: exit on unset symbol When a target configuration has unser Kconfig symbols, the build will fail when OpenWrt is compiled with V=s and stdin is connected to a tty. In case OpenWrt is compiled without either of these preconditions, the build will uscceed with the symbols in question being unset. Modify the kernel configuration in a way it fails on unset symbols regardless of the aformentioned preconditions. Signed-off-by: David Bauer --- target/linux/generic/hack-5.10/205-kconfig-exit.patch | 11 +++++++++++ target/linux/generic/hack-5.4/205-kconfig-exit.patch | 11 +++++++++++ 2 files changed, 22 insertions(+) create mode 100644 target/linux/generic/hack-5.10/205-kconfig-exit.patch create mode 100644 target/linux/generic/hack-5.4/205-kconfig-exit.patch (limited to 'target/linux') diff --git a/target/linux/generic/hack-5.10/205-kconfig-exit.patch b/target/linux/generic/hack-5.10/205-kconfig-exit.patch new file mode 100644 index 0000000000..8931ad3270 --- /dev/null +++ b/target/linux/generic/hack-5.10/205-kconfig-exit.patch @@ -0,0 +1,11 @@ +--- a/scripts/kconfig/conf.c ++++ b/scripts/kconfig/conf.c +@@ -212,6 +212,8 @@ static int conf_sym(struct menu *menu) + break; + continue; + case 0: ++ if (!sym_has_value(sym) && !tty_stdio && getenv("FAIL_ON_UNCONFIGURED")) ++ exit(1); + newval = oldval; + break; + case '?': diff --git a/target/linux/generic/hack-5.4/205-kconfig-exit.patch b/target/linux/generic/hack-5.4/205-kconfig-exit.patch new file mode 100644 index 0000000000..8931ad3270 --- /dev/null +++ b/target/linux/generic/hack-5.4/205-kconfig-exit.patch @@ -0,0 +1,11 @@ +--- a/scripts/kconfig/conf.c ++++ b/scripts/kconfig/conf.c +@@ -212,6 +212,8 @@ static int conf_sym(struct menu *menu) + break; + continue; + case 0: ++ if (!sym_has_value(sym) && !tty_stdio && getenv("FAIL_ON_UNCONFIGURED")) ++ exit(1); + newval = oldval; + break; + case '?': -- cgit v1.2.3