public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH v4 1/4] bootstd: Enable BOOTSTD_DEFAULTS by default
@ 2023-03-29  7:16 Simon Glass
  2023-03-29  7:16 ` [PATCH v4 2/4] rockchip: Move to standard boot Simon Glass
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Simon Glass @ 2023-03-29  7:16 UTC (permalink / raw)
  To: U-Boot Mailing List
  Cc: huang lin, Jeffy Chen, Simon Glass, Kever Yang, Philipp Tomsich,
	Vagrant Cascadian, Tom Rini, Albert ARIBAUD (3ADEV),
	Eugen Hristev, Greg Gallagher, Heiko Schocher, Michal Simek,
	Nicolas Ferre, Philippe Reynes, Tony Dinh

This is needed to enable the boot command used to start standard boot.
Enable it by default. This brings in quite a few features, mostly in
common with DISTRO_DEFAULTS

Disable this option for boards which don't have enough space.

Disable CONFIG_ENV_VARS_UBOOT_CONFIG for some Xilinx boards which have
a very small environment. Disable BOOTSTD_DEFAULTS for smartweb since
it is too close to its limit.

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

Changes in v4:
- Rebase to -next

 boot/Kconfig                                 | 1 +
 configs/bk4r1_defconfig                      | 1 +
 configs/sama5d27_giantboard_defconfig        | 1 +
 configs/sama5d27_som1_ek_mmc1_defconfig      | 1 +
 configs/sama5d27_som1_ek_mmc_defconfig       | 1 +
 configs/sama5d27_som1_ek_qspiflash_defconfig | 1 +
 configs/sama5d27_wlsom1_ek_mmc_defconfig     | 1 +
 configs/sama5d2_icp_mmc_defconfig            | 1 +
 configs/sama5d2_xplained_emmc_defconfig      | 1 +
 configs/sama5d2_xplained_mmc_defconfig       | 1 +
 configs/sama5d2_xplained_qspiflash_defconfig | 1 +
 configs/sheevaplug_defconfig                 | 1 +
 configs/smartweb_defconfig                   | 1 +
 configs/taurus_defconfig                     | 1 +
 configs/tools-only_defconfig                 | 2 +-
 configs/xilinx_versal_mini_emmc0_defconfig   | 1 +
 configs/xilinx_versal_mini_emmc1_defconfig   | 1 +
 configs/xilinx_zynqmp_mini_emmc0_defconfig   | 2 +-
 configs/xilinx_zynqmp_mini_emmc1_defconfig   | 2 +-
 19 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/boot/Kconfig b/boot/Kconfig
index d95a2a702665..61ebc2750154 100644
--- a/boot/Kconfig
+++ b/boot/Kconfig
@@ -435,6 +435,7 @@ if BOOTSTD
 config BOOTSTD_DEFAULTS
 	bool "Select some common defaults for standard boot"
 	depends on BOOTSTD
+	default y
 	imply USE_BOOTCOMMAND
 	select BOOT_DEFAULTS
 	help
diff --git a/configs/bk4r1_defconfig b/configs/bk4r1_defconfig
index 66adeac725ce..298518e7ea59 100644
--- a/configs/bk4r1_defconfig
+++ b/configs/bk4r1_defconfig
@@ -21,6 +21,7 @@ CONFIG_SYS_MEMTEST_END=0x87c00000
 CONFIG_HAS_BOARD_SIZE_LIMIT=y
 CONFIG_BOARD_SIZE_LIMIT=520192
 CONFIG_FIT=y
+# CONFIG_BOOTSTD_DEFAULTS is not set
 CONFIG_BOOTDELAY=3
 CONFIG_AUTOBOOT_KEYED=y
 CONFIG_AUTOBOOT_PROMPT="Enter passphrase to stop autoboot, booting in %d seconds\n"
diff --git a/configs/sama5d27_giantboard_defconfig b/configs/sama5d27_giantboard_defconfig
index 39d1dcdbb796..39680fcf69d7 100644
--- a/configs/sama5d27_giantboard_defconfig
+++ b/configs/sama5d27_giantboard_defconfig
@@ -29,6 +29,7 @@ CONFIG_DEBUG_UART=y
 CONFIG_ENV_VARS_UBOOT_CONFIG=y
 CONFIG_SYS_MONITOR_LEN=524288
 CONFIG_FIT=y
+# CONFIG_BOOTSTD_DEFAULTS is not set
 CONFIG_SD_BOOT=y
 CONFIG_BOOTDELAY=3
 CONFIG_AUTOBOOT_KEYED=y
diff --git a/configs/sama5d27_som1_ek_mmc1_defconfig b/configs/sama5d27_som1_ek_mmc1_defconfig
index cdb000fe1ebe..dd76c79b82e3 100644
--- a/configs/sama5d27_som1_ek_mmc1_defconfig
+++ b/configs/sama5d27_som1_ek_mmc1_defconfig
@@ -28,6 +28,7 @@ CONFIG_DEBUG_UART=y
 CONFIG_ENV_VARS_UBOOT_CONFIG=y
 CONFIG_SYS_MONITOR_LEN=524288
 CONFIG_FIT=y
+# CONFIG_BOOTSTD_DEFAULTS is not set
 CONFIG_SD_BOOT=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
diff --git a/configs/sama5d27_som1_ek_mmc_defconfig b/configs/sama5d27_som1_ek_mmc_defconfig
index 1471cebaf4d0..d5c3c01cf707 100644
--- a/configs/sama5d27_som1_ek_mmc_defconfig
+++ b/configs/sama5d27_som1_ek_mmc_defconfig
@@ -29,6 +29,7 @@ CONFIG_DEBUG_UART=y
 CONFIG_ENV_VARS_UBOOT_CONFIG=y
 CONFIG_SYS_MONITOR_LEN=524288
 CONFIG_FIT=y
+# CONFIG_BOOTSTD_DEFAULTS is not set
 CONFIG_SD_BOOT=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
diff --git a/configs/sama5d27_som1_ek_qspiflash_defconfig b/configs/sama5d27_som1_ek_qspiflash_defconfig
index 1c8adfbb7a31..f765379985f8 100644
--- a/configs/sama5d27_som1_ek_qspiflash_defconfig
+++ b/configs/sama5d27_som1_ek_qspiflash_defconfig
@@ -29,6 +29,7 @@ CONFIG_DEBUG_UART=y
 CONFIG_ENV_VARS_UBOOT_CONFIG=y
 CONFIG_SYS_MONITOR_LEN=524288
 CONFIG_FIT=y
+# CONFIG_BOOTSTD_DEFAULTS is not set
 CONFIG_QSPI_BOOT=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
diff --git a/configs/sama5d27_wlsom1_ek_mmc_defconfig b/configs/sama5d27_wlsom1_ek_mmc_defconfig
index eeb8d209f2b4..ec11575224ee 100644
--- a/configs/sama5d27_wlsom1_ek_mmc_defconfig
+++ b/configs/sama5d27_wlsom1_ek_mmc_defconfig
@@ -27,6 +27,7 @@ CONFIG_DEBUG_UART=y
 CONFIG_ENV_VARS_UBOOT_CONFIG=y
 CONFIG_SYS_MONITOR_LEN=524288
 CONFIG_FIT=y
+# CONFIG_BOOTSTD_DEFAULTS is not set
 CONFIG_SD_BOOT=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
diff --git a/configs/sama5d2_icp_mmc_defconfig b/configs/sama5d2_icp_mmc_defconfig
index e1b602d8e5ec..2abe775480c1 100644
--- a/configs/sama5d2_icp_mmc_defconfig
+++ b/configs/sama5d2_icp_mmc_defconfig
@@ -27,6 +27,7 @@ CONFIG_DEBUG_UART=y
 CONFIG_ENV_VARS_UBOOT_CONFIG=y
 CONFIG_SYS_MONITOR_LEN=524288
 CONFIG_FIT=y
+# CONFIG_BOOTSTD_DEFAULTS is not set
 CONFIG_SD_BOOT=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
diff --git a/configs/sama5d2_xplained_emmc_defconfig b/configs/sama5d2_xplained_emmc_defconfig
index 33f1b691c7ab..8fdd9e053db6 100644
--- a/configs/sama5d2_xplained_emmc_defconfig
+++ b/configs/sama5d2_xplained_emmc_defconfig
@@ -28,6 +28,7 @@ CONFIG_DEBUG_UART=y
 CONFIG_ENV_VARS_UBOOT_CONFIG=y
 CONFIG_SYS_MONITOR_LEN=524288
 CONFIG_FIT=y
+# CONFIG_BOOTSTD_DEFAULTS is not set
 CONFIG_SD_BOOT=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
diff --git a/configs/sama5d2_xplained_mmc_defconfig b/configs/sama5d2_xplained_mmc_defconfig
index 7b6a3d207576..fa8468429277 100644
--- a/configs/sama5d2_xplained_mmc_defconfig
+++ b/configs/sama5d2_xplained_mmc_defconfig
@@ -29,6 +29,7 @@ CONFIG_DEBUG_UART=y
 CONFIG_ENV_VARS_UBOOT_CONFIG=y
 CONFIG_SYS_MONITOR_LEN=524288
 CONFIG_FIT=y
+# CONFIG_BOOTSTD_DEFAULTS is not set
 CONFIG_SD_BOOT=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
diff --git a/configs/sama5d2_xplained_qspiflash_defconfig b/configs/sama5d2_xplained_qspiflash_defconfig
index b1892239f836..b97389cd0ae5 100644
--- a/configs/sama5d2_xplained_qspiflash_defconfig
+++ b/configs/sama5d2_xplained_qspiflash_defconfig
@@ -29,6 +29,7 @@ CONFIG_DEBUG_UART=y
 CONFIG_ENV_VARS_UBOOT_CONFIG=y
 CONFIG_SYS_MONITOR_LEN=524288
 CONFIG_FIT=y
+# CONFIG_BOOTSTD_DEFAULTS is not set
 CONFIG_QSPI_BOOT=y
 CONFIG_SD_BOOT=y
 CONFIG_BOOTDELAY=3
diff --git a/configs/sheevaplug_defconfig b/configs/sheevaplug_defconfig
index 2e4901b840cb..8ecb35203333 100644
--- a/configs/sheevaplug_defconfig
+++ b/configs/sheevaplug_defconfig
@@ -18,6 +18,7 @@ CONFIG_IDENT_STRING="\nMarvell-Sheevaplug"
 CONFIG_SYS_LOAD_ADDR=0x800000
 CONFIG_HAS_BOARD_SIZE_LIMIT=y
 CONFIG_BOARD_SIZE_LIMIT=524288
+# CONFIG_BOOTSTD_DEFAULTS is not set
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTCOMMAND=y
 CONFIG_BOOTCOMMAND="${x_bootcmd_kernel}; setenv bootargs ${x_bootargs} ${x_bootargs_root}; bootm 0x6400000;"
diff --git a/configs/smartweb_defconfig b/configs/smartweb_defconfig
index 4cbdab0b37d8..eae8bba87da7 100644
--- a/configs/smartweb_defconfig
+++ b/configs/smartweb_defconfig
@@ -25,6 +25,7 @@ CONFIG_SPL=y
 CONFIG_ENV_OFFSET_REDUND=0x180000
 CONFIG_SYS_LOAD_ADDR=0x22000000
 CONFIG_FIT=y
+# CONFIG_BOOTSTD_DEFAULTS is not set
 CONFIG_NAND_BOOT=y
 CONFIG_BOOTDELAY=3
 CONFIG_AUTOBOOT_KEYED=y
diff --git a/configs/taurus_defconfig b/configs/taurus_defconfig
index 2a85c0d19026..c77ea219f6ae 100644
--- a/configs/taurus_defconfig
+++ b/configs/taurus_defconfig
@@ -33,6 +33,7 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y
 CONFIG_SPL_SPI=y
 CONFIG_SYS_LOAD_ADDR=0x22000000
 CONFIG_DEBUG_UART=y
+# CONFIG_BOOTSTD_DEFAULTS is not set
 CONFIG_NAND_BOOT=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
diff --git a/configs/tools-only_defconfig b/configs/tools-only_defconfig
index 23e1f0e9dba0..910986a1b55c 100644
--- a/configs/tools-only_defconfig
+++ b/configs/tools-only_defconfig
@@ -10,8 +10,8 @@ CONFIG_TIMESTAMP=y
 CONFIG_FIT_SIGNATURE=y
 # CONFIG_BOOTSTD_FULL is not set
 # CONFIG_BOOTMETH_VBE is not set
-CONFIG_USE_BOOTCOMMAND=y
 CONFIG_BOOTCOMMAND="run distro_bootcmd"
+# CONFIG_AVB_VERIFY is not set
 # CONFIG_CMD_BOOTD is not set
 # CONFIG_CMD_BOOTM is not set
 # CONFIG_CMD_ELF is not set
diff --git a/configs/xilinx_versal_mini_emmc0_defconfig b/configs/xilinx_versal_mini_emmc0_defconfig
index 31b3c02f7389..8aadc7f6805b 100644
--- a/configs/xilinx_versal_mini_emmc0_defconfig
+++ b/configs/xilinx_versal_mini_emmc0_defconfig
@@ -16,6 +16,7 @@ CONFIG_SYS_PROMPT="Versal> "
 CONFIG_SYS_LOAD_ADDR=0x8000000
 # CONFIG_EXPERT is not set
 CONFIG_REMAKE_ELF=y
+# CONFIG_BOOTSTD_DEFAULTS is not set
 # CONFIG_AUTOBOOT is not set
 CONFIG_USE_BOOTCOMMAND=y
 CONFIG_BOOTCOMMAND="run distro_bootcmd"
diff --git a/configs/xilinx_versal_mini_emmc1_defconfig b/configs/xilinx_versal_mini_emmc1_defconfig
index 5480cf1d9cc4..5ccc20048212 100644
--- a/configs/xilinx_versal_mini_emmc1_defconfig
+++ b/configs/xilinx_versal_mini_emmc1_defconfig
@@ -16,6 +16,7 @@ CONFIG_SYS_PROMPT="Versal> "
 CONFIG_SYS_LOAD_ADDR=0x8000000
 # CONFIG_EXPERT is not set
 CONFIG_REMAKE_ELF=y
+# CONFIG_BOOTSTD_DEFAULTS is not set
 # CONFIG_AUTOBOOT is not set
 CONFIG_USE_BOOTCOMMAND=y
 CONFIG_BOOTCOMMAND="run distro_bootcmd"
diff --git a/configs/xilinx_zynqmp_mini_emmc0_defconfig b/configs/xilinx_zynqmp_mini_emmc0_defconfig
index 54b22aefa1d9..47eab450c90a 100644
--- a/configs/xilinx_zynqmp_mini_emmc0_defconfig
+++ b/configs/xilinx_zynqmp_mini_emmc0_defconfig
@@ -13,11 +13,11 @@ CONFIG_DEFAULT_DEVICE_TREE="zynqmp-mini-emmc0"
 CONFIG_SPL_STACK=0xfffffffc
 CONFIG_SPL_SYS_MALLOC_F_LEN=0x600
 CONFIG_SPL=y
-# CONFIG_CMD_ZYNQMP is not set
 CONFIG_SYS_LOAD_ADDR=0x8000000
 CONFIG_REMAKE_ELF=y
 # CONFIG_MP is not set
 CONFIG_FIT=y
+# CONFIG_BOOTSTD_DEFAULTS is not set
 CONFIG_SUPPORT_RAW_INITRD=y
 # CONFIG_AUTOBOOT is not set
 # CONFIG_DISPLAY_CPUINFO is not set
diff --git a/configs/xilinx_zynqmp_mini_emmc1_defconfig b/configs/xilinx_zynqmp_mini_emmc1_defconfig
index eb78e0a39f3c..03b34777c9f4 100644
--- a/configs/xilinx_zynqmp_mini_emmc1_defconfig
+++ b/configs/xilinx_zynqmp_mini_emmc1_defconfig
@@ -13,11 +13,11 @@ CONFIG_DEFAULT_DEVICE_TREE="zynqmp-mini-emmc1"
 CONFIG_SPL_STACK=0xfffffffc
 CONFIG_SPL_SYS_MALLOC_F_LEN=0x600
 CONFIG_SPL=y
-# CONFIG_CMD_ZYNQMP is not set
 CONFIG_SYS_LOAD_ADDR=0x8000000
 CONFIG_REMAKE_ELF=y
 # CONFIG_MP is not set
 CONFIG_FIT=y
+# CONFIG_BOOTSTD_DEFAULTS is not set
 CONFIG_SUPPORT_RAW_INITRD=y
 # CONFIG_AUTOBOOT is not set
 # CONFIG_DISPLAY_CPUINFO is not set
-- 
2.40.0.348.gf938b09366-goog


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v4 2/4] rockchip: Move to standard boot
  2023-03-29  7:16 [PATCH v4 1/4] bootstd: Enable BOOTSTD_DEFAULTS by default Simon Glass
@ 2023-03-29  7:16 ` Simon Glass
  2023-03-29  7:16 ` [PATCH v4 3/4] bootstd: Relax the argument requirements for bootflow scan Simon Glass
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Simon Glass @ 2023-03-29  7:16 UTC (permalink / raw)
  To: U-Boot Mailing List
  Cc: huang lin, Jeffy Chen, Simon Glass, Kever Yang, Philipp Tomsich,
	Vagrant Cascadian, Tom Rini, Christopher Obbard, Jagan Teki,
	Johan Jonker, Jonas Karlman, Peng Fan, Philipp Tomsich,
	Quentin Schulz

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

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

Changes in v4:
- Add back BOOT_TARGETS

Changes in v3:
- Update rk3588 boards too

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

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

diff --git a/include/configs/px30_common.h b/include/configs/px30_common.h
index 8df481b09788..6fbd2679f099 100644
--- a/include/configs/px30_common.h
+++ b/include/configs/px30_common.h
@@ -24,12 +24,11 @@
 	"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
+	"boot_targets=" BOOT_TARGETS "\0"
 
 #endif
diff --git a/include/configs/rk3036_common.h b/include/configs/rk3036_common.h
index ea6073f29446..c2abd14e114b 100644
--- a/include/configs/rk3036_common.h
+++ b/include/configs/rk3036_common.h
@@ -21,8 +21,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 512M on a evb-rk3036 board,
  * so limit the fdt reallocation to that */
 #define CFG_EXTRA_ENV_SETTINGS \
@@ -30,6 +28,6 @@
 	"fdt_high=0x7fffffff\0" \
 	"partitions=" PARTS_DEFAULT \
 	ENV_MEM_LAYOUT_SETTINGS \
-	BOOTENV
+	"boot_targets=" BOOT_TARGETS "\0"
 
 #endif
diff --git a/include/configs/rk3066_common.h b/include/configs/rk3066_common.h
index 1a6d3678df3e..d70c8f77d487 100644
--- a/include/configs/rk3066_common.h
+++ b/include/configs/rk3066_common.h
@@ -22,14 +22,12 @@
 	"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
+	"boot_targets=" BOOT_TARGETS "\0"
 
 #endif
diff --git a/include/configs/rk3128_common.h b/include/configs/rk3128_common.h
index 8736b14d1015..d8269b0ec96f 100644
--- a/include/configs/rk3128_common.h
+++ b/include/configs/rk3128_common.h
@@ -22,11 +22,10 @@
 	"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
+	"boot_targets=" BOOT_TARGETS "\0"
 
 #endif
diff --git a/include/configs/rk3188_common.h b/include/configs/rk3188_common.h
index fcb274565e9e..a8cee1e44d4d 100644
--- a/include/configs/rk3188_common.h
+++ b/include/configs/rk3188_common.h
@@ -21,8 +21,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 \
@@ -32,6 +30,6 @@
 	"partitions=" PARTS_DEFAULT \
 	ENV_MEM_LAYOUT_SETTINGS \
 	ROCKCHIP_DEVICE_SETTINGS \
-	BOOTENV
+	"boot_targets=" BOOT_TARGETS "\0"
 
 #endif
diff --git a/include/configs/rk322x_common.h b/include/configs/rk322x_common.h
index 39a40f4e2d10..15f77df3e17e 100644
--- a/include/configs/rk322x_common.h
+++ b/include/configs/rk322x_common.h
@@ -22,8 +22,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 512M on a evb-rk3036 board,
  * so limit the fdt reallocation to that */
 #define CFG_EXTRA_ENV_SETTINGS \
@@ -31,6 +29,6 @@
 	"fdt_high=0x7fffffff\0" \
 	"partitions=" PARTS_DEFAULT \
 	ENV_MEM_LAYOUT_SETTINGS \
-	BOOTENV
+	"boot_targets=" BOOT_TARGETS "\0"
 
 #endif
diff --git a/include/configs/rk3288_common.h b/include/configs/rk3288_common.h
index 71d2426d72a4..3063076a97af 100644
--- a/include/configs/rk3288_common.h
+++ b/include/configs/rk3288_common.h
@@ -23,8 +23,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 \
@@ -34,6 +32,6 @@
 	"partitions=" PARTS_DEFAULT \
 	ENV_MEM_LAYOUT_SETTINGS \
 	ROCKCHIP_DEVICE_SETTINGS \
-	BOOTENV
+	"boot_targets=" BOOT_TARGETS "\0"
 
 #endif
diff --git a/include/configs/rk3308_common.h b/include/configs/rk3308_common.h
index ba9ee112e2df..7d55fcd975c6 100644
--- a/include/configs/rk3308_common.h
+++ b/include/configs/rk3308_common.h
@@ -20,11 +20,10 @@
 	"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
+	"boot_targets=" BOOT_TARGETS "\0"
 
 #endif
diff --git a/include/configs/rk3328_common.h b/include/configs/rk3328_common.h
index e565ccff8979..e920ec7e5ddb 100644
--- a/include/configs/rk3328_common.h
+++ b/include/configs/rk3328_common.h
@@ -22,11 +22,10 @@
 	"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
+	"boot_targets=" BOOT_TARGETS "\0"
 
 #endif
diff --git a/include/configs/rk3368_common.h b/include/configs/rk3368_common.h
index 9aa256b59592..ccb5369b9018 100644
--- a/include/configs/rk3368_common.h
+++ b/include/configs/rk3368_common.h
@@ -23,11 +23,9 @@
 	"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 \
+	"boot_targets=" BOOT_TARGETS "\0"
 
 #endif
diff --git a/include/configs/rk3568_common.h b/include/configs/rk3568_common.h
index a5e1dde50888..366ccc97db75 100644
--- a/include/configs/rk3568_common.h
+++ b/include/configs/rk3568_common.h
@@ -22,12 +22,11 @@
 	"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 \
+	"boot_targets=" BOOT_TARGETS "\0"
 
 #endif
diff --git a/include/configs/rk3588_common.h b/include/configs/rk3588_common.h
index abd20139aaf3..1cc16fe15206 100644
--- a/include/configs/rk3588_common.h
+++ b/include/configs/rk3588_common.h
@@ -21,12 +21,11 @@
 	"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 \
+	"boot_targets=" BOOT_TARGETS "\0"
 
 #endif /* __CONFIG_RK3588_COMMON_H */
diff --git a/include/configs/rockchip-common.h b/include/configs/rockchip-common.h
index 18544d75acc6..e9f4072b7e78 100644
--- a/include/configs/rockchip-common.h
+++ b/include/configs/rockchip-common.h
@@ -13,67 +13,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 050d37bff0b5..3bf70a0e0ae2 100644
--- a/include/configs/rv1108_common.h
+++ b/include/configs/rv1108_common.h
@@ -28,6 +28,6 @@
 	ENV_MEM_LAYOUT_SETTINGS \
 	"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
 	"partitions=" PARTS_DEFAULT \
-	BOOTENV
+	"boot_targets=" BOOT_TARGETS "\0"
 
 #endif
-- 
2.40.0.348.gf938b09366-goog


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v4 3/4] bootstd: Relax the argument requirements for bootflow scan
  2023-03-29  7:16 [PATCH v4 1/4] bootstd: Enable BOOTSTD_DEFAULTS by default Simon Glass
  2023-03-29  7:16 ` [PATCH v4 2/4] rockchip: Move to standard boot Simon Glass
