Installing gentoo on the PS3

Investigation into how Linux on the PS3 might lead to homebrew development.

Moderators: cheriff, emoon

mtb
Posts: 19
Joined: Thu Oct 19, 2006 6:55 am
Location: UK/Tokyo

Installing gentoo on the PS3

Post by mtb »

Lets face it, nobody would want to run FC5 or YDL on their desktop, so why on earth would they want to install them on their PS3?

:)

http://www.daniel.jp/joomla/info/ps3/in ... e-ps3.html

There is also a version for people with an aversion to spending 2 days compiling gnome:)

http://www.daniel.jp/joomla/info/ps3/in ... e-ps3.html
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Personally, Fedora Core is my favorite distro. I'm running FC6 on my system right now. Never cared much for Gentoo...
mtb
Posts: 19
Joined: Thu Oct 19, 2006 6:55 am
Location: UK/Tokyo

Post by mtb »

J.F. wrote:Personally, Fedora Core is my favorite distro. I'm running FC6 on my system right now. Never cared much for Gentoo...
And?

Guess you haven't used FC5 on a PS3...
You need to treat the PS3 due to the limitations of the PPU and lack of memory as an embedded system - and the last thing you would ever want on an embedded system is FC5 or YDL.

Simplest proof is to boot and then simply open an teminal window in gnome on FC5 and then do the same in gnome-2.14 on gentoo. Unbelievable difference. Then try navigating the fs.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Comparing an optimized Gentoo install to a generic FC5 install... real fair. Spend as much time tuning FC5 as you did putting Gentoo together and it'll run just as fast. There are all kinds of web pages dedicated to making Fedora work better for different systems - for example, when memory is a little tight.
mtb
Posts: 19
Joined: Thu Oct 19, 2006 6:55 am
Location: UK/Tokyo

Post by mtb »

J.F. wrote:Comparing an optimized Gentoo install to a generic FC5 install... real fair. Spend as much time tuning FC5 as you did putting Gentoo together and it'll run just as fast. There are all kinds of web pages dedicated to making Fedora work better for different systems - for example, when memory is a little tight.
Doh you don't say.

That exactly is the point. You can install my tarball of a Cell install of gentoo instead of FC5 in the same amount of time and have a pre-tweaked install.

To be blunt, I and probably everyone else here don't give a monkey's what distribution you use. The thread isn't called Gentoo Vs other distributions/discuss - it's on installing Gentoo.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

mtb wrote:To be blunt, I and probably everyone else here don't give a monkey's what distribution you use. The thread isn't called Gentoo Vs other distributions/discuss - it's on installing Gentoo.
Then why did you start the thread with this statement?
Lets face it, nobody would want to run FC5 or YDL on their desktop, so why on earth would they want to install them on their PS3?
You could have simply said something like "Not everyone cares for Fedora Core or YDL, and those of you who like Gentoo will appreciate this - you can now install Gentoo on the PS3! Here's how..."

See the difference? One is mocking and making sweeping generalizations which have no basis in reality, the other merely informs those of a particular frame of mind.
User avatar
jbit
Site Admin
Posts: 293
Joined: Sat May 28, 2005 3:11 am
Location: København, Danmark
Contact:

Post by jbit »

Okay, let's stop the distro war.
I don't care who started it, I don't care what distros are involved.
Let's keep threads on topic. If the general spirit of the post was distroX questions/information/etc, leave it as that.
I will lock and hall of fame this thread (and other threads) if this continues.
mtb
Posts: 19
Joined: Thu Oct 19, 2006 6:55 am
Location: UK/Tokyo

Post by mtb »

J.F. wrote:
mtb wrote:To be blunt, I and probably everyone else here don't give a monkey's what distribution you use. The thread isn't called Gentoo Vs other distributions/discuss - it's on installing Gentoo.
Then why did you start the thread with this statement?
Lets face it, nobody would want to run FC5 or YDL on their desktop, so why on earth would they want to install them on their PS3?
You could have simply said something like "Not everyone cares for Fedora Core or YDL, and those of you who like Gentoo will appreciate this - you can now install Gentoo on the PS3! Here's how..."

