Chances are that you haven't set up the path for the ARM toolchain properly. You need two cross-compilers to build KOS - one for the Dreamcast's main CPU (the SH-4), and one for the Dreamcast's sound CPU (and ARM7). Unless you're writing your own sound drivers, you'll probably never need the ARM compiler again, but you need it for compiling the sound driver.
Anyway, that guide doesn't actually work properly. It builds GCC 3.4.1, I think, and the ARM from that version of GCC generates apparently broken code. It doesn't build a working sound driver, basically. You need an older version of the ARM cross compiler (GCC 3.0.4) to build KOS.
There's probably not much point in making you download the source code for GCC 3.0.4 and the associated binutils (you have to use an earlier version or it won't work), and it's pointless to make you rebuild the things again anyway. I have instructions on how to do it here, but they're kind of complicated. You may as well use the ones I prepared earlier (compiled under Ubuntu 5.04, but they should work on anything any Linux distro that uses glibc). The ARM toolchain is GCC 3.0.4, and the SH-4 toolchain is GCC 3.4.3.
http://greay.phpwebhosting.com/DC/to...-elf-3.tar.bz2 (2.5MB)
http://greay.phpwebhosting.com/DC/to...-elf-3.tar.bz2 (13.1MB)
Download those (you can use the SH-4 toolchain you already have, if you like - it doesn't really make any difference). Extract them somewhere. I usually use a subdirectory of my home directory, like ~/dreamcast/{arm-elf,sh-elf} but you can use /usr/local if you like.
Grab the latest version of KallistiOS using Subversion:
Code:
svn co http://www.allusion.net/svn/kos/kos
svn co http://www.allusion.net/svn/kos/kos-ports
Or from the latest snapshots:
http://gamedev.allusion.net/svn/snap...050618.tar.bz2
http://gamedev.allusion.net/svn/snap...050618.tar.bz2
Grab them and extract them somewhere. You should now have a kos directory, and a kos-ports directory.
Next step - configure KOS. Find the file kos/doc/environ.sh.sample and copy it to kos/environ.sh then open it in a text editor.
Change this bit to reflect the path to the KOS directory. In my case, that's /home/blackaura/dreamcast/kos
Code:
# KOS main base path
export KOS_BASE="/usr/local/home/bard/prj/svn/kos"
Next, modify this bit to point to wherever you unpacked the sh-elf cross compiler. Make sure you use the sh-elf version, and not the dc version (I have no idea what that's doing in there). Just comment out the first two lines, uncomment the next two, and change the path.
Code:
# Compiler prefixes
export KOS_CC_BASE="/usr/local/dc/dc-elf"
export KOS_CC_PREFIX="dc"
#export KOS_CC_BASE="/usr/local/dc/sh-elf" # DC
#export KOS_CC_PREFIX="sh-elf"
Next, the ARM toolchain. Same deal as before - just change the paths:
Code:
# If you are compiling for DC and have an ARM compiler, use these too.
export DC_ARM_BASE="/usr/local/dc/arm-elf"
export DC_ARM_PREFIX="arm-elf"
Save that. Pop up a console. Go to the kos directory, and type this:
Code:
. ./environ.sh
make
Hopefully, that'll work. If you want all the useful addon libraries that come with KOS (you probably do), go to the kos-ports directory and type "make" there as well to build all of them. It takes much longer than compiling KOS alone.
Once you've done that, you can build the examples by going into the examples directory and typing "make" a lot of them probably won't work, because they haven't been updated in a very long time. If they don't work, just remove them from the makefiles.
Bookmarks