Last active
December 1, 2022 16:50
-
-
Save WillSams/4b2119b6ba4865b1f13d1b0b393ef173 to your computer and use it in GitHub Desktop.
Dreamcast - sh4 toolchain and KOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DCDEV=/opt/toolchains/dc | |
sudo bash -c "apt-get install -y genisoimage squashfs-tools libpng-dev libjpeg-dev liblzo2-dev" | |
sudo bash -c "mkdir -p $DCDEV/tools/kos" | |
sudo bash -c "chown -R $(id -u):$(id -g) $DCDEV" | |
cd /tmp && git clone https://github.com/LuaDist/tolua.git && cd tolua | |
mkdir build && cd ./build | |
cmake ../ && make && sudo make install | |
cd $DCDEV/tools/kos | |
git clone https://github.com/KallistiOS/kos-ports.git | |
git clone https://github.com/KallistiOS/KallistiOS.git kos && cd kos | |
git clone https://github.com/DC-SWAT/DreamShell.git ds | |
git checkout `cat ds/sdk/doc/KallistiOS.txt` | |
patch -d ./ -p1 < ds/sdk/toolchain/patches/kos.diff | |
cp ds/sdk/toolchain/environ.sh environ.sh | |
ln -nsf `which tolua` ds/sdk/bin/tolua | |
ln -nsf `which mkisofs` ds/sdk/bin/mkisofs | |
ln -nsf `which mksquashfs` ds/sdk/bin/mksquashfs | |
cd utils/dc-chain && cp config.mk.testing.sample config.mk | |
./download.sh && ./unpack.sh && make | |
cd ../../ && source ./environ.sh | |
make && cd ../kos-ports && ./utils/build-all.sh | |
cd ./lib && rm -f libfreetype.a liboggvorbisplay.a libogg.a && cd ../../kos/ds | |
cd ./sdk/bin/src && make && make install && cd ../../../ | |
cp ../lib/dreamcast/libkallisti_exports.a ./sdk/lib/libkos.a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment