Fedora 8 on Playstation 3

There are several pages out there on how to do this. I found that they were mostly dead and I had to use google cache on them. I'm just reposting a lot of information here... Geoff Levand does all the kernel work. His home page has a lot of useful information. This link seems to be the most complete, but inaccessible http://bohmer.net/ps3_stuff/install-fedora-8-on-PS3.html.

Make a Partition for Linux

  • Go to Settings -> System Settings -> Format Utility
    Select Format Hard Disk
    Select Custom format
    Select 10GB for Linux (it really doesn't make sense to only give your PS3 10GB). Follow the prompts and reboot the machine

Install Linux Bootloader (kboot)

  • Burn the latest kboot to a CD. Look here
  • Insert the kboot CD into the PS3 and select Settings -> System Settings -> Install other OS

Install Fedora

  • Insert the Fedora DVD in the PS3
  • Switch on the PS3, and wait for the KBoot prompt.
  • At the kboot: prompt type 'linux64 text xdriver=fbdev'
  • Install Fedora to your liking, I recommend not installing GNOME or KDE, go with XFCE4, there isn't enough memory in the PS3 for GNOME.
    Note: Many of the installation guides have default partition layouts prescribed, the normal is to have 196MB for boot, 512MB for swap (the PS3 has 256MB of RAM) and use the rest for your root (/). You can use whatever you feel like though.
  • Reboot after installation. You'll see an error https://bugzilla.redhat.com/show_bug.cgi?id=389331. You need to fix up the boot line in yaboot.
    Reinsert the installation CD and type linux rescue at the kboot prompt.
    Once the system is up in recovery mode cd to /mnt/sysimage and then find /etc/yaboot.conf under there.
    Change root=LABEL=/ to root=/dev/ps3da3 *or whatever your root partition is.
    You can also change your resolution at this point to something other than the default 480p. You do this by adding video=ps3fb:mode: to the append part of the kernel line in yaboot.conf. Here is a table (that I didn't write) that shows the various values for mode.
    YUV 60Hz 1:480i 2:480p 3:720p 4:1080i 5:1080p
    YUV 50Hz 6:576i 7:576p 8:720p 9:1080i 10:1080p
    RGB 60Hz 33:480i 34:480p 35:720p 36:1080i 37:1080p
    RGB 50Hz 38:576i 39:576p 40:720p 41:1080i 42:1080p
    VESA 11:WXGA 12:SXGA 13:WUXGA
    0:auto mode,  full screen mode: <video mode ID> + 128, dither ON mode  : <video mode ID> + 2048
    (138 is thus: 1080p Full Screen PAL mode, 50Hz.) Save your changes and copy the file to /mnt/sysimage/boot/yaboot/yaboot.conf and reboot
  • Update your system
    yum -y upgrade
  • Turn off everything you don't need
    Run this: chkconfig --list |grep 3:on
    Look at the list of things that are started at boot and turn off everything you don't need.
    Here is my list of things actually running at runlevel 3
    [root@ps3 ~]# chkconfig --list |grep 3:on
    ConsoleKit      0:off   1:off   2:on    3:on    4:on    5:on    6:off
    anacron         0:off   1:off   2:on    3:on    4:on    5:on    6:off
    bluetooth       0:off   1:off   2:on    3:on    4:on    5:on    6:off
    cpuspeed        0:off   1:on    2:on    3:on    4:on    5:on    6:off
    crond           0:off   1:off   2:on    3:on    4:on    5:on    6:off
    haldaemon       0:off   1:off   2:off   3:on    4:on    5:on    6:off
    irqbalance      0:off   1:off   2:off   3:on    4:on    5:on    6:off
    messagebus      0:off   1:off   2:on    3:on    4:on    5:on    6:off
    network         0:off   1:off   2:on    3:on    4:on    5:on    6:off
    nscd            0:off   1:off   2:on    3:on    4:on    5:on    6:off
    pand            0:off   1:off   2:on    3:on    4:on    5:on    6:off
    rsyslog         0:off   1:off   2:on    3:on    4:on    5:on    6:off
    sshd            0:off   1:off   2:on    3:on    4:on    5:on    6:off
    udev-post       0:off   1:off   2:off   3:on    4:on    5:on    6:off
    [root@ps3 ~]# 
     
    Those should be about all you need. You can probably even do without nscd, but I find the system runs better with it enabled...slow resolver possibly?
  • Configure your desktop...install XFCE, trust me.
    yum groupinstall XFCE
    [root@ps3 ~]# cat .xinitrc
    exec xfce4-session
    EOF
    [root@ps3 ~]# startx
    
  • Recompile a smaller kernel
    The fedora kernel has a lot of stuff in it you will not need.
    First thing, install dtc, some pages say to get the git like this: I find that yum does the job better, and jdl.com is always down it seems.
    yum -y install dtc
    

    Get the latest patched source tree from Geoff at http://www.kernel.org/pub/linux/kernel/people/geoff/cell/CELL-Linux-CL_…
    He seems to update this regularly, so use lftp to get the latest directories and versions.

    [root@ps3 ~]# lftp www.kernel.org/pub/linux/kernel/people/geoff/cell
    cd ok, cwd=/pub/linux/kernel/people/geoff/cell                                      
    lftp www.kernel.org:/pub/linux/kernel/people/geoff/cell> cd CELL-Linux-CL_20080201-ADDON/
    cd ok, cwd=/pub/linux/kernel/people/geoff/cell/CELL-Linux-CL_20080201-ADDON
    lftp www.kernel.org:/pub/linux/kernel/people/geoff/cell/CELL-Linux-CL_20080201-ADDON> cd src/
    cd ok, cwd=/pub/linux/kernel/people/geoff/cell/CELL-Linux-CL_20080201-ADDON/src
    lftp www.kernel.org:/pub/linux/kernel/people/geoff/cell/CELL-Linux-CL_20080201-ADDON/src> get linux-2.6.24-20080131.tar.bz2
    48040433 bytes transferred in 102 seconds (459.1K/s)                                 
    lftp www.kernel.org:/pub/linux/kernel/people/geoff/cell/CELL-Linux-CL_20080201-ADDON/src> bye
    [root@ps3 ~]# 
    
    Unpack the kernel source and type make ps3_defconfig to build a ps3 kernel. Or alternatively, make oldconfig then copy my kernel config into that directory and call it ".config".
    [root@ps3 linux02.6.24-20080131]# wget ramblings.narrabilis.com/PS3/2.6.24.config .config
    --14:39:12--  http://ramblings.narrabilis.com/PS3/2.6.24.config
               => `2.6.24.config'
    Resolving ramblings.narrabilis.com... 208.97.141.182
    Connecting to ramblings.narrabilis.com|208.97.141.182|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 27,478 (27K) [text/plain]
    
    100%[============================>] 27,478        --.--K/s             
    
    14:39:37 (929.12 KB/s) - `2.6.24.config' saved [27478/27478]
    
    FINISHED --14:39:37--
    Downloaded: 27,478 bytes in 1 files
    [root@ps3 linux-2.6.24-20080131]# mv 2.6.24.config .config
    
    now make the kernel and modules
    [root@ps3 linux-2.6.24-20080131]# make -j2
    
    (Note: -j2 to compile with more than one thread...the ps3 has several processors ;-) )
    [root@ps3 linux-2.6.24-20080131]# make modules_install
    [root@ps3 linux-2.6.24-20080131]# make install
     
  • Update yaboot.conf with your new kernel information.
    Just copy the lines for the default "linux" and edit so they match your shiny new kernel.
  • Reboot to use your new kernel
I have my kernel as a tar here (kernel-2.6.24.tar.gz). I didn't bother with a proper rpm yet, sorry. Geoff has a kernel also, but he's missing bluetooth and oss sound support. His works well though too.

Next thing you'll want to install xmame and gens...

My kernel has an issue right now that I can't figure out...I need to reload ps3_gelic after reboot before I can access the network. Probably something silly...

Also, I can see the ps3 controllers as bluetooth devices and /var/log/messages shows them as being detected as joysticks, but I cannot actually use them with jstest. jstest shows all the buttons but when I press them, nothing happens. Suggestions?