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

Simon Glass sjg at chromium.org
Fri Sep 16 03:30:47 CEST 2022


Hi Tom,

On Thu, 15 Sept 2022 at 12:32, Tom Rini <trini at konsulko.com> wrote:
>
> On Wed, Sep 14, 2022 at 04:39:18PM -0600, Simon Glass wrote:
> > 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?
>
> I don't know just how "soon", but yes, I'd rather not invest further
> time in tooling that works and we're aiming to remove.

Fair enough.

>
> And as an aside, the current tool got me to learn comm which has been
> quite handy in other things.

Yes, I remember learning about it at uni and then forgetting about it
for a decade :-)

Regards,
Simon


More information about the U-Boot mailing list