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

Rick Bronson rick at efn.org
Fri Oct 24 16:05:43 CEST 2003


Hi Steven,

  It's totally okay with me.

> Should we put all the init code into cpu/at91rm9200/{start.S} and use CONFIG_ 
> and CFG_?

  I'd put it all in start.S and not define any CONFIG for it.  But one
thing you might check is if it will start up when the clocks are
already configured.  In other words, make sure your new u-boot can be
started from an already running u-boot.  This is necessary because the
AT91RM9200 can be started from SPI DataFlash (or EEPROM) which
requires a preloader.  The preloader sets up clocks for SDRAM, etc and
then launches u-boot.

  I have a sperate entry in a Makefile for compiling u-boot up to run
in ram so that I can fire a new u-boot while inside u-boot:

ram:
	cd u-boot-0.4.0; \
	echo TEXT_BASE = 0x21fa0000 > board/at91rm9200dk/config.mk; \
	make at91rm9200dk_config; \
	make; \
	cp -f u-boot.bin /tftpboot

  And then from u-boot I do:

tftp 21fa0000 u-boot.bin # load u-boot
go 21fa0000			   # run u-boot

> Or should every AT91 based board copy the same code again and again into thier 
> own subdirectory?

  I'd make it (optimistically) so they didn't have to copy.

  Thanks for your work!

  Rick

> 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 
> AT91RM9200DK:
> 
> 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