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

Steven Scholz steven.scholz at imc-berlin.de
Mon Oct 27 08:15:12 CET 2003


Rick,

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

Ok. I see. So you're building a special version of U-Boot for this anyway (using 
make ram). Right?

I've seen:
         /*
          * we do sys-critical inits only at reboot,
          * not when booting from ram!
          */
#ifdef CONFIG_INIT_CRITICAL
         bl      cpu_init_crit
#endif

in cpu/arm920t/start.S and

#define CONFIG_INIT_CRITICAL         /* undef for developing */

in some board specific header file.

So. Would you agree on a mechanism like that?

You could still do something like that in your Makefile:

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

I think this would better better than trying to autodetect if the system was 
already configured. Ok?

Steven










More information about the U-Boot mailing list