[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian powerpc binary compatibility?

Hello Sebastian,

Thanks for reply! Please see my comments below.

On Fri, 17 Sep 2010 20:19:29 +0200
Sebastian Andrzej Siewior <sebastian@breakpoint.cc> wrote:

> * Sergei Poselenov | 2010-09-17 13:48:19 [+0400]:
> >Could you please answer some questions, regarding the use of the 
> >Debian powerpc distro for embedded PowerPC system?
> >
> >- What exact target CPU it is built for? I see here
> >  http://www.debian.org/ports/powerpc/inst/install the list of
> >  supported machines, but how can I understand will the Debian
> > binaries work on my board with the specific CPU?
> >  Is it possible, knowing only the specific CPU type (440, 603, 8540,
> >  8560, etc) to say will it run Debian PowerPC Distro or not?
> - 603 are fine.
> - I have no clue whether 440 has a FPU or not. If it don't you need
>   either to enable enable floating emulation in kernel or a softfloat
>   port.

Thanks, but I'm looking for specific information - what instruction set
was used by gcc to build Debian binaries.

It seems to me this information is not readily available... I can only
guess of gcc configuration - just defaults (-mcpu=powepc -msoft-float).

> - 8540 and 8560 are e500v1 core based cpus. They use the SPE unit for
>   single precision floating point operation. This is not compatible
> with the "classic" floating unit in other powerpc like the 603. You
> may use the kernel emulation to work around the problem but they
> remain a few opcodes which trigger an invalid opcode.
> >  (I understand that there should be a kernel supporting the specific
> >  board; I'm rather interested in the instructions set used by GCC to
> >  build the binary images for Debian powerpc distro. In short - what
> >  "-mcpu=" GCC option is used for build?)
> generic so you can run it on any powerpc. Floating point could be a
> problem which can solved by kernel emulation which will make FPU
> intesive operation slow. On 85xx lwsync will be another problem.

Yes, I'm aware of an attempt to run Debian on e500v2 - it throws
"Illegal instruction" on "lwsync". I'm sorry I don't have enough
details - what Debian Distro they tried and what kernel the target
has been run.

However, speaking about the "lwsync" problem on e500 - I've got an
impression that the problem should be solved already -

Do you know - isn't the fix in the mainline gcc?

And while we at this: on the [0], the current status of the project is
"stalled" because of GCC bug in e500 floating point insns. The bug is
reported against 4.4.4.

Have you tried other Debian GCC version - 4.3? Is the bug there, too?

> >- We are considering to rebuild the Debian distribution, to
> >  tune the packages for the specific CPU type (enable hardware FP
> >  support, etc).
> >  I now the Debian powerpc distro is built natively. Are there any
> >  details of the build process available, so we could use it in our
> >  build system?
> For powerpcspe [0] we use powerpc-linux-gnuspe as gcc tripplet which
> enables the correct CPU and floating point for us. There is no more
> magic behind it.
> If you want to rebuild the complete Debian with -mcpu=603 then the
> easiest thing would be to put a wrapper around gcc which passes the
> correct CFLAGS _or_ make sure that the default cpu is 603. 

Yes, I understand this. I guess, for your powerpcspe port you are
rebuilding Debian packages on the system running the same Debian,
right? (What Debian are running on your e500, btw? How your overcame
the "lwsync" problem?)

Probably, I was not quite clear in my question  - we are considering
the case that there will be no working Debian distribution for
particular target (like e500 "lwsync" problem I mentioned above), so we
will have to use some other distribution for native build system, with
different toolchain version (I'mean the versions of gcc, binutils and
glibc, which could be different of those in Debian toolchain). How
could I rebuild Debian on such system?

Apparently, I need first to build the Debian toolchain, and then make
sure the binaries are linked against the new-built Glibc, not the build
host one. Also, because of the package dependencies, the order of
package's build is also important.

So, the question is - how to build Debian "from scratch"?

Again, thanks for reply.


> [0] http://wiki.debian.org/PowerPCSPEPort
> >Thanks for any help.
> >
> >Regards,
> >Sergei
> Sebastian

Reply to: