[U-Boot] [PATCH v2] pico-imx7d: Increase the CONFIG_ENV_OFFSET size

Stefan Roese sr at denx.de
Fri Nov 30 10:29:20 UTC 2018


Hi Fabio,

On 30.11.18 11:15, 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" causes U-Boot to hang because of this overlap.
> 
> Fix this problem by increasing the CONFIG_ENV_OFFSET size.
> 
> Signed-off-by: Fabio Estevam <festevam at gmail.com>
> ---
> Changes since v1:
> - Reword the commit log (Stefano)
> 
>   include/configs/pico-imx7d.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/configs/pico-imx7d.h b/include/configs/pico-imx7d.h
> index 2bc42a0..120111d 100644
> --- a/include/configs/pico-imx7d.h
> +++ b/include/configs/pico-imx7d.h
> @@ -134,7 +134,7 @@
>   /* FLASH and environment organization */
>   #define CONFIG_ENV_SIZE			SZ_8K
>   
> -#define CONFIG_ENV_OFFSET			(8 * SZ_64K)
> +#define CONFIG_ENV_OFFSET			(12 * SZ_64K)

I find this hard to read: (12 * SZ_64K). Wouldn't (768 * SZ_1K) be
better?

And I found using CONFIG_BOARD_SIZE_LIMIT quite handy, as it detects
such increased image growths beyond its limit upon build time. Perhaps
you could add this as well? This should do it for this board:

#define CONFIG_BOARD_SIZE_LIMIT            CONFIG_ENV_OFFSET

Thanks,
Stefan



More information about the U-Boot mailing list