[U-Boot] [PATCH] warp7: Fix U-Boot corruption after saving the environment

Fabio Estevam festevam at gmail.com
Mon Oct 21 16:50:13 UTC 2019

Hi Pierre-Jean,

On Mon, Oct 21, 2019 at 1:43 PM Pierre-Jean Texier <pjtexier at koncepto.io> wrote:

> On top-of master 32ded50 ("spl: mmc: make eMMC HW boot
> partition configuration optional ")
> I am not able to reproduce the described behavior.

I used u-boot-imx tree and this is what I get:

ls -al u-boot-dtb.imx
-rw-r--r-- 1 fabio fabio 547840 out 21 13:45 u-boot-dtb.imx

#define CONFIG_ENV_OFFSET (8 * SZ_64K)

CONFIG_ENV_OFFSET = 8 * 64 * 1024 = 524288

So the u-boot-dtb.imx is overlapping the env region.

Maybe your compiler is producing a smaller binary and you are not
getting the issue.

Anyway, it is safer to increase CONFIG_ENV_OFFSET and use
CONFIG_BOARD_SIZE_LIMIT to detect such problem in build-time.

More information about the U-Boot mailing list