-
Notifications
You must be signed in to change notification settings - Fork 0
Dev Environment
Matt Gonzales edited this page May 31, 2024
·
5 revisions
Here's a list of Dev Environments that can used to build projects for the PlayStation Classic
- Requires Docker Desktop to be installed
-
Mod My Classic's docker image
-
Has outdated packages list
-
glibc 2.24
-
Pull
docker pull modmyclassicdocker/mmc-crosscompiler
- Start Image (This will create a new container)
docker run -it modmyclassicdocker/mmc-crosscompiler
- Start a stopped container
docker start -i CONTAINER_ID_OR_NAME_HERE
- While image is running how to switch build environment to PlayStation Classic (armhf)
. classic_set_env_psc_6
- Install Windows Subsystem for Linux (WSL)
Run CMD as Administrator and enter this command:
wsl --install
- Complete the install and restart you computer.
- Open WSL and enter this command:
sudo apt update && sudo apt upgrade
- Install the following packages:
sudo apt install build-essential wget tar git libtool autoconf automake pkg-config make gdb-multiarch -y
- Next download and extract an older arm-linux-gnueabihf release from Linaro
- We'll use
gcc-linaro-7.3.1-2018.05-x86_64_arm-linux-gnueabihf.tar.xz
as an example though it uses glibc 2.21 (so you might want to use a slightly later release)
wget https://releases.linaro.org/components/toolchain/binaries/7.3-2018.05/arm-linux-gnueabihf/gcc-linaro-7.3.1-2018.05-x86_64_arm-linux-gnueabihf.tar.xz
- Next extract the toolchain:
tar -xvf gcc-linaro-7.3.1-2018.05-x86_64_arm-linux-gnueabihf.tar.xz
- Move the toolchain to /opt/
sudo mv gcc-linaro-7.3.1-2018.05-x86_64_arm-linux-gnueabihf /opt/
- Add the toolchain to your PATH
echo 'export PATH=/opt/gcc-linaro-7.3.1-2018.05-x86_64_arm-linux-gnueabihf/bin:$PATH' >> ~/.bashrc
- Reload the profile
source ~/.bashrc
- Verify the toolchain
arm-linux-gnueabihf-gcc --version
- To use the toolchain you can do the following
export PATH=/opt/gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabihf/bin:$PATH
export CC=arm-linux-gnueabihf-gcc
export CXX=arm-linux-gnueabihf-g++
export AR=arm-linux-gnueabihf-ar
export AS=arm-linux-gnueabihf-as
export LD=arm-linux-gnueabihf-ld
export RANLIB=arm-linux-gnueabihf-ranlib
export STRIP=arm-linux-gnueabihf-strip
export NM=arm-linux-gnueabihf-nm
export OBJCOPY=arm-linux-gnueabihf-objcopy
export OBJDUMP=arm-linux-gnueabihf-objdump
export PKG_CONFIG_PATH=/usr/arm-linux-gnueabihf/lib/pkgconfig
- Create script:
nano ~/arm-cross-compile-env.sh
- Copy paste the following:
#!/bin/bash
# Set up environment for ARM cross-compilation
export PATH=/opt/gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabihf/bin:$PATH
export CC=arm-linux-gnueabihf-gcc
export CXX=arm-linux-gnueabihf-g++
export AR=arm-linux-gnueabihf-ar
export AS=arm-linux-gnueabihf-as
export LD=arm-linux-gnueabihf-ld
export RANLIB=arm-linux-gnueabihf-ranlib
export STRIP=arm-linux-gnueabihf-strip
export NM=arm-linux-gnueabihf-nm
export OBJCOPY=arm-linux-gnueabihf-objcopy
export OBJDUMP=arm-linux-gnueabihf-objdump
export PKG_CONFIG_PATH=/usr/arm-linux-gnueabihf/lib/pkgconfig
- Ctrl + X to save the script
- Next make script executable:
chmod +x ~/arm-cross-compile-env.sh
- Whenever you want to use the script:
source ~/arm-cross-compile-env.sh
- Needs Oracle VM VirtualBox
- Image
- Has arm32 chroot
- glibc version 2.28 (May cause issues)
- Simply start the arm32 chroot and start build.
- Username/password
dev/dev