KallistiOS: Setup/Compilation





Intro

So you want to get started, but have no idea how. Well, you are not alone!

If you have no aversion to a simple way to have it pretty much set everything up for you, then visit the DCSetup Script docs. That is by far the most reliable and best way to get this set up. If you are a masochist or just want to know how it works, though...

The basic steps you will need to perform to get a working KOS dev setup are the following:

  1. Compile GCC
  2. Compile Newlib
  3. Compile G++
  4. Pull KOS from Subversion
  5. Setup an environ.sh
  6. Compile KOS
  7. Compile Ports

The first three steps are covered adequately by other tutorials, BUT please read this page before proceeding on one of those.


Getting a working GCC/Newlib

If you'd like an automated setup script, check out Jim Ursetto's setup script here. This is now the recommended way due to the complexity of getting a fully threaded GCC and G++.

Newlib setup is covered here. If you've previously built KOS and want to update from a 1.2.x version to a 1.3.x version, or from a pre-patch-148 1.3.x version, please read it. Otherwise you can skip that.

Here are some links to standard setup tutorials. Maybe one will work for you if you want to go this route. It seems like which one works for people is random. I like the first one best.

Hangar Eleven tutorial
b00b! Getting started guide


Pulling KOS from Subversion

This topic is covered here.

You can also grab a weekly snapshot.


Building an environ.sh

Once you have a KOS tree extracted, figure out its path. This can be done by going to a shell (Cygwin or Linux/*NIX), changing to the dir containing KOS, and using 'pwd' (it'll print something like /home/foo/kos). This path will become your KOS_BASE.

Make a copy of doc/environ.sh.sample into your KOS_BASE. Edit this file with a text editor, and set KOS_BASE to the path from above. Also set KOS_CC_BASE and KOS_CC_PREFIX to match your compiler (generally the defaults are ok). You may also want to set DC_ARM_BASE and DC_ARM_PREFIX if you have the ARM compilers.

You should also edit environ_dreamcast.sh if you've upgraded to a newer compiler version than 3.0.4. Note that versions newer than 3.0.4 are not fully supported unless you go all the way up to 3.4.1. If you use 3.4.1, you can remove "-fno-optimize-sibling-calls".

Make sure environ.sh is executed in any shell you'll do KOS work in. This can be done, for example, by changing to your KOS_BASE dir and using the command ". environ.sh". You can also add this to your ~/.login or similar, though I'm not going to cover that here.


Building KOS

Ok, the big test! Change to your KOS_BASE dir and run make. If all goes well, you should have a successful compile after a while. You may also want to go to the kos-ports dir and compile that.


Building Ports

You should place your ports tree at the same level as your KOS_BASE, to be standard. So for example, you might have ~/dc with your Dreamcast files in it, and then ~/dc/kos for KOS_BASE, and ~/dc/kos-ports for Ports.

Change to your kos-ports base dir and use "ln -s ../kos/addons/Makefile .". This will link the addons Makefile into place, and then "make" should suffice to build everything.


Problems?

Join the KOS development list, and ask any questions there. There are a lot of really helpful people there who are happy to help you out. Really. :)

List info can be found here.



Gamedev Home

KallistiOS

The "Scene"
Download
Installation
FAQ
Lists



Hosted by:
SourceForge.net Logo


Cryptic Allusion Game Dev ©2002,2003,2004 Dan Potter (design and information); all material contained in these pages is copyright by Dan Potter unless explicitly stated otherwise; please see About CA Game Dev for further trademark and copyright info. This site has nothing to do with game mods, piracy, or other illegal or potentially illegal activities. It also has no relation whatsoever to SEGA, Ltd.(tm) It is intended strictly for the use of homebrew developers.