@ 2023-03-29  7:16 ` Simon Glass
  2023-03-29 14:17   ` Tom Rini
  2023-03-29  7:16 ` [PATCH v4 4/4] rockchip: Use the same boot_targets for all boards Simon Glass
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: Simon Glass @ 2023-03-29  7:16 UTC (permalink / raw)
  To: U-Boot Mailing List
  Cc: huang lin, Jeffy Chen, Simon Glass, Kever Yang, Philipp Tomsich,
	Vagrant Cascadian, Tom Rini, Philippe Reynes

Currently this does not allow the -lb flags unless CMD_BOOTFLOW_FULL is
enabled, which means that we need two separate boot commands. Relax this
to make things easier. It is only a small amount of extra code.

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

(no changes since v1)

 boot/Kconfig   |  3 +--
 cmd/bootflow.c | 14 ++++++++++++--
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/boot/Kconfig b/boot/Kconfig
index 61ebc2750154..ae0e7b738c0c 100644
--- a/boot/Kconfig
+++ b/boot/Kconfig
@@ -1554,8 +1554,7 @@ config USE_BOOTCOMMAND
 config BOOTCOMMAND
 	string "bootcmd value"
 	depends on USE_BOOTCOMMAND && !USE_DEFAULT_ENV_FILE
-	default "bootflow scan -lb" if BOOTSTD_BOOTCOMMAND && CMD_BOOTFLOW_FULL
-	default "bootflow scan" if BOOTSTD_BOOTCOMMAND && !CMD_BOOTFLOW_FULL
+	default "bootflow scan -lb" if BOOTSTD_BOOTCOMMAND
 	default "run distro_bootcmd" if !BOOTSTD_BOOTCOMMAND && DISTRO_DEFAULTS
 	help
 	  This is the string of commands that will be used as bootcmd and if
diff --git a/cmd/bootflow.c b/cmd/bootflow.c
index 42f6e14a4370..c345b020070f 100644
--- a/cmd/bootflow.c
+++ b/cmd/bootflow.c
@@ -124,9 +124,19 @@ static int do_bootflow_scan(struct cmd_tbl *cmdtp, int flag, int argc,
 		if (!label)
 			dev = std->cur_bootdev;
 	} else {
+		/*
+		 * allow -b and -l (which is ignored) but complain about
+		 * anything else
+		 */
 		if (has_args) {
-			printf("Flags not supported: enable CONFIG_BOOTFLOW_FULL\n");
-			return CMD_RET_USAGE;
+			char *p;
+
+			for (p = argv[1] + 1; *p; p++) {
+				if (*p != 'b' && *p != 'l') {
+					printf("Flags not supported: enable CONFIG_BOOTFLOW_FULL\n");
+					return CMD_RET_USAGE;
+				}
+			}
 		}
 		boot = true;
 	}
-- 
2.40.0.348.gf938b09366-goog


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v4 4/4] rockchip: Use the same boot_targets for all boards
  2023-03-29  7:16 [PATCH v4 1/4] bootstd: Enable BOOTSTD_DEFAULTS by default Simon Glass
  2023-03-29  7:16 ` [PATCH v4 2/4] rockchip: Move to standard boot Simon Glass
  2023-03-29  7:16 ` [PATCH v4 3/4] bootstd: Relax the argument requirements for bootflow scan Simon Glass
@ 2023-03-29  7:16 ` Simon Glass
  2023-03-29 14:19   ` Tom Rini
  2023-03-29  7:41 ` [PATCH v4 1/4] bootstd: Enable BOOTSTD_DEFAULTS by default Michal Simek
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: Simon Glass @ 2023-03-29  7:16 UTC (permalink / raw)
  To: U-Boot Mailing List
  Cc: huang lin, Jeffy Chen, Simon Glass, Kever Yang, Philipp Tomsich,
	Vagrant Cascadian, Tom Rini, Jonas Karlman, Philipp Tomsich

