From 5272732d1c73f4d5f7210ce7e2d7470f2ff826fb Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 24 Mar 2023 16:58:10 -0400 Subject: rockchip: Drop bootstage stash in TPL and SPL for rockpro64 Unfortunately the IRAM used to stash the bootstage records in TPL becomes inaccessible after SPL runs. Presumably this is because of ATF taking it over. We could move the stash to another address in SPL, before passing it to U-Boot proper. But it seems easier to wait until we have support for standard passage[1] which should not be too far away. For now, disable it in TPL and SPL. [1] https://patchwork.ozlabs.org/project/uboot/cover/ 20220117150428.1580273-1-sjg@chromium.org/ Signed-off-by: Simon Glass Tested-by: Vagrant Cascadian --- configs/rockpro64-rk3399_defconfig | 5 ----- 1 file changed, 5 deletions(-) diff --git a/configs/rockpro64-rk3399_defconfig b/configs/rockpro64-rk3399_defconfig index dd67f9dff64..49614236819 100644 --- a/configs/rockpro64-rk3399_defconfig +++ b/configs/rockpro64-rk3399_defconfig @@ -13,7 +13,6 @@ CONFIG_DM_RESET=y CONFIG_ROCKCHIP_RK3399=y CONFIG_TARGET_ROCKPRO64_RK3399=y CONFIG_SPL_STACK=0x400000 -CONFIG_BOOTSTAGE_STASH_ADDR=0xff8e0000 CONFIG_DEBUG_UART_BASE=0xFF1A0000 CONFIG_DEBUG_UART_CLOCK=24000000 CONFIG_SPL_SPI_FLASH_SUPPORT=y @@ -21,11 +20,7 @@ CONFIG_SPL_SPI=y CONFIG_SYS_LOAD_ADDR=0x800800 CONFIG_DEBUG_UART=y CONFIG_BOOTSTAGE=y -CONFIG_SPL_BOOTSTAGE=y -CONFIG_TPL_BOOTSTAGE=y CONFIG_BOOTSTAGE_REPORT=y -CONFIG_SPL_BOOTSTAGE_RECORD_COUNT=10 -CONFIG_BOOTSTAGE_STASH=y CONFIG_USE_PREBOOT=y CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-rockpro64.dtb" CONFIG_DISPLAY_BOARDINFO_LATE=y -- cgit v1.2.3 From c9d4abee6d88b6dd967f84d199a2fc41ef82b232 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 24 Mar 2023 16:58:11 -0400 Subject: Move DISTRO_DEFAULTS into boot/ This relates to booting so move it in to that Kconfig file, before changing it. Signed-off-by: Simon Glass --- Kconfig | 27 --------------------------- boot/Kconfig | 27 +++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/Kconfig b/Kconfig index a75cce7e28f..b8f65589f45 100644 --- a/Kconfig +++ b/Kconfig @@ -191,33 +191,6 @@ config XEN [1] - https://xenproject.org/ -config DISTRO_DEFAULTS - bool "Select defaults suitable for booting general purpose Linux distributions" - select AUTO_COMPLETE - select CMDLINE_EDITING - select CMD_BOOTI if ARM64 - select CMD_BOOTZ if ARM && !ARM64 - select CMD_DHCP if CMD_NET - select CMD_ENV_EXISTS - select CMD_EXT2 - select CMD_EXT4 - select CMD_FAT - select CMD_FS_GENERIC - select CMD_PART if PARTITIONS - select CMD_PING if CMD_NET - select CMD_PXE if NET - select CMD_SYSBOOT - select ENV_VARS_UBOOT_CONFIG - select HUSH_PARSER - select SUPPORT_RAW_INITRD - select SYS_LONGHELP - imply CMD_MII if NET - imply USB_STORAGE - imply USE_BOOTCOMMAND - help - Select this to enable various options and commands which are suitable - for building u-boot for booting general purpose Linux distributions. - config ENV_VARS_UBOOT_CONFIG bool "Add arch, board, vendor and soc variables to default environment" help diff --git a/boot/Kconfig b/boot/Kconfig index 5f491625c82..170ab63f27d 100644 --- a/boot/Kconfig +++ b/boot/Kconfig @@ -820,6 +820,33 @@ config SYS_BOOT_RAMDISK_HIGH endmenu # Boot images +config DISTRO_DEFAULTS + bool "Select defaults suitable for booting general purpose Linux distributions" + select AUTO_COMPLETE + select CMDLINE_EDITING + select CMD_BOOTI if ARM64 + select CMD_BOOTZ if ARM && !ARM64 + select CMD_DHCP if CMD_NET + select CMD_ENV_EXISTS + select CMD_EXT2 + select CMD_EXT4 + select CMD_FAT + select CMD_FS_GENERIC + select CMD_PART if PARTITIONS + select CMD_PING if CMD_NET + select CMD_PXE if NET + select CMD_SYSBOOT + select ENV_VARS_UBOOT_CONFIG + select HUSH_PARSER + select SUPPORT_RAW_INITRD + select SYS_LONGHELP + imply CMD_MII if NET + imply USB_STORAGE + imply USE_BOOTCOMMAND + help + Select this to enable various options and commands which are suitable + for building u-boot for booting general purpose Linux distributions. + menu "Boot timing" config BOOTSTAGE -- cgit v1.2.3 From febb9852613708c768c1b40807ce502504d79002 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 24 Mar 2023 16:58:12 -0400 Subject: lmb: Enable LMB if SYS_BOOT_RAMDISK_HIGH Ramdisk relocation requires LMB, so enable it automatically to avoid build errors. Signed-off-by: Simon Glass --- boot/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/boot/Kconfig b/boot/Kconfig index 170ab63f27d..8fa3181d7e2 100644 --- a/boot/Kconfig +++ b/boot/Kconfig @@ -814,6 +814,7 @@ config SYS_BOOT_RAMDISK_HIGH depends on CMD_BOOTM || CMD_BOOTI || CMD_BOOTZ depends on !(NIOS2 || SANDBOX || SH || XTENSA) def_bool y + select LMB help Enable initrd_high functionality. If defined then the initrd_high feature is enabled and the boot* ramdisk subcommand is enabled. -- cgit v1.2.3 From a0c739c184cab7b2dc77315b5ed8c9cebe90bf63 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 24 Mar 2023 16:58:13 -0400 Subject: boot: Create a common BOOT_DEFAULTS for distro and bootstd These two features use a lot of common options. Move them into a common CONFIG to reduce duplication. Use 'select' for most options since these are things that boards aren't supposed to override. For now it is not possible to disable BOOT_DEFAULTS but we may take another look later. Note that five options use 'imply' to match existing behaviour. Signed-off-by: Simon Glass [trini: Rework a bit so we don't grow so many platforms unintentionally] Signed-off-by: Tom Rini --- boot/Kconfig | 62 +++++++++++++++++++++++++++--------------------------------- 1 file changed, 28 insertions(+), 34 deletions(-) diff --git a/boot/Kconfig b/boot/Kconfig index 8fa3181d7e2..ad035695a4a 100644 --- a/boot/Kconfig +++ b/boot/Kconfig @@ -350,6 +350,32 @@ config PXE_UTILS help Utilities for parsing PXE file formats. +config BOOT_DEFAULTS + bool # Common defaults for standard boot and distroboot + imply USE_BOOTCOMMAND + select CMD_ENV_EXISTS + select CMD_EXT2 + select CMD_EXT4 + select CMD_FAT + select CMD_FS_GENERIC + select CMD_PART if PARTITIONS + select CMD_DHCP if CMD_NET + select CMD_PING if CMD_NET + select CMD_PXE if CMD_NET + select SUPPORT_RAW_INITRD + select ENV_VARS_UBOOT_CONFIG + select CMD_BOOTI if ARM64 + select CMD_BOOTZ if ARM && !ARM64 + imply CMD_MII if NET + imply USB_STORAGE + imply EFI_PARTITION + imply ISO_PARTITION + help + These are not required but are commonly needed to support a good + selection of booting methods. Enable this to improve the capability + of U-Boot to boot various images. Currently much functionality is + tied to enabling the command that exercises it. + config BOOTSTD bool "Standard boot support" default y @@ -410,24 +436,7 @@ config BOOTSTD_DEFAULTS bool "Select some common defaults for standard boot" depends on BOOTSTD imply USE_BOOTCOMMAND - # Bring in some defaults which are generally needed. Boards can drop - # these as needed to save code space. Bootstd does not generally require - # the commands themselves to be enabled, but this is how some of the - # functionality is controlled at present - imply CMD_EXT2 - imply CMD_EXT4 - imply CMD_FAT - imply CMD_FS_GENERIC - imply CMD_PART - imply CMD_DHCP if NET - imply CMD_MII if NET - imply CMD_PING if NET - imply CMD_PXE if NET - imply USB_STORAGE - imply SUPPORT_RAW_INITRD - imply ENV_VARS_UBOOT_CONFIG - imply EFI_PARTITION - imply ISO_PARTITION + select BOOT_DEFAULTS help These are not required but are commonly needed to support a good selection of booting methods. Enable this to improve the capability @@ -823,27 +832,12 @@ endmenu # Boot images config DISTRO_DEFAULTS bool "Select defaults suitable for booting general purpose Linux distributions" + select BOOT_DEFAULTS select AUTO_COMPLETE select CMDLINE_EDITING - select CMD_BOOTI if ARM64 - select CMD_BOOTZ if ARM && !ARM64 - select CMD_DHCP if CMD_NET - select CMD_ENV_EXISTS - select CMD_EXT2 - select CMD_EXT4 - select CMD_FAT - select CMD_FS_GENERIC - select CMD_PART if PARTITIONS - select CMD_PING if CMD_NET - select CMD_PXE if NET select CMD_SYSBOOT - select ENV_VARS_UBOOT_CONFIG select HUSH_PARSER - select SUPPORT_RAW_INITRD select SYS_LONGHELP - imply CMD_MII if NET - imply USB_STORAGE - imply USE_BOOTCOMMAND help Select this to enable various options and commands which are suitable for building u-boot for booting general purpose Linux distributions. -- cgit v1.2.3 From 2b9cc7845cf96955db363519faab9a78e166c453 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 24 Mar 2023 16:58:14 -0400 Subject: rockchip: Disable DISTRO_DEFAULTS for rk3399 boards These board have moved to standard boot but the old 'distro_bootcmd' command is still active. Disable DISTRO_DEFAULTS to fix this. Signed-off-by: Simon Glass Tested-by: Vagrant Cascadian --- arch/arm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index bd7fffcce0b..4e7ebeaee87 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1955,7 +1955,7 @@ config ARCH_ROCKCHIP imply ADC imply CMD_DM imply DEBUG_UART_BOARD_INIT - imply DISTRO_DEFAULTS + imply DISTRO_DEFAULTS if !ROCKCHIP_RK3399 imply FAT_WRITE imply SARADC_ROCKCHIP imply SPL_SYSRESET -- cgit v1.2.3 From 3be95cc292a149d1df40edd81afe5a72868c97f5 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Fri, 24 Mar 2023 16:58:15 -0400 Subject: rockchip: Use BOOTSTD_DEFAULTS if not DISTRO_DEFAULTS When we do not enable DISTRO_DEFAULTS (generally, to get distro_bootcmd) we instea do want to imply BOOTSTD_DEFAULTS so that when using bootstd the general distro boot functionality will still work. Signed-off-by: Tom Rini --- arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 4e7ebeaee87..8a1e2234224 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1956,6 +1956,7 @@ config ARCH_ROCKCHIP imply CMD_DM imply DEBUG_UART_BOARD_INIT imply DISTRO_DEFAULTS if !ROCKCHIP_RK3399 + imply BOOTSTD_DEFAULTS if !DISTRO_DEFAULTS imply FAT_WRITE imply SARADC_ROCKCHIP imply SPL_SYSRESET -- cgit v1.2.3 From d00fb6421c8fad639f608f55f9291305061ffb17 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Fri, 24 Mar 2023 16:58:16 -0400 Subject: rockchip: rk3399: Drop altbootcmd The defined altbootcmd was specific to distro_bootcmd which is not longer in use on these platforms, so drop it. Tested-by: Jonas Karlman Reviewed-by: Jonas Karlman Signed-off-by: Tom Rini --- include/configs/rk3399_common.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/include/configs/rk3399_common.h b/include/configs/rk3399_common.h index 04dcbf20bcb..96ba19c659b 100644 --- a/include/configs/rk3399_common.h +++ b/include/configs/rk3399_common.h @@ -52,10 +52,7 @@ "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \ "partitions=" PARTS_DEFAULT \ ROCKCHIP_DEVICE_SETTINGS \ - "boot_targets=" BOOT_TARGETS "\0" \ - "altbootcmd=" \ - "setenv boot_syslinux_conf extlinux/extlinux-rollback.conf;" \ - "run distro_bootcmd\0" + "boot_targets=" BOOT_TARGETS "\0" #endif -- cgit v1.2.3