scripts: crosfw: Avoid hanging with invalid defconfig
If a board does not provide a value for an integer Kconfig option,
the conf tool will normally prompt for it. This hangs forever since our
script does not provide input.
This is actually always a bug in the defconfig, so use the existing
KCONFIG_NOSILENTUPDATE feature to detect it and print a proper error.
BUG=b:268384689
TEST=Comment out CONFIG_BOOTSTAGE_STASH_ADDR in sandbox_defconfig
$ crosfw -L sandbox
See that it now shows a helpful error instead of hanging:
.config:43:warning: symbol value '' invalid for BOOTSTAGE_STASH_ADDR
*** The configuration requires explicit update.
Change-Id: Ia60751b7a1abe433830a2f135a782a11a938b415
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/4269692
Commit-Queue: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
diff --git a/scripts/crosfw.py b/scripts/crosfw.py
index 0fd4cba..8491d3e 100644
--- a/scripts/crosfw.py
+++ b/scripts/crosfw.py
@@ -442,6 +442,7 @@
"--no-print-directory",
"HOSTSTRIP=true",
"QEMU_ARCH=",
+ "KCONFIG_NOSILENTUPDATE=1",
]
if options.dt:
base.append(f"DEVICE_TREE={options.dt}")
@@ -553,7 +554,11 @@
# Do the actual build.
if options.build:
result = cros_build_lib.run(
- base + [target], stdout=True, stderr=subprocess.STDOUT, **kwargs
+ base + [target],
+ input="",
+ stdout=True,
+ stderr=subprocess.STDOUT,
+ **kwargs,
)
if (
result.returncode