summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Opaniuk <igor.opaniuk@toradex.com>2020-11-02 11:20:41 +0200
committerIgor Opaniuk <igor.opaniuk@toradex.com>2020-11-02 11:21:06 +0200
commita7e0c37902e314ae2636c75cee9f525787c5a45c (patch)
tree030231b28890616000ca146db52bdfcf6470b380
parent3d6a3c3b084105014d8c6b8a101e955ce19b1295 (diff)
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 <igor.opaniuk@toradex.com>
-rw-r--r--configs/verdin-imx8mm_defconfig2
-rw-r--r--include/configs/verdin-imx8mm.h4
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) \