Skip to contentSkip to conversation

configs: aquila-am69: Set ENV_MMC_EMMC_HW_PARTITION and ENV_RELOC_GD_ENV_ADDR

PATCH In review Vitor Soares 3 participants 3 messages Apr 1 – Apr 25

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configs: aquila-am69: Set ENV_MMC_EMMC_HW_PARTITION and ENV_RELOC_GD_ENV_ADDR

From: Vitor Soares <[email protected]>

Set CONFIG_ENV_MMC_EMMC_HW_PARTITION=1 to store the environment in the eMMC first hardware boot partition instead of defaulting to 0 (user data area), where the rootfs and data partitions normally reside, risking corruption. This keeps the full boot stack self-contained in the eMMC hardware boot partition.

Enable CONFIG_ENV_RELOC_GD_ENV_ADDR so that gd->env_addr is adjusted by the relocation offset during U-Boot relocation. Without it, gd->env_addr keeps pointing to the pre-relocation address of the default environment, leading to incorrect environment access before env_load() completes.

Fixes 3f0528882c0d ("board: toradex: add aquila am69 support")
---
 configs/aquila-am69_a72_defconfig | 2 ++
 1 file changed, 2 insertions(+)
configs/aquila-am69_a72_defconfig +2 -0
index 0f85b228b063..6a0ccd15e6db 100644
@@ -80,6 +80,8 @@ CONFIG_SPL_MULTI_DTB_FIT=y
 CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_MMC=y
+CONFIG_ENV_RELOC_GD_ENV_ADDR=y
+CONFIG_ENV_MMC_EMMC_HW_PARTITION=1
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_USE_ETHPRIME=y
 CONFIG_ETHPRIME="eth0"
Signature · 1 line
2.53.0
Acked-by on v1 1/1
#1 lore raw

Hello Tom,

Quoted 8 lines · Vitor Soares

From: Vitor Soares <[email protected]>

Set CONFIG_ENV_MMC_EMMC_HW_PARTITION=1 to store the environment in the eMMC first hardware boot partition instead of defaulting to 0 (user data area), where the rootfs and data partitions normally reside, risking corruption. This keeps the full boot stack self-contained in the eMMC hardware boot partition.

Quoted 8 lines

Enable CONFIG_ENV_RELOC_GD_ENV_ADDR so that gd->env_addr is adjusted by the relocation offset during U-Boot relocation. Without it, gd->env_addr keeps pointing to the pre-relocation address of the default environment, leading to incorrect environment access before env_load() completes.

Fixes 3f0528882c0d ("board: toradex: add aquila am69 support")

Tom, this is for master, I know we are very close to the release date.

Thanks,
Francesco

#2 lore raw
In reply to Vitor Soares
Quoted 6 lines · Vitor Soares

Set CONFIG_ENV_MMC_EMMC_HW_PARTITION=1 to store the environment in the eMMC first hardware boot partition instead of defaulting to 0 (user data area), where the rootfs and data partitions normally reside, risking corruption. This keeps the full boot stack self-contained in the eMMC hardware boot partition.

Quoted 7 lines

Enable CONFIG_ENV_RELOC_GD_ENV_ADDR so that gd->env_addr is adjusted by the relocation offset during U-Boot relocation. Without it, gd->env_addr keeps pointing to the pre-relocation address of the default environment, leading to incorrect environment access before env_load() completes.

[...]

Applied to u-boot/master, thanks!

[1/1] configs: aquila-am69: Set ENV_MMC_EMMC_HW_PARTITION and ENV_RELOC_GD_ENV_ADDR

      commit: 6f44d897435fe700afb7bb1858d6bc15516c3956
Signature · 1 line
Tom