No subject


Fri Jan 23 11:48:37 CET 2009


program, one needs to define where the program will be=20
executed since function calls are using absolute addresses.
The example/Makefile LOAD_ADDR for the selected architecture
should be set to the program's load address.


The steps for running a standalone application using=20
the go command in U-Boot are:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D
1- Compile the standalone Hello World Demo with the
  "make examples" command from the U-Boot top directory.
  This step will run the following commands:
  $ avr32-linux-gcc     (compile hello_world.c)
  $ avr32-linux-ld      (link against the linux-uclibc library)
    . This is also where the start address is defined
  $ avr32-linux-objcopy (to copy to binary or srec format)
2- Load U-Boot program in memory
  http://www.denx.de/wiki/DULG/UBootStandalone
  According to the LOAD_ADDR, the program should be loaded
  at 0x00000000 (in Flash, over U-Boot). This would
  overwrite the U-Boot in Flash, already residing in this
  sector of memory. I would need to load it in RAM.
  $ tftpboot 0x10300000 hello_world.bin
3- Run using the U-Boot "go" command
  $ go 0x10300004 This is a test


Problem 1:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
When I change the LOAD_ADDR to 0x10300000, I get a linker error:
avr32-linux-ld: hello_world: Not enough room for program headers =
(allocated 2, need 3)
  Segment              Sections...
  00:           LOAD:  .rela.dyn
  01:           LOAD:  .text .rodata
  02:           LOAD:  .got
avr32-linux-ld: final link failed: Bad value

(?) Does anyone have an idea what I can do for this?


Steps for running a standalone program using bootm:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D
Let's assume I was able to run the standalone program usinng the
go command. My next step is to create an image that can be
started using bootm.
1- Compile the standalone Demo with "make examples"
2- Create an image (.img) using mkimage
  I assume the address (-a) needs to be the same as the
  Makefile LOAD_ADDR and the entry point (-e) will be 4 bytes
  after that.
  $ mkimage -A avr32 -O u-boot -T standalone -C none \
    -a 0x10300000 -e 0x10300004 -n "Hello World" \
    -d hello_world.bin hello_world.img
3- Load the image in memory (not the execution place)
  $ tftpboot 0x11000000 hello_world.img
4- Run the application
  $ bootm
  (autostart is set to yes and bootm works when I start linux)

 =20
(?) Anything wrong in there?


------=_NextPart_000_0076_01CA823B.73578F80--



More information about the U-Boot mailing list