Installing gentoo on the PS3

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

Moderators: cheriff, emoon

edepot
Posts: 111
Joined: Sat Apr 09, 2005 3:39 pm

problems compiling the gentoo stage4 tarball for ps3

Post by edepot »

There were many problems I encountered following the script at:

http://wiki.ps2dev.org/ps3:linux:installing_gentoo

So it is now updated.
Some errors in it:

The files on the memory stick should list the updated *gentoo* file,
and not the *gnome" file.

The install2.sh trys to do an "emerge --sync" but it won't work at
that stage because the network is not set up until you reboot.
So the script needs to be changed at the lua site.

Many assume that the PS3 can connect via wireless, but in reality
you need to connect it via wired. Also there was no editor like
vim or emacs, so that was included in the instructions.

Lastly, gnome, kde, and xfce4 isn't installed. Trying to do a
"emerge gnome" doesn't work because it is a MASKED PACKAGE.
Just tried "emerge xfce4" but don't know if it will work after installing.
Do you need to do a manual "emerge --sync" to get the gnome to
be unmasked? In any case, someone needs to update more than I
did at the wiki at:

http://wiki.ps2dev.org/ps3:linux:installing_gentoo

so you can get a GUI running on it. Do you run a gui by executing
a command after doing a "emerge xfce4"? Is there something that
needs to be done to get gnome or kde running?
edepot
Posts: 111
Joined: Sat Apr 09, 2005 3:39 pm

gentoo

Post by edepot »

Got stuck installing Linux on PS3.
Using the instructions at:


http://wiki.ps2dev.org/ps3:linux:installing_gentoo


Problem is, on Gentoo linux distribution when following
the installation instructions, I am unable to get
access to the Memory Stick, Sandisk, and Compact flash.

There was a stage where you can access the Memory Stick via
sdc1, but after installing and rebooting, that /dev/sdc1 does
not exist. So I assume this must be added afterwards.
How would you go about adding it?

On linux, the following are in /dev (before rebooting gentoo)
sdc1 is the Memory Stick
sdd1 is the Sandisk
sde1 is the compact flash

So how do you get access to sdc (or sdc1 the first partition)
when inserting the memory stick.

Also, if I plug in a memory stick into a PSP and then enabled
the USB connection on the PSP while connecting it via USB
to the PS3, how do I mount it so that you can read the
memory stick? (not there is no windowing stuff at this moment)

What needs to be edited (perhaps /etc/fstab ?) so that on booting into
gentoo, you can instert your Memory Stick via PSP or in the
slot and get access to the files. What mount commands
do you use? Perhaps support is not there using
the quick stage 4 tarball from above?

I also noticed that the /etc/make.conf has USE of -X -kde -gnome -qt -gtk, which means in this stage4 tarball there is no windowing stuff.

if you were to compile xfce4 from scratch via
emerge xfce4, it stops at a package saying USE X must be
enabled. So removed the hyphen from the /dev/make.conf
of "x" and "gtk" both are used by xfce I believe.

Afterwards, did a "emerge --usenew xfce4" so changes in
/dev/make.conf can take effect. But after doing the editing
and emerging, it gets stuck at an error recompiling glib
(something about error in redefinition of signbit)

Think it is time to grab a livecd from gentoo and start over,
but don't want to if that thing doesn't have the latest alpha
compiler (4.3.3).

So can someone enlighten on what stage to go next to manually
add the memory stick slot and the xfce4? If getting the error
means that my setup doesn't work then maybe there is no choice
but start over. I think the --newuse caused the kernel to get
recompiled as well.

Also read some stuff on gentoo site stating that some of
the G binaries "emerge -G xfce4" for example, requires
a newer portage system, and requires adding ~ppc to
the portage config.
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Post by Shine »

I think the recommend way is to use the new live CD. I've updated the wiki. Currently I'm emerging KDE, hope it works, the base installation works.
edepot
Posts: 111
Joined: Sat Apr 09, 2005 3:39 pm

the wiki doesn't work

Post by edepot »

The wiki on this site states that you copy the otheros.default from the
livecd and rename it to otheros.bld and place it on the memory stick.
Then boot up using the memory stick.

Well, maybe I am missing something but what is the point of the
livecd if you only take one file from it? I've followed the instructions
here and at qj and both have problems. For the livecd one,
you can't get past the mount -t proc and dev. Give erros. And after installing, the ps3 doesn't boot up the partition, it just gets stuck at kboot.
(even though the /etc/kboot.conf is there with the correct parameters)
so each time you need to "mount /dev/sda1 /mnt/gentoo" manually(or sda2 depending on which wiki you followed for the linux partition).
To manually login you then "chroot /mnt/gentoo /bash/bin".

Are you supposed to boot from the cd? I just stick the memory stick
in and manually mount the stick and copy over the tar files to the
sda linux partition and tar xvf rather. Did everything over kboot copied
over.

when using the livecd the prompt sometimes gets screwed up like so...

///mnt/ instead of /mnt when in kboot.

