Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

psplibraries in psptoolchain #18

Merged
merged 23 commits into from

4 participants

@take-cheeze
  • From my experience psplibraries should be included in psptoolchain.
  • 'v' option passed to tar is just annoying.
  • .gitignore for cleaner "git status"
  • Update gcc version.(built fine)
  • Remove version number from script's file name.
  • Git checker, install notification to install psplibraries.
  • Script to build psptoolchain locally.
readme-ubuntu.txt
@@ -2,7 +2,7 @@
## Install the required packages.
sudo apt-get install g++ build-essential autoconf automake bison flex \
libncurses5-dev libreadline-dev libusb-dev texinfo libgmp3-dev \
- libmpfr-dev libelf-dev libmpc-dev subversion
+ libmpfr-dev libelf-dev libmpc-dev mercurial subversion unzip git
@ooPo Owner
ooPo added a note

Can you provide a check script for mercurial?

@WinterMute Collaborator

why do we need mercurial at all?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@ooPo ooPo commented on the diff
readme.txt
@@ -14,7 +14,7 @@
1) Set up your environment by installing the following software:
autoconf, automake, bison, flex, gcc, g++/gcc-c++, libusb-dev, make, ncurses,
- patch, readline, subversion, texinfo, wget, mpc, gmp, libelf, mpfr
+ patch, readline, subversion, texinfo, wget, mpc, gmp, libelf, mpfr, git
@ooPo Owner
ooPo added a note

Mercurial should also be added here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
scripts/005-gcc-stage2.sh
((8 lines not shown))
+ ## Exit on errors
+ set -e
+
+ ## Download the source code.
+ wget --continue ftp://ftp.gnu.org/pub/gnu/gcc/gcc-$GCC_VERSION/gcc-$GCC_VERSION.tar.bz2
+
+ ## Download the library source code.
+ wget --continue ftp://ftp.gmplib.org/pub/gmp-5.0.2/gmp-5.0.2.tar.bz2
+ wget --continue http://www.multiprecision.org/mpc/download/mpc-0.8.2.tar.gz
+ wget --continue http://www.mpfr.org/mpfr-3.1.0/mpfr-3.1.0.tar.bz2
+
+ ## Unpack the source code.
+ rm -Rf gcc-$GCC_VERSION
+ tar xfj gcc-$GCC_VERSION.tar.bz2
+
+ ## Extra step for gdc: unpack and move into gcc
@ooPo Owner
ooPo added a note

What is this cheeze stuff?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@ooPo
Owner

I like the changes, only have these minor comments.

@take-cheeze

I've tried GDC(D in GCC) from @TurkeyMan but it was bit difficult so I'll remove it.
So mercurial and unzip will not be required.

@TurkeyMan

Awww, you removed D :(
What was the major problem? I really wanted to spend more time playing with D on consoles.
Any chance you could work that back in to the script on a command line option?

@WinterMute
Collaborator

Looks like there's far too much cruft in this patchset to even think about merging it in. Removing the verbose options from archive extraction is reasonable, really don't see the need to mess with old versions of tools and libraries or pull in gdc. GDC is incredibly difficult to maintain so I really wouldn't bother until they manage to get it maintained along with FSF upstream - there was talk of that happening for 4.7 not sure if it got anywhere.

@TurkeyMan

It missed 4.7, but it'll be in 4.8, though they've dropped support for GCC <4.6 to do it, which makes me a little concerned for all of these console toolchains :/
Can/will they all be updated to 4.6?

@WinterMute
Collaborator

Assuming you mean 4.8 rather than 4.6 I don't see any particular reason why not.

@TurkeyMan

Well I really meant >= 4.6, but 4.8 is always nice :)
Will it ever actually happen though?

I think the true tragedy is the PS2 toolchain, which seems to be lost to the ages... I still like toying with that machine, one of the more interesting machines ever made.

@ooPo
Owner

With the GDC stuff removed, this pull request is basically:

  • Some cleanup: .gitignore, un-verbose unpacking, build script version number consolidation
  • Adding psplibraries to the build.
  • A leftover check-git.sh and a mention of git in the two readme files.

Remove the leftover stuff and I'd be willing to do the merge, but I will leave the decision up to WinterMute as he's much more active here than I.

@ooPo ooPo merged commit 8c95cf0 into pspdev:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 28, 2011
  1. @take-cheeze

    gdc support

    take-cheeze authored
  2. @take-cheeze

    get code with mercurial

    take-cheeze authored
  3. @take-cheeze

    add forgotten lines

    take-cheeze authored
