public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] can't build u-boot-2010.12-rc2 for at91rm9200ek
@ 2010-12-09  5:56 zzs213
  2010-12-09  6:07 ` Albert ARIBAUD
  0 siblings, 1 reply; 15+ messages in thread
From: zzs213 @ 2010-12-09  5:56 UTC (permalink / raw)
  To: u-boot

I download u-boot-2010.12-rc2 and make at91rm9200ek use the flowwing command

make O=../build at91rm9200ek

and get error message like this 

arm-linux-gcc   -D__ASSEMBLY__ -g  -Os   -fno-common -ffixed-r8 -msoft-float  -D__KERNEL__ -DCONFIG_SYS_TEXT_BASE=0x10000000 -I/home/zzs/DownLoad/uboot/xx/build/include2 -I/home/zzs/DownLoad/uboot/xx/build/include -I/home/zzs/DownLoad/uboot/xx/u-boot-2010.12-rc2/include -fno-builtin -ffreestanding -nostdinc -isystem /home/zzs/work/tools/eldk4.1/usr/bin/../lib/gcc/arm-linux/4.0.0/include -pipe  -DCONFIG_ARM -D__ARM__ -marm    -mabi=apcs-gnu  -mno-thumb-interwork  -march=armv4   \
        -o /home/zzs/DownLoad/uboot/xx/build/arch/arm/cpu/arm920t/start.o start.S -c
start.S: Assembler messages:
start.S:251: Error: bad arguments to instruction -- `add r1,r9'

It looks a illegal instruction in start.S

my toolchain is eldk4.1

anybody help me!!

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

* [U-Boot] can't build u-boot-2010.12-rc2 for at91rm9200ek
  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
                     ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Albert ARIBAUD @ 2010-12-09  6:07 UTC (permalink / raw)
  To: u-boot

Le 09/12/2010 06:56, zzs213 a ?crit :
> I download u-boot-2010.12-rc2 and make at91rm9200ek use the flowwing command
>
> make O=../build at91rm9200ek
>
> and get error message like this
>
> arm-linux-gcc   -D__ASSEMBLY__ -g  -Os   -fno-common -ffixed-r8 -msoft-float  -D__KERNEL__ -DCONFIG_SYS_TEXT_BASE=0x10000000 -I/home/zzs/DownLoad/uboot/xx/build/include2 -I/home/zzs/DownLoad/uboot/xx/build/include -I/home/zzs/DownLoad/uboot/xx/u-boot-2010.12-rc2/include -fno-builtin -ffreestanding -nostdinc -isystem /home/zzs/work/tools/eldk4.1/usr/bin/../lib/gcc/arm-linux/4.0.0/include -pipe  -DCONFIG_ARM -D__ARM__ -marm    -mabi=apcs-gnu  -mno-thumb-interwork  -march=armv4   \
>          -o /home/zzs/DownLoad/uboot/xx/build/arch/arm/cpu/arm920t/start.o start.S -c
> start.S: Assembler messages:
> start.S:251: Error: bad arguments to instruction -- `add r1,r9'
>
> It looks a illegal instruction in start.S
>
> my toolchain is eldk4.1

ELDK 4.1 seems a bit old -- 4.2 has been available for some time now and 
does not have the issue with this instruction.

If you really cannot use 4.2, then you can rewrite the instruction in 
its canonical form: 'add r1,r1,r9'.

> anybody help me!!

HTH.

Amicalement,
-- 
Albert.

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

* [U-Boot] can't build u-boot-2010.12-rc2 for at91rm9200ek
  2010-12-09  6:07 ` Albert ARIBAUD
