Dear zzs213, Am 09.12.2010 09:39, schrieb zzs213: > > I just clone the git repos. and build at91rm9200ek with eldk4.1,the error > message is same.
Ok, so ELDK 4.1 is not working. How about ELDK 4.2, CodeSourcery 2009q{1,3}, 2010q1, 2010.09? > I change start.S let it check whether the main osc of at91rm9200 is work, So > I know need relocate the code or not. Use this method I boot u-boot in NOR > flash successful So you added some at91 related stuff to arm920t/cpu/start.S to conditionally branch to lowlevel_init()? You check if the CKGR_MOR.MOSCEN is set or not and decide whether you branch to lowlevel_init() or not. I guess this is wrong. First, if your u-boot is started from SDRAM you need correct initialised clocks (main oscillator or not, you know you can leave the main oscillator disabled and bypass it!), CS0 timing and SDRAM. In that case you need to compile your u-boot with CONFIG_SKIP_LOWLEVEL_INIT and therefore we do never branch to lowlevel_init() cause it just do not exist. If you boot from NOR flash (BMS set to low during reset) the internal ROM code is never executed and you need to switch on and configure the clocks, setup CS0 timing and SDRAM configuration. This is done in lowlevel_init() and therefore we do not set CONFIG_SKIP_LOWLEVEL_INIT in that case. That case is currently broken in head of u-boot-arm/master (not in u-boot/master currently, but will for v2010.12)! You may use the board in some way suggested by atmel in some of their documents. In that case you do have a preloader in NOR flash followed by an u-boot blob. But that is also the first case! Your u-boot will be copied to SDRAM by preloader! -> set CONFIG_SKIP_LOWLEVEL_INIT, set another CONFIG_TEXT_BASE cause. You may use the at91rm9200ek_ram_config and set the target address of your preloader copy to 0x20100000. In that case NOR flash booting is supported! But it is _not_ the case I meant with 'NOR flash booting does not work a.t.m.'. In any case you need to relocate if your CONFIG_TEXT_BASE is not set to the location of u-boot at the end of board_init_f()! You can not know the location in any case cause this can be influenced by some environment variables. Therefore it is completely wrong to decide on the setting of CKGR_MOR.MOSCEN if we need relocation or not. regards Andreas Bießmann _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot