[PATCH 00/13] qconfig: Use kconfiglib for database build and defconfig sync
Simon Glass
sjg at chromium.org
Tue Jul 7 13:35:01 CEST 2026
The -b (build database) and -s (sync defconfigs) options currently
spawn make subprocesses for every board, requiring cross-compiler
toolchains. It is dog slow, taking several minutes.
This series replaces both paths with direct kconfiglib evaluation,
reducing the time to under two seconds for ~1500 boards with no
toolchain requirement.
The series starts by fixing a long-standing kconfiglib bug where
backslash sequences in string values (like \n in
CONFIG_AUTOBOOT_PROMPT) were silently corrupted during round-trips.
To prepare for the conversion, the database code is refactored so that
buildman can read and build the CONFIG database directly, and
defconfigs can be selected on the command line without using stdin.
A resync is neutral: the effective config is unchanged and only the
defconfig text is brought to canonical minimal form. Defconfigs which
use #include directives are handled too, updating the overlay entries
while preserving the include structure; entries which merely restate
the include files are left alone, to avoid churn. Every updated
defconfig produces a byte-identical .config when processed by the C
Kconfig implementation. The -r (git-ref) option is converted as well.
With all operations now using kconfiglib, the old make-based
infrastructure (move_config(), Slot, Slots, KconfigParser and related
helpers) is removed, dropping ~500 lines. The tool still grows overall,
mostly due to the #include-defconfig handling and its unit tests.
Finally, qconfig's tests are added to the test runner.
The first two qconfig patches were sent in October 2024 (the -D patch
with a Reviewed-by from Tom) but were never applied; they are included
here with only minor commit-message and docstring tweaks.
Simon Glass (13):
buildman: Fix kconfiglib string-value escaping
qconfig: Add a way to select defconfigs without stdin
qconfig: Ignore defconfigs containing #include
qconfig: Refactor to allow buildman to read the database
qconfig: Rename do_build_db()
qconfig: Drop args from KconfigParser
qconfig: Allow buildman to obtain the qconfig database
qconfig: Use kconfiglib to build the CONFIG database
qconfig: Auto-rebuild stale database for -f queries
qconfig: Use kconfiglib for defconfig sync
qconfig: Handle #include defconfigs in kconfiglib sync
qconfig: Use kconfiglib for -r (git-ref) sync path
test: Add qconfig tests to the test runner
.azure-pipelines.yml | 3 +-
.gitlab-ci.yml | 3 +-
doc/develop/qconfig.rst | 75 +-
test/run | 1 +
tools/buildman/kconfiglib.py | 30 +-
tools/qconfig.py | 1294 ++++++++++++++++++++++------------
6 files changed, 912 insertions(+), 494 deletions(-)
---
base-commit: ece349ade2973e220f524ce59e59711cc919263f
branch: qconf-us
--
2.43.0
More information about the U-Boot
mailing list