All times are UTC-06:00




Post new topic  Reply to topic  [ 18 posts ] 
Author Message
PostPosted: Sat Mar 24, 2007 5:19 am 
Offline
Site Admin

Joined: Fri Sep 24, 2004 1:39 am
Posts: 1589
Location: Austin, TX
From a post Peter Czanik made today;
Quote:
Actually, this last thing, compilation, what took most of my time this afternoon, compiling my favorite torrent client, 'rtorrent' took a couple of hours on EFIKA
Unfortunately, the Efika is not really up to being a compiler box :)

Right here I have a decent laptop which most of the time is serving me by having text editors and SSH sessions open, and the occasional paint package. It seems wasteful and time consuming to not use it to compile software for my Efika.

So, I decided to poke around for the 100th time for a decent, working cross-compiler/distcc/ccache setup for my laptop.

Cygwin and Mingw32 is out of the door already. It seemed almost impossible to make a working powerpc-linux-gnu crosscompiler out of the box from any source I used (Debian, Ubuntu, plain gcc, latest binutils). Distcc and ccache work fine and I compiled some test apps using the native compilers and another PC here, for Cygwin. But getting a cross-compiler that works, that seems a chore.

I put a Debian in my VirtualPC setup, and got that running and have poked around (Scratchbox, Emdebian, crosstool) and gotten absolutely nothing that works, or support seems to have been unceremoniously dropped. Most compilers built seem to focus on the PowerPC EABI which is not what Linux on the desktop uses.

I have it on good authority that SuSE has PowerPC crosscompilers and toolchains in the YaST repositories but I have yet to try it out. I am focussing on Debian as it is the one we are getting people to install from the provided Efika kernels (at efika.info

While Genesi does a lot to encourage native development on Power machines (Pegasos/ODW, Efika) as they are more than capable, I would like to spread the load across the available machines here, regardless of architecture, and at least allow developers to develop software in their own comfortable environment.

Does anyone know of a foolproof way, and the correct method to download, compile and then enable a cross-compiler setup for - as an example - Debian Etch, such that I don't have to compile for 5 hours to get a kernel or a simple Torrent tool, something that takes all of 20 minutes on the laptop?

If we can sort this stuff out it would be great to have an article on PowerDeveloper, and package downloads for such tools so that developers can work more easily on their projects.

(the eventual goal for PowerDeveloper is using the Grid 'automatically' but it would be great to be able to throw machines into a compile farm at home, re-use your desktop PC with Cygwin or VirtualPC/VMware while it sits idle, and suchlike).

Is anyone doing this already?

Any hints or links or tools that make it easier?

Let's try this :D

_________________
Matt Sealey


Top
   
 Post subject:
PostPosted: Sat Mar 24, 2007 7:13 am 
Offline
Genesi

Joined: Mon Jan 30, 2006 2:28 am
Posts: 409
Location: Finland
Hi.

I compile an EFIKA kernel on my Gentoo Laptop in a couple of minutes. Gentoo has crossdev which allows you to select a cross-compiler for a whole range of targets, including PowerPC. (I have others here for arm, avr, sparc, nios2 etc).

Coupled with crossdev I just compiled QuakeForge for EFIKA. I also compiled Xfce, Enlightenment, Beryl etc. overnight some time ago using only crossdev and my laptop.

You can also easily compile applications this way on an x86 platform and then just make a package and install it on the EFIKA.

Gentoo even allows you to cross-merge applications to the target platform, but I've not have had the time yet to really go into this.

Crossdev is the reason why all my development boxes in the University run Gentoo :-)

Best regards,
Johan

_________________
Johan Dams, Genesi USA Inc.
Director, Software Engineering

Yep, I have a blog... PurpleAlienPlanet


Top
   
 Post subject:
PostPosted: Sat Mar 24, 2007 1:03 pm 
Offline

Joined: Mon Mar 27, 2006 12:16 pm
Posts: 79
Some information on crossdev:
http://www.sable.mcgill.ca/~dbelan2/cro ... -i686.html
And here's some information about using distcc in a cross compile setup: http://www.gentoo.org/doc/en/cross-compiling-distcc.xml

Debian stuff here: http://people.debian.org/~debacle/cross/


Top
   
PostPosted: Sat Mar 24, 2007 4:57 pm 
Offline

Joined: Sun Jun 04, 2006 3:41 am
Posts: 2
I have successfully used Dan Kegel's crosstools

http://kegel.com/crosstool/

You build gcc, libc and the binutils with the scripts he provides. I have used them on Fedora x86, to build u-boot and linux kernel binarys for ppc 8250, 8349 and 5200 evaluation boards from Freescale.


Top
   
 Post subject:
PostPosted: Sat Mar 24, 2007 6:23 pm 
Offline

Joined: Fri Oct 13, 2006 8:05 am
Posts: 7
I've got positive results from Dan Kegel's crosstool and also from MicroSUSE:

https://nemo.mfc.us.edu.pl/efika/12


