[PATCH v2 6/8] boot: Create a common BOOT_DEFAULTS for distro and bootstd

Simon Glass sjg at chromium.org
Fri Mar 17 19:29:18 CET 2023


Hi Tom,

On Fri, 17 Mar 2023 at 08:34, Tom Rini <trini at konsulko.com> wrote:
>
> On Thu, Mar 16, 2023 at 11:25:17PM -0600, Simon Glass wrote:
> > Hi Tom,
> >
> > On Thu, 2 Mar 2023 at 08:14, Tom Rini <trini at konsulko.com> wrote:
> > >
> > > On Wed, Mar 01, 2023 at 08:39:27PM -0700, Simon Glass wrote:
> > >
> > > > These two features use a lot of common options. Move them into a common
> > > > CONFIG to reduce duplication.
> > > >
> > > > Resync defconfigs since this makes a lot of changes.
> > > >
> > > > Signed-off-by: Simon Glass <sjg at chromium.org>
> > > [snip]
> > > > diff --git a/boot/Kconfig b/boot/Kconfig
> > > > index da18d4738a7..7f7ec208a54 100644
> > > > --- a/boot/Kconfig
> > > > +++ b/boot/Kconfig
> > > > @@ -350,6 +350,35 @@ config PXE_UTILS
> > > >       help
> > > >         Utilities for parsing PXE file formats.
> > > >
> > > > +config BOOT_DEFAULTS
> > > > +     bool  # Common defaults for standard boot and distroboot
> > > > +     imply USE_BOOTCOMMAND
> > > > +     # Bring in some defaults which are generally needed. Boards can drop
> > > > +     # these as needed to save code space. Bootstd does not generally require
> > > > +     # the commands themselves to be enabled, but this is how some of the
> > > > +     # functionality is controlled at present
> > > > +     select CMD_ENV_EXISTS
> > > > +     imply CMD_EXT2
> > > > +     imply CMD_EXT4
> > > > +     imply CMD_FAT
> > > > +     imply CMD_FS_GENERIC
> > > > +     imply CMD_PART if PARTITIONS
> > > > +     imply CMD_DHCP if NET
> > > > +     imply CMD_MII if NET
> > > > +     imply CMD_PING if NET
> > > > +     imply CMD_PXE if NET
> > > > +     imply USB_STORAGE
> > > > +     imply SUPPORT_RAW_INITRD
> > > > +     imply ENV_VARS_UBOOT_CONFIG
> > > > +     imply EFI_PARTITION
> > > > +     imply ISO_PARTITION
> > > > +     select CMD_BOOTI if ARM64
> > > > +     select CMD_BOOTZ if ARM && !ARM64
> > > > +     help
> > > > +       These are not required but are commonly needed to support a good
> > > > +       selection of booting methods. Enable this to improve the capability
> > > > +       of U-Boot to boot various images.
> > >
> > > We want the more heavy-handed select rather than imply here, as this is
> > > part of making sure people do end up with a set of default that will
> > > work and not unexpectedly fail to boot off-the-shelf things.
> > >
> >
> > But then boards cannot override it. This is a 'default' option that
> > intends to bring in things that make it easier for the user to get
> > right. But we do need to allow for people to use standard boot in more
> >  constrained ways.
>
> These are things that boards aren't supposed to override, which is why
> they're select'd because the board has chosen to use one of the "give me
> good defaults" options. So "select" as is done currently is what I want
> here, for now. We can evaluate later if there's a good reason to not
> select things.

OK got it, I'll respin this series. This will make it impossible for
boards to override things like EXT4, But we could give BOOT_DEFAULTS a
name to allow it to be disabled.

Regards,
Simon


More information about the U-Boot mailing list