[U-Boot-Users] MIPS build environment
Wolfgang Denk
wd at denx.de
Sat Jan 29 18:08:33 CET 2005
Dear Thomas,
in message <1106994990.5393.8.camel at gamecube.scs.ch> you wrote:
>
> > Unless I'm doing something wrong, I also have
> > to use binutils with the 'allow_branch_to_undefined'
> > patch.
>
> It looks to me that the code uses bal in an attempt to be position
> independent. It also uses a rather complicated got loading sequence.
> This is IMO futile, as the rest of u-boot (especially the copy to RAM
> routine) isn't position independent. So you can as well just load the
> full address of the called routines into a temporary register and jump
> through the register. See the patch below.
No, you're moving into the wrong direction. I hereby reject this
patch, and will do the same woth all other attempts that go into that
direction.
It was very unfortunate that the MIPS port copied the memory layout
and relocation part from ARMBoot, which broke with the IMHO better
design in PPCBoot. If we change the current code, then please let's
do it right and implement it similar as on PowerPC, i. e. get rid of
the hard-coded text addresses in RAM - instead let's auto-determine
the relocation address based on the actual RAM size in the system,
always relocating U-Boot to the very end of available RAM.
This is where the ARM and MIPS ports should move to.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Obviously, a major malfunction has occurred."
-- Steve Nesbitt, voice of Mission Control, January 28,
1986, as the shuttle Challenger exploded within view
of the grandstands.
More information about the U-Boot
mailing list