This page describes the installation of Fedora 12 onto the Playstation 3.

Prerequisites

  • a non slim PS3 (Model CECH[A-Q]) and a USB Keyboard
  • about 5 MB of free space on an USB stick
  • Internet access
  • a computer with CD burning capabilities

Download and burn Fedora

Download and burn the Fedora-12-ppc-netinst.iso from a Fedora mirror. In the meantime you can format the PS3 hard drive and install the boot loader as described below.

Installation

Format the PS3 Hard Disk

Start your PS3 and select:

  • Settings → System Settings → Format Format Utlility → Format Hard Disk → Custom

There are three options where only two of them are useful if you want to install Linux. You can either choose Allot 10GB to the Other OS or Allot 10GB to the PS3 System. Afterwards your PS3 will be restarted.

PS3 Other-OS Bootloader

Download the otheros.bld onto the USB stick

The petitboot bootloader can be found at: http://www.kernel.org/pub/linux/kernel/people/geoff/cell/ps3-petitboot
Place the otheros.bld into the following directory structure on your USB stick: PS3/otheros/

mkdir -p /media/usbstick/PS3/otheros/
wget http://www.kernel.org/pub/linux/kernel/people/geoff/cell/ps3-petitboot/otheros.bld -O /media/usbstick/PS3/otheros/otheros.bld

Install the Bootloader

Insert the USB stick into the PS3 and select:

  • Settings → System Settings → Install Other OS

Afertwards unplug the USB stick.

Install Fedora

Insert the Fedora CD/DVD in your PS3 and select:

  • Settings → System Settings → Default System → Other OS → Yes

The ps3 will reboot into the Petitboot bootloader. To boot the Fedora installtion CD/DVD select the line starting with linux64: using the USB keyboard. Then follow the instructions of the installer.

Error while configuring eth0

You may get “Error configuring network device” while configuring a the network interface within the installer. This is a known bug that can be circumvented by switching to the next console using Alt+F2 and type:

sed -i "s/NM_CONTROLLED=no/NM_CONTROLLED=yes/" /etc/sysconfig/network-scripts/ifcfg-wlan0

Afterwards switch back to the installer using Alt+F1 and select OK which retries the config.

first start

When the installation is complete the system will be rebooted and prompt for root login. The first thing I did was to start the network and login from a remote machine:

service network start
chkconfig network on

Then you might want to install some additional packages:

yum update
yum install man wget vim

Tuning the System

Using the GPU memory as swap

manual:

mkswap -f /dev/ps3vram
swapon -p 1 /dev/ps3vram

automatic:

wget http://us.fixstars.com/support/solutions/ydl_6.x/ps3-vram-swap -O /etc/init.d/ps3-vram-swap
sed -i "s/mtdblock0/ps3vram/" /etc/init.d/ps3-vram-swap
sed -i "s/mkswap/mkswap -f/" /etc/init.d/ps3-vram-swap
chmod 755 /etc/init.d/ps3-vram-swap
chkconfig --add ps3-vram-swap
chkconfig ps3-vram-swap on
service ps3-vram-swap start

The swap usage can be displayed using:

swapon -s

or:

cat /proc/swaps

Disabling services

see: chkconfig –list
Note: You should know what you're doin here. Otherwise just skip this part.

chkconfig --del auditd; service auditd stop
chkconfig --del crond; service crond stop
chkconfig --del ibmvscsisd; service ibmvscsisd stop
chkconfig --del ip6tables; service ip6tables stop
chkconfig --del iprdump; service iprdump stop
chkconfig --del iprinit; service iprinit stop
chkconfig --del iprupdate; service iprupdate stop
chkconfig --del iptables; service iptables stop
chkconfig --del mdmonitor; service mdmonitor stop
chkconfig --del netconsole
chkconfig --del netfs; service netfs stop
chkconfig --del netplugd
chkconfig --del rdisc
chkconfig --del restorecond
chkconfig --del saslauthd
chkconfig --del sendmail; service sendmail stop

set WUXGA mode

The video mode can be changed on the fly using ps3-video-mode:

ps3-video-mode -f -m 13

if you want these settings persistent edit /etc/yaboot.conf and modify the append line(s):

append "video=ps3fb:mode:13 selinux=0" to the append line

You may also disable selinux while you are at it as shown above.

enable detailed boot messages

plymouth-set-default-theme details
/usr/libexec/plymouth/plymouth-update-initrd

