[U-Boot] Setting CONFIG_SYS_TEXT_BASE when CONFIG_NAND_SPL is selected

Submitted by Fabio Estevam on Sept. 5, 2011, 7:02 p.m.

Details

Message ID CAOMZO5B0=MxQXgb9P1NXLX7J6xzNCq2rSeoY_cb1BLsui9s+ow@mail.gmail.com
State RFC
Headers show

Commit Message

Fabio Estevam Sept. 5, 2011, 7:02 p.m.
Hi,

On a MX31PDK the only boot media is NAND flash, so I was trying to get
rid of the
conditional setting of CONFIG_SYS_TEXT_BASE.

CONFIG_NAND_SPL is set in nand_spl/board/freescale/mx31pdk/Makefile.

,so I tried the following:


,but this causes the board not to boot.

Does anyone have any ideas as to why the patch above does not work?

Thanks,

Fabio Estevam

Comments

Stefano Babic Sept. 6, 2011, 9:56 a.m.
On 09/05/2011 09:02 PM, Fabio Estevam wrote:
> Hi,
> 

Hi Fabio,

> On a MX31PDK the only boot media is NAND flash, so I was trying to get
> rid of the
> conditional setting of CONFIG_SYS_TEXT_BASE.
> 
> CONFIG_NAND_SPL is set in nand_spl/board/freescale/mx31pdk/Makefile.
> 
> ,so I tried the following:
> 
> diff --git a/board/freescale/mx31pdk/config.mk b/board/freescale/mx31pdk/config.
> index de2c642..b9932ec 100644
> --- a/board/freescale/mx31pdk/config.mk
> +++ b/board/freescale/mx31pdk/config.mk
> @@ -1,5 +1,2 @@
> -ifdef CONFIG_NAND_SPL
>  CONFIG_SYS_TEXT_BASE = 0x87ec0000
> -else
> -CONFIG_SYS_TEXT_BASE = 0x87f00000
> -endif
> +
> 
> ,but this causes the board not to boot.
> 
> Does anyone have any ideas as to why the patch above does not work?

As far as I can see: it seems to me that the config.mk avoid that the
u-boot image overwrites the SPL code, making then impossible to boot.
Is it really copied into CONFIG_SYS_NAND_U_BOOT_DST ?

However, I see that CONFIG_SYS_TEXT_BASE_SPL is set in some boards, and
looks liketo be the correct mechanims to be used to set TEXT_BASE for
the SPL binary.

Best regards,
Stefano Babic
Scott Wood Sept. 8, 2011, 7:27 p.m.
On Mon, Sep 05, 2011 at 04:02:40PM -0300, Fabio Estevam wrote:
> diff --git a/board/freescale/mx31pdk/config.mk b/board/freescale/mx31pdk/config.
> index de2c642..b9932ec 100644
> --- a/board/freescale/mx31pdk/config.mk
> +++ b/board/freescale/mx31pdk/config.mk
> @@ -1,5 +1,2 @@
> -ifdef CONFIG_NAND_SPL
>  CONFIG_SYS_TEXT_BASE = 0x87ec0000
> -else
> -CONFIG_SYS_TEXT_BASE = 0x87f00000
> -endif
> +
> 
> ,but this causes the board not to boot.
> 
> Does anyone have any ideas as to why the patch above does not work?

CONFIG_SYS_TEXT_BASE_SPL should be used for the SPL address.

-Scott

Patch hide | download patch | download mbox

diff --git a/board/freescale/mx31pdk/config.mk b/board/freescale/mx31pdk/config.
index de2c642..b9932ec 100644
--- a/board/freescale/mx31pdk/config.mk
+++ b/board/freescale/mx31pdk/config.mk
@@ -1,5 +1,2 @@ 
-ifdef CONFIG_NAND_SPL
 CONFIG_SYS_TEXT_BASE = 0x87ec0000
-else
-CONFIG_SYS_TEXT_BASE = 0x87f00000
-endif
+