How to develop for GameCube Linux

From gc-linux

Jump to: navigation, search

Targetting the GameCube with your development is not as easy as targetting your Linux PC, because you have to do cross-development and explicitly upload the executables after compilation.


Cross Compiling

Although you can run a compiler on the GameCube, you will prefer to develop and compile on your desktop computer - which is likely to be a lot faster anyway.

The GameCube has a PowerPC CPU, so your development machine must be able to compile PowerPC binaries. If you have a Mac running Linux, this is easy: Your machine can already create executables for the GameCube.

If your development machine is an x86 PC or a Mac running Mac OS X, you need a cross-compiler. Arthur Othieno has contributed a ready-to-use cross-compiler for x86 available for download from the SourceForge project files page. You can of course also build your own cross-compiler from the GCC and binutils sources.

There are also cross-compilers for Linux, Windows and Mac OS X available at and However, we have found problems compiling recent kernels with them.

Cross-compiling page for linux, using using cross scripts.

Kernel Building

The document Building a GameCube Linux Kernel explains briefly how to build a kernel image from sources.

Running Executables on the GameCube

There are several methods to run your code on the GameCube:

Please see Mod That Cube for more information about running executables.

The Root Filesystem

When linux boots it needs to find its root filesystem. Since the Gamecube does not have a harddrive you will most likely have the filesystem on a SD card, a minidvd, or located on a computer on the network. There are two main methods to accomplish this through network:

NBD stands for Network Block Device. It allows you to have a filesystem in an image file. Server software is available for both Linux and Windows. See Setting up GC-Linux with NBD-root.
NFS stands for Network File System. It allows you to have the filesystem as normal files and directories on the server. Server software is used mainly on Unix systems and is quite complex to set up. See Setting up GC-Linux with NFS.
Personal tools