From: =?ISO-8859-1?Q?Jos=E9_Miguel_Gon=E7alves?= Date: Sun, 16 Sep 2012 11:16:59 +0100 Subject: [U-Boot] [PATCH v2 01/11] ARM: fix relocation on ARM926EJS In-Reply-To: <201209161206.58874.marex@denx.de> References: <1347643742-19966-1-git-send-email-jose.goncalves@inov.pt> <201209152003.24074.marex@denx.de> <50559FB4.8050501@inov.pt> <201209161206.58874.marex@denx.de> Message-ID: <5055A71B.9090405@inov.pt> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 09/16/2012 11:06 AM, Marek Vasut wrote: > Dear Jos? Miguel Gon?alves, > >> On 09/15/2012 07:03 PM, Marek Vasut wrote: >>> Dear Jos? Miguel Gon?alves, >>> >>>> Jumping to board_init_r is not performed due to a bug on address >>>> computation. >>> Is your CONFIG_SYS_TEXT_BASE configured correctly? I don't detect any >>> misbehavior on my arm926 boards. >> Maybe because you are not using it to build an SPL? > I do ... and I use CONFIG_SPL_TEXT_BASE properly . > >> Please check the same chunk of code in other start.S for arm1176 and >> armv7. They have the same code that I put for arm926ejs. > Please wait and please first explain what is the issue. The issue is what I've explained in the patch comments. Without this change the code never reaches board_init_r in the SPL and I think I have all the configurations correctly set. If the bug is not from here please suggest me what I need to change in the configuration in order to correctly boot my board. > >>>> Relocation offsets are not needed when building SPL. >>> Do they cause any trouble? >> No! Just not needed. >> >>>> Signed-off-by: Jos? Miguel Gon?alves >>>> --- >>>> >>>> Changes for v2: >>>> - None >>>> >>>> --- >>>> >>>> arch/arm/cpu/arm926ejs/start.S | 4 +++- >>>> 1 file changed, 3 insertions(+), 1 deletion(-) >>>> >>>> diff --git a/arch/arm/cpu/arm926ejs/start.S >>>> b/arch/arm/cpu/arm926ejs/start.S index 6f05f1a..2da5342 100644 >>>> --- a/arch/arm/cpu/arm926ejs/start.S >>>> +++ b/arch/arm/cpu/arm926ejs/start.S >>>> >>>> @@ -325,7 +325,7 @@ _nand_boot_ofs: >>>> .word nand_boot >>>> >>>> #else >>>> >>>> ldr r0, _board_init_r_ofs >>>> >>>> - ldr r1, _TEXT_BASE >>>> + adr r1, _start >>>> >>>> add lr, r0, r1 >>>> add lr, lr, r9 >>>> /* setup parameters for board_init_r */ >>>> >>>> @@ -338,12 +338,14 @@ _board_init_r_ofs: >>>> .word board_init_r - _start >>>> >>>> #endif >>>> >>>> +#ifndef CONFIG_SPL_BUILD >>>> >>>> _rel_dyn_start_ofs: >>>> .word __rel_dyn_start - _start >>>> >>>> _rel_dyn_end_ofs: >>>> .word __rel_dyn_end - _start >>>> >>>> _dynsym_start_ofs: >>>> .word __dynsym_start - _start >>>> >>>> +#endif >>>> >>>> /* >>>> >>>> ********************************************************************* >>>> **** >>> Best regards, >>> Marek Vasut >> Best regards, >> Jos? Gon?alves > Best regards, > Marek Vasut Best regards, Jos? Gon?alves