public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] AT91RM9200 relocation
@ 2008-09-01 18:55 Nícolas Carneiro Lebedenco
  2008-09-03  8:16 ` Andrejs Cainikovs
  0 siblings, 1 reply; 4+ messages in thread
From: Nícolas Carneiro Lebedenco @ 2008-09-01 18:55 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] AT91RM9200 relocation
  2008-09-01 18:55 [U-Boot] AT91RM9200 relocation Nícolas Carneiro Lebedenco
@ 2008-09-03  8:16 ` Andrejs Cainikovs
  2008-09-03 21:47   ` Andrejs Cainikovs
  0 siblings, 1 reply; 4+ messages in thread
From: Andrejs Cainikovs @ 2008-09-03  8:16 UTC (permalink / raw)
  To: u-boot


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
>   

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] AT91RM9200 relocation
  2008-09-03  8:16 ` Andrejs Cainikovs
@ 2008-09-03 21:47   ` Andrejs Cainikovs
  2008-09-03 22:12     ` Wolfgang Denk
  0 siblings, 1 reply; 4+ messages in thread
From: Andrejs Cainikovs @ 2008-09-03 21:47 UTC (permalink / raw)
  To: u-boot


Pardon, appearantly this stopped working somewhere between 1.3.2 and 1.3.4.
Now I am able to load only from ram. 1.3.2 works fine, though.

Regards,
Andrejs Cainikovs.


Andrejs Cainikovs wrote:
> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] AT91RM9200 relocation
  2008-09-03 21:47   ` Andrejs Cainikovs
@ 2008-09-03 22:12     ` Wolfgang Denk
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2008-09-03 22:12 UTC (permalink / raw)
  To: u-boot

Dear Andrejs Cainikovs,

In message <48BF05DA.5020904@GlobalAutomationSystems.com> you wrote:
> 
> Pardon, appearantly this stopped working somewhere between 1.3.2 and 1.3.4.
> Now I am able to load only from ram. 1.3.2 works fine, though.

It would be very helpful if you used git-bisect to find out which
spcific commit broke it.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Monday is an awful way to spend one seventh of your life.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-09-03 22:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-01 18:55 [U-Boot] AT91RM9200 relocation Nícolas Carneiro Lebedenco
2008-09-03  8:16 ` Andrejs Cainikovs
2008-09-03 21:47   ` Andrejs Cainikovs
2008-09-03 22:12     ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox