[U-Boot] v2010-rc2: OMAP3 broken

Hiremath, Vaibhav hvaibhav at ti.com
Mon Nov 29 14:19:57 CET 2010


> -----Original Message-----
> From: u-boot-bounces at lists.denx.de [mailto:u-boot-bounces at lists.denx.de]
> On Behalf Of Wolfgang Denk
> Sent: Monday, November 29, 2010 6:19 PM
> To: u-boot at lists.denx.de
> Subject: [U-Boot] v2010-rc2: OMAP3 broken
> 
> Hi,
> 
> it seems that commit 566d49a3f has broken OMAP3 - at least beagle and
> devkit8000 hang in or after relocation.
> 
[Hiremath, Vaibhav] AM3517 also used to hangs in relocate_code function.



> The culprit is this the "$(sort $(LIBS)) in Makefile, i. e. the
> following change will unbreak the boards:
> 
> @@ -263,7 +263,7 @@ ifeq ($(SOC),s5pc2xx)
>  LIBS += $(CPUDIR)/s5p-common/libs5p-common.o
>  endif
> 
> -LIBS := $(addprefix $(obj),$(sort $(LIBS)))
> +LIBS := $(addprefix $(obj),$(LIBS))
>  .PHONY : $(LIBS) $(TIMESTAMP_FILE) $(VERSION_FILE)
> 
>  LIBBOARD = board/$(BOARDDIR)/lib$(BOARD).o
> 
> 
[Hiremath, Vaibhav] The above patch works for me as well.

> Unfortunately we need the sort to avoild duplicate listing of libs /
> objects on PowerPC.  And I don;t understand yet how this change can
> cause such an affect.
> 
> Any help welcome.
> 
[Hiremath, Vaibhav] I can put my debug observations here,


The system is hanging at 

fixrel:
        /* relative fix: increase location by offset */
        ldr     r1, [r0]

Here the value of r0 is relocation offset and not an address.

fixloop:
        ldr     r0, [r2]        /* r0 <- location to fix up, IN FLASH! */
        add     r0, r0, r9      /* r0 <- location to fix up in RAM */

In the above two instructions, load from [r2] is coming as 0, causing reference to invalid address (relocation offset).

After applying your patch, the value from above load instruction comes as 0x80008020, which further gets added to offset (valid address).


I hope this might give you some pointers, and I am not an expert on makefile, so not sure about relation between library sort and above finding.

Thanks,
Vaibhav
> Best regards,
> 
> Wolfgang Denk
> 
> --
> DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
> It seems intuitively obvious to me, which  means  that  it  might  be
> wrong.                                                 -- Chris Torek
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot


More information about the U-Boot mailing list