Toolchain Setup - GithubPrankster/ps2kit GitHub Wiki

First and foremost, know this process can only be realized in an Unix-like system. Use MSYS2, Cygwin or similar for Winblows. You also require all the stuff needed for compiling Binutils and GCC, including but not limited to all their dependencies and tools like diffutils.

Chances are you already have them. If not, compiler errors or a trip to googol will assist!

With that out of the way, you'll need to clone the ps2kit repository somewhere nice. You can even download it, it's all right. With that done, before running kit-script.sh, setup the needed shell variables! They'll not only direct the script to do the right stuff but future things like the True and Honest ps2kit Makefile as well.

In .bashrc or similar in your home folder, type the lines:

export PS2KIT=/usr/local/ps2kit # you can edit this location to something you are able to access.
export PATH=$PATH:${PS2KIT}/bin # don't edit this please! i beg of you

There you go! Reload your shell and type something like echo $PS2KIT just to make sure. Now go run that badboy script! It'll do all the things you need! If you were mean and didn't do what I told you to my script will know. >:(

When it's all done, you're good to go. make something from ps2kit's examples to be fully sure and run it on an emulator.