[U-Boot] [PATCH V4 1/2] arm926ejs: fix linker file for newer ld support

Daniel Hobi
2010-11-15T14:15:53Z

Hi Eric,

On 10.11.2010 00:43, Eric Cooper wrote:
> I have been periodically rebasing my patches for the Seagate DockStar
> on master. But ever since the elf_reloc changes were merged, I have
> been unable to get a working build. First I saw symptoms similar to
> what Alexander Holler reported (failing during NAND initialization due
> to incorrect BSS relocation), but the latest arm926ejs ld script
> patches did not fix it. The system would hang here:
>
> U-Boot 2010.12-rc1 (Nov 09 2010 - 17:52:38)
> Seagate FreeAgent DockStar
>
> SoC: Kirkwood 88F6281_A0
> DRAM: 128 MiB
> NAND:
>
> This was built with the CodeSourcery 2010q1 toolchain. I also
> included Alexander's patch to double-check the relocation, and no
> error message gets printed.

Did you locally fix arch/arm/cpu/arm926ejs/kirkwood/timer.c to not
access uninitialized data (variables timestamp and lastdec) before
relocation?

Otherwise timer_init() will write into the relocation table which may
lead to your problem. If you change unrelated code, timer_init() will
overwrite some other relocation table entries and U-Boot seems to work.

@Albert: If your patch is applied without fixing the accesses to BSS
before relocation, some ARM ports will be broken even when compiling
with ELDK 4.2.

Best regards,
Daniel