-
Notifications
You must be signed in to change notification settings - Fork 127
/
ps3.sh
60 lines (52 loc) · 1.51 KB
/
ps3.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
TOOLCHAIN_URL=https://github.com/andoma/ps3toolchain/tarball/481515bbfbfbe22f775ff5d42095be75eccc7373
TOOLCHAIN_HASH=`echo ${TOOLCHAIN_URL} | sha1sum | awk '{print $1}'`
TOOLCHAIN="${WORKINGDIR}/${TOOLCHAIN_HASH}"
cleanup() {
echo "Cleaning up"
rm -rf ${TOOLCHAIN}.broken
mv ${TOOLCHAIN} ${TOOLCHAIN}.broken
exit 1
}
export PS3DEV=${TOOLCHAIN}/ps3dev
export PSL1GHT=${TOOLCHAIN}/PSL1GHT
export PATH=$PATH:$PS3DEV/bin:$PS3DEV/host/ppu/bin:$PS3DEV/host/spu/bin
export PATH=$PATH:$PSL1GHT/host/bin
echo "Toolchain from: '${TOOLCHAIN_URL}' Local install in: ${TOOLCHAIN}"
if [ -d $TOOLCHAIN ]; then
echo "Toolchain seems to exist"
else
set +e
trap cleanup SIGINT
(
set -eu
mkdir -p ${TOOLCHAIN}
cd ${TOOLCHAIN}
curl -L "${TOOLCHAIN_URL}" | tar xfz -
cd *
PARALLEL=${JARGS} ./toolchain.sh 1 2 3 4 5 11 12
)
STATUS=$?
if [ $STATUS -ne 0 ]; then
echo "Unable to stage toolchain"
cleanup
fi
trap SIGINT
set -e
fi
which ccache >/dev/null
if [ $? -eq 0 ]; then
echo "Using ccache"
ccache -s
USE_CCACHE="--ccache"
else
USE_CCACHE=""
fi
./configure.ps3 --build=${TARGET} \
${RELEASE} \
--cleanbuild \
${USE_CCACHE} \
--downloadcache="${WORKINGDIR}/downloadcache"
make ${JARGS} BUILD=${TARGET} pkg self
artifact build.${TARGET}/showtime.self self application/octect-stream showtime.self
artifact build.${TARGET}/showtime.pkg pkg application/octect-stream showtime.pkg
artifact build.${TARGET}/showtime_geohot.pkg pkg application/octect-stream showtime-gh.pkg