See the difference? One is mocking and making sweeping generalizations which have no basis in reality, the other merely informs those of a particular frame of mind.
Valid point - missed that, and I apologize - it was a throw away comment and I forgot how thin skinned certain distro users are:)
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Re: Installing gentoo on the PS3

Post by Shine »

Thanks. I've updated it to the current files (cells add-on etc.) and started a wiki page: http://wiki.ps2dev.org/ps3:linux:installing_gentoo

Instead of lots of choices and text to enter my goal was to make it as easy as possible for newbies (and lazy programmers like me), so I've created two scripts. Currently it compiles Linux, I'll finish the rest of the scripts when it is ready.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

No problem... sorry if I over-reacted. :)

Back on topic - the HowTo is rather detailed. I don't think anyone would have trouble following it, but I'd recommend printing the instructions out first. Nothing beats having a hardcopy in hand.

However, I didn't see where he set up a window manager. Even if he thinks 256M is too little memory for Gnome or KDE (which is silly - I've run a FULL install of Fedora Core 4 set for Gnome on a 450MHz G3 iMac with 128M), he could at least set up the latest xfce. Have you tried Xubuntu on a lower end machine? It's a really nice distro, and xfce has come a long ways. XFCE on the PS3 should ROCK. :)
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Post by Shine »

J.F. wrote:the HowTo is rather detailed. I don't think anyone would have trouble following it, but I'd recommend printing the instructions out first. Nothing beats having a hardcopy in hand.
I've never installed Gentoo before, so "From this point on, you can just follow from Chapter 8 in the Gentoo handbook" is not very detailed. Do you have just some commands which I could add to my install script?

When I try to follow the Gentoo manual, it is trying to compile "yaBoot" and the Linux kernel, which doesn't look like the right thing, because I have already kboot.
mtb
Posts: 19
Joined: Thu Oct 19, 2006 6:55 am
Location: UK/Tokyo

Post by mtb »

J.F. wrote: However, I didn't see where he set up a window manager.
Window manager? It's Gentoo - why would I install a window manager?

:)

The only thing that is PS3 specific is the initial install, see the docs at www.gentoo.com for installing xorg etc - they spend a lot of time and money on their manuals so pointless me replicating it.
Shine wrote: I've never installed Gentoo before, so "From this point on, you can just follow from Chapter 8 in the Gentoo handbook" is not very detailed. Do you have just some commands which I could add to my install script?
Um, the reason it isn't very detailed is becouse from Chapter 8 on you are simply setting up system config files - kernel installation is in Chapter 7:)
Shine wrote: Instead of lots of choices and text to enter my goal was to make it as easy as possible for newbies (and lazy programmers like me), so I've created two scripts.
You might be onto a bit of a loser there, there is a gentoo-ps3 live cd project with a full installer, and there is all ready a mechanism in Gentoo for "newbies (and lazy programmers", it's called a stage4 install. However a script that automates that in kboot could be cool - have a look at http://www.daniel.jp/joomla/info/ps3/in ... e-ps3.html for details.

There is a good thread at:

http://forums.gentoo.org/viewtopic-t-443551.html

if you have problems, and also gentoo-ppc64 on IRC will give you direct access to the PPC64 developers.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

mtb wrote:
J.F. wrote: However, I didn't see where he set up a window manager.
Window manager? It's Gentoo - why would I install a window manager?

:)
Oh, right... forgot about that. Everyone knows that gentoo has software in it that monitors whether you install a window manager, and if so then it alerts the Gentoo Goon Squad who kick in your door at 3am and take away your gentoo secret decoder ring. (note to mods - IT'S A JOKE!)

:)
The only thing that is PS3 specific is the initial install, see the docs at www.gentoo.com for installing xorg etc - they spend a lot of time and money on their manuals so pointless me replicating it.
Yep. I wasn't sure if there was anything more or if that were the end of the PS3 specific stuff. i guess it is - until they get an RSX driver from Sony.
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Post by Shine »

mtb wrote:have a look at http://www.daniel.jp/joomla/info/ps3/in ... e-ps3.html for details.
Thanks, now Gentoo Linux works on my PS3! See the updated article at http://wiki.ps2dev.org/ps3:linux:installing_gentoo

