All times are UTC-06:00




Post new topic  Reply to topic  [ 15 posts ] 
Author Message
PostPosted: Thu Feb 01, 2007 3:16 pm 
Hi !

Looking at Frostwork's post about his CDGA2 designed both for Pegasos and Efika, I was wondering how he was doing for both compiling stuff for the Pegasos and for the Efika under Linux Gentoo.
So I've decided to open a new thread about it. I guess this question might be interesting for other people...

So Frostwork, are you compiling the same stuff twice, by just changing the make.conf CFLAGS or do you have setup a specific crossdev environement ?

I'm asking this, because I'm wondering how much effort it would require for me, to port my "EZPegTV" (Gentoo+MythTV) from Pegasos to Efika.
The idea behind this would be to use the Efika as the backend client and the Pegasos as a frontend server with the PVR card.

So, at the moment I'm wondering how I can do this easily (even if not optimized):
- Do I have to restart it all from scratch using the stage4 available for Efika (with all its patches) and building it step by step (very long work again :-( )
- Or is it possible to compile EZPegTV as it is (from the Pegasos version with 2.6.15 kernel) for the Efika CPU on my Pegasos, just by changing a few flags in make.conf and maybe a few kernel options ?

In any case, if I want to compile stuff on my Pegasos for the Efika, as it is the same ARCH but not the same CPU, do I need crossdev or is it enough to change the ROOT/and/or portage targets ?

I've seen many tutorials about crossdev, not very clear on first read. Most of them talk about cross compiling on x86 for ppc... What about compiling on Pegasos PPC for Efika PPC ?
Well, I think I will find a way, but it's always interesting to have others opinion.


Top
   
PostPosted: Thu Feb 01, 2007 6:59 pm 
Offline
Site Admin

Joined: Fri Sep 24, 2004 1:39 am
Posts: 1589
Location: Austin, TX
Quote:
Hi !
CPU on my Pegasos, just by changing a few flags in make.conf
Take altivec out of the USE flags and make sure GCC gets -mcpu=603e, that should be about it. If the application is clever you can compile it with AltiVec in and let it switch in software (ffmpeg will do this) but don't try and use autovectorizers and be careful of more lazy apps.

_________________
Matt Sealey


Top
   
 Post subject:
PostPosted: Fri Feb 02, 2007 1:09 am 
Offline

Joined: Fri Sep 24, 2004 1:39 am
Posts: 297
Hi Geoffrey!

Matt already said everything relevant so it's a bit late now :)
You probably don't have to rebuild everything, but some
"lazy apps" :) require a rebuild with appropriate USE-flags.
In fact the cdga2-image booted almost fine without any
modifications (apart from the efika-kernel+modules) up
to the xorg-initialization - so i guess i have to rebuild at
least xorg...
Was worth a try for the beginning anyway :)

As of stage4 you mentioned. Is it a single stage4-tarball
or do you mean the binary distfiles from the gentoo-efika-wiki?

friendly,
Marcel


Top
   
 Post subject:
PostPosted: Fri Feb 02, 2007 1:18 am 
Offline

Joined: Thu Nov 18, 2004 11:48 am
Posts: 110
keep in mind that distcc is working nicely =)


Top
   
 Post subject:
PostPosted: Fri Feb 02, 2007 5:56 am 
@frostwork: Stage4 : http://dev.gentoo.org/~humpback/efika/

My current CFLAGS on Pegasos are :
CFLAGS="-O3 -mcpu="G4" -mtune=G4 -mabi=altivec -fno-strict-aliasing -pipe"

So I'm afraid that it will not work :(
Anyway, I'm going to try.

distcc: well sounds good... I'm going to look at that.


Top
   
 Post subject:
PostPosted: Fri Feb 02, 2007 6:43 am 
Offline

Joined: Fri Sep 24, 2004 1:39 am
Posts: 297
Thanks for the link geoffrey! bookmarked :)
When setting -mabi=altivec you maybe also should set
-maltivec.
My peg2-CFLAGS look like this:
CFLAGS="-O2 -mtune=powerpc -maltivec -mabi=altivec -mcpu=7400 -pipe -fno-strict-aliasing -ftree-loop-im -fivopts -ffast-math -fomit-frame-pointer -funroll-loops -ftree-vectorize"
They work fine in 99,99%
(mjpegtools don't like afair -ftree-vectorize f.e)
I'll try to find out why cdga2-X doesn't like to work on efika
maybe only the xorg-server has to be rebuilt...


Top
   
 Post subject:
PostPosted: Fri Feb 02, 2007 11:03 am 
Hi Frostwork,

for the link maybe you should bookmark this one
Efika.org links ;-)


Top
   
 Post subject:
PostPosted: Sat Feb 03, 2007 1:34 am 
Offline

