
Dear Roman,
In message 40a670230810070536w5ab3251cm39b1a4ebd199e14a@mail.gmail.com you wrote:
On ARM it's being done wrong - no real relocation is preformed;
What do you mean by "real relocation"? As per start.S bootcode is copied from ROM to RAM.
Copied to a fixed address where it is actiually already linked for. See my previous message with a lenghty explanation why this is a poor design when dealing with variable sized memory.
The problem with the ARM implementation is that the link address is fixed, i. e. it cannot be adjusted to varying RAM sizes.
Usually one ports U-Boot on a board with predefined hardware layout, i.e. flash, SDRAM and peripherals are fixed. If hardware changes, say SDRAM size, no big deal to make two/three distinct u-boot images -- after all it ends up by changing TEXT_BASE only, as I understand.
This may be your opinion, but it is an isolated one and not shared by *many* board vendors who offer different configurations of boards with smaller and bigger amounts of RAM etc. For these, having only a single binary image of U-Boot for all board configurations is a MAJOR win. Also consider systems which use memory modules.
Just try to imagine you have to install a new version of the BIOS on your PC just because you add or remove a memory module. Would you buy such a PC?
Best regards,
Wolfgang Denk