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 <sjg@chromium.org>
This commit is contained in:
Simon Glass
2022-01-24 17:36:29 -05:00
committed by Tom Rini
parent 84067a5890
commit 65d7fcec5a
2 changed files with 105 additions and 6 deletions
+23 -2
View File
@@ -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.