Difference between revisions of "Devkitppc setup (Linux)"

From WiiBrew
Jump to: navigation, search
m (Robot: Cosmetic changes)
(Installing devkitPPC: Added a link to a premade archive of devkitpro)
Line 4: Line 4:
 
== Installing devkitPPC ==
 
== Installing devkitPPC ==
  
* Download [http://sourceforge.net/project/showfiles.php?group_id=114505&package_id=124208 DevkitPPC], [http://sourceforge.net/project/showfiles.php?group_id=114505&package_id=126925 libogc],[http://sourceforge.net/project/showfiles.php?group_id=114505&package_id=197264 libfat-ogc] and the [http://sourceforge.net/project/showfiles.php?group_id=114505&package_id=273886 Wii examples] (optional) and [http://hbc.hackmii.com/download/ the Homebrew Channel] (in order to have the executable "wiiload" that should be in wiiload/lin32)
+
* Download [http://sourceforge.net/project/showfiles.php?group_id=114505&package_id=124208 DevkitPPC], [http://sourceforge.net/project/showfiles.php?group_id=114505&package_id=126925 libogc],[http://sourceforge.net/project/showfiles.php?group_id=114505&package_id=197264 libfat-ogc] and the [http://sourceforge.net/project/showfiles.php?group_id=114505&package_id=273886 Wii examples] (optional) and [http://hbc.hackmii.com/download/ the Homebrew Channel] (in order to have the executable "wiiload" that should be in wiiload/lin32)<br />
 +
A premade archive of these files (organized according to the directory structure below) is available [http://byrne.homelinux.com/wiibrew/devkitpro.tar.gz here]
 
:Note: The US mirror for DevkitPPC can be slow, so you might have to switch to a European one.
 
:Note: The US mirror for DevkitPPC can be slow, so you might have to switch to a European one.
 
:Note: Extract the files from the devkitPPC tarball using "tar -xvjf <file you downloaded>" to preserve symlinks, etc...
 
:Note: Extract the files from the devkitPPC tarball using "tar -xvjf <file you downloaded>" to preserve symlinks, etc...

Revision as of 01:44, 14 August 2009

Installing through the repositories

It is probably easiest to install devkitPPC via your linux distro repositories. Try searching for devkitPPC MYDISTRO [1].

Installing devkitPPC

A premade archive of these files (organized according to the directory structure below) is available here

Note: The US mirror for DevkitPPC can be slow, so you might have to switch to a European one.
Note: Extract the files from the devkitPPC tarball using "tar -xvjf <file you downloaded>" to preserve symlinks, etc...
  • Create a folder for devkitpro and extract everything into it such that you have this directory structure:
devkitpro
  devkitPPC
  wii-examples
  wiiload
  libogc (extract the libfat tar under this directory as well)

the folder wiiload should only contain the executable "wiiload" that you found in the homebrew channel

  • Edit ~/.bashrc and add
export DEVKITPRO=/path/to/devkitpro # replace this by your actual path
export DEVKITPPC=$DEVKITPRO/devkitPPC
PATH=$PATH:$DEVKITPPC/bin
PATH=$PATH:$DEVKITPRO/wiiload/lin32
  • Optionally, find out your Wii's IP with the homebrew channel and add
export WIILOAD=tcp:192.168.1.5 # replace this by your Wii's IP
  • Restart your terminal or type
source ~/.bashrc

Compiling a Hello World

  • Enter devkitpro/wii-examples/template and simply type
make
  • To run the example on your Wii, start the homebrew channel and type
make run

(To make this work, you should have the folder with wiiload in your $PATH)

Voilà! You just compiled your first Wii program!

Compiling Insight Debugger

A custom version of the Insight graphical debugger is included as part of the DevkitPro package, however currently there are no linux binaries available. In order to successfully compile the source under linux, you need to run the following sequence of commands from the directory where you unpacked the source:

for f in `find`; do; dos2unix ${f}; done
./configure --target=powerpc-gekko
make
make install prefix=/directory/to/install/to

Using DDD (GNU Data Display Debugger)

An alternative to Insight is DDD

It has the advantage that you won't have to compile it on linux

For instance to install it on ubuntu just use the following command:

sudo apt-get install ddd

Then you use ddd with powerpc-gecko-gdb with the following:

ddd --debugger path-to-powerpc-gecko-gdb

And finally you can use the console at the bottom to connect to your wii and load the symbols as you would using gdb from the console

For instructions on how to use gdb or insight for remote debugging, see Remote Debugging with GDB

See Also