mirror of
https://github.com/scummvm/dockerized-bb.git
synced 2026-05-21 05:40:49 +00:00
PSP: Upgrade to new toolchain from pspdev
This commit is contained in:
+36
-11
@@ -442,7 +442,17 @@ VERSIONS = {
|
||||
'branch': 'master',
|
||||
},
|
||||
|
||||
('./toolchains/psp/packages/toolchain/build.sh', 'TOOLCHAIN'): {
|
||||
('./toolchains/psp/packages/psp-packages/build.sh', 'PSP_PACKAGES'): {
|
||||
'check': 'git commit',
|
||||
'repository': 'https://github.com/pspdev/psp-packages.git',
|
||||
'branch': 'master',
|
||||
},
|
||||
('./toolchains/psp/packages/toolchain/build.sh', 'PSPDEV'): {
|
||||
'check': 'git commit',
|
||||
'repository': 'https://github.com/pspdev/pspdev.git',
|
||||
'branch': 'master',
|
||||
},
|
||||
('./toolchains/psp/packages/toolchain/build.sh', 'PSPTOOLCHAIN'): {
|
||||
'check': 'git commit',
|
||||
'repository': 'https://github.com/pspdev/psptoolchain.git',
|
||||
'branch': 'master',
|
||||
@@ -452,11 +462,6 @@ VERSIONS = {
|
||||
'repository': 'https://github.com/pspdev/pspsdk.git',
|
||||
'branch': 'master',
|
||||
},
|
||||
('./toolchains/psp/packages/toolchain/build.sh', 'NEWLIB'): {
|
||||
'check': 'git commit',
|
||||
'repository': 'https://github.com/pspdev/newlib.git',
|
||||
'branch': 'newlib-1_20_0-PSP',
|
||||
},
|
||||
('./toolchains/psp/packages/toolchain/build.sh', 'PSPLINKUSB'): {
|
||||
'check': 'git commit',
|
||||
'repository': 'https://github.com/pspdev/psplinkusb.git',
|
||||
@@ -467,14 +472,34 @@ VERSIONS = {
|
||||
'repository': 'https://github.com/pspdev/ebootsigner.git',
|
||||
'branch': 'master',
|
||||
},
|
||||
('./toolchains/psp/packages/toolchain/build.sh', 'PSP_PKGCONF'): {
|
||||
('./toolchains/psp/packages/toolchain/build.sh', 'PSPTOOLCHAIN_ALLEGREX'): {
|
||||
'check': 'git commit',
|
||||
'repository': 'https://github.com/pspdev/psp-pkgconf.git',
|
||||
'branch': 'master',
|
||||
'repository': 'https://github.com/pspdev/psptoolchain-allegrex.git',
|
||||
'branch': 'main',
|
||||
},
|
||||
('./toolchains/psp/packages/toolchain/build.sh', 'PSPLIBRARIES'): {
|
||||
('./toolchains/psp/packages/toolchain/build.sh', 'PSPTOOLCHAIN_EXTRA'): {
|
||||
'check': 'git commit',
|
||||
'repository': 'https://github.com/pspdev/psplibraries.git',
|
||||
'repository': 'https://github.com/pspdev/psptoolchain-extra.git',
|
||||
'branch': 'main',
|
||||
},
|
||||
('./toolchains/psp/packages/toolchain/build.sh', 'BINUTILS'): {
|
||||
'check': 'git commit',
|
||||
'repository': 'https://github.com/pspdev/binutils-gdb.git',
|
||||
'branch': 'allegrex-v2.37.0',
|
||||
},
|
||||
('./toolchains/psp/packages/toolchain/build.sh', 'GCC'): {
|
||||
'check': 'git commit',
|
||||
'repository': 'https://github.com/pspdev/gcc.git',
|
||||
'branch': 'allegrex-v9.3.0',
|
||||
},
|
||||
('./toolchains/psp/packages/toolchain/build.sh', 'NEWLIB'): {
|
||||
'check': 'git commit',
|
||||
'repository': 'https://github.com/pspdev/newlib.git',
|
||||
'branch': 'allegrex-v4.1.0',
|
||||
},
|
||||
('./toolchains/psp/packages/toolchain/build.sh', 'PSP_PACMAN'): {
|
||||
'check': 'git commit',
|
||||
'repository': 'https://github.com/pspdev/psp-pacman.git',
|
||||
'branch': 'master',
|
||||
},
|
||||
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
m4_include(`paths.m4')m4_dnl
|
||||
m4_include(`packages.m4')m4_dnl
|
||||
m4_define(`pspdev_package',m4_dnl
|
||||
`m4_define(`PSPDEV_PACKAGES',m4_ifdef(`PSPDEV_PACKAGES',m4_dnl
|
||||
m4_defn(`PSPDEV_PACKAGES')` ',)`$1')')
|
||||
|
||||
m4_dnl Include Debian base preparation steps
|
||||
m4_dnl This ensures all common steps are shared by all toolchains
|
||||
@@ -7,24 +10,34 @@ m4_include(`debian-toolchain-base.m4')m4_dnl
|
||||
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
g++ \
|
||||
build-essential \
|
||||
autoconf \
|
||||
automake \
|
||||
cmake \
|
||||
doxygen \
|
||||
bison \
|
||||
build-essential \
|
||||
ca-certificates \
|
||||
cmake \
|
||||
fakeroot \
|
||||
flex \
|
||||
libncurses5-dev \
|
||||
libreadline-dev \
|
||||
libusb-dev \
|
||||
texinfo \
|
||||
zlib1g-dev \
|
||||
libtool-bin \
|
||||
subversion \
|
||||
g++ \
|
||||
git \
|
||||
tcl \
|
||||
libtool-bin \
|
||||
libarchive-tools \
|
||||
libarchive-dev \
|
||||
libcurl4-openssl-dev \
|
||||
libgmp-dev \
|
||||
libgpgme-dev \
|
||||
libisl-dev \
|
||||
libmpc-dev \
|
||||
libmpfr-dev \
|
||||
libncurses-dev \
|
||||
libreadline-dev \
|
||||
libssl-dev \
|
||||
libusb-dev \
|
||||
zlib1g-dev \
|
||||
python3 \
|
||||
python3-pip \
|
||||
python3-venv \
|
||||
texinfo \
|
||||
unzip \
|
||||
wget && \
|
||||
echo "dash dash/sh boolean false" | debconf-set-selections && \
|
||||
@@ -39,11 +52,42 @@ ENV PREFIX=$PSPDEV/$HOST
|
||||
|
||||
local_package(toolchain)
|
||||
|
||||
# Override config.sub to handle --host=psp properly
|
||||
local_package(automake)
|
||||
ENV AUTOMAKE_LIBDIR=$PSPDEV/share/automake
|
||||
|
||||
pspdev_package(zlib)
|
||||
|
||||
pspdev_package(libpng)
|
||||
|
||||
pspdev_package(jpeg)
|
||||
|
||||
pspdev_package(libmad)
|
||||
|
||||
pspdev_package(libogg)
|
||||
|
||||
pspdev_package(libvorbis)
|
||||
|
||||
pspdev_package(freetype2)
|
||||
|
||||
pspdev_package(sdl2)
|
||||
|
||||
local_package(psp-packages,PSPDEV_PACKAGES)
|
||||
|
||||
# We add PATH here for *-config and platform specific binaries
|
||||
ENV \
|
||||
def_binaries(`${PSPDEV}/bin/${HOST}-', `ar, as, c++filt, ld, nm, objcopy, objdump, ranlib, readelf, strings, strip') \
|
||||
def_binaries(`${PSPDEV}/bin/${HOST}-', `gcc, cpp, c++') \
|
||||
CC=${PSPDEV}/bin/${HOST}-gcc \
|
||||
CFLAGS="-I${PSPDEV}/psp/include -I${PSPDEV}/psp/sdk/include -DPSP -O2 -G0" \
|
||||
CXXFLAGS="-I${PSPDEV}/psp/include -I${PSPDEV}/psp/sdk/include -DPSP -O2 -G0" \
|
||||
LDFLAGS="-L${PSPDEV}/lib -L${PSPDEV}/psp/lib -L${PSPDEV}/psp/sdk/lib -Wl,-zmax-page-size=128" \
|
||||
def_aclocal(`${PREFIX}') \
|
||||
def_pkg_config(`${PREFIX}') \
|
||||
PATH=$PATH:${PSPDEV}/bin:${PREFIX}/bin
|
||||
|
||||
# Keep additional packages to bare minimum because of memory constraints
|
||||
|
||||
helpers_package(giflib,,CFLAGS="${CFLAGS} -fno-PIC")
|
||||
|
||||
helpers_package(fribidi)
|
||||
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
#! /bin/sh
|
||||
|
||||
PACKAGE_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
||||
HELPERS_DIR=$PACKAGE_DIR/../..
|
||||
. $HELPERS_DIR/functions.sh
|
||||
|
||||
do_make_bdir
|
||||
|
||||
mkdir -p "$PSPDEV/share"
|
||||
cp -as "/usr/share/automake"*/ "$PSPDEV/share/automake"
|
||||
|
||||
# Override config.sub to add psp detection
|
||||
cp --remove-destination "$PACKAGE_DIR/config.sub" "$PSPDEV/share/automake"
|
||||
|
||||
do_clean_bdir
|
||||
|
||||
# Cleanup wget HSTS
|
||||
rm -f $HOME/.wget-hsts
|
||||
+1885
File diff suppressed because it is too large
Load Diff
+47
@@ -0,0 +1,47 @@
|
||||
#! /bin/sh
|
||||
|
||||
PSP_PACKAGES_VERSION=cce818b9824b876a0872a3e17e7904a5f7076ec3
|
||||
|
||||
PACKAGE_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
||||
HELPERS_DIR=$PACKAGE_DIR/../..
|
||||
. $HELPERS_DIR/functions.sh
|
||||
|
||||
do_make_bdir
|
||||
|
||||
do_http_fetch psp-packages "https://github.com/pspdev/psp-packages/archive/${PSP_PACKAGES_VERSION}.tar.gz" 'tar xzf'
|
||||
|
||||
# Patch to drop privileges during the build
|
||||
sed -i -e 's|psp-makepkg|su nobody -s /bin/sh -c "env PATH=\"\$PATH:$PSPDEV/bin\" psp-makepkg"|' ./build.sh
|
||||
|
||||
# Give rights to nobody
|
||||
chmod -R go+rwX .
|
||||
|
||||
# Let psp-pacman believe it can do anything
|
||||
chmod o+w "$PSPDEV"
|
||||
|
||||
# To let build.sh find psp-pacman
|
||||
export PATH="$PATH:$PSPDEV/bin"
|
||||
|
||||
# One argument with the whole list
|
||||
MAKEFLAGS="-d -j16" ./build.sh --install "$*"
|
||||
|
||||
# Restore the rights
|
||||
chmod o-w "$PSPDEV"
|
||||
|
||||
# Patch pc files to ensure they have proper paths
|
||||
badprefix="$(pwd)/[^/]\\+/pkg/[^/]\\+/psp"
|
||||
|
||||
PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR:-${PREFIX}/lib/pkgconfig:${PREFIX}/share/pkgconfig}
|
||||
echo "$PKG_CONFIG_LIBDIR" | tr ':' '\n' | while read p; do
|
||||
for f in "$p"/*; do
|
||||
if [ "$f" = "$p/*" -o ! -f "$f" ]; then
|
||||
continue
|
||||
fi
|
||||
sed -i -e "s|${badprefix}|${PREFIX}|" "$f"
|
||||
done
|
||||
done
|
||||
|
||||
do_clean_bdir
|
||||
|
||||
# Cleanup wget HSTS
|
||||
rm -f $HOME/.wget-hsts
|
||||
@@ -1,12 +1,16 @@
|
||||
#! /bin/sh
|
||||
|
||||
TOOLCHAIN_VERSION=1f4b805ce47dfcc6d945d7eb2821b9cd127e709d
|
||||
export PSPSDK_VERSION=da65a39152da65fca9a65dded0b415b57d30a610
|
||||
export NEWLIB_VERSION=f8d6259c204fd0fa76e01926ec4e3e4fe04f6b22
|
||||
export PSPLINKUSB_VERSION=9a9512ed115c3415ac953b64613d53283a75ada9
|
||||
PSPDEV_VERSION=c8317c85be1433dfa286d0b0229fc301ad2f8776
|
||||
export PSPTOOLCHAIN_VERSION=b6c1547ee82eada94dcb07acdcfd7fd40a3f4421
|
||||
export PSPSDK_VERSION=8029a2a210f17210907820782b44122d48369c1c
|
||||
export PSPLINKUSB_VERSION=dbf5b94dd973dc49ee28d596a03c1362bcbce9e3
|
||||
export EBOOTSIGNER_VERSION=10cfbb51ea87adfe02d63dc3a262c8480fdf31e7
|
||||
export PSP_PKGCONF_VERSION=c50b45fd551c08eefebd9cb02edc55887fd68b28
|
||||
export PSPLIBRARIES_VERSION=5b19a6454ea6cbd0d3c76a5aac9e28ce610b4553
|
||||
export PSPTOOLCHAIN_ALLEGREX_VERSION=11942d2a69c9e96e9e1465b315488b0ffb4df819
|
||||
export PSPTOOLCHAIN_EXTRA_VERSION=39bc74ae8717aee143eead9065d1bcf48bc1f021
|
||||
export BINUTILS_VERSION=07399ead1c4827b81ff71673796887d59c9355bd
|
||||
export GCC_VERSION=0049612a76e8f44b9c21646cb90ca4bad8f4aff3
|
||||
export NEWLIB_VERSION=dd3c854d70d2a0b4293569433d262c9ade4d60a0
|
||||
export PSP_PACMAN_VERSION=23e6b9389626a32336063e90c486aa4db73a74d7
|
||||
|
||||
PACKAGE_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
||||
HELPERS_DIR=$PACKAGE_DIR/../..
|
||||
@@ -14,18 +18,23 @@ HELPERS_DIR=$PACKAGE_DIR/../..
|
||||
|
||||
do_make_bdir
|
||||
|
||||
do_http_fetch psptoolchain "https://github.com/pspdev/psptoolchain/archive/${TOOLCHAIN_VERSION}.tar.gz" 'tar xzf'
|
||||
do_http_fetch pspdev "https://github.com/pspdev/pspdev/archive/${PSPDEV_VERSION}.tar.gz" 'tar xzf'
|
||||
|
||||
# export PATH to please toolchain.sh
|
||||
# Don't install packages (yet)
|
||||
rm -f scripts/*-psp-packages.sh
|
||||
|
||||
# export PATH to please the toolchain.sh
|
||||
export PATH=$PATH:$PSPDEV/bin
|
||||
# export ACLOCAL_PATH for SDL aclocal macros (avoids installation of libsdl on host)
|
||||
export ACLOCAL_PATH=$PREFIX/share/aclocal:$ACLOCAL_PATH
|
||||
|
||||
# We use this variable in the patches
|
||||
export PACKAGE_DIR
|
||||
# Use -e to stop on error
|
||||
# Don't write environment variables to profile.d (like in toolchain-local.sh)
|
||||
bash -e ./toolchain.sh $(seq 1 12)
|
||||
bash -e ./build-all.sh
|
||||
|
||||
do_clean_bdir
|
||||
|
||||
# Cleanup wget HSTS
|
||||
rm -f $HOME/.wget-hsts
|
||||
|
||||
# Remove pip cache
|
||||
rm -rf $HOME/.cache
|
||||
|
||||
@@ -1,104 +1,96 @@
|
||||
diff --git a/common.sh b/common.sh
|
||||
index a01f3a6..cc6c06e 100755
|
||||
--- a/common.sh
|
||||
+++ b/common.sh
|
||||
@@ -74,5 +74,7 @@ function clone_git_repo
|
||||
# or it was nuked due to being corrupted. Clone and track master, please.
|
||||
# Attempt to clone over SSH if possible, use anonymous HTTP as fallback.
|
||||
# Set SSH_ASKPASS and stdin(<) to prevent it from freezing to ask for auth.
|
||||
- [ -d $repo ] || SSH_ASKPASS=false git clone --recursive --depth 1 -b $branch git@$host:$user/$repo.git $repo < /dev/null || SSH_ASKPASS=false git clone --recursive --depth 1 -b $branch https://$host/$user/$repo.git $repo < /dev/null || return 1
|
||||
+ [ -d $repo ] || SSH_ASKPASS=false git clone --recursive git@$host:$user/$repo.git $repo < /dev/null || SSH_ASKPASS=false git clone --recursive https://$host/$user/$repo.git $repo < /dev/null || return 1
|
||||
diff --git a/scripts/001-psptoolchain.sh b/scripts/001-psptoolchain.sh
|
||||
index 732e96a..babb6f8 100755
|
||||
--- a/scripts/001-psptoolchain.sh
|
||||
+++ b/scripts/001-psptoolchain.sh
|
||||
@@ -4,12 +4,16 @@
|
||||
## Download the source code.
|
||||
REPO_URL="https://github.com/pspdev/psptoolchain"
|
||||
REPO_FOLDER="psptoolchain"
|
||||
-BRANCH_NAME="master"
|
||||
-if test ! -d "$REPO_FOLDER"; then
|
||||
- git clone --depth 1 -b $BRANCH_NAME $REPO_URL && cd $REPO_FOLDER || { exit 1; }
|
||||
-else
|
||||
- cd $REPO_FOLDER && git fetch origin && git reset --hard origin/${BRANCH_NAME} || { exit 1; }
|
||||
-fi
|
||||
+
|
||||
+ git -C $repo checkout $branch
|
||||
}
|
||||
diff --git a/scripts/003-pspsdk-stage1.sh b/scripts/003-pspsdk-stage1.sh
|
||||
index a0a77e9..ed407ed 100755
|
||||
--- a/scripts/003-pspsdk-stage1.sh
|
||||
+++ b/scripts/003-pspsdk-stage1.sh
|
||||
@@ -5,7 +5,7 @@
|
||||
set -e
|
||||
+mkdir "$REPO_FOLDER" && cd "$REPO_FOLDER"
|
||||
+git init
|
||||
+git remote add origin "$REPO_URL"
|
||||
+git fetch --depth 1 origin "$PSPTOOLCHAIN_VERSION"
|
||||
+git checkout FETCH_HEAD
|
||||
+
|
||||
+for p in "$PACKAGE_DIR/$REPO_FOLDER-patches"/*; do
|
||||
+ patch -p1 < "$p"
|
||||
+done
|
||||
|
||||
## Download the source code if it does not already exist.
|
||||
- clone_git_repo github.com pspdev pspsdk
|
||||
+ clone_git_repo github.com pspdev pspsdk "$PSPSDK_VERSION"
|
||||
## Build and install.
|
||||
./toolchain.sh || { exit 1; }
|
||||
diff --git a/scripts/002-pspsdk.sh b/scripts/002-pspsdk.sh
|
||||
index 629f3ac..fe11891 100755
|
||||
--- a/scripts/002-pspsdk.sh
|
||||
+++ b/scripts/002-pspsdk.sh
|
||||
@@ -4,12 +4,12 @@
|
||||
## Download the source code.
|
||||
REPO_URL="https://github.com/pspdev/pspsdk"
|
||||
REPO_FOLDER="pspsdk"
|
||||
-BRANCH_NAME="master"
|
||||
-if test ! -d "$REPO_FOLDER"; then
|
||||
- git clone --depth 1 -b $BRANCH_NAME $REPO_URL && cd $REPO_FOLDER || { exit 1; }
|
||||
-else
|
||||
- cd $REPO_FOLDER && git fetch origin && git reset --hard origin/${BRANCH_NAME} || { exit 1; }
|
||||
-fi
|
||||
+
|
||||
+mkdir "$REPO_FOLDER" && cd "$REPO_FOLDER"
|
||||
+git init
|
||||
+git remote add origin "$REPO_URL"
|
||||
+git fetch --depth 1 origin "$PSPSDK_VERSION"
|
||||
+git checkout FETCH_HEAD
|
||||
|
||||
## Enter the source directory.
|
||||
cd pspsdk
|
||||
diff --git a/scripts/004-newlib-1.20.0.sh b/scripts/004-newlib-1.20.0.sh
|
||||
index cb5e1c0..ee5f2ac 100755
|
||||
--- a/scripts/004-newlib-1.20.0.sh
|
||||
+++ b/scripts/004-newlib-1.20.0.sh
|
||||
@@ -5,7 +5,7 @@
|
||||
set -e
|
||||
## Determine the maximum number of processes that Make can work with.
|
||||
PROC_NR=$(getconf _NPROCESSORS_ONLN)
|
||||
diff --git a/scripts/004-psplinkusb-extra.sh b/scripts/004-psplinkusb-extra.sh
|
||||
index df7bce4..2dc9058 100755
|
||||
--- a/scripts/004-psplinkusb-extra.sh
|
||||
+++ b/scripts/004-psplinkusb-extra.sh
|
||||
@@ -4,12 +4,12 @@
|
||||
## Download the source code.
|
||||
REPO_URL="https://github.com/pspdev/psplinkusb"
|
||||
REPO_FOLDER="psplinkusb"
|
||||
-BRANCH_NAME="master"
|
||||
-if test ! -d "$REPO_FOLDER"; then
|
||||
- git clone --depth 1 -b $BRANCH_NAME $REPO_URL && cd $REPO_FOLDER || { exit 1; }
|
||||
-else
|
||||
- cd $REPO_FOLDER && git fetch origin && git reset --hard origin/${BRANCH_NAME} || { exit 1; }
|
||||
-fi
|
||||
+
|
||||
+mkdir "$REPO_FOLDER" && cd "$REPO_FOLDER"
|
||||
+git init
|
||||
+git remote add origin "$REPO_URL"
|
||||
+git fetch --depth 1 origin "$PSPLINKUSB_VERSION"
|
||||
+git checkout FETCH_HEAD
|
||||
|
||||
## Download the source code if it does not already exist.
|
||||
-clone_git_repo github.com pspdev newlib newlib-1_20_0-PSP
|
||||
+clone_git_repo github.com pspdev newlib "$NEWLIB_VERSION"
|
||||
## Determine the maximum number of processes that Make can work with.
|
||||
PROC_NR=$(getconf _NPROCESSORS_ONLN)
|
||||
diff --git a/scripts/005-ebootsigner-extra.sh b/scripts/005-ebootsigner-extra.sh
|
||||
index c6aff68..c79f456 100755
|
||||
--- a/scripts/005-ebootsigner-extra.sh
|
||||
+++ b/scripts/005-ebootsigner-extra.sh
|
||||
@@ -4,12 +4,12 @@
|
||||
## Download the source code.
|
||||
REPO_URL="https://github.com/pspdev/ebootsigner"
|
||||
REPO_FOLDER="ebootsigner"
|
||||
-BRANCH_NAME="master"
|
||||
-if test ! -d "$REPO_FOLDER"; then
|
||||
- git clone --depth 1 -b $BRANCH_NAME $REPO_URL && cd $REPO_FOLDER || { exit 1; }
|
||||
-else
|
||||
- cd $REPO_FOLDER && git fetch origin && git reset --hard origin/${BRANCH_NAME} || { exit 1; }
|
||||
-fi
|
||||
+
|
||||
+mkdir "$REPO_FOLDER" && cd "$REPO_FOLDER"
|
||||
+git init
|
||||
+git remote add origin "$REPO_URL"
|
||||
+git fetch --depth 1 origin "$EBOOTSIGNER_VERSION"
|
||||
+git checkout FETCH_HEAD
|
||||
|
||||
## Enter the source directory
|
||||
cd newlib
|
||||
diff --git a/scripts/006-pspsdk-stage2.sh b/scripts/006-pspsdk-stage2.sh
|
||||
index 1c5b589..de19769 100755
|
||||
--- a/scripts/006-pspsdk-stage2.sh
|
||||
+++ b/scripts/006-pspsdk-stage2.sh
|
||||
@@ -5,7 +5,7 @@
|
||||
set -e
|
||||
|
||||
## Download the source code if it does not already exist.
|
||||
- clone_git_repo github.com pspdev pspsdk
|
||||
+ clone_git_repo github.com pspdev pspsdk "$PSPSDK_VERSION"
|
||||
|
||||
## Enter the source directory.
|
||||
cd pspsdk
|
||||
diff --git a/scripts/009-psplinkusb.sh b/scripts/009-psplinkusb.sh
|
||||
index dafe84e..c79d929 100755
|
||||
--- a/scripts/009-psplinkusb.sh
|
||||
+++ b/scripts/009-psplinkusb.sh
|
||||
@@ -5,7 +5,7 @@
|
||||
set -e
|
||||
|
||||
## Download the source code if it does not already exist
|
||||
- clone_git_repo github.com pspdev psplinkusb
|
||||
+ clone_git_repo github.com pspdev psplinkusb "$PSPLINKUSB_VERSION"
|
||||
|
||||
## Enter the source directory
|
||||
cd psplinkusb
|
||||
diff --git a/scripts/010-ebootsigner.sh b/scripts/010-ebootsigner.sh
|
||||
index 76ce142..8063588 100755
|
||||
--- a/scripts/010-ebootsigner.sh
|
||||
+++ b/scripts/010-ebootsigner.sh
|
||||
@@ -6,7 +6,7 @@
|
||||
set -e
|
||||
|
||||
## Download the source code if it does not already exist.
|
||||
- clone_git_repo github.com pspdev ebootsigner
|
||||
+ clone_git_repo github.com pspdev ebootsigner "$EBOOTSIGNER_VERSION"
|
||||
|
||||
## Enter the source directory.
|
||||
cd ebootsigner
|
||||
diff --git a/scripts/011-psp-pkg-config.sh b/scripts/011-psp-pkg-config.sh
|
||||
index 38702a6..463e9c4 100755
|
||||
--- a/scripts/011-psp-pkg-config.sh
|
||||
+++ b/scripts/011-psp-pkg-config.sh
|
||||
@@ -5,7 +5,7 @@
|
||||
set -e
|
||||
|
||||
# Download the source code.
|
||||
-clone_git_repo github.com pspdev psp-pkgconf
|
||||
+clone_git_repo github.com pspdev psp-pkgconf "$PSP_PKGCONF_VERSION"
|
||||
|
||||
# Enter the source directory.
|
||||
cd psp-pkgconf
|
||||
diff --git a/scripts/012-psplibraries.sh b/scripts/012-psplibraries.sh
|
||||
index be0f1f0..b9d4e94 100755
|
||||
--- a/scripts/012-psplibraries.sh
|
||||
+++ b/scripts/012-psplibraries.sh
|
||||
@@ -9,7 +9,7 @@
|
||||
set -e
|
||||
|
||||
## Download the source code.
|
||||
- clone_git_repo github.com pspdev psplibraries
|
||||
+ clone_git_repo github.com pspdev psplibraries "$PSPLIBRARIES_VERSION"
|
||||
|
||||
## Enter the source directory.
|
||||
cd psplibraries
|
||||
## Determine the maximum number of processes that Make can work with.
|
||||
PROC_NR=$(getconf _NPROCESSORS_ONLN)
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
diff --git a/depends/check-dependencies.sh b/depends/check-dependencies.sh
|
||||
index e873a74..a27c6a1 100755
|
||||
--- a/depends/check-dependencies.sh
|
||||
+++ b/depends/check-dependencies.sh
|
||||
@@ -53,12 +53,12 @@ if [ "$(uname)" == "Darwin" ]; then
|
||||
header_paths+=("`xcrun --show-sdk-path`/usr/include")
|
||||
fi
|
||||
|
||||
-check_header libelf elf.h libelf.h libelf/libelf.h gelf.h libelf/gelf.h
|
||||
+#check_header libelf elf.h libelf.h libelf/libelf.h gelf.h libelf/gelf.h
|
||||
check_header libusb usb.h
|
||||
check_header ncurses ncurses.h ncurses/ncurses.h
|
||||
check_header zlib zlib.h
|
||||
-check_header libcurl curl/curl.h
|
||||
-check_header gpgme gpgme.h
|
||||
+#check_header libcurl curl/curl.h
|
||||
+#check_header gpgme gpgme.h
|
||||
|
||||
check_program git
|
||||
check_program svn
|
||||
@@ -75,7 +75,7 @@ check_program cmake
|
||||
check_program make
|
||||
check_program gcc
|
||||
check_program g++
|
||||
-check_program m4
|
||||
+#check_program m4
|
||||
|
||||
check_program bison
|
||||
check_program flex
|
||||
@@ -86,7 +86,7 @@ check_program which
|
||||
check_program makeinfo
|
||||
check_program doxygen
|
||||
|
||||
-check_program python3
|
||||
+#check_program python3
|
||||
|
||||
# Sometimes things will be a little different on Mac OS X...
|
||||
if [ "$(uname)" == "Darwin" ]; then
|
||||
@@ -107,8 +107,8 @@ if [ "$(uname)" == "Darwin" ]; then
|
||||
# the one comes along with OS X.
|
||||
check_program glibtoolize
|
||||
else
|
||||
- check_header libarchive archive.h
|
||||
- check_header libssl openssl/ssl.h
|
||||
+# check_header libarchive archive.h
|
||||
+# check_header libssl openssl/ssl.h
|
||||
check_header readline readline.h readline/readline.h
|
||||
check_program libtoolize
|
||||
fi
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
diff --git a/scripts/002-psp-pacman.sh b/scripts/002-psp-pacman.sh
|
||||
index 2bc237f..8616834 100755
|
||||
--- a/scripts/002-psp-pacman.sh
|
||||
+++ b/scripts/002-psp-pacman.sh
|
||||
@@ -4,12 +4,12 @@
|
||||
## Download the source code.
|
||||
REPO_URL="https://github.com/pspdev/psp-pacman"
|
||||
REPO_FOLDER="psp-pacman"
|
||||
-BRANCH_NAME="master"
|
||||
-if test ! -d "$REPO_FOLDER"; then
|
||||
- git clone --depth 1 -b $BRANCH_NAME $REPO_URL && cd $REPO_FOLDER || { exit 1; }
|
||||
-else
|
||||
- cd $REPO_FOLDER && git fetch origin && git reset --hard origin/${BRANCH_NAME} || { exit 1; }
|
||||
-fi
|
||||
+
|
||||
+mkdir "$REPO_FOLDER" && cd "$REPO_FOLDER"
|
||||
+git init
|
||||
+git remote add origin "$REPO_URL"
|
||||
+git fetch --depth 1 origin "$PSP_PACMAN_VERSION"
|
||||
+git checkout FETCH_HEAD
|
||||
|
||||
## Determine the maximum number of processes that Make can work with.
|
||||
PROC_NR=$(getconf _NPROCESSORS_ONLN)
|
||||
@@ -0,0 +1,88 @@
|
||||
diff --git a/scripts/001-binutils.sh b/scripts/001-binutils.sh
|
||||
index f9a21a0..042b722 100755
|
||||
--- a/scripts/001-binutils.sh
|
||||
+++ b/scripts/001-binutils.sh
|
||||
@@ -4,12 +4,12 @@
|
||||
## Download the source code.
|
||||
REPO_URL="https://github.com/pspdev/binutils-gdb.git"
|
||||
REPO_FOLDER="binutils-gdb"
|
||||
-BRANCH_NAME="allegrex-v2.37.0"
|
||||
-if test ! -d "$REPO_FOLDER"; then
|
||||
- git clone --depth 1 -b $BRANCH_NAME $REPO_URL $REPO_FOLDER && cd $REPO_FOLDER || { exit 1; }
|
||||
-else
|
||||
- cd $REPO_FOLDER && git fetch origin && git reset --hard origin/${BRANCH_NAME} || { exit 1; }
|
||||
-fi
|
||||
+
|
||||
+mkdir "$REPO_FOLDER" && cd "$REPO_FOLDER"
|
||||
+git init
|
||||
+git remote add origin "$REPO_URL"
|
||||
+git fetch --depth 1 origin "$BINUTILS_VERSION"
|
||||
+git checkout FETCH_HEAD
|
||||
|
||||
TARGET="psp"
|
||||
TARG_XTRA_OPTS=""
|
||||
diff --git a/scripts/002-gcc-stage1.sh b/scripts/002-gcc-stage1.sh
|
||||
index 9a11c50..d8e6eca 100755
|
||||
--- a/scripts/002-gcc-stage1.sh
|
||||
+++ b/scripts/002-gcc-stage1.sh
|
||||
@@ -4,12 +4,12 @@
|
||||
## Download the source code.
|
||||
REPO_URL="https://github.com/pspdev/gcc.git"
|
||||
REPO_FOLDER="gcc"
|
||||
-BRANCH_NAME="allegrex-v9.3.0"
|
||||
-if test ! -d "$REPO_FOLDER"; then
|
||||
- git clone --depth 1 -b $BRANCH_NAME $REPO_URL $REPO_FOLDER && cd $REPO_FOLDER || { exit 1; }
|
||||
-else
|
||||
- cd $REPO_FOLDER && git fetch origin && git reset --hard origin/${BRANCH_NAME} || { exit 1; }
|
||||
-fi
|
||||
+
|
||||
+mkdir "$REPO_FOLDER" && cd "$REPO_FOLDER"
|
||||
+git init
|
||||
+git remote add origin "$REPO_URL"
|
||||
+git fetch --depth 1 origin "$GCC_VERSION"
|
||||
+git checkout FETCH_HEAD
|
||||
|
||||
TARGET="psp"
|
||||
OSVER=$(uname)
|
||||
diff --git a/scripts/003-newlib.sh b/scripts/003-newlib.sh
|
||||
index e30a362..6e2b4f3 100755
|
||||
--- a/scripts/003-newlib.sh
|
||||
+++ b/scripts/003-newlib.sh
|
||||
@@ -4,12 +4,12 @@
|
||||
## Download the source code.
|
||||
REPO_URL="https://github.com/pspdev/newlib.git"
|
||||
REPO_FOLDER="newlib"
|
||||
-BRANCH_NAME="allegrex-v4.1.0"
|
||||
-if test ! -d "$REPO_FOLDER"; then
|
||||
- git clone --depth 1 -b $BRANCH_NAME $REPO_URL && cd $REPO_FOLDER || { exit 1; }
|
||||
-else
|
||||
- cd $REPO_FOLDER && git fetch origin && git reset --hard origin/${BRANCH_NAME} && git checkout ${BRANCH_NAME} || { exit 1; }
|
||||
-fi
|
||||
+
|
||||
+mkdir "$REPO_FOLDER" && cd "$REPO_FOLDER"
|
||||
+git init
|
||||
+git remote add origin "$REPO_URL"
|
||||
+git fetch --depth 1 origin "$NEWLIB_VERSION"
|
||||
+git checkout FETCH_HEAD
|
||||
|
||||
TARGET="psp"
|
||||
|
||||
diff --git a/scripts/004-gcc-stage2.sh b/scripts/004-gcc-stage2.sh
|
||||
index 3a5dca3..f9abe8e 100755
|
||||
--- a/scripts/004-gcc-stage2.sh
|
||||
+++ b/scripts/004-gcc-stage2.sh
|
||||
@@ -4,12 +4,8 @@
|
||||
## Download the source code.
|
||||
REPO_URL="https://github.com/pspdev/gcc.git"
|
||||
REPO_FOLDER="gcc"
|
||||
-BRANCH_NAME="allegrex-v9.3.0"
|
||||
-if test ! -d "$REPO_FOLDER"; then
|
||||
- git clone --depth 1 -b $BRANCH_NAME $REPO_URL && cd $REPO_FOLDER || { exit 1; }
|
||||
-else
|
||||
- cd $REPO_FOLDER && git fetch origin && git reset --hard origin/${BRANCH_NAME} || { exit 1; }
|
||||
-fi
|
||||
+
|
||||
+cd $REPO_FOLDER
|
||||
|
||||
TARGET="psp"
|
||||
OSVER=$(uname)
|
||||
@@ -0,0 +1,56 @@
|
||||
diff --git a/scripts/001-allegrex.sh b/scripts/001-allegrex.sh
|
||||
index 096b094..47ec86e 100755
|
||||
--- a/scripts/001-allegrex.sh
|
||||
+++ b/scripts/001-allegrex.sh
|
||||
@@ -5,14 +5,15 @@
|
||||
REPO_URL="https://github.com/pspdev/psptoolchain-allegrex"
|
||||
REPO_FOLDER="psptoolchain-allegrex"
|
||||
|
||||
-# Checking if a specific TAG has been selected, it is passed using parameter $1
|
||||
-[ -z "$1" ] && REPO_REFERENCE="main" || REPO_REFERENCE=$1
|
||||
-echo "Using repo reference $REPO_REFERENCE"
|
||||
+mkdir "$REPO_FOLDER" && cd "$REPO_FOLDER"
|
||||
+git init
|
||||
+git remote add origin "$REPO_URL"
|
||||
+git fetch --depth 1 origin "$PSPTOOLCHAIN_ALLEGREX_VERSION"
|
||||
+git checkout FETCH_HEAD
|
||||
|
||||
-if test ! -d "$REPO_FOLDER"; then
|
||||
- git clone $REPO_URL -b "${REPO_REFERENCE}" || exit 1
|
||||
-fi
|
||||
-cd "$REPO_FOLDER" && git fetch origin && git reset --hard "origin/${REPO_REFERENCE}" && git checkout "${REPO_REFERENCE}" || exit 1
|
||||
+for p in "$PACKAGE_DIR/$REPO_FOLDER-patches"/*; do
|
||||
+ patch -p1 < "$p"
|
||||
+done
|
||||
|
||||
## Build and install.
|
||||
./toolchain.sh || { exit 1; }
|
||||
diff --git a/scripts/002-extra.sh b/scripts/002-extra.sh
|
||||
index ab89aee..5d5ec20 100755
|
||||
--- a/scripts/002-extra.sh
|
||||
+++ b/scripts/002-extra.sh
|
||||
@@ -5,14 +5,15 @@
|
||||
REPO_URL="https://github.com/pspdev/psptoolchain-extra"
|
||||
REPO_FOLDER="psptoolchain-extra"
|
||||
|
||||
-# Checking if a specific TAG has been selected, it is passed using parameter $1
|
||||
-[ -z "$1" ] && REPO_REFERENCE="main" || REPO_REFERENCE=$1
|
||||
-echo "Using repo reference $REPO_REFERENCE"
|
||||
+mkdir "$REPO_FOLDER" && cd "$REPO_FOLDER"
|
||||
+git init
|
||||
+git remote add origin "$REPO_URL"
|
||||
+git fetch --depth 1 origin "$PSPTOOLCHAIN_EXTRA_VERSION"
|
||||
+git checkout FETCH_HEAD
|
||||
|
||||
-if test ! -d "$REPO_FOLDER"; then
|
||||
- git clone $REPO_URL -b "${REPO_REFERENCE}" || exit 1
|
||||
-fi
|
||||
-cd "$REPO_FOLDER" && git fetch origin && git reset --hard "origin/${REPO_REFERENCE}" && git checkout "${REPO_REFERENCE}" || exit 1
|
||||
+for p in "$PACKAGE_DIR/$REPO_FOLDER-patches"/*; do
|
||||
+ patch -p1 < "$p"
|
||||
+done
|
||||
|
||||
## Build and install.
|
||||
-./build-all.sh || { exit 1; }
|
||||
\ No newline at end of file
|
||||
+./build-all.sh || { exit 1; }
|
||||
@@ -7,6 +7,15 @@ m4_include(`debian-builder-base.m4')m4_dnl
|
||||
ENV PSPDEV=/usr/local/pspdev HOST=psp
|
||||
ENV PREFIX=$PSPDEV/$HOST
|
||||
|
||||
# Add libraries needed by toolchain to run
|
||||
# Currently libgmp is already installed so don't add it
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||
libmpc3 \
|
||||
libmpfr6 \
|
||||
libisl23 && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY --from=toolchain $PSPDEV $PSPDEV/
|
||||
|
||||
# We add PATH here for *-config and platform specific binaries
|
||||
@@ -14,6 +23,9 @@ ENV \
|
||||
def_binaries(`${PSPDEV}/bin/${HOST}-', `ar, as, c++filt, ld, nm, objcopy, objdump, ranlib, readelf, strings, strip') \
|
||||
def_binaries(`${PSPDEV}/bin/${HOST}-', `gcc, cpp, c++') \
|
||||
CC=${PSPDEV}/bin/${HOST}-gcc \
|
||||
CFLAGS="-I${PSPDEV}/psp/include -I${PSPDEV}/psp/sdk/include -DPSP -O2 -G0" \
|
||||
CXXFLAGS="-I${PSPDEV}/psp/include -I${PSPDEV}/psp/sdk/include -DPSP -O2 -G0" \
|
||||
LDFLAGS="-L${PSPDEV}/lib -L${PSPDEV}/psp/lib -L${PSPDEV}/psp/sdk/lib -Wl,-zmax-page-size=128" \
|
||||
def_aclocal(`${PREFIX}') \
|
||||
def_pkg_config(`${PREFIX}') \
|
||||
PATH=$PATH:${PSPDEV}/bin:${PREFIX}/bin
|
||||
|
||||
Reference in New Issue
Block a user