From: Andrejs Cainikovs <AndrejsC@GlobalAutomationSystems.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] AT91RM9200 relocation
Date: Wed, 03 Sep 2008 11:16:41 +0300 [thread overview]
Message-ID: <48BE47E9.20208@GlobalAutomationSystems.com> (raw)
In-Reply-To: <200809011555.42305.nicolas.lebedenco@tasksistemas.com.br>
Nicolas,
I faced the similar problem before. Playing around with
CONFIG_SKIP_RELOCATE_UBOOT and others don't gived any results.. The only
result was that you should change define you mentioned every time when
compiling for flash or ram. This has fixed my problem:
--- a/cpu/arm920t/start.S 2008-09-03 10:50:21.000000000 +0300
+++ b/cpu/arm920t/start.S 2008-05-19 15:22:00.000000000 +0300
@@ -261,11 +261,10 @@
* find a lowlevel_init.S in your board directory.
*/
mov ip, lr
-#if defined(CONFIG_AT91RM9200DK) || defined(CONFIG_AT91RM9200EK) ||
defined(CONFIG_AT91RM9200DF)
-
-#else
- bl lowlevel_init
-#endif
+ adr r0, _start /* r0 <- current position of
code */
+ ldr r1, _TEXT_BASE /* test if we run from flash or
RAM */
+ cmp r0, r1 /* don't init during
debug */
+ blne lowlevel_init
mov lr, ip
mov pc, lr
#endif /* CONFIG_SKIP_LOWLEVEL_INIT */
Regards,
Andrejs Cainikovs.
N?colas Carneiro Lebedenco wrote:
> Hi,
>
> I'm porting u-boot to a custom board based on the at91rm9200-dk (only
> exception is that only parallel nor flash is available on my board)
>
> Soon I realized that I could load u-boot 1.1.4 from flash but not u-boot
> 1.3.4. It really bugged me until I noticed some differences in
> cpu/arm920t/start.S and came across this patch
> "Fix regression introduced by a typo in 'Tidied other..." introduced by
> Guennadi Liakhovetski in the main branch on 2008-04-18 as follows:
>
> diff --git a/cpu/arm920t/start.S b/cpu/arm920t/start.S
> index ae86002..acc00ad 100644 (file)
>
> --- a/cpu/arm920t/start.S
> +++ b/cpu/arm920t/start.S
> @@ -178,7 +178,7 @@ copyex:
> bl cpu_init_crit
> #endif
>
> -#ifdef CONFIG_AT91RM9200
> +#ifndef CONFIG_AT91RM9200
>
> #ifndef CONFIG_SKIP_RELOCATE_UBOOT
> relocate: /* relocate U-Boot to RAM */
> --
>
> The point is I can only get u-boot to load from nor flash if I remove the
> #ifndef condition. So what was the reason behind this patch after all. Is the
> relocation supposed to take place somewhere else? Maybe someone has already
> pointed that out and got it fixed in the main branch?
>
> Regards,
>
> N?colas
>
>
>
>
>
>
>
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
next prev parent reply other threads:[~2008-09-03 8:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-01 18:55 [U-Boot] AT91RM9200 relocation Nícolas Carneiro Lebedenco
2008-09-03 8:16 ` Andrejs Cainikovs [this message]
2008-09-03 21:47 ` Andrejs Cainikovs
2008-09-03 22:12 ` Wolfgang Denk
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=48BE47E9.20208@GlobalAutomationSystems.com \
--to=andrejsc@globalautomationsystems.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