First, we need to download the appropriate source package:
|
I'm assuming, you'll collect the package sources under ~/Dreamcast/SRC
, so
we can unpack the archive with:
$ cd Dreamcast/BUILD $ bunzip2 -c ../SRC/uClibc-0.9.19.tar.bz2 | \ tar -xv -C . $ cd uClibc-0.9.19
Now, we have to set up some environment variables for getting the correct options in the configuration menu:
$ export TARGET_ARCH=sh $ export NATIVE_CC=gcc $ export CROSS=sh4-linux- $ export KERNEL_SOURCE=/home/christian/Dreamcast\ /KERNEL/linux
If you've logged out meanwhile, you have to set up the correct
$PATH
and $PREFIX
environment settings:
$ export PREFIX=/home/christian/Dreamcast\ /toolchain $ export PATH=$PREFIX/bin:$PATH
Now, we're ready for setting up the Makefile for uClibc:
$ make menuconfig
Please select the following options for running programs compiled against uClibc on your SEGA Dreamcast:
Please check also that the option uClibc development environment is set to:
$PREFIX/$(TARGET)-linux-uclibc
Any option not mentioned in table 4.2 has to be unselected. Now it's time for compiling and installing:
$ make all $ su -c "make install" $ cd ..
You should have a new toolchain located under:
$PREFIX/sh-linux-uclibc/*
These last steps are necessary for compiling the following sources without any errors:
$ unset TARGET_ARCH $ unset NATIVE_CC $ unset CROSS $ unset KERNEL_SOURCE $ export UCLIBC=/home/Dreamcast\ /toolchain/sh-linux-uclibc
Next, it's time for testing our new toolchain.