Skip to contentSkip to conversation

configs: colibri-imx7*: set 'fdtfile' generically in PREBOOT

PATCH In review Ernest Van Hoecke 3 participants 3 messages Nov 18, 2025 – Nov 26, 2025 Arm i.MX and Layerscape

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 configs: colibri-imx7*: set 'fdtfile' generically in PREBOOT

From: Ernest Van Hoecke <[email protected]>

In TEZI (Toradex Easy Installer), we use one U-Boot binary for both our NAND and eMMC Colibri iMX7 modules. Currently, CONFIG_PREBOOT sets the environment variable 'fdtfile' depending on which defconfig was used, adding the '-emmc' variant for the emmc defconfig. Since we always build the TEZI recovery U-Boot with the standard (non-emmc) defconfig, fdtfile has to be overwritten later or it will be wrong there.

By using '$variant', the fdtfile var is properly constructed at run time for both the NAND and eMMC variants, and we do not have to worry about setting fdtfile again when building the recovery TEZI U-Boot.

This also synchronizes these configs with how we handle the iMX6ULL.

Fixes 327381e8b57c ("colibri_imx7: use preboot for fdtfile evaluation")

---
v2: Do not erroneously replace the '${soc}' variable with imx7
v1: https://lore.kernel.org/u-boot/[email protected]/

---
 configs/colibri_imx7_defconfig      | 2 +-
 configs/colibri_imx7_emmc_defconfig | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
configs/colibri_imx7_defconfig +1 -1
index 5a415120bead..2a3cb84c3b6f 100644
@@ -22,7 +22,7 @@ CONFIG_BOOTDELAY=1
 CONFIG_OF_ENV_SETUP=y
 CONFIG_BOOTCOMMAND="run ubiboot ; echo ; echo ubiboot failed ; run distro_bootcmd;"
 CONFIG_USE_PREBOOT=y
-CONFIG_PREBOOT="test -n ${fdtfile} || setenv fdtfile ${soc}-colibri-${fdt_board}.dtb "
+CONFIG_PREBOOT="test -n ${fdtfile} || setenv fdtfile ${soc}-colibri${variant}-${fdt_board}.dtb "
 CONFIG_SYS_PBSIZE=544
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 # CONFIG_DISPLAY_BOARDINFO is not set
configs/colibri_imx7_emmc_defconfig +1 -1
index bae43fe45aa7..a95a3214d0c8 100644
@@ -19,7 +19,7 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_BOOTDELAY=1
 CONFIG_USE_PREBOOT=y
-CONFIG_PREBOOT="test -n ${fdtfile} || setenv fdtfile ${soc}-colibri-emmc-${fdt_board}.dtb"
+CONFIG_PREBOOT="test -n ${fdtfile} || setenv fdtfile ${soc}-colibri${variant}-${fdt_board}.dtb"
 CONFIG_SYS_PBSIZE=544
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 # CONFIG_DISPLAY_BOARDINFO is not set
Signature · 1 line
2.43.0
Reviewed-by on v2 1/1
#1 lore raw
Quoted 9 lines · Ernest Van Hoecke

From: Ernest Van Hoecke <[email protected]>

In TEZI (Toradex Easy Installer), we use one U-Boot binary for both our NAND and eMMC Colibri iMX7 modules. Currently, CONFIG_PREBOOT sets the environment variable 'fdtfile' depending on which defconfig was used, adding the '-emmc' variant for the emmc defconfig. Since we always build the TEZI recovery U-Boot with the standard (non-emmc) defconfig, fdtfile has to be overwritten later or it will be wrong there.

Quoted 8 lines

By using '$variant', the fdtfile var is properly constructed at run time for both the NAND and eMMC variants, and we do not have to worry about setting fdtfile again when building the recovery TEZI U-Boot.

This also synchronizes these configs with how we handle the iMX6ULL.

Fixes 327381e8b57c ("colibri_imx7: use preboot for fdtfile evaluation")
reviewer
#2 lore raw
In reply to Ernest Van Hoecke
Quoted 10 lines · Ernest Van Hoecke

From: Ernest Van Hoecke <[email protected]>

In TEZI (Toradex Easy Installer), we use one U-Boot binary for both our NAND and eMMC Colibri iMX7 modules. Currently, CONFIG_PREBOOT sets the environment variable 'fdtfile' depending on which defconfig was used, adding the '-emmc' variant for the emmc defconfig. Since we always build the TEZI recovery U-Boot with the standard (non-emmc) defconfig, fdtfile has to be overwritten later or it will be wrong there.

Quoted 8 lines

By using '$variant', the fdtfile var is properly constructed at run time for both the NAND and eMMC variants, and we do not have to worry about setting fdtfile again when building the recovery TEZI U-Boot.

This also synchronizes these configs with how we handle the iMX6ULL.

Fixes 327381e8b57c ("colibri_imx7: use preboot for fdtfile evaluation")

Applied it for u-boot-imx/master, thanks.