Commits on Oct 29, 2011
  1. @take-cheeze

    enable d

    take-cheeze authored
  2. @take-cheeze

    remove v option from tar

    take-cheeze authored
  3. @take-cheeze

    use my repository

    take-cheeze authored
  4. @take-cheeze

    get snapshot instead

    take-cheeze authored
  5. @take-cheeze

    disable d

    take-cheeze authored
  6. @take-cheeze
Commits on Nov 1, 2011
  1. @take-cheeze

    add unzip

    take-cheeze authored
  2. @take-cheeze

    add newlib flags

    take-cheeze authored
  3. @take-cheeze
  4. @take-cheeze

    export env

    take-cheeze authored
Commits on Feb 29, 2012
  1. @take-cheeze

    Merge remote-tracking branch 'main_repo/master'

    take-cheeze authored
    Conflicts:
    	scripts/001-binutils-2.22.sh
    	scripts/002-gcc-4.6.2-stage1.sh
    	scripts/004-newlib-1.20.0.sh
    	scripts/005-gcc-4.6.2-stage2.sh
    	scripts/007-gdb-7.3.1.sh
    	scripts/008-insight-6.8.sh
  2. @take-cheeze
  3. @take-cheeze

    disable D

    take-cheeze authored
Commits on Mar 2, 2012
  1. @take-cheeze
  2. @take-cheeze
  3. @take-cheeze

    better toolchain-local.sh

    take-cheeze authored
Commits on Mar 3, 2012
  1. @take-cheeze

    remove gdc related part

    take-cheeze authored
Commits on Mar 24, 2012
  1. @take-cheeze

    add check-libusb

    take-cheeze authored
Commits on Apr 6, 2012
  1. @take-cheeze
Commits on Apr 13, 2012
  1. @take-cheeze

    specify pulling branch

    take-cheeze authored
This page is out of date. Refresh to see the latest.
View
2  .gitignore
@@ -0,0 +1,2 @@
+/build/
+/pspdev/
View
5 depends/check-git.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+# check-git.sh by Takeshi Watanabe (takechi101010@gmail.com)
+
+ ## Check for git.
+ git --version 1> /dev/null || { echo "ERROR: Install git before continuing."; exit 1; }
View
7 depends/check-libusb.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# check-libusb.sh by take-cheeze (takechi101010@gmail.com)
+
+ ls /usr/include/usb.h 1> /dev/null || \
+ ls /usr/local/include/usb.h 1> /dev/null || \
+ ls /opt/local/include/usb.h 1> /dev/null || \
+ { echo "ERROR: Install elf before continuing."; exit 1; }
View
2  readme-ubuntu.txt
@@ -2,7 +2,7 @@
## Install the required packages.
sudo apt-get install g++ build-essential autoconf automake bison flex \
libncurses5-dev libreadline-dev libusb-dev texinfo libgmp3-dev \
- libmpfr-dev libelf-dev libmpc-dev subversion
+ libmpfr-dev libelf-dev libmpc-dev subversion git
## Build and install the toolchain + sdk. A login script will automatically
## be created in /etc/profile.d/ if possible.
View
2  readme.txt
@@ -14,7 +14,7 @@
1) Set up your environment by installing the following software:
autoconf, automake, bison, flex, gcc, g++/gcc-c++, libusb-dev, make, ncurses,
- patch, readline, subversion, texinfo, wget, mpc, gmp, libelf, mpfr
+ patch, readline, subversion, texinfo, wget, mpc, gmp, libelf, mpfr, git
@ooPo Owner
ooPo added a note

