linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Xilinx Virtex4 FX PPC
@ 2007-08-20 16:00 Robert Woodworth
  2007-08-20 16:35 ` Josh Boyer
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Robert Woodworth @ 2007-08-20 16:00 UTC (permalink / raw)
  To: linuxppc-embedded

Hello All!

I'm beginning development with a Xilinx PPC/FPGA.  I've now gotten my
feet wet and have a few successes and a few head scratches.

I have a Xilinx ML403 dev board.  I ran the Monta-Vista Linux 2.4 demo.
good.



Now for my own attempt.  
(Please reply if anything I'm doing is incorrect)

I found a pre-built toolchain for my i686 Debian host with 
gcc-4.1.1 + glibc6.  I downloaded kernel 2.6.23-rc3 after reading
several posts on this list about the ML403 and drivers in this kernel
version.

Problem 1:  The kernel did not have the correct memory information.  I
noticed in 'embed_config.c' that the board params are hard coded,
however my kernel was not linking with that version of embed_config().
It was linking with embed_config() in 'misc-embedded.c'   
Did I miss a config parameter in the kernel config??


My kernel now boots and mounts the MontaVista rootfs on the SystemACE
Flash!!! :)



Problem 2:  Build my own rootfs.
If I try to build my own programs (busybox and bash at this point) with
shared libc using the same glibc from my toolchain, I get an "Illegal
instruction" error.  Is my glibc not compatible with my Xilinx PPC 405??


If I try to build a rootfs with debian ppc packages I have the same
"Illegal instruction" error.



Question 1:
Do I need a special glibc for the Xilinx PPC 405????  
Does a normal PPC glibc have more "advanced" instructions compiled in
that will not work on a Xilinx PPC 405??

Question 2:
Is it true that the xparameters.h file produced by Xilinx EDK is not
compatible with the current 2.6.23 kernel??  It appears that if I change
params (addresses or IRQ's) in my Xilinx EDK I need to hand edit the
xparameters.h in the kernel source tree.  True?  


BTW: My Xilinx EDK is version 9.1i with full ISE 9.1i.




I'm looking forward to helping the Linux on Xilinx PPC effort!!

Woody.

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

* Re: Xilinx Virtex4 FX PPC
  2007-08-20 16:00 Xilinx Virtex4 FX PPC Robert Woodworth
@ 2007-08-20 16:35 ` Josh Boyer
  2007-08-20 17:26   ` Robert Woodworth
  2007-08-20 17:50 ` Grant Likely
  2007-08-21  8:52 ` Stelios Koroneos
  2 siblings, 1 reply; 9+ messages in thread
From: Josh Boyer @ 2007-08-20 16:35 UTC (permalink / raw)
  To: Robert Woodworth; +Cc: linuxppc-embedded

On Mon, 20 Aug 2007 10:00:54 -0600
Robert Woodworth <rwoodworth@securics.com> wrote:

> Problem 2:  Build my own rootfs.
> If I try to build my own programs (busybox and bash at this point) with
> shared libc using the same glibc from my toolchain, I get an "Illegal
> instruction" error.  Is my glibc not compatible with my Xilinx PPC 405??
> 
> 
> If I try to build a rootfs with debian ppc packages I have the same
> "Illegal instruction" error.
> 
> 
> 
> Question 1:
> Do I need a special glibc for the Xilinx PPC 405????  
> Does a normal PPC glibc have more "advanced" instructions compiled in
> that will not work on a Xilinx PPC 405??

Make sure you're building glibc with soft-fp, or make sure you have
CONFIG_MATH_EMULATION enabled in your kernel.  The PPC 405 doesn't have
an FPU.

josh

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

* Re: Xilinx Virtex4 FX PPC
  2007-08-20 16:35 ` Josh Boyer
@ 2007-08-20 17:26   ` Robert Woodworth
  2007-08-20 17:42     ` Grant Likely
                       ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Robert Woodworth @ 2007-08-20 17:26 UTC (permalink / raw)
  To: Josh Boyer; +Cc: linuxppc-embedded

On Mon, 2007-08-20 at 11:35 -0500, Josh Boyer wrote:
> On Mon, 20 Aug 2007 10:00:54 -0600
> Robert Woodworth <rwoodworth@securics.com> wrote:
> 
> > Problem 2:  Build my own rootfs.
> > If I try to build my own programs (busybox and bash at this point) with
> > shared libc using the same glibc from my toolchain, I get an "Illegal
> > instruction" error.  Is my glibc not compatible with my Xilinx PPC 405??
> > 
> > 
> > If I try to build a rootfs with debian ppc packages I have the same
> > "Illegal instruction" error.
> > 
> > 
> > 
> > Question 1:
> > Do I need a special glibc for the Xilinx PPC 405????  
> > Does a normal PPC glibc have more "advanced" instructions compiled in
> > that will not work on a Xilinx PPC 405??
> 
> Make sure you're building glibc with soft-fp, or make sure you have
> CONFIG_MATH_EMULATION enabled in your kernel.  The PPC 405 doesn't have
> an FPU.
> 
> josh


CONFIG_MATH_EMULATION fixed it!!



What are the opinions out there? 
Kernel fp or glibc soft-fp??

I don't have a need for floating point in my final application anyway.

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

* Re: Xilinx Virtex4 FX PPC
  2007-08-20 17:26   ` Robert Woodworth
@ 2007-08-20 17:42     ` Grant Likely
  2007-08-20 17:50     ` Stephen Neuendorffer
  2007-08-21 22:14     ` Clemens Koller
  2 siblings, 0 replies; 9+ messages in thread
From: Grant Likely @ 2007-08-20 17:42 UTC (permalink / raw)
  To: Robert Woodworth; +Cc: linuxppc-embedded

On 8/20/07, Robert Woodworth <rwoodworth@securics.com> wrote:
> CONFIG_MATH_EMULATION fixed it!!
>
> What are the opinions out there?
> Kernel fp or glibc soft-fp??

kernel fp is slower, but easier to get going (you can use just about
any distro).  soft-fp results in faster floating point execution, but
your entire rootfs needs to be compiled with soft-fp.

Cheers,
g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195

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

* RE: Xilinx Virtex4 FX PPC
  2007-08-20 17:26   ` Robert Woodworth
  2007-08-20 17:42     ` Grant Likely
@ 2007-08-20 17:50     ` Stephen Neuendorffer
  2007-08-21 22:14     ` Clemens Koller
  2 siblings, 0 replies; 9+ messages in thread
From: Stephen Neuendorffer @ 2007-08-20 17:50 UTC (permalink / raw)
  To: Robert Woodworth, Josh Boyer; +Cc: linuxppc-embedded

Note that you should pick one or the other and be consistent.

If you have MATH_EMULATION
in the kernel and use code compiled partly with and partly without
soft-fp,
then you get really strange errors, because (I believe) the soft-fp uses
a different mechanism for emulating the floating point register files
than
the kernel  (I suppose you'll also see the same thing in a system with
floating
point unit and a mixed-up compilation as well).

Steve

> -----Original Message-----
> From:=20
> linuxppc-embedded-bounces+stephen=3Dneuendorffer.name@ozlabs.org
> =20
> [mailto:linuxppc-embedded-bounces+stephen=3Dneuendorffer.name@oz
labs.org] On Behalf Of Robert Woodworth
> Sent: Monday, August 20, 2007 10:27 AM
> To: Josh Boyer
> Cc: linuxppc-embedded@ozlabs.org
> Subject: Re: Xilinx Virtex4 FX PPC
>=20
> On Mon, 2007-08-20 at 11:35 -0500, Josh Boyer wrote:
> > On Mon, 20 Aug 2007 10:00:54 -0600
> > Robert Woodworth <rwoodworth@securics.com> wrote:
> >=20
> > > Problem 2:  Build my own rootfs.
> > > If I try to build my own programs (busybox and bash at=20
> this point) with
> > > shared libc using the same glibc from my toolchain, I get=20
> an "Illegal
> > > instruction" error.  Is my glibc not compatible with my=20
> Xilinx PPC 405??
> > >=20
> > >=20
> > > If I try to build a rootfs with debian ppc packages I=20
> have the same
> > > "Illegal instruction" error.
> > >=20
> > >=20
> > >=20
> > > Question 1:
> > > Do I need a special glibc for the Xilinx PPC 405???? =20
> > > Does a normal PPC glibc have more "advanced" instructions=20
> compiled in
> > > that will not work on a Xilinx PPC 405??
> >=20
> > Make sure you're building glibc with soft-fp, or make sure you have
> > CONFIG_MATH_EMULATION enabled in your kernel.  The PPC 405=20
> doesn't have
> > an FPU.
> >=20
> > josh
>=20
>=20
> CONFIG_MATH_EMULATION fixed it!!
>=20
>=20
>=20
> What are the opinions out there?=20
> Kernel fp or glibc soft-fp??
>=20
> I don't have a need for floating point in my final application anyway.
>=20
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>=20
>=20

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

