[PATCH 1/4] Makefile: Add a Python-based CONFIG checker

Simon Glass sjg at chromium.org
Thu Sep 15 00:39:18 CEST 2022


Hi Tom,

On Wed, 14 Sept 2022 at 12:47, Tom Rini <trini at konsulko.com> wrote:
>
> On Mon, Aug 29, 2022 at 07:57:04AM -0600, Simon Glass wrote:
> > The existing shell script is a bit ugly. It was picked up by
> > Chromium OS and then rewritten in Python, adding unit tests. Bring this
> > new version into U-Boot.
> >
> > Signed-off-by: Simon Glass <sjg at chromium.org>
> > ---
> >
> >  scripts/kconfig_check.py      | 338 ++++++++++++++++++++++++++++++++++
> >  scripts/test_kconfig_check.py | 185 +++++++++++++++++++
> >  2 files changed, 523 insertions(+)
> >  create mode 100755 scripts/kconfig_check.py
> >  create mode 100755 scripts/test_kconfig_check.py
>
> All told, this ends up being +400 or so lines to replace a shell script
> with Python. I'm not sure that's a win overall.

It is more maintainable, has tests (which should not detract from line
count) and uses kconfiglib. We could remove the non-kconfig code
perhaps, but half the code is comments.

Perhaps we are going to delete all this anyway soon, I'm not sure?

Regards,
Simon


>
> --
> Tom


More information about the U-Boot mailing list