[U-Boot] What mkimage arguments for standalone AVR32 app?

Jesper Vestergaard openocd at jespervestergaard.dk
Tue May 5 12:05:19 CEST 2009


Mike Frysinger wrote:
> On Tuesday 05 May 2009 04:55:44 Jesper Vestergaard wrote:
>   
>> mkimage -A avr32 -O u-boot -T standalone -C none -a 0x11000000 -e
>> 0x11000000 -n "myapp" -d test.bin test_uboot.bin
>>     
>
> the entry/load addresses need to match reality.  you cant pick them out of the 
> air without properly setting them everywhere.
>
> you also didnt say how you compiled/linked the standalone code ... you must be 
> sure to not use any files/libraries/toolchain that expect an operating system 
> (like Linux).
>   
Here's how i compiled it:
avr32-gcc -O2 -Wall -c -fmessage-length=0 -mpart=ap7000 
-ffunction-sections -o test.o test.c
avr32-ld test.o -e 0x00000000 -T simple.lds -o test.out
avr32-objcopy -O binary test.out test.bin

And the simple.lds:
SECTIONS
{
  . = 0x11000000;
  /*. = 0x00000000; */
  .text : { *(.text) }
  /* . = 0x8000000; */
  .data : { *(.data) }
  .bss : { *(.bss) }
}

and a objectdump:

avr32-objdump -d test.out

test.out:     file format elf32-avr32

Disassembly of section .text.main:

11000000 <main>:
11000000:    d7 03           nop
11000002:    d7 03           nop
11000004:    d7 03           nop
11000006:    d7 03           nop
11000008:    c0 08           rjmp    11000008 <main+0x8>


>   
>> ICnova> tftp 11000000 test_uboot.bin
>> ICnova> bootm 11000000
>>    Load Address: 11000000
>>    Entry Point:  11000000
>>     
> you shoulud not load (tftp) the bootable image to the same address that it 
> will be uncompressing to (load address).
>
> really you should read doc/README.standalone and the simple examples in 
> examples/ instead of trying random commands.
> -mike
>   

According to the Makefile in the example directory i should load the 
binary to 0x00000000
    ifeq ($(ARCH),avr32)
    LOAD_ADDR = 0x00000000
    endif
but looking at the uboot startup it says that the flash is placed at 
that address and that the SDRAM is placed at 0x10000000.
Flash:  8 MB at address 0x00000000
SDRAM: 64 MB at address 0x10000000

Which of the addresses should i use?

I couldn't find any documentation about what entry address i should use 
for the avr32 but according to the README.standalone it is only the 
power pc which needs a entry address different from the load address so 
i guess load address=entry address.



More information about the U-Boot mailing list