[PATCH v2 8/9] verdin-imx8mm: use preboot for fdtfile evaluation
Marcel Ziswiler
marcel at ziswiler.com
Mon Aug 23 17:03:56 CEST 2021
From: Igor Opaniuk <igor.opaniuk at toradex.com>
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 at toradex.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler at toradex.com>
---
Changes in v2:
- New patch addressing dynamic fdtfile definition.
configs/verdin-imx8mm_defconfig | 3 ++-
include/configs/verdin-imx8mm.h | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/configs/verdin-imx8mm_defconfig b/configs/verdin-imx8mm_defconfig
index ad9c00a3cc4..ab549ebbada 100644
--- a/configs/verdin-imx8mm_defconfig
+++ b/configs/verdin-imx8mm_defconfig
@@ -28,7 +28,8 @@ CONFIG_SPL_LOAD_FIT=y
CONFIG_OF_SYSTEM_SETUP=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/toradex/verdin-imx8mm/imximage.cfg"
# CONFIG_USE_BOOTCOMMAND is not set
-CONFIG_DEFAULT_FDT_FILE="fsl-imx8mm-verdin-dev.dtb"
+CONFIG_USE_PREBOOT=y
+CONFIG_PREBOOT="setenv fdtfile imx8mm-verdin-${variant}-${fdt_board}.dtb"
CONFIG_LOG=y
# CONFIG_DISPLAY_BOARDINFO is not set
CONFIG_DISPLAY_BOARDINFO_LATE=y
diff --git a/include/configs/verdin-imx8mm.h b/include/configs/verdin-imx8mm.h
index ad13f804be9..42fb1f2114a 100644
--- a/include/configs/verdin-imx8mm.h
+++ b/include/configs/verdin-imx8mm.h
@@ -59,7 +59,7 @@
"bootcmd_mfg=fastboot 0\0" \
"console=ttymxc0\0" \
"fdt_addr=0x43000000\0" \
- "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
+ "fdt_board=dev\0" \
"image=Image\0" \
"initrd_addr=0x43800000\0" \
"initrd_high=0xffffffffffffffff\0" \
--
2.26.2
More information about the U-Boot
mailing list