tweaking petitboot

To set the videomode or timeout of the bootloader you have to reboot your PS3 and select “Exit to Shell” from the boot menu. Then run ps3-bl-option like this:

ps3-bl-option -O 20

Sets the bootloaders timeout to 20 seconds. Note: Timeouts from [yaboot|kboot].conf files are ignored.

ps3-bl-option -M 13

Sets the bootloader video mode to WUXGA (see ps3-video-mode -h).

Then type:

reboot

Adding a user

/usr/sbin/useradd alice
passwd alice

Desktop Environments and Window Managers

install Xorg

yum install xorg-x11-server-Xorg xorg-x11-drv-fbdev xorg-x11-xinit hal xterm
reboot

fluxbox

yum install fluxbox
echo startfluxbox > ~/.xinitrc

start X

startx

Wireless Network

yum install wpa_supplicant
chkconfig wpa_supplicant on

adjust /etc/sysconfig/wpa_supplicant:

sed -i 's/^INTERFACES=.*/INTERFACES="-iwlan0"/' /etc/sysconfig/wpa_supplicant
sed -i 's/^DRIVERS=.*/DRIVERS="-Dwext"/' /etc/sysconfig/wpa_supplicant

Then add your network to the /etc/wpa_supplicant/wpa_supplicant.conf

wpa_passphrase "your-ssid" "secret-passphrase" >> /etc/wpa_supplicant/wpa_supplicant.conf

(see: /usr/share/doc/wpa_supplicant-0.6.8/examples/)

You may do a dry run to check if it's working so far:

wpa_supplicant -Dwext -iwlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf

Look for CTRL-EVENT-CONNECTED and press ctrl+c to abort.

edit /etc/sysconfig/network-scripts/ifcfg-wlan0:

LINKDELAY=15
DEVICE=wlan0
BOOTPROTO=dhcp
ONBOOT=yes

You may also disable eth0 on boot:

sed -i 's/^ONBOOT=.*/ONBOOT=no/' /etc/sysconfig/network-scripts/ifcfg-eth0

