[PATCH v3 8/9] rockchip: Move to standard boot

Simon Glass sjg at chromium.org
Mon Mar 20 06:48:00 CET 2023


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

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

Changes in v3:
- Update rk3588 boards too

Changes in v2:
- Add new patch to move rockchip to standard boot

 arch/arm/Kconfig                  |  1 -
 include/configs/px30_common.h     |  4 +--
 include/configs/rk3036_common.h   |  5 +--
 include/configs/rk3066_common.h   |  5 +--
 include/configs/rk3128_common.h   |  4 +--
 include/configs/rk3188_common.h   |  5 +--
 include/configs/rk322x_common.h   |  5 +--
 include/configs/rk3288_common.h   |  5 +--
 include/configs/rk3308_common.h   |  4 +--
 include/configs/rk3328_common.h   |  4 +--
 include/configs/rk3368_common.h   |  5 +--
 include/configs/rk3399_common.h   |  2 +-
 include/configs/rk3568_common.h   |  4 +--
 include/configs/rk3588_common.h   |  4 +--
 include/configs/rockchip-common.h | 58 -------------------------------
 include/configs/rv1108_common.h   |  3 +-
 16 files changed, 14 insertions(+), 104 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index e324387ad057..5fe21413d6bc 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1956,7 +1956,6 @@ config ARCH_ROCKCHIP
 	imply ADC
 	imply CMD_DM
 	imply DEBUG_UART_BOARD_INIT
-	imply DISTRO_DEFAULTS if !ROCKCHIP_RK3399
 	imply FAT_WRITE
 	imply SARADC_ROCKCHIP
 	imply SPL_SYSRESET
diff --git a/include/configs/px30_common.h b/include/configs/px30_common.h
index c0896e5f6281..a4c8bfebdf84 100644
--- a/include/configs/px30_common.h
+++ b/include/configs/px30_common.h
@@ -25,12 +25,10 @@
 	"kernel_addr_c=0x03e80000\0" \
 	"ramdisk_addr_r=0x0a200000\0"
 
-#include <config_distro_bootcmd.h>
 #define CFG_EXTRA_ENV_SETTINGS \
 	ENV_MEM_LAYOUT_SETTINGS \
 	"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
 	"partitions=" PARTS_DEFAULT \
-	ROCKCHIP_DEVICE_SETTINGS \
-	BOOTENV
+	ROCKCHIP_DEVICE_SETTINGS
 
 #endif
diff --git a/include/configs/rk3036_common.h b/include/configs/rk3036_common.h
index ea6073f29446..e056555276aa 100644
--- a/include/configs/rk3036_common.h
+++ b/include/configs/rk3036_common.h
@@ -21,15 +21,12 @@
 	"kernel_addr_r=0x62000000\0" \
 	"ramdisk_addr_r=0x64000000\0"
 
-#include <config_distro_bootcmd.h>
-
 /* Linux fails to load the fdt if it's loaded above 512M on a evb-rk3036 board,
  * so limit the fdt reallocation to that */
 #define CFG_EXTRA_ENV_SETTINGS \
 	"fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
 	"fdt_high=0x7fffffff\0" \
 	"partitions=" PARTS_DEFAULT \
-	ENV_MEM_LAYOUT_SETTINGS \
-	BOOTENV
+	ENV_MEM_LAYOUT_SETTINGS
 
 #endif
diff --git a/include/configs/rk3066_common.h b/include/configs/rk3066_common.h
index 1a6d3678df3e..7f4d48c1ea95 100644
--- a/include/configs/rk3066_common.h
+++ b/include/configs/rk3066_common.h
@@ -22,14 +22,11 @@
 	"kernel_addr_r=0x62000000\0" \
 	"ramdisk_addr_r=0x64000000\0"
 
-#include <config_distro_bootcmd.h>
-
 #define CFG_EXTRA_ENV_SETTINGS \
 	"fdt_high=0x6fffffff\0" \
 	"initrd_high=0x6fffffff\0" \
 	"partitions=" PARTS_DEFAULT \
 	ENV_MEM_LAYOUT_SETTINGS \
-	ROCKCHIP_DEVICE_SETTINGS \
-	BOOTENV
+	ROCKCHIP_DEVICE_SETTINGS
 
 #endif
diff --git a/include/configs/rk3128_common.h b/include/configs/rk3128_common.h
index 8aa17bfbd364..6d531f6bc812 100644
--- a/include/configs/rk3128_common.h
+++ b/include/configs/rk3128_common.h
@@ -26,11 +26,9 @@
 	"kernel_addr_r=0x62000000\0" \
 	"ramdisk_addr_r=0x64000000\0"
 
-#include <config_distro_bootcmd.h>
 #define CFG_EXTRA_ENV_SETTINGS \
 	ENV_MEM_LAYOUT_SETTINGS \
 	"fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
-	"partitions=" PARTS_DEFAULT \
-	BOOTENV
+	"partitions=" PARTS_DEFAULT
 
 #endif
diff --git a/include/configs/rk3188_common.h b/include/configs/rk3188_common.h
index ac9195672fb7..80d2619fb78f 100644
--- a/include/configs/rk3188_common.h
+++ b/include/configs/rk3188_common.h
@@ -27,8 +27,6 @@
 	"kernel_addr_r=0x62000000\0" \
 	"ramdisk_addr_r=0x64000000\0"
 
-#include <config_distro_bootcmd.h>
-
 /* Linux fails to load the fdt if it's loaded above 256M on a Rock board,
  * so limit the fdt reallocation to that */
 #define CFG_EXTRA_ENV_SETTINGS \
@@ -37,7 +35,6 @@
 	"initrd_high=0x6fffffff\0" \
 	"partitions=" PARTS_DEFAULT \
 	ENV_MEM_LAYOUT_SETTINGS \
-	ROCKCHIP_DEVICE_SETTINGS \
-	BOOTENV
+	ROCKCHIP_DEVICE_SETTINGS
 
 #endif
diff --git a/include/configs/rk322x_common.h b/include/configs/rk322x_common.h
index fcaf9c52c4be..fb6c1033499b 100644
--- a/include/configs/rk322x_common.h
+++ b/include/configs/rk322x_common.h
@@ -23,15 +23,12 @@
 	"kernel_addr_r=0x62000000\0" \
 	"ramdisk_addr_r=0x64000000\0"
 
-#include <config_distro_bootcmd.h>
-
 /* Linux fails to load the fdt if it's loaded above 512M on a evb-rk3036 board,
  * so limit the fdt reallocation to that */
 #define CFG_EXTRA_ENV_SETTINGS \
 	"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
 	"fdt_high=0x7fffffff\0" \
 	"partitions=" PARTS_DEFAULT \
-	ENV_MEM_LAYOUT_SETTINGS \
-	BOOTENV
+	ENV_MEM_LAYOUT_SETTINGS
 
 #endif
diff --git a/include/configs/rk3288_common.h b/include/configs/rk3288_common.h
index 5f29432be10b..fd70b4fc862e 100644
--- a/include/configs/rk3288_common.h
+++ b/include/configs/rk3288_common.h
@@ -26,8 +26,6 @@
 	"kernel_addr_r=0x02000000\0" \
 	"ramdisk_addr_r=0x04000000\0"
 
-#include <config_distro_bootcmd.h>
-
 /* Linux fails to load the fdt if it's loaded above 256M on a Rock 2 board, so
  * limit the fdt reallocation to that */
 #define CFG_EXTRA_ENV_SETTINGS \
@@ -36,7 +34,6 @@
 	"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
 	"partitions=" PARTS_DEFAULT \
 	ENV_MEM_LAYOUT_SETTINGS \
-	ROCKCHIP_DEVICE_SETTINGS \
-	BOOTENV
+	ROCKCHIP_DEVICE_SETTINGS
 
 #endif
diff --git a/include/configs/rk3308_common.h b/include/configs/rk3308_common.h
index 55a0dfecb21b..3e33f6af3d35 100644
--- a/include/configs/rk3308_common.h
+++ b/include/configs/rk3308_common.h
@@ -21,11 +21,9 @@
 	"kernel_addr_r=0x00680000\0" \
 	"ramdisk_addr_r=0x04000000\0"
 
-#include <config_distro_bootcmd.h>
 #define CFG_EXTRA_ENV_SETTINGS \
 	ENV_MEM_LAYOUT_SETTINGS \
 	"partitions=" PARTS_DEFAULT \
-	ROCKCHIP_DEVICE_SETTINGS \
-	BOOTENV
+	ROCKCHIP_DEVICE_SETTINGS
 
 #endif
diff --git a/include/configs/rk3328_common.h b/include/configs/rk3328_common.h
index 24b21c024dee..0e1a63228391 100644
--- a/include/configs/rk3328_common.h
+++ b/include/configs/rk3328_common.h
@@ -23,11 +23,9 @@
 	"kernel_comp_addr_r=0x08000000\0" \
 	"kernel_comp_size=0x2000000\0"
 
-#include <config_distro_bootcmd.h>
 #define CFG_EXTRA_ENV_SETTINGS \
 	ENV_MEM_LAYOUT_SETTINGS \
 	"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
-	"partitions=" PARTS_DEFAULT \
-	BOOTENV
+	"partitions=" PARTS_DEFAULT
 
 #endif
diff --git a/include/configs/rk3368_common.h b/include/configs/rk3368_common.h
index 9aa256b59592..526a5dde787e 100644
--- a/include/configs/rk3368_common.h
+++ b/include/configs/rk3368_common.h
@@ -23,11 +23,8 @@
 	"kernel_addr_r=0x280000\0" \
 	"ramdisk_addr_r=0x5bf0000\0"
 
-#include <config_distro_bootcmd.h>
-
 #define CFG_EXTRA_ENV_SETTINGS \
 	"fdtfile=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
-	ENV_MEM_LAYOUT_SETTINGS	\
-	BOOTENV
+	ENV_MEM_LAYOUT_SETTINGS
 
 #endif
