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

Tom Rini trini at konsulko.com
Tue Dec 3 01:59:40 CET 2019


On Mon, Dec 02, 2019 at 08:40:28PM -0300, Fabio Estevam wrote:

> U-Boot binary has grown in such a way that it goes beyond the reserved
> area for the environment variables.
>     
> Running "saveenv" followed by a "reset" causes U-Boot to hang because
> of this overlap.
>     
> Fix this problem by increasing the CONFIG_ENV_OFFSET size.
>     
> Also, in order to prevent this same problem in the future, use
> CONFIG_BOARD_SIZE_LIMIT, which will detect the overlap in build-time.
>     
> CONFIG_BOARD_SIZE_LIMIT does not accept math expressions, so declare
> CONFIG_ENV_OFFSET with its direct value instead.
> 
> Signed-off-by: Fabio Estevam <festevam at gmail.com>
> Acked-by: Pierre-Jean Texier <pjtexier at koncepto.io>
> Tested-by: Pierre-Jean Texier <pjtexier at koncepto.io>
> Acked-by: Joris Offouga <offougajoris at gmail.com>
> Tested-by: Joris Offouga <offougajoris at gmail.com>
> ---
> Changes since v1:
> - Rebased against master as CONFIG_ENV_OFFSET has moved to Kconfig
> 
>  configs/warp7_defconfig |  2 +-
>  include/configs/warp7.h | 13 +++++++++++++
>  2 files changed, 14 insertions(+), 1 deletion(-)

Is there a reason we can't use CONFIG_SYS_THUMB_BUILD on these
platforms?  It's not default y as I seem to recall some thumb problems
with very early ARMv7 cores, but it should almost certainly be set here
(and a large number of other i.MX platforms).  I'd much rather see that
than moving the environment offset.  Thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20191202/a4ae39d5/attachment.sig>


More information about the U-Boot mailing list