mirror of
https://github.com/ps5-payload-dev/sdk.git
synced 2026-10-22 03:14:55 -05:00
restructure file system layout, deps to clang, cmake etc
This commit is contained in:
1 parent
d98d02786f
commit
dfa42bcfae
1921 files changed
+200
-313
No files matched your search
+10
-26
@@ -1,4 +1,4 @@
|
||||
name: Build SDK
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -23,40 +23,24 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup SDK
|
||||
- name: Setup
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install bash cmake clang-15 lld-15
|
||||
make
|
||||
make DESTDIR=${{ runner.tool_cache }}/ps5-payload-sdk install
|
||||
echo PS5_PAYLOAD_SDK=${{ runner.tool_cache }}/ps5-payload-sdk >> $GITHUB_ENV
|
||||
echo PS5_HOST=ps5 >> $GITHUB_ENV
|
||||
echo PS5_PORT=9020 >> $GITHUB_ENV
|
||||
tar -zcf ps5-payload-sdk.tar.gz -C ${{ runner.tool_cache }}/ps5-payload-sdk .
|
||||
sudo apt install bash socat cmake pkg-config clang-15 lld-15
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
make -C samples/arbitrary_syscall
|
||||
make -C samples/browser
|
||||
make -C samples/hello_sprx
|
||||
make -C samples/hello_stdio
|
||||
make -C samples/hello_world
|
||||
make -C samples/hwinfo
|
||||
make -C samples/list_files
|
||||
make -C samples/mntinfo
|
||||
make -C samples/ps
|
||||
bash samples/hello_cmake/build.sh
|
||||
make
|
||||
make DESTDIR=${{ runner.tool_cache }}/ps5-payload-sdk install
|
||||
tar -zcf ps5-payload-sdk.tar.gz -C ${{ runner.tool_cache }}/ps5-payload-sdk .
|
||||
|
||||
- name: Upload SDK
|
||||
- name: Test
|
||||
run: bash ci.sh
|
||||
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: SDK
|
||||
path: ./ps5-payload-sdk.tar.gz
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload payload
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Payload binaries
|
||||
path: ./**/*.elf
|
||||
if-no-files-found: error
|
||||
@@ -18,7 +18,7 @@ MAKE ?= make
|
||||
DESTDIR ?= /opt/ps5-payload-sdk
|
||||
|
||||
TOPTARGETS := all clean install
|
||||
SUBDIRS := crt sce_stubs host
|
||||
SUBDIRS := crt sce_stubs include host
|
||||
|
||||
$(TOPTARGETS): $(SUBDIRS)
|
||||
|
||||
@@ -27,21 +27,5 @@ $(SUBDIRS):
|
||||
|
||||
.PHONY: $(TOPTARGETS) $(SUBDIRS)
|
||||
|
||||
install: elf_x86_64.x toolchain.cmake toolchain.mk toolchain.sh
|
||||
install -d $(DESTDIR)/ldscripts
|
||||
install elf_x86_64.x $(DESTDIR)/ldscripts
|
||||
|
||||
install -d $(DESTDIR)/cmake
|
||||
install toolchain.cmake $(DESTDIR)/cmake
|
||||
|
||||
install -d $(DESTDIR)/make
|
||||
install toolchain.mk $(DESTDIR)/make
|
||||
|
||||
install -d $(DESTDIR)/shell
|
||||
install toolchain.sh $(DESTDIR)/shell
|
||||
|
||||
cp -r include_bsd/. $(DESTDIR)/sysroot/usr/include
|
||||
cp -r include_ps5/. $(DESTDIR)/sysroot/usr/include/ps5
|
||||
cp -r include_khronos/. $(DESTDIR)/sysroot/usr/include
|
||||
|
||||
install:
|
||||
cp -r samples/. $(DESTDIR)/samples
|
||||
@@ -15,10 +15,14 @@
|
||||
# along with this program; see the file COPYING. If not see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
|
||||
SCRIPTDIR="${BASH_SOURCE[0]}"
|
||||
SCRIPTDIR="$(dirname "${SCRIPTDIR}")"
|
||||
|
||||
export DESTDIR=$(mktemp -d)
|
||||
trap 'rm -rf -- "$DESTDIR"' EXIT
|
||||
|
||||
make clean install || exit 1
|
||||
export PS5_PAYLOAD_SDK=$DESTDIR
|
||||
|
||||
MAKE_SAMPLES=("arbitrary_syscall"
|
||||
"browser"
|
||||
@@ -33,15 +37,15 @@ MAKE_SAMPLES=("arbitrary_syscall"
|
||||
CMAKE_SAMPLES=("hello_cmake"
|
||||
)
|
||||
|
||||
export PS5_PAYLOAD_SDK=$DESTDIR
|
||||
source $PS5_PAYLOAD_SDK/toolchain/prospero.sh
|
||||
|
||||
for SAMPLE in "${MAKE_SAMPLES[@]}"; do
|
||||
make -C samples/$SAMPLE clean all || exit 1
|
||||
${MAKE} -C $PS5_PAYLOAD_SDK/samples/$SAMPLE clean all || exit 1
|
||||
done
|
||||
|
||||
for SAMPLE in "${CMAKE_SAMPLES[@]}"; do
|
||||
cmake -B $DESTDIR/build/$SAMPLE \
|
||||
-DCMAKE_TOOLCHAIN_FILE=$PS5_PAYLOAD_SDK/cmake/toolchain.cmake \
|
||||
samples/$SAMPLE || exit 1
|
||||
make -C $DESTDIR/build/$SAMPLE clean all || exit 1
|
||||
${CMAKE} \
|
||||
-B $PS5_PAYLOAD_SDK/build/$SAMPLE \
|
||||
-S $SCRIPTDIR/samples/$SAMPLE || exit 1
|
||||
${MAKE} -C $PS5_PAYLOAD_SDK/build/$SAMPLE clean all
|
||||
done
|
||||
+4
-4
@@ -16,14 +16,14 @@
|
||||
|
||||
DESTDIR ?= /opt/ps5-payload-sdk
|
||||
|
||||
CCS := clang-18 clang-17 clang-16 clang-15
|
||||
CCS := clang-18 clang-17 clang-16 clang-15 clang
|
||||
CCS := $(foreach CC,$(CCS),$(if $(shell command -v $(CC) 2> /dev/null),$(CC)))
|
||||
CC := $(firstword $(CCS))
|
||||
ifndef CC
|
||||
$(error No suitable compiler found)
|
||||
endif
|
||||
|
||||
LDS := ld.lld-18 ld.lld-17 ld.lld-16 ld.lld-15
|
||||
LDS := ld.lld-18 ld.lld-17 ld.lld-16 ld.lld-15 ld.lld
|
||||
LDS := $(foreach LD,$(LDS),$(if $(shell command -v $(LD) 2> /dev/null),$(LD)))
|
||||
LD := $(firstword $(LDS))
|
||||
ifndef CC
|
||||
@@ -46,5 +46,5 @@ clean:
|
||||
rm -f *.o
|
||||
|
||||
install: crt1.o
|
||||
install -d $(DESTDIR)/sysroot/usr/lib
|
||||
install $^ $(DESTDIR)/sysroot/usr/lib
|
||||
install -d $(DESTDIR)/target/lib
|
||||
install $^ $(DESTDIR)/target/lib
|
||||
+37
-12
@@ -16,22 +16,47 @@
|
||||
|
||||
DESTDIR ?= /opt/ps5-payload-sdk
|
||||
|
||||
TOOLS := prospero-clang \
|
||||
prospero-clang++ \
|
||||
prospero-lld \
|
||||
prospero-objcopy \
|
||||
prospero-ranlib \
|
||||
prospero-ar \
|
||||
prospero-nm \
|
||||
prospero-strip \
|
||||
prospero-pkg-config \
|
||||
prospero-cmake \
|
||||
prospero-deploy
|
||||
TOOLCHAINS := toolchain/prospero.sh \
|
||||
toolchain/prospero.mk \
|
||||
toolchain/prospero.cmake
|
||||
|
||||
TOOLS := bin/cmake-bin-wrapper \
|
||||
bin/llvm-bin-wrapper \
|
||||
bin/llvm-config \
|
||||
bin/prospero-clang \
|
||||
bin/prospero-clang++ \
|
||||
bin/prospero-deploy \
|
||||
bin/prospero-lld \
|
||||
bin/prospero-pkg-config
|
||||
|
||||
LDSCRIPTS := elf_x86_64.x
|
||||
|
||||
all:
|
||||
|
||||
clean:
|
||||
|
||||
install: $(TOOLS)
|
||||
install: install-tools install-symlinks install-ldscripts install-toolchains
|
||||
|
||||
install-ldscripts: $(LDSCRIPTS)
|
||||
install -d $(DESTDIR)/ldscripts
|
||||
install $^ $(DESTDIR)/ldscripts
|
||||
|
||||
install-toolchains: $(TOOLCHAINS)
|
||||
install -d $(DESTDIR)/toolchain
|
||||
install $^ $(DESTDIR)/toolchain
|
||||
|
||||
install-tools: $(TOOLS)
|
||||
install -d $(DESTDIR)/bin
|
||||
install $^ $(DESTDIR)/bin
|
||||
|
||||
install-symlinks:
|
||||
ln -sf llvm-bin-wrapper $(DESTDIR)/bin/llvm-ar
|
||||
ln -sf llvm-bin-wrapper $(DESTDIR)/bin/llvm-nm
|
||||
ln -sf llvm-bin-wrapper $(DESTDIR)/bin/llvm-objcopy
|
||||
ln -sf llvm-bin-wrapper $(DESTDIR)/bin/llvm-ranlib
|
||||
ln -sf llvm-bin-wrapper $(DESTDIR)/bin/llvm-strip
|
||||
ln -sf llvm-bin-wrapper $(DESTDIR)/bin/clang
|
||||
ln -sf llvm-bin-wrapper $(DESTDIR)/bin/clang++
|
||||
ln -sf llvm-bin-wrapper $(DESTDIR)/bin/clang-cpp
|
||||
ln -sf llvm-bin-wrapper $(DESTDIR)/bin/ld.lld
|
||||
ln -sf cmake-bin-wrapper $(DESTDIR)/bin/prospero-cmake
|
||||
Executable → Regular
+8
-4
@@ -15,8 +15,12 @@
|
||||
# along with this program; see the file COPYING. If not see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
|
||||
PS5_PAYLOAD_SDK="${BASH_SOURCE[0]}"
|
||||
PS5_PAYLOAD_SDK="$(dirname "${PS5_PAYLOAD_SDK}")"
|
||||
PS5_PAYLOAD_SDK="${PS5_PAYLOAD_SDK}/.."
|
||||
SCRIPT_PATH="${BASH_SOURCE[0]}"
|
||||
SCRIPT_NAME="$(basename "${SCRIPT_PATH}")"
|
||||
SCRIPT_DIR="$(dirname "${SCRIPT_PATH}")"
|
||||
|
||||
exec cmake -DCMAKE_TOOLCHAIN_FILE=${PS5_PAYLOAD_SDK}/cmake/toolchain.cmake "$@"
|
||||
PS5_PAYLOAD_SDK="${SCRIPT_DIR}/.."
|
||||
TOOLCHAIN="${SCRIPT_NAME::-6}"
|
||||
|
||||
exec cmake \
|
||||
-DCMAKE_TOOLCHAIN_FILE="${SCRIPT_DIR}/../toolchain/${TOOLCHAIN}.cmake" "$@"
|
||||
Executable
+32
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (C) 2024 John Törnblom
|
||||
#
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; see the file COPYING. If not see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
|
||||
SCRIPT_PATH="${BASH_SOURCE[0]}"
|
||||
SCRIPT_NAME="$(basename "${SCRIPT_PATH}")"
|
||||
SCRIPT_DIR="$(dirname "${SCRIPT_PATH}")"
|
||||
|
||||
LLVM_CONFIG="${SCRIPT_DIR}/llvm-config"
|
||||
LLVM_BINDIR=$("${LLVM_CONFIG}" --bindir)
|
||||
|
||||
BIN_PATH="${LLVM_BINDIR}/${SCRIPT_NAME}"
|
||||
if [ -f "${BIN_PATH}" ]; then
|
||||
exec "${BIN_PATH}" "$@"
|
||||
fi
|
||||
|
||||
BIN_NAME=$(echo $SCRIPT_NAME | rev | cut -d'-' -f1 | rev)
|
||||
BIN_PATH="${LLVM_BINDIR}/${BIN_NAME}"
|
||||
exec -a "${SCRIPT_NAME}" "${BIN_PATH}" "$@"
|
||||
@@ -15,18 +15,18 @@
|
||||
# along with this program; see the file COPYING. If not see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
|
||||
PS5_PAYLOAD_SDK="${BASH_SOURCE[0]}"
|
||||
PS5_PAYLOAD_SDK="$(dirname "${PS5_PAYLOAD_SDK}")"
|
||||
PS5_PAYLOAD_SDK="${PS5_PAYLOAD_SDK}/.."
|
||||
if [ -x "$(command -v "${LLVM_CONFIG}")" ]; then
|
||||
exec "${LLVM_CONFIG}"
|
||||
fi
|
||||
|
||||
CANDIDATES=("llvm-ar-18"
|
||||
"llvm-ar-17"
|
||||
"llvm-ar-16"
|
||||
"llvm-ar-15")
|
||||
CANDIDATES=("llvm-config-18"
|
||||
"llvm-config-17"
|
||||
"llvm-config-16"
|
||||
"llvm-config-15")
|
||||
|
||||
for AR in "${CANDIDATES[@]}"; do
|
||||
if [ -x "$(command -v $AR)" ]; then
|
||||
exec $AR $*
|
||||
for LLVM_CONFIG in "${CANDIDATES[@]}"; do
|
||||
if [ -x "$(command -v "${LLVM_CONFIG}")" ]; then
|
||||
exec "${LLVM_CONFIG}" "$@"
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -15,19 +15,17 @@
|
||||
# along with this program; see the file COPYING. If not see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
|
||||
PS5_PAYLOAD_SDK="${BASH_SOURCE[0]}"
|
||||
PS5_PAYLOAD_SDK="$(dirname "${PS5_PAYLOAD_SDK}")"
|
||||
PS5_PAYLOAD_SDK="${PS5_PAYLOAD_SDK}/.."
|
||||
SCRIPT_PATH="${BASH_SOURCE[0]}"
|
||||
SCRIPT_NAME="$(basename "${SCRIPT_PATH}")"
|
||||
SCRIPT_DIR="$(dirname "${SCRIPT_PATH}")"
|
||||
|
||||
CANDIDATES=("llvm-objcopy-18"
|
||||
"llvm-objcopy-17"
|
||||
"llvm-objcopy-16"
|
||||
"llvm-objcopy-15")
|
||||
PS5_PAYLOAD_SDK="${SCRIPT_DIR}/.."
|
||||
|
||||
for OBJCOPY in "${CANDIDATES[@]}"; do
|
||||
if [ -x "$(command -v $OBJCOPY)" ]; then
|
||||
exec $OBJCOPY $*
|
||||
fi
|
||||
done
|
||||
# ensure clang knows where prospero-lld is at
|
||||
export PATH=${SCRIPT_DIR}:$PATH
|
||||
|
||||
exit 1
|
||||
exec -a "${SCRIPT_NAME}" "${SCRIPT_DIR}/clang" \
|
||||
-target x86_64-sie-ps5 \
|
||||
-isysroot "${PS5_PAYLOAD_SDK}" \
|
||||
-fno-stack-protector -fno-plt \
|
||||
"$@"
|
||||
@@ -15,19 +15,17 @@
|
||||
# along with this program; see the file COPYING. If not see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
|
||||
PS5_PAYLOAD_SDK="${BASH_SOURCE[0]}"
|
||||
PS5_PAYLOAD_SDK="$(dirname "${PS5_PAYLOAD_SDK}")"
|
||||
PS5_PAYLOAD_SDK="${PS5_PAYLOAD_SDK}/.."
|
||||
SCRIPT_PATH="${BASH_SOURCE[0]}"
|
||||
SCRIPT_NAME="$(basename "${SCRIPT_PATH}")"
|
||||
SCRIPT_DIR="$(dirname "${SCRIPT_PATH}")"
|
||||
|
||||
CANDIDATES=("llvm-nm-18"
|
||||
"llvm-nm-17"
|
||||
"llvm-nm-16"
|
||||
"llvm-nm-15")
|
||||
PS5_PAYLOAD_SDK="${SCRIPT_DIR}/.."
|
||||
|
||||
for NM in "${CANDIDATES[@]}"; do
|
||||
if [ -x "$(command -v $NM)" ]; then
|
||||
exec $NM $*
|
||||
fi
|
||||
done
|
||||
# ensure clang++ knows where prospero-lld is at
|
||||
export PATH=${SCRIPT_DIR}:$PATH
|
||||
|
||||
exit 1
|
||||
exec -a "${SCRIPT_NAME}" "${SCRIPT_DIR}/clang++" \
|
||||
-target x86_64-sie-ps5 \
|
||||
-isysroot "${PS5_PAYLOAD_SDK}" \
|
||||
-fno-stack-protector -fno-plt \
|
||||
"$@"
|
||||
File renamed without changes.
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (C) 2023 John Törnblom
|
||||
# Copyright (C) 2024 John Törnblom
|
||||
#
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
@@ -15,9 +15,15 @@
|
||||
# along with this program; see the file COPYING. If not see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
|
||||
PS5_PAYLOAD_SDK="${BASH_SOURCE[0]}"
|
||||
PS5_PAYLOAD_SDK="$(dirname "${PS5_PAYLOAD_SDK}")"
|
||||
PS5_PAYLOAD_SDK="${PS5_PAYLOAD_SDK}/.."
|
||||
SCRIPT_PATH="${BASH_SOURCE[0]}"
|
||||
SCRIPT_NAME="$(basename "${SCRIPT_PATH}")"
|
||||
SCRIPT_DIR="$(dirname "${SCRIPT_PATH}")"
|
||||
|
||||
PS5_PAYLOAD_SDK="${SCRIPT_DIR}/.."
|
||||
|
||||
LLVM_CONFIG="${SCRIPT_DIR}/llvm-config"
|
||||
LLVM_BINDIR=$("${LLVM_CONFIG}" --bindir)
|
||||
|
||||
|
||||
LIBKERNEL=-lkernel_web
|
||||
for ARG in "$@"; do
|
||||
@@ -26,21 +32,11 @@ for ARG in "$@"; do
|
||||
fi
|
||||
done
|
||||
|
||||
CANDIDATES=("ld.lld-18"
|
||||
"ld.lld-17"
|
||||
"ld.lld-16"
|
||||
"ld.lld-15")
|
||||
|
||||
for LD in "${CANDIDATES[@]}"; do
|
||||
if [ -x "$(command -v $LD)" ]; then
|
||||
exec $LD \
|
||||
-pie \
|
||||
-z max-page-size=0x4000 \
|
||||
-T "${PS5_PAYLOAD_SDK}/ldscripts/elf_x86_64.x" \
|
||||
-L "${PS5_PAYLOAD_SDK}/sysroot/usr/lib" \
|
||||
-lScePosixForWebKit -lSceLibcInternal "${LIBKERNEL}" $* \
|
||||
"${PS5_PAYLOAD_SDK}/sysroot/usr/lib/crt1.o"
|
||||
fi
|
||||
done
|
||||
|
||||
exit 1
|
||||
BIN_PATH="${LLVM_BINDIR}/ld.lld"
|
||||
exec "${BIN_PATH}" \
|
||||
-pie \
|
||||
-z max-page-size=0x4000 \
|
||||
-T "${PS5_PAYLOAD_SDK}/ldscripts/elf_x86_64.x" \
|
||||
-L "${PS5_PAYLOAD_SDK}/target/lib" \
|
||||
-lScePosixForWebKit -lSceLibcInternal "${LIBKERNEL}" "$@" \
|
||||
"${PS5_PAYLOAD_SDK}/target/lib/crt1.o"
|
||||
@@ -15,17 +15,15 @@
|
||||
# along with this program; see the file COPYING. If not see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
|
||||
PS5_PAYLOAD_SDK="${BASH_SOURCE[0]}"
|
||||
PS5_PAYLOAD_SDK="$(dirname "${PS5_PAYLOAD_SDK}")"
|
||||
PS5_PAYLOAD_SDK="${PS5_PAYLOAD_SDK}/.."
|
||||
SCRIPT_PATH="${BASH_SOURCE[0]}"
|
||||
SCRIPT_NAME="$(basename "${SCRIPT_PATH}")"
|
||||
SCRIPT_DIR="$(dirname "${SCRIPT_PATH}")"
|
||||
|
||||
PS5_PAYLOAD_SDK="${SCRIPT_DIR}/.."
|
||||
|
||||
export PKG_CONFIG_DIR=
|
||||
export PKG_CONFIG_SYSROOT_DIR=
|
||||
export PKG_CONFIG_LIBDIR=${PS5_PAYLOAD_SDK}/sysroot/usr/lib/pkgconfig
|
||||
export PKG_CONFIG_PATH=${PS5_PAYLOAD_SDK}/sysroot/usr/libdata/pkgconfig
|
||||
export PKG_CONFIG_SYSROOT_DIR=${PS5_PAYLOAD_SDK}/target
|
||||
export PKG_CONFIG_LIBDIR=${PS5_PAYLOAD_SDK}/target/lib/pkgconfig
|
||||
export PKG_CONFIG_PATH=${PS5_PAYLOAD_SDK}/target/libdata/pkgconfig
|
||||
|
||||
if [ -x "$(command -v pkg-config)" ]; then
|
||||
exec pkg-config --static "$@"
|
||||
fi
|
||||
|
||||
exit 1
|
||||
exec -a "${SCRIPT_NAME}" pkg-config --static "$@"
|
||||
File renamed without changes.
@@ -1,41 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (C) 2023 John Törnblom
|
||||
#
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; see the file COPYING. If not see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
|
||||
PS5_PAYLOAD_SDK="${BASH_SOURCE[0]}"
|
||||
PS5_PAYLOAD_SDK="$(dirname "${PS5_PAYLOAD_SDK}")"
|
||||
PS5_PAYLOAD_SDK="${PS5_PAYLOAD_SDK}/.."
|
||||
|
||||
CANDIDATES=("clang-18"
|
||||
"clang-17"
|
||||
"clang-16"
|
||||
"clang-15")
|
||||
|
||||
# ensure clang knows where prospero-lld is at
|
||||
export PATH=${PS5_PAYLOAD_SDK}/bin:$PATH
|
||||
|
||||
for CC in "${CANDIDATES[@]}"; do
|
||||
if [ -x "$(command -v $CC)" ]; then
|
||||
exec $CC \
|
||||
-target x86_64-sie-ps5 \
|
||||
-isysroot ${PS5_PAYLOAD_SDK}/sysroot \
|
||||
-isystem ${PS5_PAYLOAD_SDK}/sysroot/usr/include \
|
||||
-fno-stack-protector -fno-plt \
|
||||
$*
|
||||
fi
|
||||
done
|
||||
|
||||
exit 1
|
||||
@@ -1,42 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (C) 2023 John Törnblom
|
||||
#
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; see the file COPYING. If not see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
|
||||
PS5_PAYLOAD_SDK="${BASH_SOURCE[0]}"
|
||||
PS5_PAYLOAD_SDK="$(dirname "${PS5_PAYLOAD_SDK}")"
|
||||
PS5_PAYLOAD_SDK="${PS5_PAYLOAD_SDK}/.."
|
||||
|
||||
CANDIDATES=("clang++-18"
|
||||
"clang++-17"
|
||||
"clang++-16"
|
||||
"clang++-15")
|
||||
|
||||
|
||||
# ensure clang++ knows where prospero-lld is at
|
||||
export PATH=${PS5_PAYLOAD_SDK}/bin:$PATH
|
||||
|
||||
for CXX in "${CANDIDATES[@]}"; do
|
||||
if [ -x "$(command -v $CXX)" ]; then
|
||||
exec $CXX \
|
||||
-target x86_64-sie-ps5 \
|
||||
-isysroot ${PS5_PAYLOAD_SDK}/sysroot \
|
||||
-isystem ${PS5_PAYLOAD_SDK}/sysroot/usr/include \
|
||||
-fno-stack-protector -fno-plt \
|
||||
$*
|
||||
fi
|
||||
done
|
||||
|
||||
exit 1
|
||||
@@ -1,33 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (C) 2024 John Törnblom
|
||||
#
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; see the file COPYING. If not see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
|
||||
PS5_PAYLOAD_SDK="${BASH_SOURCE[0]}"
|
||||
PS5_PAYLOAD_SDK="$(dirname "${PS5_PAYLOAD_SDK}")"
|
||||
PS5_PAYLOAD_SDK="${PS5_PAYLOAD_SDK}/.."
|
||||
|
||||
CANDIDATES=("llvm-ranlib-18"
|
||||
"llvm-ranlib-17"
|
||||
"llvm-ranlib-16"
|
||||
"llvm-ranlib-15")
|
||||
|
||||
for RANLIB in "${CANDIDATES[@]}"; do
|
||||
if [ -x "$(command -v $RANLIB)" ]; then
|
||||
exec $RANLIB $*
|
||||
fi
|
||||
done
|
||||
|
||||
exit 1
|
||||
@@ -30,7 +30,7 @@ set(CMAKE_CROSSCOMPILING 1)
|
||||
#
|
||||
# Set sysroot and search paths
|
||||
#
|
||||
set(CMAKE_SYSROOT "${PS5_PAYLOAD_SDK}/sysroot")
|
||||
set(CMAKE_SYSROOT "${PS5_PAYLOAD_SDK}/target")
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
@@ -15,18 +15,18 @@
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
|
||||
PS5_PAYLOAD_SDK := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))..)
|
||||
PS5_SYSROOT := $(PS5_PAYLOAD_SDK)/sysroot
|
||||
PS5_SYSROOT := $(PS5_PAYLOAD_SDK)/target
|
||||
PS5_DEPLOY := $(PS5_PAYLOAD_SDK)/bin/prospero-deploy
|
||||
|
||||
AS := $(PS5_PAYLOAD_SDK)/bin/prospero-clang
|
||||
CC := $(PS5_PAYLOAD_SDK)/bin/prospero-clang
|
||||
CXX := $(PS5_PAYLOAD_SDK)/bin/prospero-clang++
|
||||
AS := $(PS5_PAYLOAD_SDK)/bin/prospero-clang
|
||||
LD := $(PS5_PAYLOAD_SDK)/bin/prospero-lld
|
||||
AR := $(PS5_PAYLOAD_SDK)/bin/prospero-ar
|
||||
NM := $(PS5_PAYLOAD_SDK)/bin/prospero-nm
|
||||
OBJCOPY := $(PS5_PAYLOAD_SDK)/bin/prospero-objcopy
|
||||
RANLIB := $(PS5_PAYLOAD_SDK)/bin/prospero-ranlib
|
||||
STRIP := $(PS5_PAYLOAD_SDK)/bin/prospero-strip
|
||||
PKG_CONFIG := $(PS5_PAYLOAD_SDK)/bin/prospero-pkg-config
|
||||
AR := $(PS5_PAYLOAD_SDK)/bin/llvm-ar
|
||||
NM := $(PS5_PAYLOAD_SDK)/bin/llvm-nm
|
||||
OBJCOPY := $(PS5_PAYLOAD_SDK)/bin/llvm-objcopy
|
||||
RANLIB := $(PS5_PAYLOAD_SDK)/bin/llvm-ranlib
|
||||
STRIP := $(PS5_PAYLOAD_SDK)/bin/llvm-strip
|
||||
|
||||
STRINGS := strings
|
||||
@@ -21,20 +21,21 @@ PS5_PAYLOAD_SDK="${PS5_PAYLOAD_SDK}/.."
|
||||
PS5_PAYLOAD_SDK="$(realpath "${PS5_PAYLOAD_SDK}")"
|
||||
|
||||
export PS5_PAYLOAD_SDK=${PS5_PAYLOAD_SDK}
|
||||
export PS5_SYSROOT=${PS5_PAYLOAD_SDK}/sysroot
|
||||
export PS5_SYSROOT=${PS5_PAYLOAD_SDK}/target
|
||||
export PS5_DEPLOY=${PS5_PAYLOAD_SDK}/bin/prospero-deploy
|
||||
|
||||
export CC=${PS5_PAYLOAD_SDK}/bin/prospero-clang
|
||||
export CXX=${PS5_PAYLOAD_SDK}/bin/prospero-clang++
|
||||
export AS=${PS5_PAYLOAD_SDK}/bin/prospero-clang
|
||||
export LD=${PS5_PAYLOAD_SDK}/bin/prospero-ldd
|
||||
export AR=${PS5_PAYLOAD_SDK}/bin/prospero-ar
|
||||
export NM=${PS5_PAYLOAD_SDK}/bin/prospero-nm
|
||||
export OBJCOPY=${PS5_PAYLOAD_SDK}/bin/prospero-objcopy
|
||||
export RANLIB=${PS5_PAYLOAD_SDK}/bin/prospero-ranlib
|
||||
export STRIP=${PS5_PAYLOAD_SDK}/bin/prospero-strip
|
||||
export CMAKE=${PS5_PAYLOAD_SDK}/bin/prospero-cmake
|
||||
export PKG_CONFIG=${PS5_PAYLOAD_SDK}/bin/prospero-pkg-config
|
||||
|
||||
export AR=${PS5_PAYLOAD_SDK}/bin/llvm-ar
|
||||
export NM=${PS5_PAYLOAD_SDK}/bin/llvm-nm
|
||||
export OBJCOPY=${PS5_PAYLOAD_SDK}/bin/llvm-objcopy
|
||||
export RANLIB=${PS5_PAYLOAD_SDK}/bin/llvm-ranlib
|
||||
export STRIP=${PS5_PAYLOAD_SDK}/bin/llvm-strip
|
||||
|
||||
export STRINGS=strings
|
||||
export MAKE=make
|
||||
Executable → Regular
+9
-15
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (C) 2024 John Törnblom
|
||||
# Copyright (C) 2023 John Törnblom
|
||||
#
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
@@ -15,19 +14,14 @@
|
||||
# along with this program; see the file COPYING. If not see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
|
||||
PS5_PAYLOAD_SDK="${BASH_SOURCE[0]}"
|
||||
PS5_PAYLOAD_SDK="$(dirname "${PS5_PAYLOAD_SDK}")"
|
||||
PS5_PAYLOAD_SDK="${PS5_PAYLOAD_SDK}/.."
|
||||
DESTDIR ?= /opt/ps5-payload-sdk
|
||||
|
||||
CANDIDATES=("llvm-strip-18"
|
||||
"llvm-strip-17"
|
||||
"llvm-strip-16"
|
||||
"llvm-strip-15")
|
||||
all:
|
||||
|
||||
for STRIP in "${CANDIDATES[@]}"; do
|
||||
if [ -x "$(command -v $STRIP)" ]; then
|
||||
exec $STRIP $*
|
||||
fi
|
||||
done
|
||||
clean:
|
||||
|
||||
exit 1
|
||||
install:
|
||||
install -d $(DESTDIR)/target
|
||||
cp -r freebsd/. $(DESTDIR)/target/include
|
||||
cp -r khronos/. $(DESTDIR)/target/include
|
||||
cp -r ps5/. $(DESTDIR)/target/include/ps5
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loaded 100 of 1921 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user