[U-Boot] [RFC PATCH v2 0/3] python tools to inspect configs

Jean-Jacques Hiblot jjhiblot at ti.com
Wed Oct 3 13:53:49 UTC 2018


This series introduce 2 new python tools that helps getting an overview
of the configuration options.
First one is fairly simple and is used to locate deconfigs based on several
criteria: 'arch', 'soc', 'cpu', 'vendor', 'board', 'defconfig name',
'maintainer' and 'status'. All the parameters use regexp.
ex: Show all defconfigs of platforms built around imx25 or imx27 or imxs
$ tools/find_defconfigs.py --soc 'mx(25|27|s)'

The 2nd tool is used to produce a CSV file that summarizes the usage of
config options by a set of defconfigs. Useful to check what platforms might
need modifications when working on a particular option.
ex:
Get the TI platforms that enable CONFIG_DM_I2C_COMPAT either in u-boot or
the SPL
$ tools/configs2csv.py -X  CONFIG_DM_I2C_COMPAT --spl --u-boot --vendor ti \
  --discard-empty

limitations:
- must be executed at the root of the source tree
- the source tree must be clean (make mrproper)
- only supports CSV format. visualization in terminal sould be added.
  But LibreOffice calc is better suited with all its ordering/
  filtering capabilities.

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

Jean-Jacques Hiblot (3):
  tools: moveconfig: Add an option to build a fuller database of options
  tools: Add a tool to get a list of defconfigs based on filters
  tools: Add a tool to get an overview of the usage of CONFIG options

 tools/configs2csv.py     | 387 +++++++++++++++++++++++++++++++++++++++++++++++
 tools/find_defconfigs.py | 167 ++++++++++++++++++++
 tools/moveconfig.py      |  56 ++++++-
 3 files changed, 603 insertions(+), 7 deletions(-)
 create mode 100755 tools/configs2csv.py
 create mode 100755 tools/find_defconfigs.py

-- 
2.7.4



More information about the U-Boot mailing list