[PATCH] mx6qsabrelite: increase offset for environment on SPI

Fabio Estevam festevam at gmail.com
Mon Sep 14 13:03:33 CEST 2020


Hi Denis,

On Mon, Sep 14, 2020 at 6:56 AM Denis Pynkin <denis.pynkin at collabora.com> wrote:
>
> The size of the binary created with the default U-boot config is much
> greater than the default offset for environment `0x60000`. If the new
> version is flashed onto SPI it overlaps with the stored environment.
> This leads to U-Boot corruption in case of saving environment onto
> SPI and non-bootable SabreLite board.
>
> Signed-off-by: Denis Pynkin <denis.pynkin at collabora.com>

Reviewed-by: Fabio Estevam <festevam at gmail.com>

In case you want to detect errors like this again in the future, you could add
CONFIG_BOARD_SIZE_LIMIT that detects such overlaps in build-time.

Please check commit 033f6ea5fa5f ("mx53loco: Fix U-Boot corruption
after saving the environment")

The addition of CONFIG_BOARD_SIZE_LIMIT can be a separate patch though.


More information about the U-Boot mailing list