[U-Boot] [RFC PATCH v3 3/3] tools: Add a tool to get an overview of the usage of CONFIG options
Simon Glass
sjg at chromium.org
Sat Nov 3 06:08:24 UTC 2018
On 26 October 2018 at 05:14, Jean-Jacques Hiblot <jjhiblot at ti.com> wrote:
> configs2csv.py is tool that allow to check how some options are used for a
> particular subset of platforms.
> The purpose is to identify the targets that are actually using one or more
> options of interest.
> For example, it can tell what targets are still using CONFIG_DM_I2_COMPAT.
> It relies on the config database produced by tools/moveconfig.py.
> If the database doesn't exist, it will build it for the restricted set of
> the selected platforms. Once the database is built, it is much faster than
> greping the configs directory and more accurate as it relies on the
> information found in u-boot.cfg instead of defconfigs.
> It possible to look for options in the u-boot, the SPL or the TPL
> configurations. It can also perform diffs between those configurations.
>
> usage: configs2csv.py [-h] [-X] [--u-boot] [--spl] [--tpl] [--diff]
> [--rebuild-db] [-j JOBS] [-o OUTPUT] [--no-header]
> [--discard-empty] [-i] [--soc SOC] [--vendor VENDOR]
> [--arch ARCH] [--cpu CPU] [--board BOARD]
> [--target TARGET]
> OPTION [OPTION ...]
>
> all filtering parameters (OPTION, vendor, arch, ...) accept regexp.
> ex: configs2csv.py .*DM_I2C.* --soc 'omap[2345]|k3' will match
> CONFIG_DM_I2C and CONFIG_DM_I2C_COMPAT and look for it only for targets
> using the omap2, omap3, omap4, omap5 or k3 SOCs.
>
> Signed-off-by: Jean-Jacques Hiblot <jjhiblot at ti.com>
>
> ---
>
> Changes in v3:
> - stylistics changes
> - Add more comments to describe classes and functions
>
> Changes in v2:
> - basically rewrote the whole thing
> - use tools/moveconfig.py to generate the database of configs
> - use tools/find_defconfigs.py to get the list of defconfigs off interest
> - removed diff with .config. tools/moveconfig.py does a better job
>
> tools/configs2csv.py | 427 +++++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 427 insertions(+)
> create mode 100755 tools/configs2csv.py
Reviewed-by: Simon Glass <sjg at chromium.org>
More information about the U-Boot
mailing list