

Women in Tech: 20 Trailblazers Share Their Journeys

Successful women in the tech trenches share their insights and tackle subjects ranging from how to search out a strong mentor to how to be one -- from how to advance in a large company to how to start your own firm. Get the Kindle or Paperback.

One of the most exciting aspects of the PlayStation 3 is that it allows users to install an alternative operating system.

You can't overwrite Sony's GameOS or access privileged resources, but you can run your own applications on the new Cell Broadband Engine processor (called the "CBE processor" or the "Cell" for short).

The Cell is the mighty brain of the PlayStation 3, and this article explains how to access it by installing Linux on the console.

Brief Introduction to the Cell Processor

Before you start the installation, it helps to have a basic understanding of the target system. The Cell is composed of nine processing cores -- eight Synergistic Processor Units (SPUs) and one Power Processor Unit (PPU).

The SPUs were designed for high-speed number crunching, and each operates on multiple values at once. When you read about the Cell's performance in Folding@Home or in the Roadrunner supercomputer, the extraordinary speed is provided by the SPUs.

The PPU, on the other hand, was designed for general-purpose processing. It's not particularly fast, but it's well suited for running an operating system and managing the SPUs. You can think of the PPU as the coachman in an eight-horse carriage; it makes high-level decisions and keeps the horses in line.

An Overview of the Linux-PS3 Installation Process

When installing Linux, the first task is to choose a distribution. FixStars Solutions (recent acquisitor of TerraSoft) provides Yellow Dog Linux specifically for the Cell processor. Many users have also had success with Ubuntu and Debian.

However, IBM's Cell Software Development Kit (SDK) is only supported on Fedora Core 9 and Red Hat Enterprise Linux 5.2. For this reason, this discussion focuses on installing Fedora Core 9 on the PS3. The process consists of four main steps:

Obtain the Fedora Core 9 ISO for the PowerPC and burn it to a DVD. Download the PS3 Add-on Tools ISO and burn it to a CD. Reformat the PS3 hard drive to support Linux. Install Linux using the add-on tools.

The rest of this article explains these steps in detail.

Part I: Obtain the Linux ISO for the PowerPC

The PPU's architecture is based on IBM's PowerPC specification, so you'll need the distribution of Fedora Core 9 that targets the PowerPC. The following steps show how to obtain it.

Open a Web browser and go here. Find a mirror site for your location. In the column labeled Content, click on one of the transfer protocols (http, ftp, or rsync). In the mirror's directory hierarchy, open the releases folder, then 9, then Fedora, then ppc, then iso. Save Fedora-9-ppc-DVD.iso to your computer and burn it to a DVD.

Part II: Download the PS3 Bootloader

Open a Web browser and go here. Save the CELL-Linux-CL_date-ADDON.iso file to your computer. Burn this file onto a CD.

To boot an alternative OS on the PS3, you need a PS3-compatible bootloader. The following steps explain how to acquire this.

This ISO file contains many Linux-related utilities for the PS3, but for our purposes, two are particularly important: otheros.bld and kboot. The first file, located in the PS3/otheros directory, is the bootloader called by the PS3 when it starts in Other OS mode. The second file provides a miniature Linux environment that makes it possible to install the full kernel on the PlayStation.

Part III: Reformat the PlayStation 3 Hard Drive

The following steps explain how to set aside memory on the console's hard drive for the installation:

Turn on the PlayStation 3 and navigate to the Settings option in the main menu. If you haven't already, update your firmware with Settings->System Update. The console will restart. Select Settings->System Settings and choose the Format Utility option. Select Format Hard Disk, then Yes, then Custom. You can allocate memory in three ways: assign all of the memory for the PS3, assign 10 GB to Linux and the rest to the PS3, or assign 10 GB to the PS3 and the rest to Linux. I recommend the last option. Choose between Quick Format and Full Format. I recommend the quick version, which only takes seconds. Select Yes to delete all data on the formatted memory. Press Enter to restart the PS3.

Part IV: Install Linux Using the Add-on Tools

At this point, you should have a Linux DVD, an Add-on Tools CD, and a PlayStation with memory set aside for Linux. If everything's in order, you're ready to start installing Linux. The procedure is as follows:

Connect a USB keyboard and mouse to the console. You can navigate through the menu with arrow keys and select options with Enter. Insert the add-on CD into the console. Go to Settings->System Settings, and select Install Other OS. The PS3 will search for a suitable bootloader and find otheros.bld on the CD. Select Start and the PS3 will install the bootloader. When the installation finishes, eject the CD and insert the Linux DVD. Go back to the main menu and select Settings->System Settings->Default System. You'll see options for PS3 and Other OS, and your choice determines which operating system will start when you turn on the console. Choose Other OS and Yes to restart the console. When the PS3 restarts, two penguins will appear above a series of startup messages. Enter the bold-faced text at the kboot prompt: kboot : linux64 xdriver=fbdev video=720p The video parameter is optional and identifies your display (720p, 1080i, or 1080p). The 720p setting works well for most displays. Note: If your keyboard sends gibberish to the command line, it means it was designed for Windows. You'll need a different keyboard to continue the installation. After a brief startup check, a Welcome to Fedora screen will appear. Choose whether you want to test the DVD or not. When the graphical installer appears, choose your language, your keyboard locale, and click Yes to initialize the hard drive. The rest of the Linux installation is standard across all distributions of Fedora Core 9. Configure your network settings, your location, and the drive partitioning. I recommend that you check Review and modify partitioning layout, remove at least 1 GB from the ext3 partition, and add the memory to the swap partition. Once you're finished, the installer will format the partition. The Cell's PPU won't run office applications quickly, so I recommend deselecting Office and Productivity. Click Next to start the full installation.

When the installation finishes, Linux will automatically load when you turn on the PS3. To go back to GameOS, restart the console and press the front power button until you hear a beep. Then, to return to Linux from GameOS, go to Settings->System Settings->Default System, select Other OS, and restart the console.

Congratulations! Installing a foreign operating system on a game console is no small task, and you have every right to be proud. If you'd like to pursue Cell development further, I recommend that you download IBM's free Software Development Kit.

Matthew Scarpino is the author of Programming the Cell Processor: For Games, Graphics and Computation. He lives in the San Francisco Bay Area and works as a software developer.