It doesn't really matter if we mention things which are not present. For
example, if 'nvme' is included but the board does not support it, we get
a message like:

   Unknown uclass 'nvme' in label

This seems tolerable. If it creates confusion we could perhaps find a way
to avoid the message, e.g. by maintaining a list of uclasses which may
be missing from the build and supressing warnings about them.

It is simpler to use the same target list for all boards, so drop the
different one for rk3399.

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

Changes in v4:
- Add new patch to use the same boot_targets for all boards

 include/configs/rockchip-common.h | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/include/configs/rockchip-common.h b/include/configs/rockchip-common.h
index e9f4072b7e78..9121bba37384 100644
--- a/include/configs/rockchip-common.h
+++ b/include/configs/rockchip-common.h
@@ -13,11 +13,7 @@
 
 #ifndef CONFIG_SPL_BUILD
 
-#ifdef CONFIG_ROCKCHIP_RK3399
 #define BOOT_TARGETS	"mmc1 mmc0 nvme scsi usb pxe dhcp spi"
-#else
-#define BOOT_TARGETS	"mmc1 mmc0 usb pxe dhcp"
-#endif
 
 #ifdef CONFIG_ARM64
 #define ROOT_UUID "B921B045-1DF0-41C3-AF44-4C6F280D3FAE;\0"
