diff options
author | Simon Glass <sjg@chromium.org> | 2021-10-20 06:43:24 +0300 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2021-10-20 11:59:55 +0300 |
commit | 7bf83a5d7be036969807c0f44ff75d211e039a02 (patch) | |
tree | a866b3676aa62584cbda8643aee6c7ca85eaff19 /configs | |
parent | bafdeb45462683692e0ae217d4683b8062c59608 (diff) | |
download | u-boot-7bf83a5d7be036969807c0f44ff75d211e039a02.tar.xz |
buildman: Detect Kconfig loops
Hex and int Kconfig options are supposed to have defaults. This is so we
can configure U-Boot without having to enter particular values for the
items that don't have specific values in the board's defconfig file.
If this rule is not followed, then introducing a new Kconfig can produce
a loop like this:
Break things (BREAK_ME) [] (NEW)
Error in reading or end of file.
Break things (BREAK_ME) [] (NEW)
Error in reading or end of file.
The continues forever since buildman passes /dev/null to 'conf', and
the build system just tries again. Eventually there is so much output that
buildman runs out of memory.
We can detect this situation by looking for a symbol (like 'BREAK_ME')
which has no default (the '[]' above) and is marked as new. If this
appears multiple times in the output, we know something is wrong.
Add a filter function for the output which detects this situation. Allow
it to return True to terminate the process. Implement this termination in
cros_subprocess.
With this we get a nice message:
buildman --board sandbox -T0
Building current source for 1 boards (0 threads, 32 jobs per thread)
sandbox: w+ sandbox
+.config:66:warning: symbol value '' invalid for BREAK_ME
+
+Error in reading or end of file.
+make[3]: *** [scripts/kconfig/Makefile:75: syncconfig] Terminated
+make[2]: *** [Makefile:569: syncconfig] Terminated
+make: *** [Makefile:177: sub-make] Terminated
+(** did you define an int/hex Kconfig with no default? **)
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'configs')
0 files changed, 0 insertions, 0 deletions