Skip to content

Commit

Permalink
make an elf file in the box, then move it out
Browse files Browse the repository at this point in the history
  • Loading branch information
humbertodias committed Mar 2, 2024
1 parent 612c579 commit cb6aed2
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions easy-compile-docker-psp
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#!/bin/bash -e

EXE=paintown-psp.elf
BUILD_DIR=build-psp
mkdir -p ${PWD}/${BUILD_DIR}

BUILD_DIR=/tmp
export DOCKER_DEFAULT_PLATFORM=linux/amd64
docker build -t paintown-psp-build -f docker/Dockerfile.psp .
docker run --rm -iv${PWD}:/paintown-bin -w /paintown-bin paintown-psp-build sh -s <<EOF
Expand All @@ -14,18 +12,18 @@ meson setup --cross-file misc/psp/mips32-eabi-psp.txt ${BUILD_DIR}
# compile
(cd ${BUILD_DIR}; meson configure -Dbuild_tests=false)
meson compile --jobs=`nproc` -C ${BUILD_DIR} && echo "Compilation OK" || { echo "Compilation ERROR"; exit 1; }
meson compile -C ${BUILD_DIR} || { echo "Compilation ERROR"; exit 1; }
# copy
chown $(id -u):$(id -g) ${BUILD_DIR}/paintown
cp ${BUILD_DIR}/paintown $EXE
psp-readelf -S $EXE
cp ${BUILD_DIR}/paintown ${EXE}
psp-readelf -S ${EXE}
EOF

echo "
To run you will need a CFW [custom firmware] or system that can boot unsigned applications
"
ls -l $EXE
file $EXE
echo "Here is the executable $EXE. To run you need to package as a pbp file"
ls -l ${EXE}
file ${EXE}
echo "Here is the executable ${EXE}. To run you need to package as a pbp file"

0 comments on commit cb6aed2

Please sign in to comment.