http://dev.oopo.net/files/psptoolchain-20070517.tar.bz2
There's been no changes to the patches, they're the same as you'd get with the current psptoolchain in the subversion repository.
Now for the why.
1) The toolchain script has grown annoying to manage.
2) There's a lot of random stuff added to the script instead of doing things like properly merging patches.
3) Checking dependencies before running is very important - adding more should be easy to do.
So, here's the new-style script:
Code: Select all
#!/bin/sh
# toolchain.sh by Dan Peori (danpeori@oopo.net)
## Create the build directory.
mkdir -p `dirname $0`/build || { echo "ERROR: Could not create the build directory."; exit 1; }
## Enter the build directory.
cd `dirname $0`/build || { echo "ERROR: Could not enter the build directory."; exit 1; }
## Run the depend scripts.
for SCRIPT in `ls ../depends/*.sh | sort`; do $SCRIPT || { echo "$SCRIPT: Failed."; exit 1; } done
## Run the build scripts.
for SCRIPT in `ls ../scripts/*.sh | sort`; do $SCRIPT || { echo "$SCRIPT: Failed."; exit 1; } done
Adding a new dependency check is as simple as adding a new script in the 'depends' directory. Here's what we currently have:
Code: Select all
psptoolchain/depends/check-autoconf.sh
psptoolchain/depends/check-automake.sh
psptoolchain/depends/check-bison.sh
psptoolchain/depends/check-flex.sh
psptoolchain/depends/check-gcc.sh
psptoolchain/depends/check-make.sh
psptoolchain/depends/check-ncurses.sh
psptoolchain/depends/check-patch.sh
psptoolchain/depends/check-pspdev.sh
psptoolchain/depends/check-subversion.sh
psptoolchain/depends/check-texinfo.sh
psptoolchain/depends/check-wget.sh
Code: Select all
#!/bin/sh
# check-make.sh by Dan Peori (danpeori@oopo.net)
## Check for make.
make -v 1> /dev/null || { echo "ERROR: Install make before continuing."; exit 1; }
Build scripts are similar, but are numbered so that they get executed in the correct order:
Code: Select all
psptoolchain/scripts/001-binutils-2.16.1.sh
psptoolchain/scripts/002-gcc-4.1.0-stage1.sh
psptoolchain/scripts/003-pspsdk-stage1.sh
psptoolchain/scripts/004-newlib-1.15.0.sh
psptoolchain/scripts/005-gcc-4.1.0-stage2.sh
psptoolchain/scripts/006-pspsdk-stage2.sh
psptoolchain/scripts/007-gdb-6.4.sh
psptoolchain/scripts/008-insight-6.4.sh
Code: Select all
#!/bin/sh
# binutils-2.16.1.sh by Dan Peori (danpeori@oopo.net)
## Download the source code.
if test ! -f "binutils-2.16.1.tar.bz2"; then
wget ftp://ftp.gnu.org/pub/gnu/binutils/binutils-2.16.1.tar.bz2 || { exit 1; }
fi
## Unpack the source code.
rm -Rf binutils-2.16.1 && tar xfvj binutils-2.16.1.tar.bz2 || { exit 1; }
## Enter the source directory and patch the source code.
cd binutils-2.16.1 && cat ../../patches/binutils-2.16.1-PSP.patch | patch -p1 || { exit 1; }
## Create and enter the build directory.
mkdir build-psp && cd build-psp || { exit 1; }
## Configure the build.
../configure --prefix="$PSPDEV" --target="psp" --enable-install-libbfd || { exit 1; }
## Compile and install.
make clean && make -j 2 && make install && make clean || { exit 1; }
Questions? Comments?