This page describes the installation of Fedora 12 onto the Playstation 3.
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.
Start your PS3 and select:
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.
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
Insert the USB stick into the PS3 and select:
Afertwards unplug the USB stick.
Insert the Fedora CD/DVD in your PS3 and select:
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.
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.
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
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
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
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.
plymouth-set-default-theme details /usr/libexec/plymouth/plymouth-update-initrd
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
/usr/sbin/useradd alice passwd alice
yum install xorg-x11-server-Xorg xorg-x11-drv-fbdev xorg-x11-xinit hal xterm reboot
yum install fluxbox echo startfluxbox > ~/.xinitrc
startx
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
yum install rsync tcl wget expat glibc-devel.ppc64 libspe2.ppc libspe2.ppc64 libspe2-devel.ppc libspe2-devel.ppc64 libspe2-adabinding-devel elfspe2
Download the following packages from http://www.ibm.com/developerworks/power/cell/downloads.html
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.
To list all the packages that are not installed type:
/opt/cell/cellsdk verify|grep "not installed"
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
yum install crash-spu-commands spu-tools spu-libcrypto-examples fdprpro
yum install ppu-gcc-fortran spu-gcc-fortran ppu-gcc-gnat
yum install alf-hybrid alf-hybrid-devel alf-hybrid-examples-source alf-hybrid-spu-devel
yum install dacs-tools dacs-hybrid.ppc dacs-hybrid.ppc64 dacs-hybrid-devel.ppc dacs-hybrid-devel.ppc64 dacs-hybrid-daemon.ppc
yum install libfft3d libfft3d-devel libfft3d-examples-source
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
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
/opt/cell/cellsdk --iso /path/to/CellSDK/isoDir unmount
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
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
The OpenCL Dev Kit 0.2 can be found at: http://www.alphaworks.ibm.com/tech/opencl
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 ..
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.
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
cd /path/to/opencl/downloads unzip OpenCL-samples-0.2-0.zip cd OpenCL-samples-0.2-0
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 ../..
cd blackscholes/ppc make ./bsop --help cd ../..
cd perlin_noise/ppc make ./perlin --help cd ../..
cd fluid/ppc make ./fluid --help cd ../..
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 ../..
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
This section describes how to build and install a kernel from a git repo
yum install git gcc make
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
to seperate the source dir from the build dir
mkdir ../2.6.31-rc7-build
make O=../2.6.31-rc7-build clean make O=../2.6.31-rc7-build mrproper
make O=../2.6.31-rc7-build ps3_defconfig
make O=../2.6.31-rc7-build
make O=../2.6.31-rc7-build modules_install
cd ../2.6.31-rc7-build /sbin/mkinitrd initrd.img 2.6.31-rc7
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
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. :)
yum install git imake libX11-devel libXext-devel libXmu-devel libXi-devel
git clone git://anongit.freedesktop.org/git/mesa/mesa cd mesa git checkout origin/mesa_7_6_branch
make linux-cell LDFLAGS="-L $PWD/lib/gallium -L $PWD/lib"
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 ../..