It's time to port Lua Player :-)
mtb
Posts: 19
Joined: Thu Oct 19, 2006 6:55 am
Location: UK/Tokyo

Post by mtb »

Shine wrote: It's time to port Lua Player :-)
Heh, that would be great:)

I've pointed people on the gentoo.org forum towards your install tutorial, we have had a few people on irc for whom the manual install was a bit much.
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Post by Shine »

mtb wrote:
Shine wrote: It's time to port Lua Player :-)
Heh, that would be great:)
I think first I have to install spu-gcc to compile programs for the SPEs. Any idea how I can do this on my PS3? I've found http://overlays.gentoo.org/dev/lu_zero/ ... llTutorial but when trying to call "crossdev ppu" it says "Refusing to create a cross-compiler using the same target name as your host utils.".
User avatar
0okm0000
Posts: 116
Joined: Fri Jan 13, 2006 9:51 am
Contact:

Post by 0okm0000 »

PSP hardware hack
http://0okm.blogspot.com/
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Post by Shine »

I have burned the ISO image, like described in my manual, because you'll need it for the otheros.bld, and there are some docs on the CD, libraries and sample code, but I didn't found a description which compiler I need and how to install it for the compute-intensive processor cores (SPEs). The second link contains a link to the page, where I had the problems compiling it.
User avatar
0okm0000
Posts: 116
Joined: Fri Jan 13, 2006 9:51 am
Contact:

Post by 0okm0000 »

GNU Toolchain 4.0.2 and GDB for the Cell BE's SPU
http://www.bsc.es/plantillaH.php?cat_id=107
PSP hardware hack
http://0okm.blogspot.com/
mtb
Posts: 19
Joined: Thu Oct 19, 2006 6:55 am
Location: UK/Tokyo

Post by mtb »

No you want to give those precompiled packages a wide birth.

crossdev ppu will not work as the ppu (powerpc processor unit) is part of the PPE - and you already have a toolchain for the PPE.

So I think you need to jump that bit and go straight to cossdev spu - though I haven't had time to look into this myself.
mtb
Posts: 19
Joined: Thu Oct 19, 2006 6:55 am
Location: UK/Tokyo

Post by mtb »

One little thing to watch out for - for stage1 it uses gcc-4.3, so before starting the process you need to:

export I_PROMISE_TO_SUPPLY_PATCHES_WITH_BUGS=1

:)
mtb
Posts: 19
Joined: Thu Oct 19, 2006 6:55 am
Location: UK/Tokyo

Post by mtb »

Code: Select all

<mtb> Wahoo!
<mtb> PS3 spu # ./ppu_hello
<mtb> Hello, World! &#40;From SPU&#58;0&#41;
<lu_zero> =&#41;
<lu_zero> great =&#41;
<mtb> hmm, guess that works&#58;&#41;
<lu_zero> seems so =&#41;
<mtb> also
<mtb> PS3 spu # elfspe2 spu_hello
<mtb> Hello, World! &#40;From SPU&#58;0&#41; 
Guide up at:
http://www.daniel.jp/joomla/info/ps3/cr ... entoo.html
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Post by Shine »

J.F. wrote:Personally, Fedora Core is my favorite distro. I'm running FC6 on my system right now. Never cared much for Gentoo...
One main advantage currently is that the standard Fedora Core version for the PS3 is only compiled in 32 bit mode, but Gentoo is 64 bit (at least the version which mtb has built).
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Shine wrote:
J.F. wrote:Personally, Fedora Core is my favorite distro. I'm running FC6 on my system right now. Never cared much for Gentoo...
One main advantage currently is that the standard Fedora Core version for the PS3 is only compiled in 32 bit mode, but Gentoo is 64 bit (at least the version which mtb has built).
Is it? That would surprise me as ppc64 has been part of Fedora officially since FC4. Most of the Fedora mirrors have all the ppc64 RPMs. Like this one for FC7...

http://ftp.crihan.fr/mirrors/fedora.red ... dora/RPMS/
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Post by Shine »

