Cell SDK on Ubuntu (Feisty Fawn).

I ended up installing ubuntu on my playstation 3, pretty straight forward installation. Getting the Cell SDK up and running on ubuntu turned out to be a bit of a challenge however. There’s really not much information out there about how to do it, the closest I got was Gammel’s “Installing Cell SDK under Ubuntu” – which almost worked. Most of the following is based on his recipe.

1. Install a few needed packages:

$ apt-get install rpm freeglut3 freeglut3-dev libxmu-dev libxext-dev 
   build-essential perl rsync flex byacc tk8.4 tcl8.4 libelf1 gawk bash 
   libnetpbm10 libnuma1

2. Make sure sh points to bash:

$ ls -la /bin/sh
lrwxrwxrwx 1 root root 9 2007-08-25 07:33 /bin/sh -> /bin/bash

if it doesn’t then replace it:

$ rm  /bin/sh && ln -s /bin/bash /bin/sh

3. Replace mawk with gawk:

$ update-alternatives --set awk /usr/bin/gawk

4. Add symlinks to a couple of libs:

$ ln -s /usr/lib/libtcl8.4.so.0 /usr/lib/libtcl8.4.so
$ ln -s /usr/lib/libtk8.4.so.0 /usr/lib/libtk8.4.so

5. Download the Cell SDK (v2.1 is current version). Mount it and copy out the software.

$ mkdir /media/cell && mount -o loop CellSDK21.iso /media/cell
$ cp -r /media/cell/software /tmp/

6. Fix the install script, i needed to add –ignorearch since it complained about the system not beeing ppc64 for some reason. Then run it..

$ cd /tmp/software
$ sed -i 's/rpm -i/rpm -i --nodeps --ignorearch/g' cellsdk
$ ./cellsdk install

7. Mount up the SPU-filesystem (if you get errors like “Unable to create SPE thread: Invalid argument” or “spu_create(): No such file or directory” while running your code this is probably why).

$ mkdir /spu
$ echo "none /spu spufs defaults 0 0" >> /etc/fstab
$ mount -a

Playstation 3.

I’ve bought a Playstation 3. This thing is a number crunching monster, the Cell CPU does Folding@Home about 10 times faster than a normal computer! The Cell CPU is basically a multithreaded core (PPE) backed up by 8 (!) smaller cpus (SPE) connected to a ring-bus (EIB). You don’t have to go many years back to find super-computers that this beast beats hands down on computing power (at least on floating point operations). I’ve installed linux on it (yellow dog, might change that soon – probably ubuntu) and you have access to the main PPE + 7 of the SPEs. It’s also a very good DVD-player, which is one of the main reasons why I bought it. Upscales and transmits both image and sound to my receiver over a single cable (HDMI). A good upscaling DVD-player is around 3000NOK, so why not pay a little bit extra and get a number cruncher, (future) media center, gaming machine (there really aren’t many good games for it yet though) and blu-ray player included? That aside, it was kinda a hard decision whether to buy it or not, I really don’t like supporting SONY (they got a really bad track record: the sony root kit, closing down lik sang, exploding batteries, etc, etc). I prefer HD-DVD over Blu-ray. Blu-ray is region-locked, HD-DVD is not, which means that buying movies from the states is harder with Blu-ray. The Blu-ray camp also got a nasty DRM trick up their sleeve called BD+, it’s basically a VM running on the player that executes code from the disc. Hopefully Sony sells the console at a loss. I hope that it will be possible to attach a xbox360 HD-DVD player to the PS3 via USB and use that to play HD-DVDs in linux in the future.