-- 
2.40.0.348.gf938b09366-goog


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH v4 1/4] bootstd: Enable BOOTSTD_DEFAULTS by default
  2023-03-29  7:16 [PATCH v4 1/4] bootstd: Enable BOOTSTD_DEFAULTS by default Simon Glass
                   ` (2 preceding siblings ...)
  2023-03-29  7:16 ` [PATCH v4 4/4] rockchip: Use the same boot_targets for all boards Simon Glass
@ 2023-03-29  7:41 ` Michal Simek
  2023-03-29  7:55 ` Nicolas Ferre
  2023-03-29 14:15 ` Tom Rini
  5 siblings, 0 replies; 11+ messages in thread
From: Michal Simek @ 2023-03-29  7:41 UTC (permalink / raw)
  To: Simon Glass, U-Boot Mailing List
  Cc: huang lin, Jeffy Chen, Kever Yang, Philipp Tomsich,
	Vagrant Cascadian, Tom Rini, Albert ARIBAUD (3ADEV),
	Eugen Hristev, Greg Gallagher, Heiko Schocher, Nicolas Ferre,
	Philippe Reynes, Tony Dinh



On 3/29/23 09:16, Simon Glass wrote:
> This is needed to enable the boot command used to start standard boot.
> Enable it by default. This brings in quite a few features, mostly in
> common with DISTRO_DEFAULTS
> 
> Disable this option for boards which don't have enough space.
> 
> Disable CONFIG_ENV_VARS_UBOOT_CONFIG for some Xilinx boards which have
> a very small environment. Disable BOOTSTD_DEFAULTS for smartweb since
> it is too close to its limit.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
> 
> Changes in v4:
> - Rebase to -next
> 
>   boot/Kconfig                                 | 1 +
>   configs/bk4r1_defconfig                      | 1 +
>   configs/sama5d27_giantboard_defconfig        | 1 +
>   configs/sama5d27_som1_ek_mmc1_defconfig      | 1 +
>   configs/sama5d27_som1_ek_mmc_defconfig       | 1 +
>   configs/sama5d27_som1_ek_qspiflash_defconfig | 1 +
>   configs/sama5d27_wlsom1_ek_mmc_defconfig     | 1 +
>   configs/sama5d2_icp_mmc_defconfig            | 1 +
>   configs/sama5d2_xplained_emmc_defconfig      | 1 +
>   configs/sama5d2_xplained_mmc_defconfig       | 1 +
>   configs/sama5d2_xplained_qspiflash_defconfig | 1 +
>   configs/sheevaplug_defconfig                 | 1 +
>   configs/smartweb_defconfig                   | 1 +
>   configs/taurus_defconfig                     | 1 +
>   configs/tools-only_defconfig                 | 2 +-
>   configs/xilinx_versal_mini_emmc0_defconfig   | 1 +
>   configs/xilinx_versal_mini_emmc1_defconfig   | 1 +
>   configs/xilinx_zynqmp_mini_emmc0_defconfig   | 2 +-
>   configs/xilinx_zynqmp_mini_emmc1_defconfig   | 2 +-
>   19 files changed, 19 insertions(+), 3 deletions(-)

Acked-by: Michal Simek <michal.simek@amd.com> #xilinx

Thanks,
Michal

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v4 1/4] bootstd: Enable BOOTSTD_DEFAULTS by default
  2023-03-29  7:16 [PATCH v4 1/4] bootstd: Enable BOOTSTD_DEFAULTS by default Simon Glass
                   ` (3 preceding siblings ...)
  2023-03-29  7:41 ` [PATCH v4 1/4] bootstd: Enable BOOTSTD_DEFAULTS by default Michal Simek
@ 2023-03-29  7:55 ` Nicolas Ferre
  2023-03-30  9:17   ` Simon Glass
  2023-03-29 14:15 ` Tom Rini
  5 siblings, 1 reply; 11+ messages in thread
