|
|||||||||||||||
|
[en][de][es][fi][fr][it][nl][pl][se]
Building a GameCube Linux Kernelby Albert Herranz , 6 October 2004 IntroductionThis guide explains briefly the necessary steps to produce a Linux kernel suitable for the GameCube, using a Linux PC.Requisites
Installing the toolchain and doltool1. Uncompress the toolchain to a directory where you have write access. $ cd /home/isobel $ tar xjvf /temp/ppc-linux-uclibc-toolchain-20040609.tar.bz2 2. Uncompress doltool sources there too. $ tar xzvf /temp/doltool.0.3.2.linux-TenOfTen.tgz 3. Build doltool, and copy the resulting binary to the toolchain bin directory. $ cd doltool.0.3.2.linux-TenOfTen $ g++ -o doltool *cpp $ cp doltool ../ppc-linux-uclibc-toolchain-20040609/bin/ $ cd .. Preparing to use the toolchain1. Add the bin directory of your ppc toolchain tree to your PATH environment variable. $ export PATH=$PATH:/home/isobel/ppc-linux-uclibc-toolchain-20040609/binNOTE: This will temporarily add the toolchain directory to your path. If you plan to frequently use the toolchain you may want to modify your login script accordingly. Installing and patching the Linux kernel sources1. Put the kernel tarball, and the GameCube Linux kernel patches, in a directory where you have permissions. $ ls linux-2.6.8.1.tar.bz2 linux-2.6.8-gc.patch.gzCAUTION: Do NOT use the /usr/src directory !!! 2. Unpack the kernel sources. $ tar xjvf linux-2.6.8.1.tar.bz2 3. If you plan to build a ramdisk based kernel, copy your ramdisk image into the kernel source tree. $ cp /temp/ramdisk.image.gz linux-2.6.8.1/arch/ppc/boot/images/ 4. Apply the GameCube Linux patch corresponding to your kernel version. $ cd linux-2.6.8.1 $ gunzip -cd <../linux-2.6.8-gc.patch.gz | patch -p1HINT: The patch for 2.6.8 applies also to 2.6.8.1 Building the kernel image1. Change to the parent directory of your recently patched kernel source tree. $ cd .. $ ls linux-2.6.8.1 linux-2.6.8.1.tar.bz2 linux-2.6.8-gc.patch.gz 2. Start with the default GameCube Linux kernel configuration as a base config. $ cp linux-2.6.8.1/arch/ppc/configs/gamecube_defconfig linux-2.6.8.1/.config 3. (Optional) Modify the kernel configuration. $ make -C linux-2.6.8.1 ARCH=ppc CROSS_COMPILE=powerpc-linux- menuconfigHINT: To change the initial IP settings of your kernel, go to "Platform options" and change "Default bootloader kernel arguments". 4. Build your kernel image. If you are building a ramdisk based kernel, then do a:$ make -C linux-2.6.8.1 ARCH=ppc CROSS_COMPILE=powerpc-linux- zImage.initrd $ doltool -d linux-2.6.8.1/arch/ppc/boot/images/zImage.initrd.elfHINT: If you are building a non ramdisk based kernel, the target is zImage instead of zImage.initrd. The resulting Linux kernel image in DOL format can be located at,
Everything done on this project is for the sole purpose of writing interoperable software under Sect. 1201 (f) Reverse Engineering exception of the DMCA. The GameCube Linux Project |
||||||||||||||