[U-Boot] [PATCH v3 5/8] arm: socfpga: fix U-Boot running from fpga OnChip RAM
Marek Vasut
marex at denx.de
Mon Aug 13 13:23:21 UTC 2018
On 08/13/2018 09:33 AM, Simon Goldschmidt wrote:
> gd->env_addr points to pre-relocation address even after
> relocation. This leads to an abort in env_callback_init
> when loading the environment.
>
> Fix this by enabling CONFIG_SYS_EXTRA_ENV_RELOC.
Doesn't this apply to gen10 too ?
> Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt at gmail.com>
> ---
>
> Changes in v3: this patch is new in v3
> Changes in v2: None
>
> include/configs/socfpga_common.h | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h
> index 8ebf6b85fe..2fb207c86a 100644
> --- a/include/configs/socfpga_common.h
> +++ b/include/configs/socfpga_common.h
> @@ -284,6 +284,14 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
> #define CONFIG_SPL_STACK CONFIG_SYS_SPL_MALLOC_START
> #endif
>
> +#ifdef CONFIG_TARGET_SOCFPGA_GEN5
> +/* When U-Boot is started from FPGA, prevent gd->env_addr to point into
> + * FPGA OnChip RAM after relocation
> + */
> +#define CONFIG_SYS_EXTRA_ENV_RELOC
> +#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE /* start of monitor */
> +#endif
> +
> /* Extra Environment */
> #ifndef CONFIG_SPL_BUILD
>
>
--
Best regards,
Marek Vasut
More information about the U-Boot
mailing list