Mercurial should also be added here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2) Set the PSPDEV and PATH environmental variables:
View
2  scripts/001-binutils-2.22.sh
@@ -9,7 +9,7 @@
## Unpack the source code.
rm -Rf binutils-2.22
- tar xfvj binutils-2.22.tar.bz2
+ tar xfj binutils-2.22.tar.bz2
## Enter the source directory and patch the source code.
cd binutils-2.22
View
21 scripts/002-gcc-4.6.3-stage1.sh → scripts/002-gcc-stage1.sh
@@ -1,11 +1,14 @@
#!/bin/sh
-# gcc-4.6.2-stage1.sh by Dan Peori (danpeori@oopo.net) customized by yreeen(yreeen@gmail.com)
+# gcc-stage1.sh by Dan Peori (danpeori@oopo.net) customized by yreeen(yreeen@gmail.com)
+
+ ## set gcc version
+ GCC_VERSION=4.6.3
## Exit on errors
set -e
## Download the source code.
- wget --continue ftp://ftp.gnu.org/pub/gnu/gcc/gcc-4.6.3/gcc-4.6.3.tar.bz2
+ wget --continue ftp://ftp.gnu.org/pub/gnu/gcc/gcc-$GCC_VERSION/gcc-$GCC_VERSION.tar.bz2
## Download the library source code.
wget --continue ftp://ftp.gmplib.org/pub/gmp-5.0.2/gmp-5.0.2.tar.bz2
@@ -13,17 +16,17 @@
wget --continue http://www.mpfr.org/mpfr-3.1.0/mpfr-3.1.0.tar.bz2
## Unpack the source code.
- rm -Rf gcc-4.6.3
- tar xfvj gcc-4.6.3.tar.bz2
+ rm -Rf gcc-$GCC_VERSION
+ tar xfj gcc-$GCC_VERSION.tar.bz2
## Enter the source directory and patch the source code.
- cd gcc-4.6.3
- patch -p1 < ../../patches/gcc-4.6.3-PSP.patch
+ cd gcc-$GCC_VERSION
+ patch -p1 < ../../patches/gcc-$GCC_VERSION-PSP.patch
## Unpack the library source code.
- tar xfvj ../gmp-5.0.2.tar.bz2 && ln -s gmp-5.0.2 gmp
- tar xfvz ../mpc-0.8.2.tar.gz && ln -s mpc-0.8.2 mpc
- tar xfvj ../mpfr-3.1.0.tar.bz2 && ln -s mpfr-3.1.0 mpfr
+ tar xfj ../gmp-5.0.2.tar.bz2 && ln -s gmp-5.0.2 gmp
+ tar xfz ../mpc-0.8.2.tar.gz && ln -s mpc-0.8.2 mpc
+ tar xfj ../mpfr-3.1.0.tar.bz2 && ln -s mpfr-3.1.0 mpfr
## Create and enter the build directory.
mkdir build-psp
View
2  scripts/003-pspsdk-stage1.sh
@@ -8,7 +8,7 @@
wget --continue --no-check-certificate https://github.com/pspdev/pspsdk/tarball/master -O pspsdk.tar.gz
## Unpack the source code.
- rm -Rf pspsdk && mkdir pspsdk && tar --strip-components=1 --directory=pspsdk -xvzf pspsdk.tar.gz
+ rm -Rf pspsdk && mkdir pspsdk && tar --strip-components=1 --directory=pspsdk -xzf pspsdk.tar.gz
## Enter the source directory.
cd pspsdk
View
7 scripts/004-newlib-1.20.0.sh
@@ -9,7 +9,7 @@
## Unpack the source code.
rm -Rf newlib-1.20.0
- tar xfvz newlib-1.20.0.tar.gz
+ tar xfz newlib-1.20.0.tar.gz
## Enter the source directory and patch the source code.
cd newlib-1.20.0
@@ -20,7 +20,10 @@
cd build-psp
## Configure the build.
- ../configure --prefix="$PSPDEV" --target="psp"
+ ../configure --prefix="$PSPDEV" --target="psp" \
+ --enable-newlib-iconv \
+ --enable-newlib-multithread \
+ --enable-newlib-mb \
## Compile and install.
make clean
View
23 scripts/005-gcc-4.6.3-stage2.sh → scripts/005-gcc-stage2.sh
@@ -1,11 +1,15 @@
#!/bin/sh
-# gcc-4.6.2-stage2.sh by Dan Peori (danpeori@oopo.net) customized by yreeen (yreeen@gmail.com)
+# gcc-stage2.sh by Dan Peori (danpeori@oopo.net) customized by yreeen (yreeen@gmail.com)
+# gdc support from TurkeyMan( https://github.com/TurkeyMan )
+
+ ## set gcc version
+ GCC_VERSION=4.6.3
## Exit on errors
set -e
## Download the source code.
- wget --continue ftp://ftp.gnu.org/pub/gnu/gcc/gcc-4.6.3/gcc-4.6.3.tar.bz2
+ wget --continue ftp://ftp.gnu.org/pub/gnu/gcc/gcc-$GCC_VERSION/gcc-$GCC_VERSION.tar.bz2
## Download the library source code.
wget --continue ftp://ftp.gmplib.org/pub/gmp-5.0.2/gmp-5.0.2.tar.bz2
@@ -13,23 +17,24 @@
wget --continue http://www.mpfr.org/mpfr-3.1.0/mpfr-3.1.0.tar.bz2
## Unpack the source code.
- rm -Rf gcc-4.6.3
- tar xfvj gcc-4.6.3.tar.bz2
+ rm -Rf gcc-$GCC_VERSION
+ tar xfj gcc-$GCC_VERSION.tar.bz2
## Enter the source directory and patch the source code.
- cd gcc-4.6.3
- patch -p1 < ../../patches/gcc-4.6.3-PSP.patch
+ cd gcc-$GCC_VERSION
+ patch -p1 < ../../patches/gcc-$GCC_VERSION-PSP.patch
## Unpack the library source code.
- tar xfvj ../gmp-5.0.2.tar.bz2 && ln -s gmp-5.0.2 gmp
- tar xfvz ../mpc-0.8.2.tar.gz && ln -s mpc-0.8.2 mpc
- tar xfvj ../mpfr-3.1.0.tar.bz2 && ln -s mpfr-3.1.0 mpfr
+ tar xfj ../gmp-5.0.2.tar.bz2 && ln -s gmp-5.0.2 gmp
+ tar xfz ../mpc-0.8.2.tar.gz && ln -s mpc-0.8.2 mpc
+ tar xfj ../mpfr-3.1.0.tar.bz2 && ln -s mpfr-3.1.0 mpfr
## Create and enter the build directory.
mkdir build-psp
cd build-psp
## Configure the build.
+ ## If you want to build gdc add "d" to --enable-languages option.
../configure --prefix="$PSPDEV" --target="psp" --enable-languages="c,c++" --enable-lto --with-newlib --with-gmp --with-mpfr --enable-cxx-flags="-G0"
## Compile and install.
View
2  scripts/006-pspsdk-stage2.sh
@@ -8,7 +8,7 @@
wget --continue --no-check-certificate https://github.com/pspdev/pspsdk/tarball/master -O pspsdk.tar.gz
## Unpack the source code.
- rm -Rf pspsdk && mkdir pspsdk && tar --strip-components=1 --directory=pspsdk -xvzf pspsdk.tar.gz
+ rm -Rf pspsdk && mkdir pspsdk && tar --strip-components=1 --directory=pspsdk -xzf pspsdk.tar.gz
## Enter the source directory.
cd pspsdk
View
2  scripts/007-gdb-7.3.1.sh
@@ -9,7 +9,7 @@
## Unpack the source code.
rm -Rf gdb-7.3.1
- tar xfvj gdb-7.3.1.tar.bz2
+ tar xfj gdb-7.3.1.tar.bz2
## Enter the source directory and patch the source code.
cd gdb-7.3.1
View
2  scripts/008-insight-6.8.sh
@@ -10,7 +10,7 @@ exit;
## Unpack the source code.
rm -Rf insight-6.8
- tar xfvj insight-6.8.tar.bz2
+ tar xfj insight-6.8.tar.bz2
## Enter the source directory and patch the source code.
cd insight-6.8
View
2  scripts/009-psplinkusb.sh
@@ -8,7 +8,7 @@
wget --continue --no-check-certificate https://github.com/pspdev/psplinkusb/tarball/master -O psplinkusb.tar.gz
## Unpack the source code.
- rm -Rf psplinkusb && mkdir psplinkusb && tar --strip-components=1 --directory=psplinkusb -xvzf psplinkusb.tar.gz
+ rm -Rf psplinkusb && mkdir psplinkusb && tar --strip-components=1 --directory=psplinkusb -xzf psplinkusb.tar.gz
## Enter the source directory.
cd psplinkusb
View
2  scripts/010-ebootsigner.sh
@@ -9,7 +9,7 @@
wget --continue --no-check-certificate https://github.com/int-0/ebootsigner/tarball/master -O ebootsigner.tar.gz
## Unpack the source code.
- rm -Rf ebootsigner && mkdir ebootsigner && tar --strip-components=1 --directory=ebootsigner -xvzf ebootsigner.tar.gz
+ rm -Rf ebootsigner && mkdir ebootsigner && tar --strip-components=1 --directory=ebootsigner -xzf ebootsigner.tar.gz
## Enter the source directory.
cd ebootsigner
View
19 scripts/011-psplibraries.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+# psplibraries.sh by Takeshi Watanabe (takechi101010@gmail.com)
+
+ ## clear CC and CXX
+ unset CC
+ unset CXX
+
+ ## Exit on errors
+ set -e
+
+ ## Download the source code.
+ ls psplibraries 1> /dev/null || git clone https://github.com/pspdev/psplibraries.git
+
+ ## Enter the source directory.
+ cd psplibraries
+ git pull origin master
+
+ ## Configure the build.
+ ./libraries.sh
View
0  scripts/011-profile.sh → scripts/012-profile.sh
File renamed without changes
View
11 toolchain-local.sh
@@ -0,0 +1,11 @@
+export PSPDEV=$(pwd)/pspdev
+export PATH=$PATH:$PSPDEV/bin
+
+## If specific steps were requested...
+if [ $1 ]; then
+ ## Run the requested build scripts.
+ ./toolchain.sh $@
+else
+ ## Run the all build scripts.
+ ./toolchain.sh $(seq 1 11)
+fi
Something went wrong with that request. Please try again.