[U-Boot] how can i change u-boot load address?
Andrew Dyer
amdyer at gmail.com
Mon Oct 6 17:13:24 CEST 2008
On Mon, Oct 6, 2008 at 7:13 AM, sahar mustafa <nilesmile at live.com> wrote:
> can you tell me how to change the load address without crippling the u-boot?
It's not 100% clear what you are trying to do, and you didn't mention
your target other than it's MIPS...
If you want to build a version of u-boot that is linked to a start
address that is in RAM for loading via a jtag debugger, then change
the definition of TEXT_BASE in board/<your board name here>/config.mk.
You have to make sure that u-boot doesn't try to re-initialize the
ram or caches, and doesn't write over parts of itself when it
relocates or allocates memory for the stack and heap.
If you want to make sure u-boot is still linked in ROM, but gets put
at the top of memory during relocation, then you have to make sure the
initdram() function in your code returns the correct ram size. If you
look in lib_mips/board.c board_init_f(), ram starts being allocated
top down, starting at CFG_SDRAM_BASE + gd->ram_size. gd->ram_size is
initialized by the return value of a call to initdram() which is
usually somewhere in the board specific code.
--
Hardware, n.:
The parts of a computer system that can be kicked.
More information about the U-Boot
mailing list