All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Simon Glass <sjg@chromium.org>
Cc: U-Boot Mailing List <u-boot@lists.denx.de>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Daniel Schwierzeck <daniel.schwierzeck@gmail.com>,
	Dennis Gilmore <dennis@ausil.us>,
	Steffen Jaeckel <jaeckel-floss@eyet-services.de>,
	Lukas Auer <lukas.auer@aisec.fraunhofer.de>,
	Michal Simek <michal.simek@xilinx.com>,
	Heinrich Schuchardt <xypron.glpk@gmx.de>
Subject: Re: [PATCH v3 31/31] RFC: Switch rpi over to use bootstd
Date: Wed, 19 Jan 2022 11:21:17 -0500	[thread overview]
Message-ID: <20220119162117.GD7004@bill-the-cat> (raw)
In-Reply-To: <CAPnjgZ1=V278Czkfv+CT=CFSNLPSbfX+LsBBwb22bxkojFQOnQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 4498 bytes --]

On Wed, Jan 19, 2022 at 09:09:51AM -0700, Simon Glass wrote:
> Hi Tom,
> 
> On Wed, 19 Jan 2022 at 08:01, Tom Rini <trini@konsulko.com> wrote:
> >
> > On Wed, Jan 19, 2022 at 07:37:36AM -0700, Simon Glass wrote:
> > > Hi Tom,
> > >
> > > On Wed, 19 Jan 2022 at 07:04, Tom Rini <trini@konsulko.com> wrote:
> > > >
> > > > On Tue, Jan 18, 2022 at 06:43:15PM -0700, Simon Glass wrote:
> > > >
> > > > > Switch this over, for testing purposes.
> > > > >
> > > > > Signed-off-by: Simon Glass <sjg@chromium.org>
> > > > > ---
> > > > >
> > > > > (no changes since v1)
> > > > >
> > > > >  boot/Kconfig          |  3 ++-
> > > > >  include/configs/rpi.h | 39 ++-------------------------------------
> > > > >  2 files changed, 4 insertions(+), 38 deletions(-)
> > > > >
> > > > > diff --git a/boot/Kconfig b/boot/Kconfig
> > > > > index 9cf1d013f20..eab3c0f3467 100644
> > > > > --- a/boot/Kconfig
> > > > > +++ b/boot/Kconfig
> > > > > @@ -1124,7 +1124,8 @@ config USE_BOOTCOMMAND
> > > > >  config BOOTCOMMAND
> > > > >       string "bootcmd value"
> > > > >       depends on USE_BOOTCOMMAND && !USE_DEFAULT_ENV_FILE
> > > > > -     default "run distro_bootcmd" if DISTRO_DEFAULTS
> > > > > +     default "bootflow scan -lb" if BOOTSTD
> > > > > +     default "run distro_bootcmd" if !BOOTSTD && DISTRO_DEFAULTS
> > > > >       help
> > > > >         This is the string of commands that will be used as bootcmd and if
> > > > >         AUTOBOOT is set, automatically run.
> > > > > diff --git a/include/configs/rpi.h b/include/configs/rpi.h
> > > > > index d5e064fb379..ea373d0c221 100644
> > > > > --- a/include/configs/rpi.h
> > > > > +++ b/include/configs/rpi.h
> > > > > @@ -133,47 +133,12 @@
> > > > >       "fdt_addr_r=0x02600000\0" \
> > > > >       "ramdisk_addr_r=0x02700000\0"
> > > > >
> > > > > -#if CONFIG_IS_ENABLED(CMD_MMC)
> > > > > -     #define BOOT_TARGET_MMC(func) \
> > > > > -             func(MMC, mmc, 0) \
> > > > > -             func(MMC, mmc, 1) \
> > > > > -             func(MMC, mmc, 2)
> > > > > -#else
> > > > > -     #define BOOT_TARGET_MMC(func)
> > > > > -#endif
> > > > > -
> > > > > -#if CONFIG_IS_ENABLED(CMD_USB)
> > > > > -     #define BOOT_TARGET_USB(func) func(USB, usb, 0)
> > > > > -#else
> > > > > -     #define BOOT_TARGET_USB(func)
> > > > > -#endif
> > > > > -
> > > > > -#if CONFIG_IS_ENABLED(CMD_PXE)
> > > > > -     #define BOOT_TARGET_PXE(func) func(PXE, pxe, na)
> > > > > -#else
> > > > > -     #define BOOT_TARGET_PXE(func)
> > > > > -#endif
> > > > > -
> > > > > -#if CONFIG_IS_ENABLED(CMD_DHCP)
> > > > > -     #define BOOT_TARGET_DHCP(func) func(DHCP, dhcp, na)
> > > > > -#else
> > > > > -     #define BOOT_TARGET_DHCP(func)
> > > > > -#endif
> > > > > -
> > > > > -#define BOOT_TARGET_DEVICES(func) \
> > > > > -     BOOT_TARGET_MMC(func) \
> > > > > -     BOOT_TARGET_USB(func) \
> > > > > -     BOOT_TARGET_PXE(func) \
> > > > > -     BOOT_TARGET_DHCP(func)
> > > > > -
> > > > > -#include <config_distro_bootcmd.h>
> > > > > -
> > > > >  #define CONFIG_EXTRA_ENV_SETTINGS \
> > > > >       "dhcpuboot=usb start; dhcp u-boot.uimg; bootm\0" \
> > > > > +     "boot_targets=mmc0 mmc1 usb0 pxe dhcp\0" \
> > > >
> > > > We have the indirect defines to func(...) everywhere so that if a
> > > > feature is disabled we still build + function, as otherwise it's a loud
> > > > link error.  I assume with this we just get a try and fail move to the
> > > > next target at run time, yes?
> > >
> > > Yes, that's right. But I hope that boards actually set up the boot
> > > targets correctly so that only those that are actually supported are
> > > enabled.
> >
> > What do you mean?  They always do that, even today, which is why we have
> > those #ifdef's in the distro boot board code.  If the user ends up
> > disabling something, it should still build and work.  And honestly,
> > given that dependencies are now in Kconfig, the distro_boot.h stuff
> > could get away with dropping all of the
> > "Enabled_foo_without_CONFIG_CMD_foo" stuff I bet.
> 
> Then I don't think I understand your original question. With bootstd
> if USB is disabled (for example) then the USB bootdev won't exist so
> it won't look at USB. It is not so much a link error, just that the
> device is not there.

