diff options
author | Fabio Estevam <festevam@gmail.com> | 2019-09-12 11:15:54 -0300 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2019-10-08 16:35:59 +0200 |
commit | 831824c0a795286f4ba2a83c4eefb2162c054f2b (patch) | |
tree | 19253e25ba2935c58457dff158903bcd6832a8d3 /include/configs/pico-imx6ul.h | |
parent | 998800108928873d83d2da243623c937510fc3ef (diff) |
pico-imx6ul: Increase the CONFIG_ENV_OFFSET size
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.
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@gmail.com>
Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'include/configs/pico-imx6ul.h')
-rw-r--r-- | include/configs/pico-imx6ul.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/include/configs/pico-imx6ul.h b/include/configs/pico-imx6ul.h index 39c83a8c78..2666e7ac52 100644 --- a/include/configs/pico-imx6ul.h +++ b/include/configs/pico-imx6ul.h @@ -134,7 +134,19 @@ /* environment organization */ #define CONFIG_ENV_SIZE SZ_8K -#define CONFIG_ENV_OFFSET (8 * SZ_64K) +/* Environment starts at 768k = 768 * 1024 = 786432 */ +#define CONFIG_ENV_OFFSET 786432 +/* + * Detect overlap between U-Boot image and environment area in build-time + * + * CONFIG_BOARD_SIZE_LIMIT = CONFIG_ENV_OFFSET - u-boot.img offset + * CONFIG_BOARD_SIZE_LIMIT = 768k - 69k = 699k = 715776 + * + * Currently CONFIG_BOARD_SIZE_LIMIT does not handle expressions, so + * write the direct value here + */ +#define CONFIG_BOARD_SIZE_LIMIT 715776 + #define CONFIG_SYS_MMC_ENV_DEV 0 #define CONFIG_SYS_MMC_ENV_PART 0 |