Re: [U-Boot] eldk5.0 generate illegal instruction for at91rm9200

2011-07-16 Thread zzs

 Thanks again for the feedback.  I have documented this issue in the
 ELDK FAQ section:

 http://www.denx.de/wiki/view/ELDK-5/QuestionsAndAnswers#GCC_generates_illegal_opcodes_fo

Yes. When using USE_PRIVATE_LIBGCC=yes make my_board_name. It works
well. And the kernel works fine too because linux kernel has private libgcc
code too.

But when I examine the *.so files in eldk5.0, Almost all of them has
'clz' opcode. So if I use them in my aplication like busybox. It will
crash.

So I think the best way is to rebuild eldk5.0 for armv4. Did you tell
me how to configure eldk5.0 to build for armv4. And why eldk5.0 hasn't
a release for armv4, Is armv4 too old and has no value to support it?

-- 
Best Regards,
zzs


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] eldk5.0 generate illegal instruction for at91rm9200

2011-07-16 Thread Albert ARIBAUD
Le 15/07/2011 20:00, Wolfgang Denk a écrit :
 Dear zzs,

 In message20110715161531.ga5...@greatfirst.com  you wrote:

 Today I found the  wrong code :

 Thanks again for the feedback.  I have documented this issue in the
 ELDK FAQ section:

 http://www.denx.de/wiki/view/ELDK-5/QuestionsAndAnswers#GCC_generates_illegal_opcodes_fo

 Best regards,

 Wolfgang Denk

This would not happen for AT91 only, would it? Maybe the FAQ should 
mention other arches / SoC families that might be hurt by the issue.

Amicalement,
-- 
Albert.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] eldk5.0 generate illegal instruction for at91rm9200

2011-07-16 Thread Andreas Bießmann
Dear zzs213,

Am 16.07.2011 um 10:05 schrieb zzs:

 But when I examine the *.so files in eldk5.0, Almost all of them has
 'clz' opcode. So if I use them in my aplication like busybox. It will
 crash.

you could just build your libc for target rootfs with -march=armv4.

 So I think the best way is to rebuild eldk5.0 for armv4.

That is another solution. Then you could use the libc from your toolchain for 
your rootfs, but I recomend to build your own in any way.

regards

Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] eldk5.0 generate illegal instruction for at91rm9200

2011-07-16 Thread Wolfgang Denk
Dear zzs,

In message 20110716080555.ga17...@greatfirst.com you wrote:

 So I think the best way is to rebuild eldk5.0 for armv4. Did you tell
 me how to configure eldk5.0 to build for armv4. And why eldk5.0 hasn't
 a release for armv4, Is armv4 too old and has no value to support it?

This is actually off topic here.  Please let's take this discussion to
the ELDK mailing list instead.

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: w...@denx.de
If I ever needed a brain transplant, I'd choose a teenager's  because
I'd want a brain that had never been used.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] eldk5.0 generate illegal instruction for at91rm9200

2011-07-16 Thread Wolfgang Denk
Dear Albert ARIBAUD,

In message 4e214769.3060...@aribaud.net you wrote:

  http://www.denx.de/wiki/view/ELDK-5/QuestionsAndAnswers#GCC_generates_illegal_opcodes_fo
...
 This would not happen for AT91 only, would it? Maybe the FAQ should
 mention other arches / SoC families that might be hurt by the issue.

It mentions that the problem comes from using a tool chain that is
configured for the ARMv5TE architecture for a processor that belongs
to another, less capable architecture (ARMv4T).

You always have to expect problems when using a tool chain that is set
up to support another architecture than the one you have.

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: w...@denx.de
It seems intuitively obvious to me, which  means  that  it  might  be
wrong. -- Chris Torek
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] eldk5.0 generate illegal instruction for at91rm9200

2011-07-15 Thread Wolfgang Denk
Dear zzs,

In message 20110715161531.ga5...@greatfirst.com you wrote:

 Today I found the  wrong code :

Very well - thanks.

 and the __udivsi3 contain the  wrong code :
 
 20111cfc __udivsi3:
 20111cfc: e2512001subsr2, r1, #1  ; 0x1
 20111d00: 012fff1ebxeqlr
 20111d04: 3a23bcc 20111d98 __udivsi3+0x9c
 20111d08: e151cmp r0, r1
 20111d0c: 9a1abls 20111d7c __udivsi3+0x80
 20111d10: e1110002tst r1, r2
 20111d14: 0a1bbeq 20111d88 __udivsi3+0x8c
 20111d18: e16f3f11clz r3, r1 # ***this is the  wrong 
 code
 20111d1c: e16f2f10clz r2, r0
 20111d20: e0432002sub r2, r3, r2
...

 Architectures
 
 This instruction is available in ARM architecture versions 5 and above.
 
 
 But at91rm9200 is armv4.

This is to be expected.  It comes from using the GCC library routines
from ELDK, which are configured for an ARMv5TE architecture.

 Does this mean I can't use eldk5.0 for at91rm9200 ? If yes, How can I

You can use it, but you must make sure to rebuild the needed GCC
library routines as needed for your target.

See the USE_PRIVATE_LIBGCC make option, i. e. use:

USE_PRIVATE_LIBGCC=yes make ...

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: w...@denx.de
One of the advantages of being a captain is being able to ask for ad-
vice without necessarily having to take it.
-- Kirk, Dagger of the Mind, stardate 2715.2
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] eldk5.0 generate illegal instruction for at91rm9200

2011-07-15 Thread Wolfgang Denk
Dear zzs,

In message 20110715161531.ga5...@greatfirst.com you wrote:

 Today I found the  wrong code :

Thanks again for the feedback.  I have documented this issue in the
ELDK FAQ section:

http://www.denx.de/wiki/view/ELDK-5/QuestionsAndAnswers#GCC_generates_illegal_opcodes_fo

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: w...@denx.de
In my experience the best way to get something done  is to give it to
someone who is busy.   - Terry Pratchett, _Going_Postal_
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot