Message ID | 1401799074-3801-3-git-send-email-akshay.s@samsung.com |
---|---|
State | Superseded |
Delegated to: | Minkyu Kang |
Headers | show |
On 3 June 2014 06:37, Akshay Saraswat <akshay.s@samsung.com> wrote: > Currently environment resides at the location where BL2 ends. > This may hold good in case there is an empty space at this > position. But what if this place already has a binary or is > expected to have one. To avoid such scenarios it is better > to save environment at the end of the flash. > > Signed-off-by: Akshay Saraswat <akshay.s@samsung.com> Acked-by: Simon Glass <sjg@chromium.org> Tested on pit with saveenv Tested-by: Simon Glass <sjg@chromium.org>
diff --git a/include/configs/exynos5-dt.h b/include/configs/exynos5-dt.h index 5a9b1b4..3bcec85 100644 --- a/include/configs/exynos5-dt.h +++ b/include/configs/exynos5-dt.h @@ -207,7 +207,10 @@ #define CONFIG_BL1_OFFSET (CONFIG_RES_BLOCK_SIZE + CONFIG_SEC_FW_SIZE) #define CONFIG_BL2_OFFSET (CONFIG_BL1_OFFSET + CONFIG_BL1_SIZE) -#define CONFIG_ENV_OFFSET (CONFIG_BL2_OFFSET + CONFIG_BL2_SIZE) + +/* Store environment at the end of a 4 MB SPI flash */ +#define FLASH_SIZE (0x4 << 20) +#define CONFIG_ENV_OFFSET (FLASH_SIZE - CONFIG_BL2_SIZE) /* U-boot copy size from boot Media to DRAM.*/ #define BL2_START_OFFSET (CONFIG_BL2_OFFSET/512)
Currently environment resides at the location where BL2 ends. This may hold good in case there is an empty space at this position. But what if this place already has a binary or is expected to have one. To avoid such scenarios it is better to save environment at the end of the flash. Signed-off-by: Akshay Saraswat <akshay.s@samsung.com> --- Changes since v1: - Added new config for SPI flash size. include/configs/exynos5-dt.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)