public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH v1] configs: aquila-am69: Set ENV_MMC_EMMC_HW_PARTITION and ENV_RELOC_GD_ENV_ADDR
@ 2026-04-01 14:18 Vitor Soares
  2026-04-01 14:32 ` Francesco Dolcini
  0 siblings, 1 reply; 2+ messages in thread
From: Vitor Soares @ 2026-04-01 14:18 UTC (permalink / raw)
  To: Francesco Dolcini, Tom Rini; +Cc: Vitor Soares, u-boot

From: Vitor Soares <vitor.soares@toradex.com>

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")
Signed-off-by: Vitor Soares <vitor.soares@toradex.com>
---
 configs/aquila-am69_a72_defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configs/aquila-am69_a72_defconfig b/configs/aquila-am69_a72_defconfig
index 0f85b228b063..6a0ccd15e6db 100644
--- a/configs/aquila-am69_a72_defconfig
+++ b/configs/aquila-am69_a72_defconfig
@@ -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"
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v1] configs: aquila-am69: Set ENV_MMC_EMMC_HW_PARTITION and ENV_RELOC_GD_ENV_ADDR
  2026-04-01 14:18 [PATCH v1] configs: aquila-am69: Set ENV_MMC_EMMC_HW_PARTITION and ENV_RELOC_GD_ENV_ADDR Vitor Soares
@ 2026-04-01 14:32 ` Francesco Dolcini
  0 siblings, 0 replies; 2+ messages in thread
From: Francesco Dolcini @ 2026-04-01 14:32 UTC (permalink / raw)
  To: Vitor Soares, Tom Rini; +Cc: Francesco Dolcini, Vitor Soares, u-boot

Hello Tom,

On Wed, Apr 01, 2026 at 03:18:42PM +0100, Vitor Soares wrote:
> From: Vitor Soares <vitor.soares@toradex.com>
> 
> 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")
> Signed-off-by: Vitor Soares <vitor.soares@toradex.com>

Acked-by: Francesco Dolcini <francesco.dolcini@toradex.com>

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

Thanks,
Francesco


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-04-01 15:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-01 14:18 [PATCH v1] configs: aquila-am69: Set ENV_MMC_EMMC_HW_PARTITION and ENV_RELOC_GD_ENV_ADDR Vitor Soares
2026-04-01 14:32 ` Francesco Dolcini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox