From: Marek Vasut Date: Mon, 13 Aug 2018 22:32:07 +0200 Subject: [U-Boot] [PATCH v4 2/5] arm: socfpga: fix U-Boot running from fpga OnChip RAM In-Reply-To: <20180813193437.9539-3-simon.k.r.goldschmidt@gmail.com> References: <20180813193437.9539-1-simon.k.r.goldschmidt@gmail.com> <20180813193437.9539-3-simon.k.r.goldschmidt@gmail.com> Message-ID: <2ad083dc-ac7c-7de2-e0b4-0cb9f571bfc2@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 08/13/2018 09:34 PM, 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. > > Signed-off-by: Simon Goldschmidt > --- > > Changes in v4: enable this fix for all socfpga, not for gen5 only > Changes in v3: this patch is new in v3 > Changes in v2: None > > include/configs/socfpga_common.h | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h > index 8ebf6b85fe..d1148b838b 100644 > --- a/include/configs/socfpga_common.h > +++ b/include/configs/socfpga_common.h > @@ -284,6 +284,12 @@ unsigned int cm_get_qspi_controller_clk_hz(void); > #define CONFIG_SPL_STACK CONFIG_SYS_SPL_MALLOC_START > #endif > > +/* When U-Boot is started from FPGA, prevent gd->env_addr to point into Multi-line comment should have this format /* * foo * bar */ > + * FPGA OnChip RAM after relocation > + */ > +#define CONFIG_SYS_EXTRA_ENV_RELOC > +#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE /* start of monitor */ What you don't explain in the commit message is this last line. Why is this needed ? > /* Extra Environment */ > #ifndef CONFIG_SPL_BUILD > > -- Best regards, Marek Vasut