From a7e0c37902e314ae2636c75cee9f525787c5a45c Mon Sep 17 00:00:00 2001 From: Igor Opaniuk Date: Mon, 2 Nov 2020 11:20:41 +0200 Subject: verdin-imx8mm: use preboot for fdtfile evaluation Enable and set preboot var with fdtfile evaluation. It will be checked and run immediately before starting the CONFIG_BOOTDELAY countdown and/or running the auto-boot command resp. entering interactive mode. This provides possibility to use different boot cmds in interactive mode without manual setting fdtfile value, as it it's already evaluated before entering interactive mode. Signed-off-by: Igor Opaniuk --- configs/verdin-imx8mm_defconfig | 2 ++ include/configs/verdin-imx8mm.h | 4 ---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/configs/verdin-imx8mm_defconfig b/configs/verdin-imx8mm_defconfig index 4f1266ed6f..a55c5c1ed6 100644 --- a/configs/verdin-imx8mm_defconfig +++ b/configs/verdin-imx8mm_defconfig @@ -16,6 +16,8 @@ CONFIG_DM_GPIO=y CONFIG_TARGET_VERDIN_IMX8MM=y CONFIG_SPL_MMC_SUPPORT=y CONFIG_SPL_SERIAL_SUPPORT=y +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="setenv fdtfile imx8mm-verdin-${variant}-${fdt_board}.dtb" CONFIG_SPL_DRIVERS_MISC_SUPPORT=y CONFIG_NR_DRAM_BANKS=1 CONFIG_SPL=y diff --git a/include/configs/verdin-imx8mm.h b/include/configs/verdin-imx8mm.h index 0d81069394..36188923a8 100644 --- a/include/configs/verdin-imx8mm.h +++ b/include/configs/verdin-imx8mm.h @@ -70,8 +70,6 @@ #define CONFIG_SERVERIP 192.168.10.1 #endif /* CONFIG_CMD_NET */ -#define FDT_FILE "imx8mm-verdin-${variant}-${fdt_board}.dtb" - #define MEM_LAYOUT_ENV_SETTINGS \ "fdt_addr_r=0x43000000\0" \ "kernel_addr_r=0x40000000\0" \ @@ -83,8 +81,6 @@ /* Enable Distro Boot */ #ifndef CONFIG_SPL_BUILD -#undef CONFIG_BOOTCOMMAND -#define CONFIG_BOOTCOMMAND "setenv fdtfile " FDT_FILE " && run distro_bootcmd;" #define BOOT_TARGET_DEVICES(func) \ func(MMC, mmc, 1) \ func(MMC, mmc, 0) \ -- cgit v1.2.3