Compiling Open Source Ps2 Software

[ ]

I recently wanted to try making some changes to Open PS2 Loader. It’s one of many projects built using the open source ps2sdk. It’s actually really easy to build using the docker image provided in the Open PS2 Loader repo (Dockerfile here), which builds on the docker image provided by the ps2sdk project (Dockerfile here).

Download dependencies

Pull the docker image:

docker pull ghcr.io/ps2homebrew/ps2homebrew:main

Clone the Open PS2 Loader repo:

git clone git@github.com:ps2homebrew/Open-PS2-Loader.git

Docker containers run their processes as the root user unless the image specifies otherwise and the ps2homebrew image doesn’t. This can cause headaches when mounting host directories into the container. Files created or edited from within the container can’t be written (and sometimes read) by standard user accounts. This can be fixed by giving all users read/write permissions for the contents of the mounted directory. It isn’t generally a good idea to do this for whole directories but in this case it’s low risk.

chmod -R a+rw Open-PS2-Loader 

The docker image can then be run as a container with:

docker run -it --rm -v "$(pwd)/Open-PS2-Loader":/opl ghcr.io/ps2homebrew/ps2homebrew:main

Within the container shell, you can now run:

cd /opl
make

On the host you can now make changes to the Open PS2 Loader code, save and then run make again in the container terminal to rebuild the project.