I suggest someone compile the latest ibm compilers and put it into
the tarball or give it to osl, because currently both tarballs are missing
lots of things. mtl doesn't have X stuff (or memory stick access!).
I think he didn't compile the memory stick driver into the kernel.

For the osl one, it doesn't boot! you have to manually boot, and it
doesn't have the sources so you can compile programs on this site.
(it is missing ps3fb.h for example).

someone needs to start from scratch and actually follow the instructions
because they dont work.
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Re: the wiki doesn't work

Post by Shine »

edepot wrote: Well, maybe I am missing something but what is the point of the
livecd if you only take one file from it?
The otheros.bld is the boot loader, which needs to be on the same medium when installing the OS from the PS3 game OS. But it is not allowed to put it on the live CD, so you'll need these two steps.

But you are right, I missed to write down the step that you have to put the live CD in the PS3 CD ROM. Make sure, that you don't have any previous installation (by killing it with fdisk) and the boot loader should load the system from the live CD.
edepot
Posts: 111
Joined: Sat Apr 09, 2005 3:39 pm

installing from the livecd

Post by edepot »

From my understanding, I think mtb's tarball came from his 20GB
PS3, which did not have /dev/sdc1 (the memory stick slot). So after
using his tarball, I couldn't mount the memory stick no matter what I
did. I also had trouble mounting a memory stick via the psp plugged
in, maybe someone know how to do that? What command do you
use?

As for the livecd on oslabs, when following your instructions, is the
end result that you must always use the cd when booting linux?
or do you just install once and throw the cd away? Can you include
instructions on adding the latest compilers and sources so that you
can at least compile some of the examples on the threads in the
PS3 development? asm/ps3fb.h is not in the jan22nd tarball.
edepot
Posts: 111
Joined: Sat Apr 09, 2005 3:39 pm

oslabs gentoo tarball for ps3

Post by edepot »

Well, I confirmed it. It is possible to install the oslabs.org 64bit experimental gentoo linux on a 60GB without burning any CDs.
The commands that had to be delayed were...

mkswap..
swapon...
mount -t proc...
mount -o bind /dev...
e2label...

You delay executing them until you have chroot to the /mnt/gentoo.


It seems the linux kernel is 2.2.16. But the BE SDK v 2.0 from IBM
patches linux kernel 2.2.18 and it uses rpm packages, while gentoo uses
emerge. So is the BE SDK v 2.0 necessary? If yes, how do you
install it when it is for patching a new linux? How do I get the
asm/ps3fb.h on the ps3?
mtb
Posts: 19
Joined: Thu Oct 19, 2006 6:55 am
Location: UK/Tokyo

Re: installing from the livecd

Post by mtb »

edepot wrote:From my understanding, I think mtb's tarball came from his 20GB PS3
Do you mind - no it didn't!

20GB... Jeez.

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

Post by mtb »

Anyway...

I've no idea what the "oslabs.org 64bit experimental gentoo linux" but you are probably better off giving it a miss - the official Gentoo PS3 install is experimental enough:)

To go the official root with a stage 4 and livecd:

http://overlays.gentoo.org/proj/cell/wi ... entooOnPS3

If you want to do a install of your own:

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

And then the toolchain and bit'n'bobs from the SDK

http://www.daniel.jp/joomla/info/ps3/cr ... entoo.html
edepot
Posts: 111
Joined: Sat Apr 09, 2005 3:39 pm

ps3 gentoo

Post by edepot »

the oslabs is actually "gentoo.osuosl.org"

The otheros.bld is taken from one of the iso (livecd or installcd below)
by renaming from otheros.default...

http://gentoo.osuosl.org/experimental/ppc64/livecd/
installcd-ps3-minimal-beta.iso
livecd-ppc64-beta.iso


Then the whole directory tree of gentoo was taken from one of
the tarballs... (I used 64bit)...

http://gentoo.osuosl.org/experimental/ppc64/stages/
stage4-ppc64-ps3_32ul.tar.bz2 for 32bit
stage4-ppc64-ps3_64ul.tar.bz2 for 64bit


I also downloaded beforehand a tarball of the latest version of
portage (so I can emerge programs from the internet)

So after installing the gentoo tarball and the latest portage tree,
The system can't compile the examples from this
site (especially the frontbuffer example). The reason being the
ps3fb.h is missing. I realize that you need to use the overlay
(to fetch from the subversion) to get the latest compilers, but the
files there may be a little stale, as there is now a
BE CELL SDK 2.0. So I am assessing that gentoo is not
ready for primetime yet... Perhaps YDL.

Perhaps you can provide a newer tarball with the memory stick
and gui enabled along with the ppe and spe compilers (and
perhaps a 2.2.20 version of the linux kernel) along with the
CELL sdk 2.0. The process is overloaded with complications.
Another important thing is the samples.

Can someone verify whether the YDL install works without a CD
writer? Does it have the ps3fb.h? Is it kernel 2.2.20?
popper
Posts: 9
Joined: Mon Jan 15, 2007 5:21 am

