[PATCH 00/25] Tidy up use of CONFIG_CMDLINE

Simon Glass sjg at chromium.org
Tue Oct 10 16:57:44 CEST 2023


Hi Tom,

On Sun, 24 Sept 2023 at 18:37, Tom Rini <trini at konsulko.com> wrote:
>
> On Sun, Sep 24, 2023 at 02:39:18PM -0600, Simon Glass wrote:
>
> > It should be possible to disable CONFIG_CMDLINE and have all commands
> > and related functionality dropped from U-Boot. This is useful when
> > trying to reduce the size of U-Boot.
> >
> > Recent changes have stopped this from working.
> >
> > This series repairs the feature for sandbox and adds a test to stop it
> > breaking again.
> >
> > Note that quite a lot of functionality is lost of CONFIG_CMDLINE is
> > disabled, e.g. networking and most booting options. Further work is
> > needed to make the option more generally useful.
>
> I worry there's a lot of "make it compile, deal with it later" in here
> rather than unwinding so that $X works with CMDLINE disabled or we truly
> must have CMDLINE.  Perhaps it would be better to start with to take one
> of the platforms that enables say networking in SPL, where we
> functionally don't have a cmdline, and make that build with CMDLINE off.
> Having *PL build and link and work with CMDLINE disabled would possibly
> save some space too, which is always a good thing there.

So long as it gets us closer to the goal, I think the work is valuable.
Also it prevents additional regressions from creeping in, at least for
sandbox. I am under no illusions about how big an effort this is, but we
have to start somewhere. To me the easiest first step would be to decouple
bootm functionality from the bootm command. Likely that would be <40
patches.

Regards,
Simon


More information about the U-Boot mailing list