[U-Boot-Users] U-Boot for AT91RM9200DK

Steven Scholz steven.scholz at imc-berlin.de
Fri Oct 24 11:01:52 CEST 2003

Hi Rick et al.,

as I mentioned before U-Boot is running on our AT91RM9200 based board. I went 
down the path ATMEL was suggesting. They use this memory map on their eval board 

24k	Boot Image
32KB	free
8KB	Environment
64KB	gzipped U-Boot image

The "Boot image" is a small (11k) piece of code which initialises clocks, flash, 
SDRAM and serial port. Then it decompresses the "gzipped U-Boot image" into 
SDRAM and jumps to it. The reason for that seems to be:

 > We chose, to put a compressed boot due to memory mapping constraints.
 > We need to keep a sector for environment variables the 8Kbyte-size sector is
 > enough.

They probably overlooked that you could embedded the environment into U-Boot. By 
using a correct u-boot.lds linker file one can reserve an 8Kbyte-size sector in 
the middle of U-Boot. So instead one could use this memory map:

56KB	U-Boot
8KB	Environment
64KB	U-Boot

using the same 128KB of flash.

Since the CPU was setup by the bootloader there's no init and relocation code 
for the AT91RM9200 in U-Boot (yet).

So I spend a day, "wrote" some init and relocation code and now U-Boot is 
starting directly from flash and relocates itself to RAM. No Preboot needed. Nor 
gzipped image of U-Boot.

I would like to change the official U-Boot code for the AT91RM9200 and 
AT91RM9200DK so that it can be used without the need of another bootloader.
This way it would be a lot easier for people to port U-Boot to their hardware.

What do you think?
Anyone interessted?

I'd love to hear suggestion, where to put specific parts of the init code. Other 
ARM cpus use a board specific memsetup.S file.
For an AT91RM9200 we have to setup more than just the SDRAM.
Should we put all the init code into cpu/at91rm9200/{start.S} and use CONFIG_ 
and CFG_?
Or should every AT91 based board copy the same code again and again into thier 
own subdirectory?

Looking forward to your ideas!

Thanks. And sorry for the long mail!

Steven Scholz

imc Measurement & Control               imc Meßsysteme GmbH
Voltastr. 5                             Voltastr. 5
13355 Berlin                            13355 Berlin
Germany                                 Deutschland
fon: +49 30 467090-0                    Tel: 030 / 467090-0
fax: +49 30 4631576                     fax: 030 / 4631576

More information about the U-Boot mailing list