I mean, with "boot_targets=mmc0 mmc1 usb0 pxe dhcp0" but CONFIG_MMC
disabled, bootstd will gracefully fail, gracefully fail, boot from USB.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

  reply	other threads:[~2022-01-19 16:21 UTC|newest]

Thread overview: 106+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-19  1:42 [PATCH v3 00/31] Initial implementation of standard boot Simon Glass
2022-01-19  1:42 ` [PATCH v3 01/31] str: Move string tests to the string module Simon Glass
2022-01-19 11:15   ` Heinrich Schuchardt
2022-03-06  3:08     ` Simon Glass
2022-01-19  1:42 ` [PATCH v3 02/31] test: Add tests for trailing_strtol() Simon Glass
2022-01-19 11:26   ` Heinrich Schuchardt
2022-01-19  1:42 ` [PATCH v3 03/31] str: Fix a few bugs in trailing_strtoln() Simon Glass
2022-01-31  9:44   ` Rasmus Villemoes
2022-01-31 16:13     ` Simon Glass
2022-01-19  1:42 ` [PATCH v3 04/31] lib: Add a way to find the postiion of a trailing number Simon Glass
2022-01-19 11:27   ` Heinrich Schuchardt
2022-01-19 14:37     ` Simon Glass
2022-01-19 15:11       ` Tom Rini
2022-01-19 17:23         ` Heinrich Schuchardt
2022-01-20  3:16     ` AKASHI Takahiro
2022-03-06  3:08       ` Simon Glass
2022-01-19  1:42 ` [PATCH v3 05/31] dm: core: Rename uclass_get_by_name_len() Simon Glass
2022-01-19 11:28   ` Heinrich Schuchardt
2022-01-19  1:42 ` [PATCH v3 06/31] dm: core: Allow finding a uclass device by partial name Simon Glass
2022-01-19 11:28   ` Heinrich Schuchardt
2022-01-19  1:42 ` [PATCH v3 07/31] test: fastboot: Avoid using mmc1 Simon Glass
2022-01-19  1:42 ` [PATCH v3 08/31] test: dm: Restart USB before assuming it is stopped Simon Glass
2022-01-19  1:42 ` [PATCH v3 09/31] dm: blk: Add a function to return the device type Simon Glass
2022-01-19 11:30   ` Heinrich Schuchardt
2022-01-19  1:42 ` [PATCH v3 10/31] bootstd: Add the concept of a bootflow Simon Glass
2022-01-19  1:42 ` [PATCH v3 11/31] bootstd: Add the bootstd uclass and core implementation Simon Glass
2022-01-19  1:42 ` [PATCH v3 12/31] bootstd: Add the bootdev uclass Simon Glass
2022-01-19  1:42 ` [PATCH v3 13/31] bootstd: Add the bootmeth uclass and helpers Simon Glass
2022-01-19  1:42 ` [PATCH v3 14/31] bootstd: Add support for bootflows Simon Glass
2022-01-19  1:42 ` [PATCH v3 15/31] bootstd: Add a bootdev command Simon Glass
2022-01-19  1:43 ` [PATCH v3 16/31] bootstd: Add a bootflow command Simon Glass
2022-01-19  1:43 ` [PATCH v3 17/31] bootstd: Add a bootmeth command Simon Glass
2022-01-19  1:43 ` [PATCH v3 18/31] bootstd: Add an implementation of distro boot Simon Glass
2022-01-19  1:43 ` [PATCH v3 19/31] bootstd: mmc: Add a bootdev driver Simon Glass
2022-01-19  1:43 ` [PATCH v3 20/31] bootstd: ethernet: " Simon Glass
2022-01-19  1:43 ` [PATCH v3 21/31] bootstd: Add an implementation of distro PXE boot Simon Glass
2022-01-19  1:43 ` [PATCH v3 22/31] bootstd: Add an implementation of EFI boot Simon Glass
2022-01-19  8:08   ` Michael Walle
2022-01-19 11:45   ` Heinrich Schuchardt
2022-03-06  3:08     ` Simon Glass
2022-03-07  9:03       ` Michael Walle
2022-01-19  1:43 ` [PATCH v3 23/31] bootstd: Add a system bootdev for strange boot methods Simon Glass
2022-01-19  1:43 ` [PATCH v3 24/31] bootstd: Add an implementation of EFI bootmgr Simon Glass
2022-01-19 11:47   ` Heinrich Schuchardt
2022-03-06  3:08     ` Simon Glass
2022-03-12  9:36       ` Ilias Apalodimas
2022-03-12 17:58         ` Simon Glass
2022-01-19  1:43 ` [PATCH v3 25/31] bootstd: Add a sandbox bootmeth driver Simon Glass
2022-01-19  1:43 ` [PATCH v3 26/31] bootstd: Add an implementation of script boot Simon Glass
2022-01-19  1:43 ` [PATCH v3 27/31] bootstd: usb: Add a bootdev driver Simon Glass
2022-01-19  1:43 ` [PATCH v3 28/31] bootstd: Add tests for bootstd including all uclasses Simon Glass
2022-01-19  1:43 ` [PATCH v3 29/31] bootstd: Add setup for the bootflow tests Simon Glass
2022-01-19  1:43 ` [PATCH v3 30/31] bootstd: doc: Add documentation Simon Glass
2022-01-19 11:39   ` Heinrich Schuchardt
2022-01-21 15:08     ` Tom Rini
2022-01-21 15:20       ` Simon Glass
2022-01-21 15:31         ` Tom Rini
2022-01-21 16:02           ` Simon Glass
2022-01-21 18:09             ` Tom Rini
2022-01-21 19:14               ` Simon Glass
2022-01-21 19:23                 ` Tom Rini
2022-01-21 21:15                   ` Simon Glass
2022-01-21 21:46                     ` Tom Rini
2022-01-21 22:18                       ` Simon Glass
2022-01-30  0:48           ` Ilias Apalodimas
2022-01-21 16:03         ` Mark Kettenis
2022-01-21 16:53           ` Simon Glass
2022-01-21 18:22             ` Mark Kettenis
2022-01-21 18:41               ` Tom Rini
2022-01-21 19:17               ` Simon Glass
2022-01-21 22:05                 ` Heinrich Schuchardt
2022-01-21 22:13                   ` Simon Glass
2022-01-22 11:44                   ` Mark Kettenis
2022-01-19  1:43 ` [PATCH v3 31/31] RFC: Switch rpi over to use bootstd Simon Glass
2022-01-19 14:04   ` Tom Rini
2022-01-19 14:37     ` Simon Glass
2022-01-19 15:01       ` Tom Rini
2022-01-19 16:09         ` Simon Glass
2022-01-19 16:21           ` Tom Rini [this message]
2022-01-19 16:38             ` Mark Kettenis
2022-01-19 23:26               ` Simon Glass
2022-01-20  8:35                 ` Michael Walle
2022-01-20 10:28                   ` Mark Kettenis
2022-01-20 18:16                     ` Simon Glass
2022-01-20 18:30                       ` Tom Rini
2022-01-20 18:56                         ` Mark Kettenis
2022-01-20 19:56                           ` Simon Glass
2022-01-20 19:56                         ` Simon Glass
2022-01-20 20:08                           ` Tom Rini
2022-01-20 20:47                             ` Simon Glass
2022-01-20 23:23                               ` Tom Rini
2022-01-21  0:59                                 ` Simon Glass
2022-01-21  1:08                                   ` Tom Rini
2022-01-21  3:12                                     ` Simon Glass
2022-01-21  9:36                                       ` Mark Kettenis
2022-01-21 15:25                                         ` Simon Glass
2022-01-21 15:05                                       ` Tom Rini
2022-01-21 15:23                                         ` Simon Glass
2022-01-19 23:23             ` Simon Glass
2022-01-19  8:09 ` [PATCH v3 00/31] Initial implementation of standard boot Michael Walle
2022-01-19 14:56   ` Simon Glass
2022-01-20  8:38     ` Michael Walle
2022-01-20 18:16       ` Simon Glass
2022-03-06  3:08         ` Simon Glass
2022-03-06 11:03           ` Michael Walle
2022-03-06 13:24             ` Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220119162117.GD7004@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=daniel.schwierzeck@gmail.com \
    --cc=dennis@ausil.us \
    --cc=ilias.apalodimas@linaro.org \
    --cc=jaeckel-floss@eyet-services.de \
    --cc=lukas.auer@aisec.fraunhofer.de \
    --cc=michal.simek@xilinx.com \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.