What is needed? I run this under ubuntu with gcc.

ps2toolchain

when the toolchain is installed, magically ps2client is also installed :-)

Now you need to run ps2link on your PS2 and you will have a full functionable test enviroment for running ELFs with standard out pointing back to your workstation

http://ps2dev.org/ps2/Loaders/PS2_si.../PS2Link_v1.46