* Re: Xilinx Virtex4 FX PPC
  2007-08-20 16:00 Xilinx Virtex4 FX PPC Robert Woodworth
  2007-08-20 16:35 ` Josh Boyer
@ 2007-08-20 17:50 ` Grant Likely
  2007-08-21  8:52 ` Stelios Koroneos
  2 siblings, 0 replies; 9+ messages in thread
From: Grant Likely @ 2007-08-20 17:50 UTC (permalink / raw)
  To: Robert Woodworth; +Cc: linuxppc-embedded

On 8/20/07, Robert Woodworth <rwoodworth@securics.com> wrote:
> Hello All!
>
> I'm beginning development with a Xilinx PPC/FPGA.  I've now gotten my
> feet wet and have a few successes and a few head scratches.
>
> I have a Xilinx ML403 dev board.  I ran the Monta-Vista Linux 2.4 demo.
> good.
>
>
>
> Now for my own attempt.
> (Please reply if anything I'm doing is incorrect)
>
> I found a pre-built toolchain for my i686 Debian host with
> gcc-4.1.1 + glibc6.  I downloaded kernel 2.6.23-rc3 after reading
> several posts on this list about the ML403 and drivers in this kernel
> version.
>
> Problem 1:  The kernel did not have the correct memory information.  I
> noticed in 'embed_config.c' that the board params are hard coded,
> however my kernel was not linking with that version of embed_config().
> It was linking with embed_config() in 'misc-embedded.c'
> Did I miss a config parameter in the kernel config??

Probably.  The one in misc-embedded.c has the 'weak' attribute, so it
gets linked in if a stronger version is not provided.  Check that
CONFIG_* values that wrap the Xilinx section of embed_config.c

As for the hard coded values, you need to add an xparameters_<board>.h
file as generated by the EDK 'linux-2.6' bsp and fixup
arch/ppc/platforms/4xx/xparameters.h appropriately to include it.

> My kernel now boots and mounts the MontaVista rootfs on the SystemACE
> Flash!!! :)

Cheers,
g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195

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

* RE: Xilinx Virtex4 FX PPC
  2007-08-20 16:00 Xilinx Virtex4 FX PPC Robert Woodworth
  2007-08-20 16:35 ` Josh Boyer
  2007-08-20 17:50 ` Grant Likely
@ 2007-08-21  8:52 ` Stelios Koroneos
  2007-08-21 12:57   ` Josh Boyer
  2 siblings, 1 reply; 9+ messages in thread
From: Stelios Koroneos @ 2007-08-21  8:52 UTC (permalink / raw)
  To: Robert Woodworth, linuxppc-embedded

> Question 1:
> Do I need a special glibc for the Xilinx PPC 405????

FYI we are at the last stage of implementing OpenEmbedded support for the
Xilinx ml403 (and hopefully other Xilinx boards in the near future)
It also handles the EDK header copying procedure "automagically" i.e you
point to your EDK project dir and pulls the file(s) it needs for the kernel.
We will be working to "automate" the generation of ACE files also, since OE
generates a full image (kernel+fs) and not just the toolchain.
Currently toolchain is gcc 4.1.1 with glibc 2.5 and/or uclibc 0.9.28.
There is some work done by other OE developers to get eglibc going (omap
works according to the latest info i have)

OpenEmbedded supports a number of ppc targets currently walnut
(405),sequoia(440e),efika(603e) just to mention a few

I will be speaking at the Power.org dev conference about OE and power
architecure so if anyone will be there and wishes to get some knowledge
about OE in "advance" , feel  free to drop me a mail, as we will releasing a
beta of our OE based distro soon.



Stelios S. Koroneos

Digital OPSiS - Embedded Intelligence
http://www.digital-opsis.com

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

* Re: Xilinx Virtex4 FX PPC
  2007-08-21  8:52 ` Stelios Koroneos
