[PATCH] mx6qsabrelite: increase offset for environment on SPI

Tom Rini trini at konsulko.com
Mon Sep 14 14:33:18 CEST 2020


On Mon, Sep 14, 2020 at 08:03:33AM -0300, Fabio Estevam wrote:
> 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.

Hold on.  Can we shrink the board back down so that we don't need to
move the environment?  Moving the environment is bad as it will also
break existing users.  Thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200914/76207c23/attachment.sig>


More information about the U-Boot mailing list