CONFIG migration quirk

Simon Glass sjg at chromium.org
Fri Dec 30 18:51:10 CET 2022


Hi Tom,

On Thu, 29 Dec 2022 at 17:03, Tom Rini <trini at konsulko.com> wrote:
>
> On Thu, Dec 29, 2022 at 04:54:35PM -0600, Simon Glass wrote:
> > Hi Tom,
> >
> > If I:
> >
> > 1. Revert 9ef3ba85bf3 kbuild: Remove checking for adhoc CONFIG symbols
> > 2. rm scripts/config_whitelist.txt
> > 3. run ./scripts/build-whitelist.sh
> >
> > Then I get about 930 unmirgrated CONFIG options:
> >
> > $ wc scripts/config_whitelist.txt
> >   930   930 21243 scripts/config_whitelist.txt
> >
> > It seems that some of them are still there. I noticed this when
> > looking at CONFIG_VIDEO_FONT_4X6
> >
> > Am I missing something?
>
> So, it's why I've not quite said we've migrated _everything_.  There's
> now a much smaller / odder set of CONFIG values left to deal with, or
> ignore. If you do:
> $ git grep -E '^#[[:blank:]]*(define|undef)[[:blank:]]*CONFIG_' :^arch/arm/dts/ :^scripts/kconfig/lkc.h :^include/linux/kconfig.h | wc -l
> 606

Oh I see. I didn't know that. The script was designed to ratchet down,
which made sense at the time.

>
> And of those, 406 are "CONFIG_SYS" and so should just get regex'd to
> CFG_SYS. There's also a few more ignore paths that should go in that
> grep, such as doc/ and tools/.  What's left after that is seeing if any
> of those are used, or if there's any more cases of defining defaults in
> code instead of Kconfig.
>
> I'm also a bit less concerned about this in that I've made checkpatch.pl
> complain about any additional #define CONFIG / #undef CONFIG anywhere
> (and I check that for everything as I merge), and CI is now more strict,
> but not 100% strict yet.

Does this prevent new ad-hoc CONFIG options?

Should we return to the build-whitelist.sh script for now?

Is there something I could help with on clearing out the rest of the
CONFIGs or are you working on that?

Regards,
Simon


More information about the U-Boot mailing list