HOWTO install CELL Environment in Gentoo

gentoo cell

The CELL BE SDK developed by IBM and Barcelona Supercomputing Center targets RedHat Fedora Core 6 host system. Using the rpm2targz and rpm, we can also install the CELL SDK in Gentoo Linux as well.

Dependency and Tools

Since I don’t want to use RPM as my package management, that is the motivation for me to use Gentoo, I need to resolve the dependencies manually, the following package are installed to meet the dependency requirement:

emerge glut libXmu libXext
emerge rpm rpm2targz

Download the RPMs

The CELL SDK files are scattered in AlphaWorks and Bsc:

Download the CELLSDK21.iso from AlphaWorks, you might need to register before access.

Download all the x86-based file from Bsc, to make your life easier, you could use this script:

# ppu
wget -c http://www.bsc.es/projects/deepcomputing/linuxoncell/cellsimulator/sdk2.1/ppu-binutils-2.17.50-8.i686.rpm
wget -c http://www.bsc.es/projects/deepcomputing/linuxoncell/cellsimulator/sdk2.1/ppu-gcc-4.1.1-10.i686.rpm
wget -c http://www.bsc.es/projects/deepcomputing/linuxoncell/cellsimulator/sdk2.1/ppu-gcc-c++-4.1.1-10.i686.rpm
wget -c http://www.bsc.es/projects/deepcomputing/linuxoncell/cellsimulator/sdk2.1/ppu-gcc-fortran-4.1.1-10.i686.rpm
wget -c http://www.bsc.es/projects/deepcomputing/linuxoncell/cellsimulator/sdk2.1/ppu-gdb-6.6-15.i686.rpm
wget -c http://www.bsc.es/projects/deepcomputing/linuxoncell/cellsimulator/sdk2.1/ppu-gcc-debuginfo-4.1.1-10.i686.rpm
wget -c http://www.bsc.es/projects/deepcomputing/linuxoncell/cellsimulator/sdk2.1/ppu-gdb-debuginfo-6.6-15.i686.rpm

# spu
wget -c http://www.bsc.es/projects/deepcomputing/linuxoncell/cellsimulator/sdk2.1/spu-binutils-2.17.50-8.i686.rpm
wget -c http://www.bsc.es/projects/deepcomputing/linuxoncell/cellsimulator/sdk2.1/spu-gcc-4.1.1-9.i686.rpm
wget -c http://www.bsc.es/projects/deepcomputing/linuxoncell/cellsimulator/sdk2.1/spu-gcc-c++-4.1.1-9.i686.rpm
wget -c ttp://www.bsc.es/projects/deepcomputing/linuxoncell/cellsimulator/sdk2.1/spu-gdb-6.6-12.i686.rpm
wget -c http://www.bsc.es/projects/deepcomputing/linuxoncell/cellsimulator/sdk2.1/spu-newlib-1.15.0-7.i686.rpm
wget -c http://www.bsc.es/projects/deepcomputing/linuxoncell/cellsimulator/sdk2.1/spu-gcc-debuginfo-4.1.1-9.i686.rpm
wget -c http://www.bsc.es/projects/deepcomputing/linuxoncell/cellsimulator/sdk2.1/spu-gdb-debuginfo-6.6-12.i686.rpm
wget -c http://www.bsc.es/projects/deepcomputing/linuxoncell/cellsimulator/sdk2.1/ppu-sysroot-fc6-1.noarch.rpm
wget -c http://www.bsc.es/projects/deepcomputing/linuxoncell/cellsimulator/sdk2.1/ppu-sysroot64-fc6-1.noarch.rpm

# sysroot
wget -c http://www.bsc.es/projects/deepcomputing/linuxoncell/cellsimulator/sdk2.1/sysroot\_image-2.1-8.noarch.rpm

Extract the RPMs

We need to convert all RPMs to tar, then untar it in the root of directory:

sudo mount CELLSDK21.iso /mnt/loop -o loop
for x in /mnt/loop/software/*i386.rpm
do
 rpm2tar $x
done

for x in *.rpm
do
 rpm2tar $x
done

BUILDDIR=`pwd`

cd /
for x in $BUILDDIR/*.tar
do
 sudo tar xvf $x
done

It would take a few hours depending on your network bandwidth. If the sysroot_image-2.1-8.noarch.rpm fails to covert to tarball, using rpm2cpio as the rescue:

sudo rpm2cpio sysroot_image-2.1-8.noarch.rpm | cpio -i --make-directories

Test Drive

cd /opt/ibm/systemsim-cell/run/cell/linux ../run_gui

You MUST go to the specified path where .systemsim.tcl residents. Wait for the GUI window launches, then Click Go, if nothing is wrong, the Linux kernel is launched, and the sysroot_image is mapped as the guest OS system.

Warnning: The CELL simulator is extremely computing-extensive, you could click Stop to pause the simulator when it is idle.

Cleanup

We can unmerge the rpm right now if you want to a crusty system.

emerge -c rpm beecrypt