[PATCH 03/25] autoboot: Correct dependencies on CMDLINE

Simon Glass sjg at chromium.org
Wed Oct 4 04:11:11 CEST 2023


Hi Tom,

On Sun, 24 Sept 2023 at 18:40, Tom Rini <trini at konsulko.com> wrote:
>
> On Sun, Sep 24, 2023 at 02:39:21PM -0600, Simon Glass wrote:
>
> > Make AUTOBOOT depend on CMDLINE since it is mostly meaningless without it.
> >
> > Signed-off-by: Simon Glass <sjg at chromium.org>
> > ---
> >
> >  boot/Kconfig | 23 ++++++++++++++---------
> >  1 file changed, 14 insertions(+), 9 deletions(-)
> >
> > diff --git a/boot/Kconfig b/boot/Kconfig
> > index f74ac7e9cc72..41ec2c34bf74 100644
> > --- a/boot/Kconfig
> > +++ b/boot/Kconfig
> > @@ -1167,14 +1167,16 @@ menu "Autoboot options"
> >
> >  config AUTOBOOT
> >       bool "Autoboot"
> > +     depends on CMDLINE
> >       default y
> >       help
> >         This enables the autoboot.  See doc/README.autoboot for detail.
>
> This is fine and correct.
>
> > +if AUTOBOOT
> > +
> >  config BOOTDELAY
> >       int "delay in seconds before automatically booting"
> >       default 2
> > -     depends on AUTOBOOT
> [snip]
> > @@ -1322,6 +1324,9 @@ config AUTOBOOT_STOP_STR_SHA256
> >         includes a ":", the portion prior to the ":" will be treated
> >         as a salt value.
> >
> > +endif  # AUTOBOOT_KEYED
> > +endif  # AUTOBOOT
>
> So it's ~200 lines, yes, hiding this under an if, or perhaps a menu
> makes sense, however...
>
> >  config AUTOBOOT_USE_MENUKEY
> >       bool "Allow a specify key to run a menu from the environment"
> >       depends on !AUTOBOOT_KEYED
>
> It looks like there's more stuff to move under a menu/if here?

Well this depends on !AUTOBOOT_KEYED so can't be in the 'if
AUTOBOOT_KEYED'. But yes I can create a new 'if !AUTOBOOT_KEYED' for
these two items. Normally we want 2-3 options to warrant an 'if', so I
don't see this as a strong case.

Regards,
Simon


More information about the U-Boot mailing list