PS2 WSL(1)/WSL2 SDK-Installation for multiple platforms

ps2toolchain error in compiling

/usr/local/ps2dev/ee/lib/gcc/mips64r5900el-ps2-elf/10.2.0/../../../../mips64r5900el-ps2-elf/bin/ld: cannot find -lmf
collect2: error: ld returned 1 exit status
make[1]: *** [/usr/local/ps2dev/ps2sdk/samples/Makefile.eeglobal:46: 3dcb.elf] Erro 1
make: *** [Makefile:20: all] Erro 2
 
  • Like
Reactions: TnA
Could someone refer me to the instructions for PSP, PS4, PS5, Wii, GC, DC, whatever else there is which you all want?

I fixed some issues as well. The tutorial btw. works on Debian, Ubuntu, Kali and probably others on WSL as well as NATIVE!
 
just made a small script to automate the process on PS2SDK installation.

download with wget this URL https://github.com/israpps/israpps/raw/main/installPS2SDK.sh

if you have curl, you can do this:
Code:
/bin/bash -c "$(curl -fsSL https://github.com/israpps/israpps/raw/main/installPS2SDK.sh)"

Also, the tutorial should be updated with a brief explanation on Brew.sh usage, since apt-get will install older CMake, causing compilation errors on ps2sdk-ports, wasting precious time.

Note: can't remember the exact procedure, but you will need at least to:

Code:
brew install gcc
brew install cmake

Then add the needed paths into $PATH

UPDATE: added command switches to download dependencies (excluding CMake, deal with it manually. and to push the needed enviroment variables to ~/.profile)
use installPS2SDK.sh --help to see available switches

upload_2022-11-24_14-18-37.png
 
Last edited:
  • Like
Reactions: TnA
Thanks for the guide. Just starting/learning but being able to compile OPL is a result!

I just ran through this install for PS2, here are a few things regarding doing this is 2023 that could be updated in the guide.

1) WSL2 is really easy to install now, simply type in PowerShell:

Code:
wsl --install

I used Ubuntu. Microsoft has a guide, but I can't link to it.

2) When installing dependencies, the package "libgsl23" wasn't available, "libgslcblas0" being it's suggested replacement. I noticed that is already in the command, so I just removed libgsl23 (and ucl as mentioned) and haven't had any issues.

3) The PS2ETH install command needs to use HTTPS instead of SSH:

Code:
cd $PS2DEV && git clone https://github.com/ps2dev/ps2eth.git && cd ps2eth && make && tar c `find . -name \*irx` | tar x -C /usr/local/ps2dev/ps2eth && make clean && cd $HOME && . .profile

4) If setting up with VS Code, install the C/C++ extensions as well as the WSL/Remote extensions and add

/usr/local/ps2dev/**

to the include path. You can use the VS Code command "C/C++: Edit configurations (UI)" to get there quickly.

Otherwise the guide is fantastic. Thank you!
 
  • Like
Reactions: TnA
Could someone refer me to the instructions for PSP, PS4, PS5, Wii, GC, DC, whatever else there is which you all want?

I fixed some issues as well. The tutorial btw. works on Debian, Ubuntu, Kali and probably others on WSL as well as NATIVE!
I know this is an old post, but PSP stuff, a lot of it, including the cfw (even ark4) I believe runs older versions of the sdk. The PSP has psp-pacman iirc, which allows you to install or update specific things in the sdk.

As for the PS4, there's open orbis, orbisdev, and an aptly named PS4 sdk. Open orbis seems to be the most widely used, at least in my experience. I couldn't get open orbis to compile though, the other two were fine, so I used their precompiled one. If you want to build sm64, for example, use 0.5.1 or 0.5.0 with clang-10. Ubuntu 20.04 is a good distro to use for this.

PS5 has a payload sdk. There's not much to explain here, and it's easy to set up. Most things seem to need clang-15 or 16 like libhijacker or use gcc. I think by default the PS5 uses java-11, so things like the jar loader use the same.

Wii and gc can be compiled with devkitpro. Some things like nintendont require an older version of devkitPPC or portlibs. I think nintendont will freeze when exiting if you don't use a specific version.

Dreamcast uses kallistiOS mostly, I think. It has several parts, and you can choose the gcc version when compiling. I think the default is 13.2. I've managed to compile sm64, doom64, sonic mania, and a few others with it. It does have cmake now too.

Edit: I hope this is helpful for someone. I have a lot of experience compiling for many systems.

btw, KallistiOS or the dreamcast sdk has been fixed through a pr for ubuntu 20.04, which doesn't have work with "command" in the make shell, I believe. they changed it to which, which worked for me, so I have ubuntu 20.04 with KallistiOS and cmake, so sonic mania should be buildable in that. I was building it in ubuntu 22.04, which works fine with the scripts by default.
 
Last edited by a moderator:
  • Like
Reactions: TnA
Back
Top