Message ID | 20211023232635.9195-29-sjg@chromium.org |
---|---|
State | Deferred |
Delegated to: | Tom Rini |
Headers | show |
Series | Initial implementation of standard boot | expand |
On Sat, Oct 23, 2021 at 05:26:35PM -0600, Simon Glass wrote: > Switch this over, for testing purposes. > > Signed-off-by: Simon Glass <sjg@chromium.org> [snip] > + "ramdisk_addr_r=0x02700000\0" \ > + "ethaddr=b8:27:eb:a6:61:e1\0" I know this is just testing, but, you cannot hard-code the ethaddr to the environment.
On Sat, Oct 23, 2021 at 05:26:35PM -0600, Simon Glass wrote: > Switch this over, for testing purposes. > > Signed-off-by: Simon Glass <sjg@chromium.org> [snip] > #define CONFIG_EXTRA_ENV_SETTINGS \ > "dhcpuboot=usb start; dhcp u-boot.uimg; bootm\0" \ > + "boot_targets=mmc0 mmc1 usb0 pxe dhcp\0" \ So, based on this patch I went "oh, so we can still easily control the device order, per board and also for users to tweak". Then I looked for where boot_targets was used, saw it wasn't and looked over the documentation patch previous to this. That's not looking easier to configure than what we have now either.
Hi Tom, On Thu, 28 Oct 2021 at 10:43, Tom Rini <trini@konsulko.com> wrote: > > On Sat, Oct 23, 2021 at 05:26:35PM -0600, Simon Glass wrote: > > > Switch this over, for testing purposes. > > > > Signed-off-by: Simon Glass <sjg@chromium.org> > [snip] > > #define CONFIG_EXTRA_ENV_SETTINGS \ > > "dhcpuboot=usb start; dhcp u-boot.uimg; bootm\0" \ > > + "boot_targets=mmc0 mmc1 usb0 pxe dhcp\0" \ > > So, based on this patch I went "oh, so we can still easily control the > device order, per board and also for users to tweak". Then I looked for > where boot_targets was used, saw it wasn't and looked over the > documentation patch previous to this. That's not looking easier to > configure than what we have now either. Yes, I did originally implement the boot_targets env var, then decided it should be in the device tree instead, since you can do: bootstd { compatible = "u-boot,boot-std"; bootdev-order = "mmc2", "mmc1"; }; (with nothing else in the devicetree) I made this change since it seems that boot_targets is always set in the env and should not be touched by the distro. If that is not correct I can bring the code back... BTW the MAC address was just for my testing. Regards, Simon
On Thu, Oct 28, 2021 at 11:16:31AM -0600, Simon Glass wrote: > Hi Tom, > > On Thu, 28 Oct 2021 at 10:43, Tom Rini <trini@konsulko.com> wrote: > > > > On Sat, Oct 23, 2021 at 05:26:35PM -0600, Simon Glass wrote: > > > > > Switch this over, for testing purposes. > > > > > > Signed-off-by: Simon Glass <sjg@chromium.org> > > [snip] > > > #define CONFIG_EXTRA_ENV_SETTINGS \ > > > "dhcpuboot=usb start; dhcp u-boot.uimg; bootm\0" \ > > > + "boot_targets=mmc0 mmc1 usb0 pxe dhcp\0" \ > > > > So, based on this patch I went "oh, so we can still easily control the > > device order, per board and also for users to tweak". Then I looked for > > where boot_targets was used, saw it wasn't and looked over the > > documentation patch previous to this. That's not looking easier to > > configure than what we have now either. > > Yes, I did originally implement the boot_targets env var, then decided > it should be in the device tree instead, since you can do: > > bootstd { > compatible = "u-boot,boot-std"; > bootdev-order = "mmc2", "mmc1"; > }; > > (with nothing else in the devicetree) > > I made this change since it seems that boot_targets is always set in > the env and should not be touched by the distro. If that is not > correct I can bring the code back... Aside from what I said to the cover letter, I think all of the device tree stuff is taking it the wrong direction. The environment is something that can easily be manipulated in a persistent and well understood manner by a number of tools, and is done so today. Defining the boot order to start with in a device tree fragment is going to be annoying for all of the platforms where the device tree comes from somewhere else. But it's going to suck even more for users to manipulate (now that we've installed, we don't want to probe the whole world normally, just check where it's installed). I'm not seeing this as a better step forward at all right now, sorry. > BTW the MAC address was just for my testing. Hoped so, thanks :)
diff --git a/boot/Kconfig b/boot/Kconfig index 2862bd10710..ce4686d8d15 100644 --- a/boot/Kconfig +++ b/boot/Kconfig @@ -1061,7 +1061,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 55768a46da2..0c236579b55 100644 --- a/include/configs/rpi.h +++ b/include/configs/rpi.h @@ -132,48 +132,15 @@ "scriptaddr=0x02400000\0" \ "pxefile_addr_r=0x02500000\0" \ "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) -#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> + "ramdisk_addr_r=0x02700000\0" \ + "ethaddr=b8:27:eb:a6:61:e1\0" #define CONFIG_EXTRA_ENV_SETTINGS \ "dhcpuboot=usb start; dhcp u-boot.uimg; bootm\0" \ + "boot_targets=mmc0 mmc1 usb0 pxe dhcp\0" \ ENV_DEVICE_SETTINGS \ ENV_DFU_SETTINGS \ - ENV_MEM_LAYOUT_SETTINGS \ - BOOTENV + ENV_MEM_LAYOUT_SETTINGS #endif
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 | 41 ++++------------------------------------- 2 files changed, 6 insertions(+), 38 deletions(-)