KallistiOS: DCSetup Script





DCSetup Script

This is pretty raw right now. But it's better than nothing. This is basically a transcript of an email I wrote a group on how to set up the newest KOS and GCC.

First thing to do -- set up Subversion! If you're in Debian Sid, apt-get on 'subversion' and you should be good to go. For Fink on OSX, use 'svn' for fink/apt-get. Everyone else, go here:

http://subversion.tigris.org/project_packages.html

Once that's working make sure you have the 'svn' command in your path (just type it at a shell and see if it gives you "Type 'svn help' for usage."). Change directories to somewhere convenient and check out a copy of KOS with the following:

  svn co http://www.allusion.net/svn/kos/kos
  svn co http://www.allusion.net/svn/kos/kos-ports

This will make the dirs 'kos' and 'kos-ports'. Change to kos and copy doc/environ.sh.sample to environ.sh. You'll need to change the following things in there:

  • Where the compilers are located (same path as in the dc-setup Makefile below)
  • Where your KOS tree is located (the 'kos' dir you checked out above)
  • The compiler prefixes (use "sh-elf" and not "dc")

This environ.sh will become your new environ.sh (use it instead of the old one). For people just getting started rather than upgrading, you need to have environ.sh executed within your current shell each time you want to use KOS. The simplest way to do this is to add something like this to your .bashrc:

. /path/to/kos/environ.sh

Where of course /path/to/kos is the path to your checked out KOS tree. Anyhow...

Next, you'll want to grab Jim Ursetto's build script:

http://3e8.org/hacks/dc/dc-chain-0.1.tgz

Extract that beast somewhere you've got a good amount of disk space (note: do not extract the contents of it to your Cygwin root tree, if you're using Cygwin). Inside there you'll find a Makefile. Edit the top of the Makefile to match the places you want things installed (sh_prefix and arm_prefix), and where you already installed (kos_root). Remove all the files under 'patches' that start with 'kos'; these are not needed for the newest version (which you now have).

Next, download your compiler pieces... this may work with newer versions, but for the sake of simplicity we'll stick with 3.4.1:

ftp://ftp.gnu.org/gnu/gcc/gcc-3.4.1/gcc-3.4.1.tar.gz (or .bz2)
ftp://ftp.gnu.org/gnu/binutils/binutils-2.15.tar.gz (or .bz2)
ftp://sources.redhat.com/pub/newlib/newlib-1.12.0.tar.gz

Unzip/untar all of these archives into the directory with the Makefile mentioned above. You should now have something like this:

dc-chain-0.1/
	Makefile
	binutils-2.15/
	gcc-3.4.1/
	newlib-1.12.0/

Now in that dc-chain-0.1 dir, type make and come back in a while... or a few days depending on your computer ;)

Finally when (if?) your GCC builds ok, change to the 'kos' dir you checked out above and use 'make'. If all goes well, you shouldn't get any errors. Things may not go well in 'utils' but you can mostly ignore that at the moment. If that all looks good, go to 'kos-ports' and do 'make' there as well. Again if all goes well, you have your own custom-built KOS that's easy to update to the latest version and make local changes on. Congrats!



Gamedev Home

KallistiOS

Home
The "Scene"
Download
Documentation (v2.0.0)
Roadmap
Installation
FAQ
Lists/Forums/etc



Hosted by:
SourceForge.net Logo