From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Scholz Date: Mon, 27 Oct 2003 08:15:12 +0100 Subject: [U-Boot-Users] Re: U-Boot for AT91RM9200DK In-Reply-To: References: <3F913C5A.8070303@imc-berlin.de> <3F914731.1000207@imc-berlin.de> <3F914F82.3060502@imc-berlin.de> <3F98EA80.9040302@imc-berlin.de> Message-ID: <3F9CC600.2080209@imc-berlin.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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