Post by popper »

this thread went quiet, strange as the EU PS3's are now available!.

thought this thread http://forum.beyond3d.com/showthread.php?t=39606 was starting to show some real interest in getting MESA going for real,but weres the WIKI and the working codebase?.
adavidm
Posts: 7
Joined: Thu Feb 15, 2007 7:49 am

Post by adavidm »

I used the guide at: http://overlays.gentoo.org/proj/cell/wi ... entooOnPS3 to install Gentoo. No major problems, and no need to chroot after the installation either.

My PS3 now uses gdm to auto-login and fire up MythTV which, after some fiddling with mplayer settings, works quite nicely. Displaying 1080i video seems to take around 50% cpu. (If you are doing something like this, use fluxbox or similar rather than Gnome, as it much kinder to low-memory machines. I am looking to replace gdm as well, but i was familiar with it and impatient to get MythTV working).

When MythTV quits, it calls boot-game-os to get back to xmb, so my wife is quite happy to use it. The only concern I have is how happy the flash or eeprom is being constantly re-written to with new boot flags. I wish Sony had put an option to boot otheros without making it default. Oh, a lirc driver for the Sony remote would be most useful too!

adavidm
Matrixdub
Posts: 60
Joined: Fri May 13, 2005 3:47 am

Post by Matrixdub »

Are you using a 1080i input or output? I.e., are you viewing a video that has 1920 by 1080 pixels or just an SD video output to 1080i?

If it's the former, please let me know if 720P videos work smoothly with your choice of application.
adavidm
Posts: 7
Joined: Thu Feb 15, 2007 7:49 am

Post by adavidm »

I'm using some episodes of Robin Hood from the BBC HD pilot channels. I'm not sure of the exact spec of these files as I am not at home right now. I will check when I get back. I assume they are genuine 1080i and not SD though (The filesize would suggest this too!).

I'm not sure if I have any 720p video around, i'll have a look when I get home. I would assume that 720p works ok, but hammers the CPU (until someone works some SPU mojo on mplayer and the codecs).

adavidm
popper
Posts: 9
Joined: Mon Jan 15, 2007 5:21 am

Post by popper »

i assume it will be one of these and remember these BBC trial TS are probably the worlds hardest DH to decode as their also using MBAFF in the encoding.

1080i/25 (effective resolution 1440 by 1080)
Emission coding : H264 (aka MPEG-4 AVC) High Profile at Level 4
GOP = 12
1080i/25 (1440 by 1080) @ 19.5 Mb/s May’06 to 12/10/06
720p/50 (1280 by 720) @ 14.3 Mb/s 12/10/06 to 17/10/06
720p/50 (1280 by 720) @ 19.5 Mb/s 17/10/06 to 23/10/06
1080i/25 (1440 by 1080) @ 17.0 Mb/s 23/10/06 to 27/10/06

see http://www.bbc.co.uk/foi/docs/receiving ... _Trial.pdf
unsolo
Posts: 155
Joined: Mon Apr 16, 2007 2:39 am
Location: OSLO Norway

Post by unsolo »

Thats because the EU guys knows what to DO..
maybe not but there has been more activity in #gentoo-ppc64 so hopefully people get help that way to.
Don't do it alone.
toxicer
Posts: 17
Joined: Wed Apr 18, 2007 8:38 pm

Post by toxicer »

adavidm wrote:
My PS3 now uses gdm to auto-login and fire up MythTV which, after some fiddling with mplayer settings, works quite nicely. Displaying 1080i video seems to take around 50% cpu.
adavidm
Adavidm, how did you configure your mplayer for Mythtv?
I just installed it using the defaults (only the frontend) and it's slow like hell even with SD streams.

toxicer
adavidm
Posts: 7
Joined: Thu Feb 15, 2007 7:49 am

Post by adavidm »

toxicer wrote:
adavidm wrote:
My PS3 now uses gdm to auto-login and fire up MythTV which, after some fiddling with mplayer settings, works quite nicely. Displaying 1080i video seems to take around 50% cpu.
adavidm
Adavidm, how did you configure your mplayer for Mythtv?
I just installed it using the defaults (only the frontend) and it's slow like hell even with SD streams.

toxicer
i'm out of the country, so can't check exactly now. I do remember that I installed freevo and used the mplayer settings from that as a base. Then just tweaked it to output at the Linux FB size (something*664 it think).

I am running on a Gentoo installation from a basic stage 4 tarball and then everything else compiled from eBuilds. No GRP packages or other binaries, including for Xorg and XFCE, so if you are running YDL, Redhat or Ubuntu, you are unlikely to get the same performance.

Regards

adavidm
toxicer
Posts: 17
Joined: Wed Apr 18, 2007 8:38 pm

Post by toxicer »

I'm also using Gentoo only ebuilds. So far I only tried livetv and this is using ffmpeg afaik. Mplayer itself is running fine but is not scaling. Will try to get directfb running.
Post Reply