[PATCH v2 1/3] arm: rpi: Switch to standard boot

Simon Glass sjg at chromium.org
Sun Apr 2 22:28:46 CEST 2023


Drop use of the distro scripts and use standard boot instead.

We don't need to specify the mmc devices individually, since they are
used in order from 0 to 2, and standard boot uses that order anyway.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

Changes in v2:
- Rebase to -next

 configs/rpi_0_w_defconfig      |  1 +
 configs/rpi_2_defconfig        |  1 +
 configs/rpi_3_32b_defconfig    |  1 +
 configs/rpi_3_b_plus_defconfig |  1 +
 configs/rpi_3_defconfig        |  1 +
 configs/rpi_4_32b_defconfig    |  1 +
 configs/rpi_4_defconfig        |  1 +
 configs/rpi_arm64_defconfig    |  1 +
 configs/rpi_defconfig          |  1 +
 include/configs/rpi.h          | 38 ++--------------------------------
 10 files changed, 11 insertions(+), 36 deletions(-)

diff --git a/configs/rpi_0_w_defconfig b/configs/rpi_0_w_defconfig
index 2a442373f116..a61f7f7feacf 100644
--- a/configs/rpi_0_w_defconfig
+++ b/configs/rpi_0_w_defconfig
@@ -11,6 +11,7 @@ CONFIG_ENV_SIZE=0x4000
 CONFIG_DEFAULT_DEVICE_TREE="bcm2835-rpi-zero-w"
 CONFIG_SYS_PROMPT="U-Boot> "
 CONFIG_SYS_LOAD_ADDR=0x1000000
+CONFIG_BOOTSTD_DEFAULTS=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_USE_PREBOOT=y
diff --git a/configs/rpi_2_defconfig b/configs/rpi_2_defconfig
index 1c462f36b479..193f15c15bae 100644
--- a/configs/rpi_2_defconfig
+++ b/configs/rpi_2_defconfig
@@ -12,6 +12,7 @@ CONFIG_ENV_SIZE=0x4000
 CONFIG_DEFAULT_DEVICE_TREE="bcm2836-rpi-2-b"
 CONFIG_SYS_PROMPT="U-Boot> "
 CONFIG_SYS_LOAD_ADDR=0x1000000
+CONFIG_BOOTSTD_DEFAULTS=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_USE_PREBOOT=y
diff --git a/configs/rpi_3_32b_defconfig b/configs/rpi_3_32b_defconfig
index ed14571d20f1..51662dc5d2a8 100644
--- a/configs/rpi_3_32b_defconfig
+++ b/configs/rpi_3_32b_defconfig
@@ -11,6 +11,7 @@ CONFIG_ENV_SIZE=0x4000
 CONFIG_DEFAULT_DEVICE_TREE="bcm2837-rpi-3-b"
 CONFIG_SYS_PROMPT="U-Boot> "
 CONFIG_SYS_LOAD_ADDR=0x1000000
+CONFIG_BOOTSTD_DEFAULTS=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_USE_PREBOOT=y
diff --git a/configs/rpi_3_b_plus_defconfig b/configs/rpi_3_b_plus_defconfig
index d29bc7d61c71..0ea27eee4b2f 100644
--- a/configs/rpi_3_b_plus_defconfig
+++ b/configs/rpi_3_b_plus_defconfig
@@ -10,6 +10,7 @@ CONFIG_ENV_SIZE=0x4000
 CONFIG_DEFAULT_DEVICE_TREE="bcm2837-rpi-3-b-plus"
 CONFIG_SYS_PROMPT="U-Boot> "
 CONFIG_SYS_LOAD_ADDR=0x1000000
+CONFIG_BOOTSTD_DEFAULTS=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_USE_PREBOOT=y
diff --git a/configs/rpi_3_defconfig b/configs/rpi_3_defconfig
index eb9251937126..8077ccbe0b54 100644
--- a/configs/rpi_3_defconfig
+++ b/configs/rpi_3_defconfig
@@ -10,6 +10,7 @@ CONFIG_ENV_SIZE=0x4000
 CONFIG_DEFAULT_DEVICE_TREE="bcm2837-rpi-3-b"
 CONFIG_SYS_PROMPT="U-Boot> "
 CONFIG_SYS_LOAD_ADDR=0x1000000