From: Nicolas Ferre @ 2023-03-29  7:55 UTC (permalink / raw)
  To: Simon Glass, U-Boot Mailing List, Varshini Rajendran
  Cc: huang lin, Jeffy Chen, Kever Yang, Philipp Tomsich,
	Vagrant Cascadian, Tom Rini, Albert ARIBAUD (3ADEV),
	Eugen Hristev, Greg Gallagher, Heiko Schocher, Michal Simek,
	Philippe Reynes, Tony Dinh

Hi Simon,

On 29/03/2023 at 09:16, Simon Glass wrote:
> This is needed to enable the boot command used to start standard boot.
> Enable it by default. This brings in quite a few features, mostly in
> common with DISTRO_DEFAULTS
> 
> Disable this option for boards which don't have enough space.

What is the identified minimal space for benefiting from this feature?


> Disable CONFIG_ENV_VARS_UBOOT_CONFIG for some Xilinx boards which have
> a very small environment. Disable BOOTSTD_DEFAULTS for smartweb since
> it is too close to its limit.

I see that a few Microchip boards are in this case too and even if 
sama5d27 som1 ek might be impacted, I would like to double check for the 
other sama5d2 boards.

[..]

Best regards,
   Nicolas

-- 
Nicolas Ferre


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v4 1/4] bootstd: Enable BOOTSTD_DEFAULTS by default
  2023-03-29  7:16 [PATCH v4 1/4] bootstd: Enable BOOTSTD_DEFAULTS by default Simon Glass
                   ` (4 preceding siblings ...)
  2023-03-29  7:55 ` Nicolas Ferre