@ 2007-08-21 12:57   ` Josh Boyer
  0 siblings, 0 replies; 9+ messages in thread
From: Josh Boyer @ 2007-08-21 12:57 UTC (permalink / raw)
  To: Stelios Koroneos; +Cc: linuxppc-embedded

On Tue, 21 Aug 2007 11:52:35 +0300
"Stelios Koroneos" <stelios@stelioscellar.com> wrote:

> > Question 1:
> > Do I need a special glibc for the Xilinx PPC 405????
> 
> FYI we are at the last stage of implementing OpenEmbedded support for the
> Xilinx ml403 (and hopefully other Xilinx boards in the near future)

Cool.

> It also handles the EDK header copying procedure "automagically" i.e you
> point to your EDK project dir and pulls the file(s) it needs for the kernel.
> We will be working to "automate" the generation of ACE files also, since OE
> generates a full image (kernel+fs) and not just the toolchain.
> Currently toolchain is gcc 4.1.1 with glibc 2.5 and/or uclibc 0.9.28.
> There is some work done by other OE developers to get eglibc going (omap
> works according to the latest info i have)
> 
> OpenEmbedded supports a number of ppc targets currently walnut
> (405),sequoia(440e),efika(603e) just to mention a few
> 
> I will be speaking at the Power.org dev conference about OE and power
> architecure so if anyone will be there and wishes to get some knowledge
> about OE in "advance" , feel  free to drop me a mail, as we will releasing a
> beta of our OE based distro soon.

I'm hoping to attend as well.  Should be interesting.

josh

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

* Re: Xilinx Virtex4 FX PPC
  2007-08-20 17:26   ` Robert Woodworth
  2007-08-20 17:42     ` Grant Likely
  2007-08-20 17:50     ` Stephen Neuendorffer
@ 2007-08-21 22:14     ` Clemens Koller
  2 siblings, 0 replies; 9+ messages in thread
From: Clemens Koller @ 2007-08-21 22:14 UTC (permalink / raw)
  To: Robert Woodworth; +Cc: linuxppc-embedded

Hi, Robert, Josh

>>> Question 1:
>>> Do I need a special glibc for the Xilinx PPC 405????  
>>> Does a normal PPC glibc have more "advanced" instructions compiled in
>>> that will not work on a Xilinx PPC 405??

Have a look at the eglibc project (embedded glibc) at http://www.eglibc.org
I think they support all kind of soft-fp configurations.
(i.e. The stuff seems to work fine on my MPC8540 e500 core with soft-fp)

>> Make sure you're building glibc with soft-fp, or make sure you have
>> CONFIG_MATH_EMULATION enabled in your kernel.  The PPC 405 doesn't have
>> an FPU.
>>
>> josh
> 
> CONFIG_MATH_EMULATION fixed it!!
> 
> What are the opinions out there? 
> Kernel fp or glibc soft-fp??

AFAICT: soft-fp in (e)glibc. They should be faster / hopefully more
optimized to your specific cpu.

Regards,
-- 
Clemens Koller
_______________________________
R&D Imaging Devices
Anagramm GmbH
Rupert-Mayer-Str. 45/1
81379 Muenchen
Germany

http://www.anagramm-technology.com
Phone: +49-89-741518-50
Fax: +49-89-741518-19

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

end of thread, other threads:[~2007-08-21 22:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-20 16:00 Xilinx Virtex4 FX PPC Robert Woodworth
2007-08-20 16:35 ` Josh Boyer
2007-08-20 17:26   ` Robert Woodworth
2007-08-20 17:42     ` Grant Likely
2007-08-20 17:50     ` Stephen Neuendorffer
2007-08-21 22:14     ` Clemens Koller
2007-08-20 17:50 ` Grant Likely
2007-08-21  8:52 ` Stelios Koroneos
2007-08-21 12:57   ` Josh Boyer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).