@ 2010-12-09  6:49   ` zzs213
  2010-12-09  7:07   ` zzs213
  2010-12-09 10:26   ` Wolfgang Denk
  2 siblings, 0 replies; 15+ messages in thread
From: zzs213 @ 2010-12-09  6:49 UTC (permalink / raw)
  To: u-boot


I chang 'adr r1, r9' to 'add r1, r1, r9' and then rebuild it
but I gave another error. the error message is:

arm-linux-ld: -static and -shared may not be used together
make[1]: *** [/home/zzs/DownLoad/uboot/xx/build/u-boot]

Is this caused by the toolchain too?

thanks!

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

* [U-Boot] can't build u-boot-2010.12-rc2 for at91rm9200ek
  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:31     ` Andreas Bießmann
  2010-12-09 10:26   ` Wolfgang Denk
  2 siblings, 2 replies; 15+ messages in thread
From: zzs213 @ 2010-12-09  7:07 UTC (permalink / raw)
  To: u-boot

I chang 'adr r1, r9' to 'add r1, r1, r9' and then rebuild it
but I got another error. the error message is:

arm-linux-ld: -static and -shared may not be used together
make[1]: *** [/home/zzs/DownLoad/uboot/xx/build/u-boot] Error 1
make[1]: Leaving directory `/home/zzs/DownLoad/uboot/xx/u-boot-2010.12-rc2'
make: *** [at91rm9200ek] Error 2


Is this caused by the toolchain too?

thanks!

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

* [U-Boot] can't build u-boot-2010.12-rc2 for at91rm9200ek
  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
  1 sibling, 1 reply; 15+ messages in thread
From: Albert ARIBAUD @ 2010-12-09  7:27 UTC (permalink / raw)
  To: u-boot

Hi 'zzs213',

Le 09/12/2010 08:07, zzs213 a ??crit :
> I chang 'adr r1, r9' to 'add r1, r1, r9' and then rebuild it
> but I got another error. the error message is:
>
> arm-linux-ld: -static and -shared may not be used together
> make[1]: *** [/home/zzs/DownLoad/uboot/xx/build/u-boot] Error 1
> make[1]: Leaving directory `/home/zzs/DownLoad/uboot/xx/u-boot-2010.12-rc2'
> make: *** [at91rm9200ek] Error 2
>
>
> Is this caused by the toolchain too?

Apparently it is. Building v2010.12-rc2 for at91rm9200ek with ELDK 4.2 
gives:

albert at lilith:~/src/u-boot$ ./MAKEALL at91rm9200ek
Configuring for at91rm9200ek board...
at91rm9200_usart.c:39:2: warning: #warning Please update to use C 
structur SoC access !
    text	   data	    bss	    dec	    hex	filename
  196564	   5576	 287296	 489436	  777dc	./u-boot

--------------------- SUMMARY ----------------------------
Boards compiled: 1
Boards with warnings or errors: 1 ( at91rm9200ek )
----------------------------------------------------------
albert at lilith:~/src/u-boot$

> thanks!

You're welcome.

Amicalement,
-- 
Albert.

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

* [U-Boot] can't build u-boot-2010.12-rc2 for at91rm9200ek
  2010-12-09  7:07   ` zzs213
  2010-12-09  7:27     ` Albert ARIBAUD
@ 2010-12-09  7:31     ` Andreas Bießmann
  2010-12-09  8:39       ` zzs213
  1 sibling, 1 reply; 15+ messages in thread
From: Andreas Bießmann @ 2010-12-09  7:31 UTC (permalink / raw)
  To: u-boot

Dear zzs213,

Am 09.12.2010 um 08:07 schrieb zzs213:

> I chang 'adr r1, r9' to 'add r1, r1, r9' and then rebuild it
> but I got another error. the error message is:
> 
> arm-linux-ld: -static and -shared may not be used together
> make[1]: *** [/home/zzs/DownLoad/uboot/xx/build/u-boot] Error 1
> make[1]: Leaving directory `/home/zzs/DownLoad/uboot/xx/u-boot-2010.12-rc2'
> make: *** [at91rm9200ek] Error 2

I can not remember any part defining -shared for the linker. Maybe it is implied by the linker when using -pie switch for the linker. That is what we do for current relocation implemented by Albert.

> Is this caused by the toolchain too?

I guess it is your toolchain. Can you try e.g. a current codesourcery build? 

regards

Andreas Bie?mann

BTW: One thing to mention. The at91rm9200ek board is _not_ fully functional a.t.m! I do only boot via JTAG currently, the same may be possible via preloader, e.g. one at91loader or a selfmade one. Booting from NOR Flash is ongoing but not working a.t.m., booting from dataflash may come in the future (fully supported by u-boot, via SPL; using preloader and copy to ram should work currently).

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

