From: "Andreas Bießmann" <andreas.devel@googlemail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] can't build u-boot-2010.12-rc2 for at91rm9200ek
Date: Thu, 09 Dec 2010 10:25:31 +0100 [thread overview]
Message-ID: <4D00A08B.2080105@gmail.com> (raw)
In-Reply-To: <11c9e17.857e.12cca48d38e.Coremail.zzs213@126.com>
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
next prev parent reply other threads:[~2010-12-09 9:25 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-09 5:56 [U-Boot] can't build u-boot-2010.12-rc2 for at91rm9200ek zzs213
2010-12-09 6:07 ` Albert ARIBAUD
2010-12-09 6:49 ` zzs213
2010-12-09 7:07 ` zzs213
2010-12-09 7:27 ` Albert ARIBAUD
2010-12-09 7:45 ` zzs213
2010-12-09 7:31 ` Andreas Bießmann
2010-12-09 8:39 ` zzs213
2010-12-09 9:25 ` Andreas Bießmann [this message]
2010-12-09 9:59 ` zzs213
[not found] ` <57fc34.989e.12cca8b8204.Coremail.zzs213@126.com>
2010-12-09 9:59 ` Andreas Bießmann
2010-12-09 10:08 ` zzs213
2010-12-09 10:26 ` Wolfgang Denk
2010-12-09 10:54 ` Andreas Bießmann
2010-12-09 11:27 ` Reinhard Meyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D00A08B.2080105@gmail.com \
--to=andreas.devel@googlemail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox