Skip to contentSkip to conversation

ARM: tegra: move to standard boot

PATCH New Svyatoslav Ryhel 1 participant 3 messages Jan 17, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover ARM: tegra: move to standard boot

Drop the distro-boot scripts and use standard boot instead. Most of tegra boards should support this as is, those which does not are adjusted.

Inspired by:
'commit 7755dc58af7b ("rockchip: Move to standard boot")'

Passes buildman for all tegra board without errors.

Svyatoslav Ryhel (2):
ARM: tegra: move to standard boot
board: tegra30: switch to standard boot

 arch/arm/Kconfig                    |  2 +-
 configs/endeavoru_defconfig         |  2 +-
 configs/grouper_common_defconfig    |  2 +-
 configs/transformer_t30_defconfig   |  2 +-
 configs/x3_t30_defconfig            |  2 +-
 include/configs/tegra-common-post.h | 30 ++---------------------------
 6 files changed, 7 insertions(+), 33 deletions(-)
Signature · 1 line
2.40.1
#1 lore raw

PATCH 1/2 ARM: tegra: move to standard boot

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

Inspired by:
'commit 7755dc58af7b ("rockchip: Move to standard boot")'

---
 arch/arm/Kconfig                    |  2 +-
 include/configs/tegra-common-post.h | 30 ++---------------------------
 2 files changed, 3 insertions(+), 29 deletions(-)
arch/arm/Kconfig +1 -1
index 2d4458b7b5..467dc07c06 100644
@@ -1323,7 +1323,7 @@ config ARCH_ZYNQMP
 config ARCH_TEGRA
 	bool "NVIDIA Tegra"
 	select GPIO_EXTRA_HEADER
-	imply DISTRO_DEFAULTS
+	imply BOOTSTD_DEFAULTS
 	imply FAT_WRITE
 	imply SPL_TIMER if SPL
 
include/configs/tegra-common-post.h +2 -28
index 0d0965ecce..fc74980f7c 100644
@@ -7,33 +7,7 @@
 #ifndef __TEGRA_COMMON_POST_H
 #define __TEGRA_COMMON_POST_H
 
-#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_DHCP) && 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
-
-#ifndef BOOT_TARGET_DEVICES
-#define BOOT_TARGET_DEVICES(func) \
-	func(MMC, mmc, 1) \
-	func(MMC, mmc, 0) \
-	BOOT_TARGET_USB(func) \
-	BOOT_TARGET_PXE(func) \
-	BOOT_TARGET_DHCP(func)
-#endif
-#include <config_distro_bootcmd.h>
+#define BOOT_TARGETS	"mmc1 mmc0 usb pxe dhcp"
 
 #ifdef CONFIG_TEGRA_KEYBOARD
 #define STDIN_KBD_KBC ",tegra-kbc"
@@ -88,7 +62,7 @@
 	MEM_LAYOUT_ENV_SETTINGS \
 	"fdt_high=" FDT_HIGH "\0" \
 	"initrd_high=" INITRD_HIGH "\0" \
-	BOOTENV \
+	"boot_targets=" BOOT_TARGETS "\0" \
 	BOARD_EXTRA_ENV_SETTINGS
 
 #endif /* __TEGRA_COMMON_POST_H */
Signature · 1 line
2.40.1
#2 lore raw

PATCH 2/2 board: tegra30: switch to standard boot

In reply to Svyatoslav Ryhel

Switch transformer, endeavoru, grouper and x3_t30 boards to bootflow scan.

---
 configs/endeavoru_defconfig       | 2 +-
 configs/grouper_common_defconfig  | 2 +-
 configs/transformer_t30_defconfig | 2 +-
 configs/x3_t30_defconfig          | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
configs/endeavoru_defconfig +1 -1
index f2c35e4f5f..7136a7e8f2 100644
@@ -20,7 +20,7 @@ CONFIG_AUTOBOOT_KEYED=y
 CONFIG_AUTOBOOT_KEYED_CTRLC=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_SYSTEM_SETUP=y
-CONFIG_BOOTCOMMAND="if run check_button; then bootmenu; fi; run bootcmd_mmc0; poweroff;"
+CONFIG_BOOTCOMMAND="if run check_button; then bootmenu; fi; bootflow scan; poweroff;"
 CONFIG_SYS_PBSIZE=2084
 CONFIG_SPL_FOOTPRINT_LIMIT=y
 CONFIG_SPL_MAX_FOOTPRINT=0x8000
configs/grouper_common_defconfig +1 -1
index 02ed8dbba9..6a1b719142 100644
@@ -20,7 +20,7 @@ CONFIG_AUTOBOOT_KEYED=y
 CONFIG_AUTOBOOT_KEYED_CTRLC=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_SYSTEM_SETUP=y
-CONFIG_BOOTCOMMAND="if run check_button; then bootmenu; fi; run bootcmd_mmc0; poweroff;"
+CONFIG_BOOTCOMMAND="if run check_button; then bootmenu; fi; bootflow scan; poweroff;"
 CONFIG_SYS_PBSIZE=2084
 CONFIG_SPL_FOOTPRINT_LIMIT=y
 CONFIG_SPL_MAX_FOOTPRINT=0x8000
configs/transformer_t30_defconfig +1 -1
index e4f76973eb..a142d82883 100644
@@ -20,7 +20,7 @@ CONFIG_AUTOBOOT_KEYED=y
 CONFIG_AUTOBOOT_KEYED_CTRLC=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_SYSTEM_SETUP=y
-CONFIG_BOOTCOMMAND="setenv skip_boot 0; setenv gpio_button 150; if run check_button; then poweroff; fi; setenv gpio_button 131; if run check_button; then bootmenu; fi; if test ${skip_boot} -eq 1; then; else run bootcmd_usb0; run bootcmd_mmc1; run bootcmd_mmc0; poweroff; fi"
+CONFIG_BOOTCOMMAND="setenv skip_boot 0; setenv gpio_button 150; if run check_button; then poweroff; fi; setenv gpio_button 131; if run check_button; then bootmenu; fi; if test ${skip_boot} -eq 1; then; else setenv boot_targets usb mmc1 mmc0; bootflow scan; poweroff; fi"
 CONFIG_SYS_PBSIZE=2084
 CONFIG_SPL_FOOTPRINT_LIMIT=y
 CONFIG_SPL_MAX_FOOTPRINT=0x8000
configs/x3_t30_defconfig +1 -1
index 094a7d0709..b777d66653 100644
@@ -21,7 +21,7 @@ CONFIG_AUTOBOOT_KEYED=y
 CONFIG_AUTOBOOT_KEYED_CTRLC=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_SYSTEM_SETUP=y
-CONFIG_BOOTCOMMAND="if run check_button; then bootmenu; fi; run bootcmd_mmc1; run bootcmd_mmc0; poweroff;"
+CONFIG_BOOTCOMMAND="if run check_button; then bootmenu; fi; bootflow scan; poweroff;"
 CONFIG_SYS_PBSIZE=2084
 CONFIG_SPL_FOOTPRINT_LIMIT=y
 CONFIG_SPL_MAX_FOOTPRINT=0x8000
Signature · 1 line
2.40.1