+CONFIG_BOOTSTD_DEFAULTS=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_USE_PREBOOT=y
diff --git a/configs/rpi_4_32b_defconfig b/configs/rpi_4_32b_defconfig
index 2fdc4b2360dc..1441d9a5cc6e 100644
--- a/configs/rpi_4_32b_defconfig
+++ b/configs/rpi_4_32b_defconfig
@@ -9,6 +9,7 @@ CONFIG_DEFAULT_DEVICE_TREE="bcm2711-rpi-4-b"
 CONFIG_SYS_PROMPT="U-Boot> "
 CONFIG_DM_RESET=y
 CONFIG_SYS_LOAD_ADDR=0x1000000
+CONFIG_BOOTSTD_DEFAULTS=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_USE_PREBOOT=y
diff --git a/configs/rpi_4_defconfig b/configs/rpi_4_defconfig
index efa42569b109..b812a093c493 100644
--- a/configs/rpi_4_defconfig
+++ b/configs/rpi_4_defconfig
@@ -9,6 +9,7 @@ CONFIG_DEFAULT_DEVICE_TREE="bcm2711-rpi-4-b"
 CONFIG_SYS_PROMPT="U-Boot> "
 CONFIG_DM_RESET=y
 CONFIG_SYS_LOAD_ADDR=0x1000000
+CONFIG_BOOTSTD_DEFAULTS=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_USE_PREBOOT=y
diff --git a/configs/rpi_arm64_defconfig b/configs/rpi_arm64_defconfig
index 53bf410a7922..b824f739a151 100644
--- a/configs/rpi_arm64_defconfig
+++ b/configs/rpi_arm64_defconfig
@@ -9,6 +9,7 @@ CONFIG_DEFAULT_DEVICE_TREE="bcm2711-rpi-4-b"
 CONFIG_SYS_PROMPT="U-Boot> "
 CONFIG_DM_RESET=y
 CONFIG_SYS_LOAD_ADDR=0x1000000
+CONFIG_BOOTSTD_DEFAULTS=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_USE_PREBOOT=y
diff --git a/configs/rpi_defconfig b/configs/rpi_defconfig
index dfd0c6bbae79..5a538225f200 100644
--- a/configs/rpi_defconfig
+++ b/configs/rpi_defconfig
@@ -11,6 +11,7 @@ CONFIG_ENV_SIZE=0x4000
 CONFIG_DEFAULT_DEVICE_TREE="bcm2835-rpi-b"
 CONFIG_SYS_PROMPT="U-Boot> "
 CONFIG_SYS_LOAD_ADDR=0x1000000
+CONFIG_BOOTSTD_DEFAULTS=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_USE_PREBOOT=y
diff --git a/include/configs/rpi.h b/include/configs/rpi.h
index 4da982f73578..4160db2d8e14 100644
--- a/include/configs/rpi.h
+++ b/include/configs/rpi.h
@@ -122,47 +122,13 @@
 	"fdt_addr_r=0x02600000\0" \
 	"ramdisk_addr_r=0x02700000\0"
 
-#if IS_ENABLED(CONFIG_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 IS_ENABLED(CONFIG_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 BOOT_TARGETS	"mmc usb pxe dhcp"
 
 #define CFG_EXTRA_ENV_SETTINGS \
 	"dhcpuboot=usb start; dhcp u-boot.uimg; bootm\0" \
 	ENV_DEVICE_SETTINGS \
 	ENV_DFU_SETTINGS \
 	ENV_MEM_LAYOUT_SETTINGS \
-	BOOTENV
-
+	"boot_targets=" BOOT_TARGETS "\0"
 
 #endif
-- 
2.40.0.348.gf938b09366-goog



More information about the U-Boot mailing list