@ 2023-03-29 14:15 ` Tom Rini
  5 siblings, 0 replies; 11+ messages in thread
From: Tom Rini @ 2023-03-29 14:15 UTC (permalink / raw)
  To: Simon Glass
  Cc: U-Boot Mailing List, huang lin, Jeffy Chen, Kever Yang,
	Philipp Tomsich, Vagrant Cascadian, Albert ARIBAUD (3ADEV),
	Eugen Hristev, Greg Gallagher, Heiko Schocher, Michal Simek,
	Nicolas Ferre, Philippe Reynes, Tony Dinh

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

On Wed, Mar 29, 2023 at 08:16:36PM +1300, Simon Glass wrote:
> This is needed to enable the boot command used to start standard boot.
> Enable it by default. This brings in quite a few features, mostly in
> common with DISTRO_DEFAULTS
> 
> Disable this option for boards which don't have enough space.
> 
> Disable CONFIG_ENV_VARS_UBOOT_CONFIG for some Xilinx boards which have
> a very small environment. Disable BOOTSTD_DEFAULTS for smartweb since
> it is too close to its limit.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
> 
> Changes in v4:
> - Rebase to -next
> 
>  boot/Kconfig                                 | 1 +
>  configs/bk4r1_defconfig                      | 1 +
>  configs/sama5d27_giantboard_defconfig        | 1 +
>  configs/sama5d27_som1_ek_mmc1_defconfig      | 1 +
>  configs/sama5d27_som1_ek_mmc_defconfig       | 1 +
>  configs/sama5d27_som1_ek_qspiflash_defconfig | 1 +
>  configs/sama5d27_wlsom1_ek_mmc_defconfig     | 1 +
>  configs/sama5d2_icp_mmc_defconfig            | 1 +
>  configs/sama5d2_xplained_emmc_defconfig      | 1 +
>  configs/sama5d2_xplained_mmc_defconfig       | 1 +
>  configs/sama5d2_xplained_qspiflash_defconfig | 1 +
>  configs/sheevaplug_defconfig                 | 1 +
>  configs/smartweb_defconfig                   | 1 +
>  configs/taurus_defconfig                     | 1 +
>  configs/tools-only_defconfig                 | 2 +-
>  configs/xilinx_versal_mini_emmc0_defconfig   | 1 +
>  configs/xilinx_versal_mini_emmc1_defconfig   | 1 +
>  configs/xilinx_zynqmp_mini_emmc0_defconfig   | 2 +-
>  configs/xilinx_zynqmp_mini_emmc1_defconfig   | 2 +-
>  19 files changed, 19 insertions(+), 3 deletions(-)
> 
> diff --git a/boot/Kconfig b/boot/Kconfig
> index d95a2a702665..61ebc2750154 100644
> --- a/boot/Kconfig
> +++ b/boot/Kconfig
> @@ -435,6 +435,7 @@ if BOOTSTD
>  config BOOTSTD_DEFAULTS
>  	bool "Select some common defaults for standard boot"
>  	depends on BOOTSTD
> +	default y
>  	imply USE_BOOTCOMMAND
>  	select BOOT_DEFAULTS

I intentionally did not do this before, and I don't think it's right,
certainly right now. This fixes some boards (such as some mediatek SoCs
for example) that have boostd, have no bootcmd in environment and so
don't autoboot before bootstd, but do now. But it also bloats all of the
platforms that don't want bootstd because they have a real bootcmd
that's not some variant of "prepare to and then run distro_bootcmd".
Those should get bootstd disabled, first. Then we can evaluate if this
ends up being the right option.

-- 
Tom

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v4 3/4] bootstd: Relax the argument requirements for bootflow scan
  2023-03-29  7:16 ` [PATCH v4 3/4] bootstd: Relax the argument requirements for bootflow scan Simon Glass
@ 2023-03-29 14:17   ` Tom Rini
  0 siblings, 0 replies; 11+ messages in thread
From: Tom Rini @ 2023-03-29 14:17 UTC (permalink / raw)
  To: Simon Glass
  Cc: U-Boot Mailing List, huang lin, Jeffy Chen, Kever Yang,
	Philipp Tomsich, Vagrant Cascadian, Philippe Reynes

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

On Wed, Mar 29, 2023 at 08:16:38PM +1300, Simon Glass wrote:

> Currently this does not allow the -lb flags unless CMD_BOOTFLOW_FULL is
> enabled, which means that we need two separate boot commands. Relax this
> to make things easier. It is only a small amount of extra code.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
> 
> (no changes since v1)
> 
>  boot/Kconfig   |  3 +--
>  cmd/bootflow.c | 14 ++++++++++++--
>  2 files changed, 13 insertions(+), 4 deletions(-)
> 
> diff --git a/boot/Kconfig b/boot/Kconfig
> index 61ebc2750154..ae0e7b738c0c 100644
> --- a/boot/Kconfig
> +++ b/boot/Kconfig
> @@ -1554,8 +1554,7 @@ config USE_BOOTCOMMAND
>  config BOOTCOMMAND
>  	string "bootcmd value"
>  	depends on USE_BOOTCOMMAND && !USE_DEFAULT_ENV_FILE
> -	default "bootflow scan -lb" if BOOTSTD_BOOTCOMMAND && CMD_BOOTFLOW_FULL
> -	default "bootflow scan" if BOOTSTD_BOOTCOMMAND && !CMD_BOOTFLOW_FULL
> +	default "bootflow scan -lb" if BOOTSTD_BOOTCOMMAND
>  	default "run distro_bootcmd" if !BOOTSTD_BOOTCOMMAND && DISTRO_DEFAULTS
>  	help
>  	  This is the string of commands that will be used as bootcmd and if
> diff --git a/cmd/bootflow.c b/cmd/bootflow.c
> index 42f6e14a4370..c345b020070f 100644
> --- a/cmd/bootflow.c
> +++ b/cmd/bootflow.c
> @@ -124,9 +124,19 @@ static int do_bootflow_scan(struct cmd_tbl *cmdtp, int flag, int argc,
>  		if (!label)
>  			dev = std->cur_bootdev;
>  	} else {
> +		/*
> +		 * allow -b and -l (which is ignored) but complain about
> +		 * anything else
> +		 */
>  		if (has_args) {
> -			printf("Flags not supported: enable CONFIG_BOOTFLOW_FULL\n");
> -			return CMD_RET_USAGE;
> +			char *p;
> +
> +			for (p = argv[1] + 1; *p; p++) {
> +				if (*p != 'b' && *p != 'l') {
> +					printf("Flags not supported: enable CONFIG_BOOTFLOW_FULL\n");
> +					return CMD_RET_USAGE;
> +				}
> +			}
>  		}
>  		boot = true;
>  	}

I don't think this is worth it for the bit of growth everywhere,
honestly.

-- 
Tom

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v4 4/4] rockchip: Use the same boot_targets for all boards
  2023-03-29  7:16 ` [PATCH v4 4/4] rockchip: Use the same boot_targets for all boards Simon Glass
@ 2023-03-29 14:19   ` Tom Rini
  0 siblings, 0 replies; 11+ messages in thread
From: Tom Rini @ 2023-03-29 14:19 UTC (permalink / raw)
  To: Simon Glass
  Cc: U-Boot Mailing List, huang lin, Jeffy Chen, Kever Yang,
	Philipp Tomsich, Vagrant Cascadian, Jonas Karlman,
	Philipp Tomsich

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

On Wed, Mar 29, 2023 at 08:16:39PM +1300, Simon Glass wrote:

> It doesn't really matter if we mention things which are not present. For
> example, if 'nvme' is included but the board does not support it, we get
> a message like:
> 
>    Unknown uclass 'nvme' in label
> 
> This seems tolerable. If it creates confusion we could perhaps find a way
> to avoid the message, e.g. by maintaining a list of uclasses which may
> be missing from the build and supressing warnings about them.
> 
> It is simpler to use the same target list for all boards, so drop the
> different one for rk3399.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Perhaps "bootflow scan -v" should print that, but normally we don't? And
a "bootflow scan .." that finds nothing should suggest trying passing -v
to see some possible errors.

-- 
Tom

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v4 1/4] bootstd: Enable BOOTSTD_DEFAULTS by default
  2023-03-29  7:55 ` Nicolas Ferre
@ 2023-03-30  9:17   ` Simon Glass
  2023-03-30 14:09     ` Tom Rini
  0 siblings, 1 reply; 11+ messages in thread
From: Simon Glass @ 2023-03-30  9:17 UTC (permalink / raw)
  To: Nicolas Ferre
  Cc: U-Boot Mailing List, Varshini Rajendran, huang lin, Jeffy Chen,
	Kever Yang, Philipp Tomsich, Vagrant Cascadian, Tom Rini,
	Albert ARIBAUD (3ADEV), Eugen Hristev, Greg Gallagher,
	Heiko Schocher, Michal Simek, Philippe Reynes, Tony Dinh

Hi Nicolas,

On Wed, 29 Mar 2023 at 20:55, Nicolas Ferre <nicolas.ferre@microchip.com> wrote:
>
> Hi Simon,
>
> On 29/03/2023 at 09:16, Simon Glass wrote:
> > This is needed to enable the boot command used to start standard boot.
> > Enable it by default. This brings in quite a few features, mostly in
> > common with DISTRO_DEFAULTS
> >
> > Disable this option for boards which don't have enough space.
>
> What is the identified minimal space for benefiting from this feature?

Well some boards have a limit on the size of U-Boot. The defaults
enables lots of things, including ext and fat filesystems, partition
types, booti/z for ARM, etc.

I have not locked at what a minimal board requires. But if you know
what you are doing, you could drop BOOT_DEFAULTS and BOOTSTD_DEFAULTS
or DISTRO_DEFAULTS and manually enable just what you need.
>
>
> > Disable CONFIG_ENV_VARS_UBOOT_CONFIG for some Xilinx boards which have
> > a very small environment. Disable BOOTSTD_DEFAULTS for smartweb since
> > it is too close to its limit.
>
> I see that a few Microchip boards are in this case too and even if
> sama5d27 som1 ek might be impacted, I would like to double check for the
> other sama5d2 boards.

OK, sure. The really big thing is booting EFI images -
CONFIG_EFI_LOADER. It adds over 100KB I think.

Regards,
Simon

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v4 1/4] bootstd: Enable BOOTSTD_DEFAULTS by default
  2023-03-30  9:17   ` Simon Glass
@ 2023-03-30 14:09     ` Tom Rini
  0 siblings, 0 replies; 11+ messages in thread
From: Tom Rini @ 2023-03-30 14:09 UTC (permalink / raw)
  To: Simon Glass
  Cc: Nicolas Ferre, U-Boot Mailing List, Varshini Rajendran, huang lin,
	Jeffy Chen, Kever Yang, Philipp Tomsich, Vagrant Cascadian,
	Albert ARIBAUD (3ADEV), Eugen Hristev, Greg Gallagher,
	Heiko Schocher, Michal Simek, Philippe Reynes, Tony Dinh

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

On Thu, Mar 30, 2023 at 10:17:22PM +1300, Simon Glass wrote:
> Hi Nicolas,
> 
> On Wed, 29 Mar 2023 at 20:55, Nicolas Ferre <nicolas.ferre@microchip.com> wrote:
> >
> > Hi Simon,
> >
> > On 29/03/2023 at 09:16, Simon Glass wrote:
> > > This is needed to enable the boot command used to start standard boot.
> > > Enable it by default. This brings in quite a few features, mostly in
> > > common with DISTRO_DEFAULTS
> > >
> > > Disable this option for boards which don't have enough space.
> >
> > What is the identified minimal space for benefiting from this feature?
> 
> Well some boards have a limit on the size of U-Boot. The defaults
> enables lots of things, including ext and fat filesystems, partition
> types, booti/z for ARM, etc.
> 
> I have not locked at what a minimal board requires. But if you know
> what you are doing, you could drop BOOT_DEFAULTS and BOOTSTD_DEFAULTS
> or DISTRO_DEFAULTS and manually enable just what you need.
> >
> >
> > > Disable CONFIG_ENV_VARS_UBOOT_CONFIG for some Xilinx boards which have
> > > a very small environment. Disable BOOTSTD_DEFAULTS for smartweb since
> > > it is too close to its limit.
> >
> > I see that a few Microchip boards are in this case too and even if
> > sama5d27 som1 ek might be impacted, I would like to double check for the
> > other sama5d2 boards.
> 
> OK, sure. The really big thing is booting EFI images -
> CONFIG_EFI_LOADER. It adds over 100KB I think.

These are examples of platforms I was talking about. They do not use
distro boot today, and have a real bootcmd defined. They should just get
bootstd turned off now until someone is interested in seeing how bootstd
would be used here.

-- 
Tom

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-03-30 14:09 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-29  7:16 [PATCH v4 1/4] bootstd: Enable BOOTSTD_DEFAULTS by default Simon Glass
2023-03-29  7:16 ` [PATCH v4 2/4] rockchip: Move to standard boot Simon Glass
2023-03-29  7:16 ` [PATCH v4 3/4] bootstd: Relax the argument requirements for bootflow scan Simon Glass
2023-03-29 14:17   ` Tom Rini
2023-03-29  7:16 ` [PATCH v4 4/4] rockchip: Use the same boot_targets for all boards Simon Glass
2023-03-29 14:19   ` Tom Rini
2023-03-29  7:41 ` [PATCH v4 1/4] bootstd: Enable BOOTSTD_DEFAULTS by default Michal Simek
2023-03-29  7:55 ` Nicolas Ferre
2023-03-30  9:17   ` Simon Glass
2023-03-30 14:09     ` Tom Rini
2023-03-29 14:15 ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox