Cell/B.E. System Simulator Installation on Modern Linux (Fedora 44)
IBM’s Cell System Simulator is old but it can still run on modern Linux. It was originally intended to run on Fedora 9 (ppc64 or x86_64) and was packaged as rpm files easily installable the rpm or dnf package management utils. In this tutorial I will show you how to get the simulator working in a Fedora 44 (x86_64) environment. It is possible to install the Simulator in other distrobutions as well but it is easiest to do in Fedora or RHEL since they are rpm-based and configured to install rpm-type packages by default.
1. Install dependencies
Modern Fedora still provides most of the dependencies required by the Cell System Simulator. Run the following command to install all dependencies that still can be installed from the Fedora software repos:
sudo dnf install perl perl-File-Basename perl-PathTools perl-File-stat tcl tk libX11 libgcc libstdc++ rtld xterm
There are two System Simulator dependencies no longer available from the Fedora repos: tcl 8.5 and tk 8.5. We are going to compile them from source code archives (tarballs) and install the files to a safe location on your system where they won’t cause any conflicts with the rest of your system’s software.
2. Download and extract the simulator archive
Run the following:
wget https://ps3linux.net/ps3-filez/IBM_Full-System_Simulator_for_the_CBE_Processor.tar.bz2
tar xvf IBM_Full-System_Simulator_for_the_CBE_Processor.tar.bz2
cd IBM_Full-System_Simulator_for_the_CBE_Processor
3. Install sysroot rpm
Package sysroot_image-3.1-1.noarch.rpm only contains a kernel and a disk image. As such it has no dependencies and will install with zero issues.
sudo rpm -ivh sysroot_image-3.1-1.noarch.rpm
4. Compile and install tcl 8.5
The simulator depends on tcl 8.5 so we will compile and install it under the directory /opt/tcltk. Fun fact: One of the main purposes of your opt directory is to contain software compiled and installed outside of the default package management infrastructure. Run the following commands:
sudo mkdir /opt/tcltk
wget https://ps3linux.net/ps3-filez/tcl8.5.19-src.tar.gz
tar xf tcl8.5.19-src.tar.gz
cd tcl8.5.19/unix
CC="gcc -m64" CFLAGS="-O2 -march=native -std=gnu89 -D_GNU_SOURCE" ./configure --prefix=/opt/tcltk --libdir=/opt/tcltk/lib64 --enable-threads --enable-64bit
make
sudo make install-strip
sudo make install-private-headers
cd ../../
rm -rf tcl8.5.19
5. Compile and install tk 8.5
The simulator also depends on tk 8.5, so next we will compile and instal it (under /opt/tcltk) as well. This time we must first apply a patch I made, or else it won’t build. Run the following commands:
wget https://ps3linux.net/ps3-filez/tk8.5.19-src.tar.gz
wget https://ps3linux.net/ps3-filez/tk8.5.19-remove-strrchr-declaration.patch
tar xf tk8.5.19-src.tar.gz
cd tk8.5.19/unix
CC="gcc -m64" CFLAGS="-O3 -march=native -std=gnu89 -D_GNU_SOURCE" LDFLAGS=-L/opt/tcltk/lib64 CPPFLAGS=-I/opt/tcltk/include ./configure --prefix=/opt/tcltk --libdir=/opt/tcltk/lib64 --enable-threads --enable-64bit --with-tcl=/opt/tcltk/lib64 --with-x
make
sudo make install-strip
cd ../../
rm -rf tk8.5.19
6. Install the system simulator rpm package
Since your rpm utility does not know about the tcl and tk libs we compiled and installed, it will refuse to install the simulator rpm package. We must force the install with the --force --no-deps options.
sudo rpm -ivh --force --no-deps systemsim-cell-3.1-25.f9.x86_64.rpm
7. Test out your new Cell CPU System Simulator
First we must set the environment variable SYSTEMSIM_TOP to systemsim’s top-level directory. You should set this variable in your .bashrc file for future convenience. In the simulator’s command line we must set the LD_LIBRARY_PATH variable to the directory containing the tcl and tk libs we built in steps 4 and 5. DO NOT set LD_LIBRARY_PATH in your .bashrc file, as this is considered to be sloppy and bad practice (it will cause ALL programn to look inside your /opt/tcltk directory first when searching for their required shared libs, which is not ideal behavior). Always set the LD_LIBRARY_PATH variable as part your System Simulator’s command line.
export SYSTEMSIM_TOP=/opt/ibm/systemsim-cell
LD_LIBRARY_PATH=/opt/tcltk/lib64 systemsim -g -q
8. (Optional) Save the simulator documentation and clean up
Run the following:
cp -v SystemSim.Installation.pdf SystemSim.Users.Guide.pdf SystemSim.PerfAnalysis.Guide.pdf ~/Documents/
cd ../
sudo rm -rf IBM_Full-System_Simulator_for_the_CBE_Processor IBM_Full-System_Simulator_for_the_CBE_Processor.tar.bz2
