[PATCH 1/2] tools: qconfig: print a proper error when database is missing
Julien Stephan
jstephan at baylibre.com
Thu Jul 2 16:04:41 CEST 2026
When CONFIG_DATABASE does not exist, read_database() would fail with a
Python traceback. Add a pre-check to print a clear message asking the
user to generate the database first with the -b option.
Signed-off-by: Julien Stephan <jstephan at baylibre.com>
---
tools/qconfig.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tools/qconfig.py b/tools/qconfig.py
index 5b85f9d22c3..9b151566e03 100755
--- a/tools/qconfig.py
+++ b/tools/qconfig.py
@@ -871,6 +871,10 @@ def read_database():
value: set of boards using that option
"""
+ if not os.path.exists(CONFIG_DATABASE):
+ sys.exit(f"Error: database '{CONFIG_DATABASE}' not found. "
+ f"Did you forget to generate it first with the -b option?")
+
configs = {}
# key is defconfig name, value is dict of (CONFIG_xxx, value)
--
2.54.0
More information about the U-Boot
mailing list