Joined: Thu Nov 18, 2004 11:48 am
Posts: 110
Quote:
Thanks for the link geoffrey! bookmarked :)
When setting -mabi=altivec you maybe also should set
-maltivec.
My peg2-CFLAGS look like this:
CFLAGS="-O2 -mtune=powerpc -maltivec -mabi=altivec -mcpu=7400 -pipe -fno-strict-aliasing -ftree-loop-im -fivopts -ffast-math -fomit-frame-pointer -funroll-loops -ftree-vectorize"
They work fine in 99,99%
(mjpegtools don't like afair -ftree-vectorize f.e)
I'll try to find out why cdga2-X doesn't like to work on efika
maybe only the xorg-server has to be rebuilt...
-maltivec -mabi=altivec triggers gcc builtin altivec optimizations, so you'll end with non G3 compatible binaries....


Top
   
 Post subject:
PostPosted: Sat Feb 03, 2007 3:13 am 
Offline

Joined: Fri Sep 24, 2004 1:39 am
Posts: 297
>-maltivec -mabi=altivec triggers gcc builtin altivec optimizations, so you'll end with non G3 compatible binaries....

Yes of course. The hint was meant for the pegasos not for the efika..... (My peg2-CFLAGS look like this:)


Top
   
 Post subject:
PostPosted: Mon Feb 05, 2007 3:05 pm 
Hi !
Back on tracks.

I've tried to run directly my EZPegTV binaries on the Efika, with the Gentoo config with G4 CFLAGS given above and of course it does not work much (probably because the mcpu option)...
I've got "illegal operation" messages when I run progs such as nano or emerge.

Then I've looked a bit to distcc and have seen that distcc was already installed in the Gentoo's Efika stage4 I had (from link above). Great !
So it seems I only have to configure the Pegasos and set the good hosts on the Efika.
But, I'm not sure if I have understood all, there is a lot of doc and not always clear. On the Pegasos, do I only have to run the distcc daemon (no config required or what) ? What about crossdev. It seems that I don't need it as I use the same ARCH ?

So, as I have a mirror copy on my working Pegasos Gentoo install, I've decided to sacrify one and rebuild the all stuff on the Pegasos for the Efika but with the G3 flags. Hope it will work like this. A big "emerge -e world"... Let's see what I will have with that...

Reading /etc/make.conf file tells that the -mcpu=750 option should work both for G3 & G4 (with O2 and no altivec). I've seen above that Frostwork was using -mcpu=7400... So what's best to have 100% working code both on Efika & Pegasos ?

I think I will do a small tutorial about that in the next Efika book...


Top
   
 Post subject:
PostPosted: Tue Feb 06, 2007 2:56 am 
Offline

Joined: Sun May 08, 2005 8:46 pm
Posts: 559
Location: Paris
http://www.gentoo.org/doc/fr/distcc.xml


Top
   
 Post subject:
PostPosted: Tue Feb 06, 2007 6:47 am 
Offline

Joined: Thu Nov 18, 2004 11:48 am
Posts: 110
Quote:
Reading /etc/make.conf file tells that the -mcpu=750 option should work both for G3 & G4 (with O2 and no altivec). I've seen above that Frostwork was using -mcpu=7400... So what's best to have 100% working code both on Efika & Pegasos ?

I think I will do a small tutorial about that in the next Efika book...
the efika cflags as reported have to have -mcpu=G3 ...

-mcpu=G4,7400,G5,970,etc will all produce something that will die horribly on the efika...


Top
   
 Post subject:
PostPosted: Sun Feb 11, 2007 8:01 am 
Hi !

I've re-compiled all my Linux Gentoo "EZPegTV" system on my Pegasos for the Efika only by editing the /etc/make.conf file.
As suggested, I've used CFLAGS="-O2 -mcpu=603e -pipe" and did a big "emerge -e world" command.
It took more than 4 uninterrupted days to compile the 679 packages !

As I was using an old 2.6.15-r8 kernel (because of ivtv), I've also taken humpback's stage4 kernel and made small changes to build a working kernel for the Efika.

Now, I've transfered all the directory tree under my Efika and it -almost- works !
- It boots :-)
- GDM / Gnome & Xorg are working fine
- I have 3D rendering (Chromium works great by the way - but the sound cracks)
- I can use my USB mass storage disk
- I have sound (I had to change the sound chip module)
- I have video (quite slow for the moment...).

At the moment, I'm only having troubles with the network which is as you guess very annoying...
DHCP seems to give an IP address but network does not work.
The network adapter is recognized, my router is giving an address via DHCP, but nothing works on the Efika.
If I ping the router (192.168.0.1) it gives me a "Network is unreachable" answer...
Something must be badly configured but it's strange as I'm using the same config as on the Pegasos (which is working).
Note : Humpback's Efika Gentoo stage4 does have the same network problem on my Efika, but network works fine under my Debian config.

Anyway, I'm now going to try to fix it by building a new kernel using the latest 2.6.19-efika-r2 available kernel...

Once this network problem will be fixed, I will remove useless remaining things and will configure MythTV for a frontend Efika.


Top
   
 Post subject:
PostPosted: Sat Feb 17, 2007 8:51 am 
Offline

Joined: Thu Nov 18, 2004 11:48 am
Posts: 110
I have no issues using static addresses...

which dhcp module are you using?


Top
   
 Post subject:
PostPosted: Sun Feb 18, 2007 1:30 pm 
oops forgot to tell that it now works.
I only reinstalled dhcp 3.0.11 to make the network work (I was using an old 2.0.5-r1).

Thanks for the answer anyway.

Now the Pegasos sees the Efika getting connected in MythTV if I cheat a little bit (with chroot) : I made a mistake and versions were different in network protocol so MythTV backend/frontend could not connect.
So, I had to resync and reinstall latest MythTV both on Pegasos and Efika... And now, mythbackend does not want to start on the Pegasos because of MySQL upgrade from 4.x to 5.1. So I started "revdep-rebuild" things and it's getting longer than I was expected...


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

All times are UTC-06:00


Who is online

Users browsing this forum: No registered users and 10 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:  
cron
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