J.F. wrote:Is it? That would surprise me as ppc64 has been part of Fedora officially since FC4. Most of the Fedora mirrors have all the ppc64 RPMs. Like this one for FC7...

http://ftp.crihan.fr/mirrors/fedora.red ... dora/RPMS/
Thanks, I was wrong. I tried some toolchain programs on Gentoo and "file" said that it was 32 bit. Somewhere I've read that you can't start 32 bit programs on 64 bit systems, but I think this is wrong, too. And at http://www.bsc.es/projects/deepcomputing/linuxoncell/ are a 64 bit versision of Fedora Core for PS3.

So only the usual Gentoo advantages (quote from the web page)
We produce Gentoo Linux, a special flavor of Linux that can be automatically optimized and customized for just about any application or need. Extreme performance, configurability and a top-notch user and developer community are all hallmarks of the Gentoo experience.
But I'm not sure, if this is necessary for the end user, because we have a well defined system, so a distribution could be optimized for it. Maybe this is the reason why at least 2 Gentoo developers are creating Gentoo live-CDs for the PS3. Personally I like the idea of Gentoo that usually you compile everything from source.
mtb
Posts: 19
Joined: Thu Oct 19, 2006 6:55 am
Location: UK/Tokyo

Post by mtb »

Both FC and ydl have PPC64 branches, but their installs for PS3 are 32bit.

Shame on you Shine for doubting me:)

See the notes at - http://www.cellperformance.com/articles ... tall_linux
NOTE: For the sake of this article, Yellow Dog Linux 5 (32 bit version for PS3) will be assumed. A 32 bit host PowerPC Fedora Core 5 installation will also be assumed (Although 64 bit and x64 versions of the libraries are available for other types of hosts.)
A major giveaway is the example code:

ppu-gcc -m32 ppu_hello.c -lspe2 -o ppu_hello

For end users there is the instant advantage that applications like Firefox are stable. For people interested in PPE development it is like having one leg cut off.

Before an amd64 owner who runs i386 code tells me otherwise, go read up on what PPC64 is at power.org:)
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Post by Shine »

mtb wrote:Both FC and ydl have PPC64 branches, but their installs for PS3 are 32bit.
I'm confused. I was looking at the install image on page http://www.bsc.es/projects/deepcomputing/linuxoncell/ and it is named "ppc64bcmfix.img". Maybe the Supercomputer Center has released a 64 bit version?
mtb
Posts: 19
Joined: Thu Oct 19, 2006 6:55 am
Location: UK/Tokyo

Post by mtb »

Shine wrote:
mtb wrote:Both FC and ydl have PPC64 branches, but their installs for PS3 are 32bit.
I'm confused. I was looking at the install image on page http://www.bsc.es/projects/deepcomputing/linuxoncell/ and it is named "ppc64bcmfix.img". Maybe the Supercomputer Center has released a 64 bit version?
Is that for running in the emu?

OK, just discovered a MASSIVE reason to use a PPC64 distribution on a PS3 - yesterdays SDK2 has a PPC64 version of xlc - there was info about it before on the IBM website but no download:)

We need to prod lu_zero into adding to his overlay
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

That ppc64 FC5 install from Barcelona is for the Cell server blades, not the PS3. Actually, it does make more sense that the PS3 linux for the general public would be 32bit - there's little support for 64 bit for PPC for things people want, like Flash or JAVA. So I guess I DO believe the YDL/FC releases for PS3 are 32bit... just to keep most people happy.
mtb
Posts: 19
Joined: Thu Oct 19, 2006 6:55 am
Location: UK/Tokyo

Post by mtb »

Well, after a week of learning much more about the inner working of gcc than I ever wished to, I give you a new Gentoo tarball with the Cell toolchain put together by the PPC64 developer lu_zero pre-installed and setup.

Forget the official gcc-4.1.1 in Cell-SDK2.0 and the "other" distributions, this toolchain is based around the latest gcc-4.3 alpha and has the latest spu code:)

File is here:

http://www.daniel.jp/mtb-data/ps3-mtb-g ... .tar.bzip2

Installation instructions here:

http://www.daniel.jp/joomla/info/ps3/in ... e-ps3.html
Post Reply