The network service should be started after wpa_supplicant (see: http://lists.shmoo.com/pipermail/hostap/2008-May/017806.html).

sed -i 's/chkconfig:.*/chkconfig: - 24 80/' /etc/init.d/network
chkconfig network resetpriorities

start the wpa_supplicant:

service network stop
service wpa_supplicant start
service network start

The Cell SDK

Prerequisites

yum install rsync tcl wget expat glibc-devel.ppc64 libspe2.ppc libspe2.ppc64 libspe2-devel.ppc libspe2-devel.ppc64 libspe2-adabinding-devel elfspe2

SDK 3.1 Downloads

Download the following packages from http://www.ibm.com/developerworks/power/cell/downloads.html

  • cell-install-3.1.0-0.0.noarch.rpm
  • CellSDK-Devel-Fedora_3.1.0.0.0.iso (SDK 3.1 Developer package ISO image for Fedora 9)
  • CellSDK-Extras-Fedora_3.1.0.0.0.iso (SDK 3.1 Extras package ISO image for Fedora 9

SDK 3.1 Installation

rpm -ihv /path/to/cell-install-3.1.0-0.0.noarch.rpm
mv /etc/yum.repos.d/cellsdk-Fedora.repo.orig /etc/yum.repos.d/cellsdk-Fedora.repo
/opt/cell/cellsdk --iso /path/to/CellSDK/isoDir install

After accepting the licences the installer will ask to overwrite some packages (libspe2, elfspe) provided by the distro. I did not install the SDK versions as they are older than whats in F12.

Additional SDK Components

To list all the packages that are not installed type:

/opt/cell/cellsdk verify|grep "not installed"

Mount the SDK iso Images

To be able to install packages via yum the Cell SDK iso images have to be mounted:

/opt/cell/cellsdk --iso /path/to/CellSDK/isoDir mount

Misc Packages

yum install crash-spu-commands spu-tools spu-libcrypto-examples fdprpro

Fortran and ADA

yum install ppu-gcc-fortran spu-gcc-fortran ppu-gcc-gnat

ALF-Hybrid

yum install alf-hybrid alf-hybrid-devel alf-hybrid-examples-source alf-hybrid-spu-devel

DACS-Hybrid

yum install dacs-tools dacs-hybrid.ppc dacs-hybrid.ppc64 dacs-hybrid-devel.ppc dacs-hybrid-devel.ppc64 dacs-hybrid-daemon.ppc

libfft3d

yum install libfft3d libfft3d-devel libfft3d-examples-source

Eclipse IDE

yum install ibm-java2-ppc-jre cellide libXtst pdt.ppc pdt.ppc64 alf-ide-template cell-spu-timing

To start the ide type:

/opt/cell/ide/eclipse/eclipse -vm /opt/ibm/java2-ppc-50/jre/bin

Trace libraries

yum install trace.ppc trace.ppc64 trace-devel.ppc trace-devel.ppc64 alf-trace.ppc alf-trace.ppc64 alf-trace-devel.ppc alf-trace-devel.ppc64 alf-spu-trace-devel alf-hybrid-trace alf-hybrid-spu-trace-devel dacs-trace.ppc dacs-trace.ppc64 dacs-trace-devel.ppc dacs-trace-devel.ppc64 dacs-hybrid-trace.ppc dacs-hybrid-trace.ppc64 dacs-hybrid-trace-devel.ppc dacs-hybrid-trace-devel.ppc64

Unmount the Cell SDK iso Images

/opt/cell/cellsdk --iso /path/to/CellSDK/isoDir unmount

Installation of the SDK 3.1.0.1 Fixpack

On May-2009 the SDK 3.1.0.1 Fixpack was released on fixcentral. The official Fix name for PPC is 3.1-SDKMA-Linux-ppc-FP01.

wget http://download2.boulder.ibm.com/sar/CMA/QSA/00ie7/0/3.1-SDKMA-Linux-ppc-FP01.tar.bz2
tar xf 3.1-SDKMA-Linux-ppc-FP01.tar.bz2
rpm -Uvh *rpm

Uninstall the Cell SDK

In case you want to remove the Cell SDK from you machine type:

/opt/cell/cellsdk --iso /path/to/CellSDK/isoDir unmount
/opt/cell/cellsdk uninstall
yum remove libspe2.ppc libspe2.ppc64 libspe2-devel.ppc libspe2-devel.ppc64 libspe2-adabinding-devel elfspe2
yum clean metadata
yum clean all
yum update

OpenCL

The OpenCL Dev Kit 0.2 can be found at: http://www.alphaworks.ibm.com/tech/opencl

Prerequisites

yum install gcc-c++ make glibc-devel.ppc numactl.ppc libspe2.ppc

If the SDK 3.1.0.1 Fixpack is already installed, you are done. Otherwise the following bsc packages should be installed

mkdir prerequisites
cd prerequisites
wget http://www.bsc.es/projects/deepcomputing/linuxoncell/cellsimulator/sdk3.1/CellSDK-Open-Fedora/cbea/ppu-binutils-2.18.50-21.ppc.rpm
wget http://www.bsc.es/projects/deepcomputing/linuxoncell/cellsimulator/sdk3.1/CellSDK-Open-Fedora/cbea/ppu-gcc-4.1.1-166.ppc.rpm
wget http://www.bsc.es/projects/deepcomputing/linuxoncell/cellsimulator/sdk3.1/CellSDK-Open-Fedora/cbea/spu-binutils-2.18.50-21.ppc.rpm
wget http://www.bsc.es/projects/deepcomputing/linuxoncell/cellsimulator/sdk3.1/CellSDK-Open-Fedora/cbea/spu-gcc-4.1.1-166.ppc.rpm
wget http://www.bsc.es/projects/deepcomputing/linuxoncell/cellsimulator/sdk3.1/CellSDK-Open-Fedora/cbea/spu-newlib-1.16.0-17.ppc.rpm
rpm -ivh *.rpm
cd ..

OpenCL Downloads

Download the OpenCL-0.2.linux.ppc.iso, OpenCL-samples-0.2-0.zip from here and the ocl-gdb-7.1-7.ppc64.rpm from here or here.

OpenCL Installation

cd /path/to/opencl/downloads
mount -o loop OpenCL-0.2.linux.ppc.iso /mnt
/mnt/install.sh
umount /mnt
rpm -ihv ocl-gdb-7.1-7.ppc64.rpm
reboot

The OpenCL Examples

cd /path/to/opencl/downloads
unzip OpenCL-samples-0.2-0.zip
cd OpenCL-samples-0.2-0

julia

su -c "yum install ncurses-devel netpbm netpbm-devel"
cd julia/ppc
# adjust the Makefile
sed -i 's/-DPPM=1 # -DPS3=1/-DPS3=1 # -DPPM=1/' Makefile
make
# run on the PPU:
./julia --cpu --lwgsize 128
# run on the SPU:
./julia --accel --lwgsize 128
# display to ps3 framebuffer (requires write access to /dev/fb0)
su -c "./julia --accel --lwgsize 128 --iterations 1000 --ps3"
# print usage:
./julia --help
cd ../..

blackscholes

cd blackscholes/ppc
make
./bsop --help
cd ../..

perlin_noise

cd perlin_noise/ppc
make
./perlin --help
cd ../..

fluid

cd fluid/ppc
make
./fluid --help
cd ../..

jacsolver

su -c "yum install openmpi-devel.ppc"
cd jacsolver/ppc
# adjust the Makefile
sed -i 's#/usr/lib/openmpi/1.3.2-gcc/include#/usr/include/openmpi-ppc#' Makefile
sed -i 's#/usr/lib/openmpi/1.3.2-gcc/lib#/usr/lib/openmpi/lib#' Makefile
make
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib/openmpi/lib" ./jacsolver --help
cd ../..

Uninstall the OpenCL Dev Kit

yum remove OpenCL-devel OpenCL OpenCL-cell OpenCL-cell-devel opencl-xlc-cmp opencl-xlc-man opencl-xlc-rte opencl-xlc-help opencl-xlc-lib opencl-cell-xlc-lib opencl-cell-xlc-cmp opencl-xlc-rte-lnk

In case the SDK wasn't installed remove the following packages in addition:

yum remove numactl.ppc libspe2.ppc ppu-binutils.ppc ppu-gcc.pcc spu-binutils.pcc spu-gcc.pcc spu-newlib.pcc

Custom Linux Kernel

This section describes how to build and install a kernel from a git repo

prequisites

yum install git gcc make

checkout the sources

git clone git://git.kernel.org/pub/scm/linux/kernel/git/geoff/ps3-linux.git ps3-linux
cd ps3-linux
git checkout v2.6.31-rc7

create a build directory

to seperate the source dir from the build dir

mkdir ../2.6.31-rc7-build

clean up everything left over from the previous build

make O=../2.6.31-rc7-build clean
make O=../2.6.31-rc7-build mrproper

create a .config using the defaults

make O=../2.6.31-rc7-build ps3_defconfig

compile the kernel and its modules

make O=../2.6.31-rc7-build

install the kernel modules to /lib/modules

make O=../2.6.31-rc7-build modules_install

create initrd

cd ../2.6.31-rc7-build
/sbin/mkinitrd initrd.img 2.6.31-rc7

copy the files into the /boot directory

cp initrd.img /boot/initrd-2.6.31-rc7.img
strip vmlinux -o /boot/vmlinuz-2.6.31-rc7
cp .config /boot/config-2.6.31-rc7
cp System.map /boot/System.map-2.6.31-rc7

edit /etc/yaboot.conf

and add something like this

image=/boot/vmlinuz-2.6.31-rc7
        label=linux-2.6.31-rc7
        read-only
        initrd=/boot/initrd-2.6.31-rc7.img
        append="video=ps3fb:mode:5 selinux=0 root=UUID=3ac720e5-48a5-47bb-821f-dbcf2c631866"

In case you have a separate boot partition you may strip ”/boot” from the “image=” and “initrd=” lines above or create a symlink:

ln -s /boot /boot/boot

Cross fingers and reboot. :)

Mesa 3D / Gallium 3D

prerequisites

yum install git imake libX11-devel libXext-devel libXmu-devel libXi-devel

In addition the Cell SDK and Xorg needs to be installed.

checkout mesa

git clone git://anongit.freedesktop.org/git/mesa/mesa
cd mesa
git checkout origin/mesa_7_6_branch

compile mesa

make linux-cell LDFLAGS="-L $PWD/lib/gallium -L $PWD/lib"

running glxgears and friends

export LD_LIBRARY_PATH=$PWD/lib/gallium:$PWD/lib/
progs/xdemos/glxinfo
progs/xdemos/glxgears

cd progs/demos
./bounce
./gloss
./morph3d
./reflect
./stex3d
./tessdemo
./textures
cd ../..
 
fedora12-ps3.txt · Last modified: 2010/06/30 15:45 by ken
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki