diff mbox

[U-Boot] arm: zynq: fix a bug in Zynq linker script

Message ID 1401965265-29489-1-git-send-email-yamada.m@jp.panasonic.com
State Accepted
Delegated to: Michal Simek
Headers show

Commit Message

Masahiro Yamada June 5, 2014, 10:47 a.m. UTC
Commit 41623c91 moved exception handlers to ".vectores" section
but it missed to adjust Zynq linker script.

Zynq boards hang up after relocation because "_start" symbol
does not point to the correct address and gd->relocaddr gets insane.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Cc: Michal Simek <monstr@monstr.eu>
Tested-by: Michal Simek <monstr@monstr.eu>
---
 arch/arm/cpu/armv7/zynq/u-boot.lds | 1 +
 1 file changed, 1 insertion(+)

Comments

Masahiro Yamada June 17, 2014, 8:45 a.m. UTC | #1
Hi Michal,

On Thu,  5 Jun 2014 19:47:45 +0900
Masahiro Yamada <yamada.m@jp.panasonic.com> wrote:

> Commit 41623c91 moved exception handlers to ".vectores" section
> but it missed to adjust Zynq linker script.
> 
> Zynq boards hang up after relocation because "_start" symbol
> does not point to the correct address and gd->relocaddr gets insane.
> 
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
> Cc: Michal Simek <monstr@monstr.eu>
> Tested-by: Michal Simek <monstr@monstr.eu>
> ---
>  arch/arm/cpu/armv7/zynq/u-boot.lds | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm/cpu/armv7/zynq/u-boot.lds b/arch/arm/cpu/armv7/zynq/u-boot.lds
> index 69500a6..4dc9bb0 100644
> --- a/arch/arm/cpu/armv7/zynq/u-boot.lds
> +++ b/arch/arm/cpu/armv7/zynq/u-boot.lds
> @@ -18,6 +18,7 @@ SECTIONS
>  	.text :
>  	{
>  		*(.__image_copy_start)
> +		*(.vectors)
>  		CPUDIR/start.o (.text*)
>  		*(.text*)
>  	}


This bug should be fixed asap.

Because this patch is assigned to you, 
could you apply it and send a pull-request, please?

Best Regards
Masahiro Yamada
Michal Simek June 17, 2014, 10:38 a.m. UTC | #2
On 06/17/2014 10:45 AM, Masahiro Yamada wrote:
> Hi Michal,
> 
> On Thu,  5 Jun 2014 19:47:45 +0900
> Masahiro Yamada <yamada.m@jp.panasonic.com> wrote:
> 
>> Commit 41623c91 moved exception handlers to ".vectores" section
>> but it missed to adjust Zynq linker script.
>>
>> Zynq boards hang up after relocation because "_start" symbol
>> does not point to the correct address and gd->relocaddr gets insane.
>>
>> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
>> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
>> Cc: Michal Simek <monstr@monstr.eu>
>> Tested-by: Michal Simek <monstr@monstr.eu>
>> ---
>>  arch/arm/cpu/armv7/zynq/u-boot.lds | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/arch/arm/cpu/armv7/zynq/u-boot.lds b/arch/arm/cpu/armv7/zynq/u-boot.lds
>> index 69500a6..4dc9bb0 100644
>> --- a/arch/arm/cpu/armv7/zynq/u-boot.lds
>> +++ b/arch/arm/cpu/armv7/zynq/u-boot.lds
>> @@ -18,6 +18,7 @@ SECTIONS
>>  	.text :
>>  	{
>>  		*(.__image_copy_start)
>> +		*(.vectors)
>>  		CPUDIR/start.o (.text*)
>>  		*(.text*)
>>  	}
> 
> 
> This bug should be fixed asap.
> 
> Because this patch is assigned to you, 
> could you apply it and send a pull-request, please?

Applied and pull request sent.

Thanks,
Michal
Helmut Raiger June 25, 2014, 9:07 a.m. UTC | #3
On 06/17/2014 12:38 PM, Michal Simek wrote:
> On 06/17/2014 10:45 AM, Masahiro Yamada wrote:
>> ....
>>
>> This bug should be fixed asap.
>>
>> Because this patch is assigned to you,
>> could you apply it and send a pull-request, please?
> Applied and pull request sent.
>
> Thanks,
> Michal
>
This very same commit breaks the SPL on TT-01. Note, the SPL is not
contributed yet (I'm about to).
Has anyone tested a current u-boot on one of the mx31 boards lately?
Simply pulling in the vectors section in the linker script does not
do the  trick.

I'm a bit tight with my time currently, so I'd very much appreciate if
someone could test and possibly offer a suggestion on what to change
to get that working again, if necessary.

Helmut


--
Scanned by MailScanner.
diff mbox

Patch

diff --git a/arch/arm/cpu/armv7/zynq/u-boot.lds b/arch/arm/cpu/armv7/zynq/u-boot.lds
index 69500a6..4dc9bb0 100644
--- a/arch/arm/cpu/armv7/zynq/u-boot.lds
+++ b/arch/arm/cpu/armv7/zynq/u-boot.lds
@@ -18,6 +18,7 @@  SECTIONS
 	.text :
 	{
 		*(.__image_copy_start)
+		*(.vectors)
 		CPUDIR/start.o (.text*)
 		*(.text*)
 	}