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

Simon Glass sjg at chromium.org
Fri Mar 17 06:25:17 CET 2023


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.

Did we ever figure out if we can detect inconsistencies when we try to
select something that has an unsatisfied dependency?

Regards,
Simon


More information about the U-Boot mailing list