* [U-Boot] can't build u-boot-2010.12-rc2 for at91rm9200ek
  2010-12-09  7:27     ` Albert ARIBAUD
@ 2010-12-09  7:45       ` zzs213
  0 siblings, 0 replies; 15+ messages in thread
From: zzs213 @ 2010-12-09  7:45 UTC (permalink / raw)
  To: u-boot

Yes. I just build it use eldk4.2. It's all right!!

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

* [U-Boot] can't build u-boot-2010.12-rc2 for at91rm9200ek
  2010-12-09  7:31     ` Andreas Bießmann
@ 2010-12-09  8:39       ` zzs213
  2010-12-09  9:25         ` Andreas Bießmann
       [not found]         ` <57fc34.989e.12cca8b8204.Coremail.zzs213@126.com>
  0 siblings, 2 replies; 15+ messages in thread
From: zzs213 @ 2010-12-09  8:39 UTC (permalink / raw)
  To: u-boot


I just clone the git repos. and build at91rm9200ek with eldk4.1,the error message is same.

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

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

* [U-Boot] can't build u-boot-2010.12-rc2 for at91rm9200ek
  2010-12-09  8:39       ` zzs213
@ 2010-12-09  9:25         ` Andreas Bießmann
  2010-12-09  9:59           ` zzs213
       [not found]         ` <57fc34.989e.12cca8b8204.Coremail.zzs213@126.com>
  1 sibling, 1 reply; 15+ messages in thread
From: Andreas Bießmann @ 2010-12-09  9:25 UTC (permalink / raw)
  To: u-boot

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

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

* [U-Boot] can't build u-boot-2010.12-rc2 for at91rm9200ek
  2010-12-09  9:25         ` Andreas Bießmann
@ 2010-12-09  9:59           ` zzs213
  0 siblings, 0 replies; 15+ messages in thread
From: zzs213 @ 2010-12-09  9:59 UTC (permalink / raw)
  To: u-boot

you are right, I use that method on u-boot-2010.09 for my own board(slightly different from at91rm9200ek)

eldk4.1 is ok for 2010.09, eldk4.2 ok too

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

* [U-Boot] can't build u-boot-2010.12-rc2 for at91rm9200ek
       [not found]         ` <57fc34.989e.12cca8b8204.Coremail.zzs213@126.com>
@ 2010-12-09  9:59           ` Andreas Bießmann
  2010-12-09 10:08             ` zzs213
  0 siblings, 1 reply; 15+ messages in thread
From: Andreas Bießmann @ 2010-12-09  9:59 UTC (permalink / raw)
  To: u-boot

Dear zzs213,

can you please leave some context when you answering to the list?

Am 09.12.2010 10:52, schrieb zzs213:
> you are right, I use that method on u-boot-2010.09 for my own board(slightly different from at91rm9200ek)

I guess you mean you are using a preloader on your NOR flash, is that right?

> eldk4.1 is ok for 2010.09, eldk4.2 ok too

So do you have no problem left?

regards

Andreas Bie?mann

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

* [U-Boot] can't build u-boot-2010.12-rc2 for at91rm9200ek
  2010-12-09  9:59           ` Andreas Bießmann
@ 2010-12-09 10:08             ` zzs213
  0 siblings, 0 replies; 15+ messages in thread
From: zzs213 @ 2010-12-09 10:08 UTC (permalink / raw)
  To: u-boot


>Dear zzs213,
>
>can you please leave some context when you answering to the list?
>
>Am 09.12.2010 10:52, schrieb zzs213:
>> you are right, I use that method on u-boot-2010.09 for my own board(slightly different from at91rm9200ek)
>
>I guess you mean you are using a preloader on your NOR flash, is that right?

yes
>
>> eldk4.1 is ok for 2010.09, eldk4.2 ok too
>
>So do you have no problem left?

yes
>
>regards
>
>Andreas Bie?mann
>

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

* [U-Boot] can't build u-boot-2010.12-rc2 for at91rm9200ek
  2010-12-09  6:07 ` Albert ARIBAUD
  2010-12-09  6:49   ` zzs213
  2010-12-09  7:07   ` zzs213
@ 2010-12-09 10:26   ` Wolfgang Denk
  2010-12-09 10:54     ` Andreas Bießmann
  2 siblings, 1 reply; 15+ messages in thread
From: Wolfgang Denk @ 2010-12-09 10:26 UTC (permalink / raw)
  To: u-boot

Dear Albert ARIBAUD,

In message <4D007227.7020106@free.fr> you wrote:
>
> > start.S:251: Error: bad arguments to instruction -- `add r1,r9'
> >
> > It looks a illegal instruction in start.S
> >
> > my toolchain is eldk4.1
>
> ELDK 4.1 seems a bit old -- 4.2 has been available for some time now and
> does not have the issue with this instruction.
>
> If you really cannot use 4.2, then you can rewrite the instruction in
> its canonical form: 'add r1,r1,r9'.

Well, we should actually do that.

Patch following.



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
You see things; and you say ``Why?'' But I dream  things  that  never
were; and I say ``Why not?''
       - George Bernard Shaw _Back to Methuselah_ (1921) pt. 1, act 1

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

* [U-Boot] can't build u-boot-2010.12-rc2 for at91rm9200ek
  2010-12-09 10:26   ` Wolfgang Denk
@ 2010-12-09 10:54     ` Andreas Bießmann
  2010-12-09 11:27       ` Reinhard Meyer
  0 siblings, 1 reply; 15+ messages in thread
From: Andreas Bießmann @ 2010-12-09 10:54 UTC (permalink / raw)
  To: u-boot

Dear Wolfgang Denk,
Dear Albert Aribaud,

Am 09.12.2010 11:26, schrieb Wolfgang Denk:
> Dear Albert ARIBAUD,
> 
> In message <4D007227.7020106@free.fr> you wrote:
>>
>>> start.S:251: Error: bad arguments to instruction -- `add r1,r9'
>>>
>>> It looks a illegal instruction in start.S
>>>
>>> my toolchain is eldk4.1
>>
>> ELDK 4.1 seems a bit old -- 4.2 has been available for some time now and
>> does not have the issue with this instruction.
>>
>> If you really cannot use 4.2, then you can rewrite the instruction in
>> its canonical form: 'add r1,r1,r9'.
> 
> Well, we should actually do that.
> 
> Patch following.

So you need to fix _all_ of the arch/arm/cpu/*/start.S cause this was
copied from one relocation code to the other.

Another cause to introduce a relocate.S in near future ;)

regards

Andreas Bie?mann

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

* [U-Boot] can't build u-boot-2010.12-rc2 for at91rm9200ek
  2010-12-09 10:54     ` Andreas Bießmann
@ 2010-12-09 11:27       ` Reinhard Meyer
  0 siblings, 0 replies; 15+ messages in thread
From: Reinhard Meyer @ 2010-12-09 11:27 UTC (permalink / raw)
  To: u-boot

Dear Andreas Bie?mann,
> Dear Wolfgang Denk,
> Dear Albert Aribaud,
> 
> Am 09.12.2010 11:26, schrieb Wolfgang Denk:
>> Dear Albert ARIBAUD,
>>
>> In message <4D007227.7020106@free.fr> you wrote:
>>>> start.S:251: Error: bad arguments to instruction -- `add r1,r9'
>>>>
>>>> It looks a illegal instruction in start.S
>>>>
>>>> my toolchain is eldk4.1
>>> ELDK 4.1 seems a bit old -- 4.2 has been available for some time now and
>>> does not have the issue with this instruction.
>>>
>>> If you really cannot use 4.2, then you can rewrite the instruction in
>>> its canonical form: 'add r1,r1,r9'.
>> Well, we should actually do that.
>>
>> Patch following.
> 
> So you need to fix _all_ of the arch/arm/cpu/*/start.S cause this was
> copied from one relocation code to the other.
> 
> Another cause to introduce a relocate.S in near future ;)

Certainly you are referring to relocate.c, or even better adding the "C"
relocation to the arm generic board.c on the path to an u-boot generic
board.c :)

We should only need a small stub in assembly for stack and pc switching.

"Patches welcome" :)

Best Regards,
Reinhard

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

end of thread, other threads:[~2010-12-09 11:27 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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