/
ps3.sh
79 lines (68 loc) · 1.95 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
build()
{
TOOLCHAIN_URL=https://github.com/andoma/ps3toolchain/tarball/14ebf99358283523bccf7a4ca1cc9970b681daac
TOOLCHAIN_HASH=`echo ${TOOLCHAIN_URL} | sha1sum | awk '{print $1}'`
TOOLCHAIN="${WORKINGDIR}/${TOOLCHAIN_HASH}"
cleanup() {
echo "Cleaning up"
rm -rf ${TOOLCHAIN}
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 ${JOBSARGS} --build=${TARGET} ${RELEASE} --cleanbuild ${USE_CCACHE}
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
}
deps()
{
DISTID=`lsb_release -si`
case "${DISTID}" in
Ubuntu)
if [[ $EUID -ne 0 ]]; then
echo "Build dependencies must be installed as root"
exit 1
fi
apt-get install git-core build-essential autoconf bison flex libelf-dev libtool pkg-config texinfo libncurses5-dev libz-dev python-dev libssl-dev libgmp3-dev ccache zip
;;
*)
echo "Don't know how to install deps on ${DISTID}"
exit 1
;;
esac
}
eval $OP