[U-Boot] [PATCH 2/4] Exynos5: Config: Place environment at the end of SPI Flash
Simon Glass
sjg at chromium.org
Mon Jun 2 17:34:59 CEST 2014
Hi Akshay,
On 30 May 2014 07:45, Akshay Saraswat <akshay.s at 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 at samsung.com>
> ---
> include/configs/exynos5-dt.h | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/include/configs/exynos5-dt.h b/include/configs/exynos5-dt.h
> index 5a9b1b4..60b99a3 100644
> --- a/include/configs/exynos5-dt.h
> +++ b/include/configs/exynos5-dt.h
> @@ -207,7 +207,9 @@
>
> #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 CONFIG_ENV_OFFSET (0x00400000 - CONFIG_BL2_SIZE)
Could we add a define for the SPI flash size and make this line use it?
>
> /* U-boot copy size from boot Media to DRAM.*/
> #define BL2_START_OFFSET (CONFIG_BL2_OFFSET/512)
> --
> 1.7.12.4
>
Regards,
Simon
More information about the U-Boot
mailing list