Best Regards,

-jjw.


Top
   
PostPosted: Sun Mar 25, 2007 11:50 am 
Offline
Site Admin

Joined: Fri Sep 24, 2004 1:39 am
Posts: 1589
Location: Austin, TX
Quote:
I have successfully used Dan Kegel's crosstools

http://kegel.com/crosstool/

You build gcc, libc and the binutils with the scripts he provides. I have used them on Fedora x86, to build u-boot and linux kernel binarys for ppc 8250, 8349 and 5200 evaluation boards from Freescale.
My problem then is how do I package them for Debian or other distributions? Does every developer have to compile their own crosscompiler when in all honesty they're all pretty much the same on each distribution?

My overriding goal here is to provide something to developers, Debian being my primary focus as their cross tool stuff seems horribly broken.

However just playing around would be fun. Next post for more details..

_________________
Matt Sealey


Top
   
 Post subject:
PostPosted: Sun Mar 25, 2007 11:54 am 
Offline
Site Admin

Joined: Fri Sep 24, 2004 1:39 am
Posts: 1589
Location: Austin, TX
Konstantinos found me this great URL, which is exactly what I was looking for;

http://wiki.debian.org/BuildingCrossCompilers

However the instructions while comprehensive, do not build working compilers (they don't even get close). I saw a bug right away in the gcc debian/rules script;
Code:
*.gz) tar -x --gzip -f gcc-4.1.1-dfsg.tar.bz2;; \
I wonder how any of this ever worked.

What I have right now is a fully working powerpc binutils on my VirtualPC install. That worked fine.

Once I'd gotten to the dpkg-buildpackage part (building gcc), it all seemed to go fine but then it tried to warn me about some dependencies not actually installed - libc6-ppc64 packages. I have checked 3 mirrors and NOT found the base files for these packages.

It dawned on me a few weeks ago that Debian is acting screwy somewhere, as on my Efika I have 16MB of ppc64 libraries installed on the base install. On a 32-bit system? By default? I don't get it.

Anyway, if ANYONE has followed these instructions successfully and got more than rudimentary results and breakages, I would love to know.

I'm going to put the pre-converted packages online if anyone is interested.

_________________
Matt Sealey


Top
   
 Post subject:
PostPosted: Mon Mar 26, 2007 11:10 am 
Offline

Joined: Mon Mar 27, 2006 12:16 pm
Posts: 79
I see buildroot isn't mentioned yet. Used to create uclibc based compiler chains and root filesystems.


Top
   
 Post subject:
PostPosted: Tue Apr 10, 2007 7:02 am 
Offline

Joined: Sat Feb 25, 2006 8:08 am
Posts: 18
Location: Greece
Efika is supported by OpenEmbedded
http://www.openembedded.org

Currently gcc 4.1.1/glibc 2.5 work fine

OE has "build in" support for icecream for distrubuted compile jobs.Works fine on both x86 and amd64 machines.
http://www.openembedded.org/icecc

We have a 10 x86 machine network (plus a few amd64) for cross-compiling for about 4-5 months now and works great.

BTW distcc is a "no-no" for cross compiling...


Top
   
 Post subject:
PostPosted: Wed Apr 11, 2007 4:20 am 
Offline
Site Admin

Joined: Fri Sep 24, 2004 1:39 am
Posts: 1589
Location: Austin, TX
Quote:
Efika is supported by OpenEmbedded
http://www.openembedded.org

Currently gcc 4.1.1/glibc 2.5 work fine

OE has "build in" support for icecream for distrubuted compile jobs.Works fine on both x86 and amd64 machines.
http://www.openembedded.org/icecc

We have a 10 x86 machine network (plus a few amd64) for cross-compiling for about 4-5 months now and works great.

BTW distcc is a "no-no" for cross compiling...
Whee, perfect. Now all I have to do is set it up and try it out. What distribution are you running on the x86/amd64 machines for cross-compiling?

However it still looks like I am going to be compiling compilers from scratch, even if it is nicely scripted and automatically built for me. Is there a repository of prebuilt same-as-host-distribution compilers and binutils which can be just installed?

Perhaps a metapackage "efika-cross" we can set up which pulls everything down onto an x86 box or an ODW, and allows everyone to just Plug 'n' Play?

_________________
Matt Sealey


Top
   
 Post subject:
PostPosted: Sun Apr 15, 2007 2:31 am 
Offline

Joined: Sat Feb 25, 2006 8:08 am
Posts: 18
Location: Greece
Quote:
Whee, perfect. Now all I have to do is set it up and try it out. What distribution are you running on the x86/amd64 machines for cross-compiling?
The dev machines (both x86/amd64) are using Ubuntu Edgy
The compile farm is using Debian Etch

The key for the icecc to work is to have the *exact* same version on all machines or be prepared for a lot of head scratching/banging on walls etc
Quote:
However it still looks like I am going to be compiling compilers from scratch, even if it is nicely scripted and automatically built for me. Is there a repository of prebuilt same-as-host-distribution compilers and binutils which can be just installed?

Perhaps a metapackage "efika-cross" we can set up which pulls everything down onto an x86 box or an ODW, and allows everyone to just Plug 'n' Play?
Basically yes, although there was some talk on the OE list of such a meta-package like the one you mention for Debian, not sure how it has progressed though.

We (as in company) have build our own distro with OE, called OPLinux and OPLinux-uclibc.
Both of these distro's (actually they are the same but one build with glibc 2.5 and the other with uclibc 0.9.28) support Efika.

The basic glibc based image has 15MB "footprint" on ext2 format, the uclibc is less than 10MB
(if you use a compressed filesystem the numbers fall to alsmost 1/3 of these values, but Efika does not need a compressed file system, especially if you have a hard disk :) )

There is a repository that has almost all of the OE packages pre-compiled for Efika.... but it's not public at the moment...

I had started working on documenting how to build a system using Efika and OE/OPLinux and then use the repo to get more packages but due to heavy work load never finished it.

Hopefully will get this out soon, so people building other projects can use it, as they will be able to control exactly what gets into the system they build and not simply rm parts from an existing filesystem.


Top
   
PostPosted: Mon Apr 23, 2007 12:05 am 
Offline

Joined: Wed Feb 08, 2006 6:02 am
Posts: 30
Does that mean that soon there will be a package I can install on my Ubuntu system that I can use to spin out custom kernels for my Efika project? I will even be happy if I have to install Debian on my desktop and do it from there. Also, what are the prospects of doing a Linux From Scratch using this toolchain? Like I said, I am a n00b when it comes to cross compiling, though I do get the basic concepts. At least I *think* I do. O_o

Thanks,

Tim


Top
   
PostPosted: Wed Apr 25, 2007 6:42 pm 
Offline
Site Admin

Joined: Fri Sep 24, 2004 1:39 am
Posts: 1589
Location: Austin, TX
Quote:
Does that mean that soon there will be a package I can install on my Ubuntu system that I can use to spin out custom kernels for my Efika project? I will even be happy if I have to install Debian on my desktop and do it from there. Also, what are the prospects of doing a Linux From Scratch using this toolchain? Like I said, I am a n00b when it comes to cross compiling, though I do get the basic concepts. At least I *think* I do. O_o
I hope there'll be something out of it. I've yet to get a Debian or Ubuntu x86 CC working from any script (Emdebian and OpenEmbedded fail for some reason.. right now I am blaming Debian itself!) so either a detailed step-by-step process confirmed to work, or a precompiled package would be awesome (this is why I initially asked, I roped Konstantinos (freevec/debian) into messing with it and he hit the same problems I had, and couldn't properly resolve them either, and he knows far more about this stuff than I do..)

_________________
Matt Sealey


Top
   
 Post subject:
PostPosted: Fri Apr 27, 2007 6:57 am 
Offline

Joined: Sat Feb 25, 2006 8:08 am
Posts: 18
Location: Greece
For OE, detailed instructions for varius distro's (incluing Debian and Ubuntu) are here.

http://www.openembedded.org/wiki/OEandYourDistro

For Debian there is also the meta-package i mentioned earlier, to get the the required software in one-go


Top
   
 Post subject:
PostPosted: Fri Apr 27, 2007 9:14 am 
Offline
Site Admin

Joined: Fri Sep 24, 2004 1:39 am
Posts: 1589
Location: Austin, TX
Quote:
For OE, detailed instructions for varius distro's (incluing Debian and Ubuntu) are here.

http://www.openembedded.org/wiki/OEandYourDistro

For Debian there is also the meta-package i mentioned earlier, to get the the required software in one-go
This is by far the LEAST ideal environment I have set my eyes upon; I don't really want to build a full, embedded system here (it's pulled in 300MB!! of packages).

What I am looking for as I think most people would be is

* prepackaged crosscompiler
* distribution client (icecc or distcc or whatever) and cache (ccache or whatever)

That's it. I have now got two systems full of Tex and X development headers when I don't have X on either system.. tools for building root filesystems and special embedded libraries. This is completely pointless and it's gotten me no closer to actually building a kernel on the Efika and offloading something to my laptop.

(the Efika is not a bad self-hosted environment, it's just not fast enough)

I spent more time today fighting OpenEmbedded than I did yesterday building 3 versions of the Linux kernel on the Efika itself. I think this defeats the object of plug and play development and crosscompiling as a way to speed things up..

_________________
Matt Sealey


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 18 posts ] 

All times are UTC-06:00


Who is online

Users browsing this forum: No registered users and 31 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
PowerDeveloper.org: Copyright © 2004-2012, Genesi USA, Inc. The Power Architecture and Power.org wordmarks and the Power and Power.org logos and related marks are trademarks and service marks licensed by Power.org.
All other names and trademarks used are property of their respective owners. Privacy Policy
Powered by phpBB® Forum Software © phpBB Group