diff --git a/include/configs/rk3399_common.h b/include/configs/rk3399_common.h
index 3ef9ffa2e9c4..8fcd800495fc 100644
--- a/include/configs/rk3399_common.h
+++ b/include/configs/rk3399_common.h
@@ -56,7 +56,7 @@
 	"boot_targets=" BOOT_TARGETS "\0" \
 	"altbootcmd=" \
 		"setenv boot_syslinux_conf extlinux/extlinux-rollback.conf;" \
-		"run distro_bootcmd\0"
+		"bootflow scan\0"
 
 #endif
 
diff --git a/include/configs/rk3568_common.h b/include/configs/rk3568_common.h
index a5e1dde50888..1fe74c051aff 100644
--- a/include/configs/rk3568_common.h
+++ b/include/configs/rk3568_common.h
@@ -22,12 +22,10 @@
 	"kernel_addr_r=0x02080000\0"	\
 	"ramdisk_addr_r=0x0a200000\0"
 
-#include <config_distro_bootcmd.h>
 #define CFG_EXTRA_ENV_SETTINGS		\
 	ENV_MEM_LAYOUT_SETTINGS			\
 	"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
 	"partitions=" PARTS_DEFAULT		\
-	ROCKCHIP_DEVICE_SETTINGS		\
-	BOOTENV
+	ROCKCHIP_DEVICE_SETTINGS
 
 #endif
diff --git a/include/configs/rk3588_common.h b/include/configs/rk3588_common.h
index abd20139aaf3..c7db24443a15 100644
--- a/include/configs/rk3588_common.h
+++ b/include/configs/rk3588_common.h
@@ -21,12 +21,10 @@
 	"kernel_addr_r=0x02080000\0"	\
 	"ramdisk_addr_r=0x0a200000\0"
 
-#include <config_distro_bootcmd.h>
 #define CFG_EXTRA_ENV_SETTINGS \
 	"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
 	"partitions=" PARTS_DEFAULT		\
 	ENV_MEM_LAYOUT_SETTINGS			\
-	ROCKCHIP_DEVICE_SETTINGS		\
-	BOOTENV
+	ROCKCHIP_DEVICE_SETTINGS
 
 #endif /* __CONFIG_RK3588_COMMON_H */
diff --git a/include/configs/rockchip-common.h b/include/configs/rockchip-common.h
index b7c5c6634394..203354c51761 100644
--- a/include/configs/rockchip-common.h
+++ b/include/configs/rockchip-common.h
@@ -15,67 +15,9 @@
 
 #ifndef CONFIG_SPL_BUILD
 
-/* First try to boot from SD (index 1), then eMMC (index 0) */
-#if IS_ENABLED(CONFIG_CMD_MMC)
-	#define BOOT_TARGET_MMC(func) \
-		func(MMC, mmc, 1) \
-		func(MMC, mmc, 0)
-#else
-	#define BOOT_TARGET_MMC(func)
-#endif
-
-#if IS_ENABLED(CONFIG_CMD_NVME)
-	#define BOOT_TARGET_NVME(func) func(NVME, nvme, 0)
-#else
-	#define BOOT_TARGET_NVME(func)
-#endif
-
-#if IS_ENABLED(CONFIG_CMD_SCSI)
-	#define BOOT_TARGET_SCSI(func) func(SCSI, scsi, 0)
-#else
-	#define BOOT_TARGET_SCSI(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
-
-#if IS_ENABLED(CONFIG_CMD_SF)
-	#define BOOT_TARGET_SF(func)	func(SF, sf, 0)
-#else
-	#define BOOT_TARGET_SF(func)
-#endif
-
 #ifdef CONFIG_ROCKCHIP_RK3399
-#define BOOT_TARGET_DEVICES(func) \
-	BOOT_TARGET_MMC(func) \
-	BOOT_TARGET_NVME(func) \
-	BOOT_TARGET_SCSI(func) \
-	BOOT_TARGET_USB(func) \
-	BOOT_TARGET_PXE(func) \
-	BOOT_TARGET_DHCP(func) \
-	BOOT_TARGET_SF(func)
 #define BOOT_TARGETS	"mmc1 mmc0 nvme scsi usb pxe dhcp spi"
 #else
-#define BOOT_TARGET_DEVICES(func) \
-	BOOT_TARGET_MMC(func) \
-	BOOT_TARGET_USB(func) \
-	BOOT_TARGET_PXE(func) \
-	BOOT_TARGET_DHCP(func)
 #define BOOT_TARGETS	"mmc1 mmc0 usb pxe dhcp"
 #endif
 
diff --git a/include/configs/rv1108_common.h b/include/configs/rv1108_common.h
index 63551b47e200..cc7b56ece15d 100644
--- a/include/configs/rv1108_common.h
+++ b/include/configs/rv1108_common.h
@@ -29,7 +29,6 @@
 #define CFG_EXTRA_ENV_SETTINGS \
 	ENV_MEM_LAYOUT_SETTINGS \
 	"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
-	"partitions=" PARTS_DEFAULT \
-	BOOTENV
+	"partitions=" PARTS_DEFAULT
 
 #endif
-- 
2.40.0.rc1.284.g88254d51c5-goog



More information about the U-Boot mailing list