From 65d7fcec5a05be15694613c6db709ede19bce85b Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 18 Dec 2021 08:09:46 -0700 Subject: moveconfig: Allow querying board configuration It is useful to be able to find out which boards define a particular option, or combination of options. This is not as easy as grepping the defconfig files since many options are implied by others. Add a -f option to the moveconfig tool to permit this. Update the documentation to cover this, including a better title for the doc page. Signed-off-by: Simon Glass --- doc/develop/moveconfig.rst | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'doc/develop') diff --git a/doc/develop/moveconfig.rst b/doc/develop/moveconfig.rst index dcd4d927e40..2f53ea52b71 100644 --- a/doc/develop/moveconfig.rst +++ b/doc/develop/moveconfig.rst @@ -1,7 +1,7 @@ .. SPDX-License-Identifier: GPL-2.0+ -moveconfig -========== +moveconfig - Migrating and querying CONFIG options +================================================== Since Kconfig was introduced to U-Boot, we have worked on moving config options from headers to Kconfig (defconfig). @@ -129,6 +129,24 @@ To process CONFIG_CMD_FPGAD only for a subset of configs based on path match:: ./tools/moveconfig.py -Cy CONFIG_CMD_FPGAD -d - +Finding boards with particular CONFIG combinations +-------------------------------------------------- + +You can use `moveconfig.py` to figure out which boards have a CONFIG enabled, or +which do not. To use it, first build a database:: + + ./tools/moveconfig.py -b + +Then you can run queries using the `-f` flag followed by a list of CONFIG terms. +Each term is CONFIG name, with or without a tilde (~) prefix. The tool searches +for boards which match the CONFIG name, or do not match if tilde is used. For +example, to find boards which enabled CONFIG_SCSI but not CONFIG_BLK:: + + tools/moveconfig.py -f SCSI ~BLK + 3 matches + pg_wcom_seli8_defconfig highbank_defconfig pg_wcom_expu1_defconfig + + Finding implied CONFIGs ----------------------- @@ -235,6 +253,9 @@ Available options Specify a file containing a list of defconfigs to move. The defconfig files can be given with shell-style wildcards. Use '-' to read from stdin. + -f, --find + Find boards with a given config combination + -n, --dry-run Perform a trial run that does not make any changes. It is useful to see what is going to happen before one actually runs it. -- cgit v1.2.3