[PATCH 28/28] RFC: rpi: Switch over to use bootflow

Simon Glass sjg at chromium.org
Thu Aug 19 05:46:01 CEST 2021


Drop the distro boot scripts and use bootflow instead.

Note: This is just a demonstration. It does not support EFI at present.

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

 boot/Kconfig           |  2 +-
 doc/develop/distro.rst |  3 +++
 include/configs/rpi.h  | 37 +------------------------------------
 3 files changed, 5 insertions(+), 37 deletions(-)

diff --git a/boot/Kconfig b/boot/Kconfig
index 8565fbeab84..a1beb182f60 100644
--- a/boot/Kconfig
+++ b/boot/Kconfig
@@ -1011,7 +1011,7 @@ 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 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/doc/develop/distro.rst b/doc/develop/distro.rst
index 105dcf28190..8b26bc1f73b 100644
--- a/doc/develop/distro.rst
+++ b/doc/develop/distro.rst
@@ -157,6 +157,9 @@ a line with "CONFIG_DISTRO_DEFAULTS=y". If you want to enable this
 from Kconfig itself, for e.g. all boards using a specific SoC then
 add a "imply DISTRO_DEFAULTS" to your SoC CONFIG option.
 
+
+TO BE UPDATED:
+
 In your board configuration file, include the following::
 
     #ifndef CONFIG_SPL_BUILD
diff --git a/include/configs/rpi.h b/include/configs/rpi.h
index 522b41c02db..d2bac1e1df2 100644
--- a/include/configs/rpi.h
+++ b/include/configs/rpi.h
@@ -161,46 +161,11 @@
 	"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>
-
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	"dhcpuboot=usb start; dhcp u-boot.uimg; bootm\0" \
 	ENV_DEVICE_SETTINGS \
 	ENV_DFU_SETTINGS \
-	ENV_MEM_LAYOUT_SETTINGS \
-	BOOTENV
+	ENV_MEM_LAYOUT_SETTINGS
 
 
 #endif
-- 
2.33.0.rc1.237.g0d66db33f3-goog



More information about the U-Boot mailing list