[U-Boot-Users] CONFIG_BOOTBINFUNC for AT91RM9200

Steven Scholz steven.scholz at imc-berlin.de
Tue Nov 23 17:51:12 CET 2004


Wolfgang Denk wrote:

> In message <41A35A7E.1020605 at imc-berlin.de> you wrote:
> 
>>is there a standard way in U-Boot to prevent to the startup code from relocating 
>>into RAM?
> 
> No. U-Boot will always relocate itself to RAM. Well, nearly always  -
> in any halfway sane implementation.
> 
> 
>>I know that arm920t figures out the currebt address. compares it to _TEXT_BASE 
>>and decides wether to relocate or not.
>>
>>relocate:				/* relocate U-Boot to RAM	    */
>>	adr	r0, _start		/* r0 <- current position of code   */
>>	ldr	r1, _TEXT_BASE		/* test if we run from flash or RAM */
>>	cmp     r0, r1                  /* don't reloc during debug         */
> 
> 
> I wish that code was never written.
Why is that so bad? It makes it possible to debug U-Boot with just loading the 
image into RAM using BDI2000.

> All CPUs always relocate the code to RAM. This is the  general  case.
> Anything else is not supported.

But how would you debug U-Boot?
I though the common way is to disabled relocation and memsetup, load that U-Boot 
image with an BDI2000 into RAM and execute it - skipping the init code...

--
Steven




More information about the U-Boot mailing list