How to install IBM Cell SDK 3.0 on PS3
Tuesday, 22 January 2008

For those of you want to play the IBM Cell Broadband Engine (Cell BE). Have fun!

1. Install Fedora 7 with kernel 2.6.23

#!/bin/sh

/sbin/other-os-flash-util -b /dev/ps3flash >> /dev/null ||
{
exit 0;
}

reboot

2. Download Cell SDK 3.0

From http://www.ibm.com/developerworks/power/cell/pkgdownloads.html?S_TACT=105AGX16&S_CMP=LP. Click the " Fedora 7 download page" to download the installation rpm, the Developer package and the Extras package.

3. Install SDK on PS3

  • Update and install some packages:
    yum update selinux-policy selinux-policy-targeted
    yum install rsync sed tcl wget
  • Install sdk (assume the the installation rpm and the isos are stored at /root/cell/cellsdk/)
    /etc/init.d/yum-updatesd stop
    rpm -ivh cell-install-3.0.0-1.0.noarch.rpm
    cd /opt/cell
    cellsdk --iso /root/cell/cellsdk/ install
  • Use "/opt/cell/cellsdk verify" to check packages of Cell SDK. Use yum to install optional packages you need.

4. Install Java, Eclipse

  • Download Java from http://www.ibm.com/developerworks/java/jdk/linux/download.html. Select "32-bit iSeries/pSeries J2SE Version 1.4.2" and then the file " IBMJava2-142-ppc32-SDK-1.4.2-9.0.ppc.rpm". Note: For IE, you may need to change the security level (turn off "protected mode") tempororily to download the file from IBM.
  • Download Eclipse 3.2.2 from http://archive.eclipse.org/eclipse/downloads/drops/R-3.2.2-200702121330/index.php. Select this file: "eclipse-SDK-3.2.2-linux-gtk-ppc.tar.gz".
  • Download CDT for Eclipse from:
    http://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/callisto/dist/3.1.2/org.eclipse.cdt.sdk-3.1.2-linux.ppc.tar.gz
  • Install Java:
    cellsdk --iso /root/cell/cellsdk/ mount
    yum install libXp
    yum install compat-libstdc++-33
    rpm -ivh IBMJava2-142-ppc32-SDK-1.4.2-9.0.ppc.rpm
    update-alternatives --install /usr/bin/javac javac /opt/IBMJava2-ppc-142/bin/javac 120
    update-alternatives --install /usr/bin/java java /opt/IBMJava2-ppc-142/jre/bin/java 120
    alternatives --config javac
    alternatives --config java

    add "PATH=$PATH:/opt/IBMJava2-ppc-142/jre/bin" to your .bash_profile.
  • Install Eclipse:
    tar -xzf eclipse-SDK-3.2.2-linux-gtk-ppc.tar.gz
    add "PATH=$PATH:/cellsdk_addon/eclipse3.2.2/eclipse" to your .bash_profile, where "/cellsdk_addon/eclipse3.2.2/eclipse" is the folder of the decompressed eclipse.
  • Install CDT:
    tar -xzf org.eclipse.cdt.sdk-3.1.2-linux.ppc.tar.gz
    Run Eclipse with "eclipse -vm /usr/java/j2sdk1.4.2_16/jre/bin/java".
    In Eclipse, select Help>>Software Updates>>Find and Install...>>Search for new features to install>>New Local Site.... Add a local site at "file:/cellsdk_addon/CDT3.1.2/eclipse/" to install CDT, where "/cellsdk_addon/CDT3.1.2/eclipse/" is the folder of the decompressed CDT.
  • Exclude updates to some packages:
    add "exclude=blas kernel numactl oprofile" to /etc/yum.conf
  • Restart yum-updatesd:
    /etc/init.d/yum-updatesd start

5. Install SDK IDE

  • Install the cellide package:
    /opt/cell/cellsdk --iso ~/cell/cellsdk/ mount
    yum install cellide
  • In Eclipse, select Help>>Software Updates>>Find and Install...>>Search for new features to install>>New Local Site.... Add a local site at "file:/opt/cell/ide/com.ibm.celldt.update/" to install the cell ide in Eclipse.
  • Install the alf-ide-template package:
    yum install alf-ide-template

6. Set Fedora and XFCE (Optional)

  • Use "startxfce4" to load xfce:
    Xfce Menu>>Autostarted applications :remove all except Network Authentication.
    The default X terminal has a problem when drag the window. Change the properties of the X terminal emulator to use xterm (/usr/bin/xterm).
    Add Eclipse to the menu. Remember to add option "-vm /usr/java/j2sdk1.4.2_16/jre/bin/java" for Eclipse.
  • Turn off some services:
    chkconfig bluetooth off
    service bluetooth stop
    chkconfig hidd off
    service hidd stop
    chkconfig yum-updatesd off
    service yum-updatesd stop
    chkconfig cpuspeed off
    service cpuspeed stop
    chkconfig firstboot off
    service firstboot stop
    chkconfig isdn off
    service isdn stop

7. Run the "Hello Cell"

  • Compile samples included in the SDK:
    cd /opt/cell/sdk/src
    for i in ./*.tar; do tar -xf $i; done
    make
  • Run "Hello Cell":
    cd /opt/cell/sdk/usr/bin/tutorial
    simple