Ubuntu 9.04 (Jaunty Jackalope) / Ubuntu 9.10 (Karmic Koala) / Ubuntu 10.04 (Lucid Lynx) manual guide
Set up the dev environment
Pre-Requisite:
Go to 'System/Administration/Software Sources' and make sure 'universe' repository is selected, then open a terminal:
Code:
$ sudo apt-get update
$ sudo apt-get upgrade
1. Install the packages "gcc-4.4", "patch", "wget", "make" and "mercurial":
Code:
$ sudo apt-get install gcc-4.4 patch wget make mercurial
2. Download the ps2toolchain scripts:
Code:
$ cd
$ hg clone https://bitbucket.org/ps2dev/ps2toolchain
3. Run the script to download and build the toolchain:
Code:
$ cd ps2toolchain/
$ sudo CC=gcc-4.4 ./toolchain-sudo.sh
4. Edit your login script ~/.profile
Code:
$ sudo gedit ~/.profile
Then add the following at the end of the file:
Code:
export PS2DEV=/usr/local/ps2dev
export PATH=$PATH:$PS2DEV/bin
export PATH=$PATH:$PS2DEV/ee/bin
export PATH=$PATH:$PS2DEV/iop/bin
export PATH=$PATH:$PS2DEV/dvp/bin
export PS2SDK=$PS2DEV/ps2sdk
export PATH=$PATH:$PS2SDK/bin
You need to source your login script to take new env vars in account:
Code:
$ source ~/.profile
5. Build one of the PS2SDK samples to test your environment:
Code:
$ cd /usr/local/ps2dev/ps2sdk/
$ sudo chmod -R a+w samples/
$ cd samples/hello/
$ make
$ make clean
6. From now you can delete the ps2toolchain scripts is you wish:
Code:
$ cd
$ rm -R ps2toolchain
How to duplicate PS2DEV environment to allow you to use several dev environments (eg compile OPL and uLE for example)
I strongly suggest you to move the ps2dev folder to /home partition, clone it, and set up it from here depending for which app to compile you're setting up this dev environment.
1. Move the ps2dev directory to /home partition, change permissions:
Code:
$ cd
$ mkdir -p PS2dev/SDK/
$ sudo mv /usr/local/ps2dev ~/PS2dev/SDK/
$ sudo chmod -R a+w ~/PS2dev/SDK/
2. Duplicate the ps2dev directory specifically for OPL:
Code:
$ cp -R ~/PS2dev/SDK/ps2dev ~/PS2dev/SDK/ps2dev-OPL
$ gedit ~/PS2dev/switch-ps2dev.sh
paste this to the file:
Code:
#!/bin/bash
if [ $# -eq 0 ]
then
echo "usage: sh $0 <dev env subname>"
exit 1
fi
unlink /usr/local/ps2dev &>/dev/null
ln -s ~/PS2dev/SDK/ps2dev-$1 /usr/local/ps2dev || exit 1
echo "$1 dev environment ready."
3. Make the script above executable
Code:
$ chmod +x ~/PS2dev/switch-ps2dev.sh
4. Now you can switch between dev environments:
Code:
$ sudo sh ~/PS2dev/switch-ps2dev.sh OPL
How to update the PS2SDK on Ubuntu?
After setting up a working PS2DEV environment, it's advisable to update the
PS2SDK every once in a while.
1. Clone the current sources:
Code:
$ cd ~/PS2dev/
$ hg clone https://bitbucket.org/ps2dev/ps2sdk
$ cd ps2sdk/
If you already have a working copy, simply update it:
2. Build/Intall the SDK:
Code:
$ make clean
$ make
$ make install
Install the libraries OPL needs
You need to install and build all libraries open-ps2-loader needs: ps2-packer, gsKit, zlib, libpng and libjpeg.
Make sure you're using the good dev environment if you use several of them:
Code:
sudo sh ~/PS2dev/switch-ps2dev.sh OPL
1. Download and build ps2-packer sources (ps2-packer needs a few packages):
Code:
$ sudo apt-get install zlib1g zlib1g-dev libucl1 libucl-dev
$ source ~/.profile
$ cd $PS2DEV
$ hg clone https://bitbucket.org/ps2dev/ps2-packer
$ cd ps2-packer/
$ make
$ make install
2. Download and build the gsKit sources:
Code:
$ cd $PS2DEV
$ hg clone https://bitbucket.org/ps2dev/gskit
$ cd gskit/
$ make
Add GSKIT env var to your login script ~/.profile:
Code:
$ sudo gedit ~/.profile
Then add the following at the end of the file:
Code:
export GSKIT=$PS2DEV/gskit
3. Download ps2sdk-ports, build and install the zlib sources:
Code:
$ cd $PS2DEV
$ hg clone https://bitbucket.org/ps2dev/ps2sdk-ports
$ cd ps2sdk-ports/zlib/
$ make
$ make install
4. Build and install the libpng sources:
Code:
$ cd ../libpng/
$ make
$ make install
5. Build and install the libjpeg sources:
Code:
$ cd ../libjpeg/
$ make
$ make install
Compile OPL
You need to re-logon again to take new env vars in account, or simply source agin your profile script:
Code:
$ source ~/.profile
1. Get OPL sources:
Code:
$ cd ~/PS2dev
$ hg clone https://bitbucket.org/ifcaro/open-ps2-loader
2. Compile OPL:
Code:
$ cd open-ps2-loader/
$ make
To get newest OPL revision:
Code:
$ cd ~/PS2dev/open-ps2-loader/
$ hg pull -u
To recompile OPL, simply use:
For those who needs iso2opl command line tool to install some ISO files, you can compile OPL's PC tools:
Install and configure Samba for use with OPL's SMB core
1. Install Samba:
Code:
$ sudo apt-get install samba smbclient
2. Edit Samba configuration:
Code:
$ sudo gedit /etc/samba/smb.conf
Search for this line in the smb.conf file, and add your 'PS2SMB' share definition below, the 'path' line must be filled with the path where you installed your games, it could also be a removable media of course:
Code:
#======================= Share Definitions =======================
[PS2SMB]
comment = PS2 OPL Games
read only = yes
locking = no
path = /share/PS2SMB"
guest ok = yes
3. Restart Samba:
Code:
$ sudo /etc/init.d/samba restart
4. Test PS2SMB share with smbclient:
Code:
$ smbclient -U GUEST -N //127.0.0.1/PS2SMB
If everything goes well you should be prompted with smb, you can test to ls like below:
Code:
jimmikaelkael@PC-DE-JIM:~$ smbclient -U GUEST -N //127.0.0.1/PS2SMB
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.4.0]
Server not using user level security and no password supplied.
smb: \> ls
. D 0 Tue Feb 16 10:29:04 2010
.. D 0 Thu Feb 18 12:01:27 2010
ul.A15B8D16.SLUS_202.30.02 A 793092096 Wed Dec 16 15:20:23 2009
ul.726F6A14.SLES_543.55.00 A 1073741824 Wed Dec 16 15:35:42 2009
ul.726F6A14.SLES_543.55.01 A 1073741824 Wed Dec 16 15:37:33 2009
ul.726F6A14.SLES_543.55.02 A 1073741824 Wed Dec 16 15:39:16 2009
ul.726F6A14.SLES_543.55.03 A 826441728 Wed Dec 16 15:40:35 2009
ul.7639C4C3.SLES_524.58.00 A 616114176 Tue Jan 5 14:10:26 2010
ul.788A8ADE.SLUS_218.70.00 A 1073741824 Thu Dec 10 15:03:15 2009
ul.788A8ADE.SLUS_218.70.01 A 1073741824 Thu Dec 10 15:04:54 2009
ul.788A8ADE.SLUS_218.70.02 A 545914880 Thu Dec 10 15:05:51 2009
ul.A15B8D16.SLUS_202.30.00 A 1073741824 Wed Dec 16 15:17:39 2009
ul.A15B8D16.SLUS_202.30.01 A 1073741824 Wed Dec 16 15:19:15 2009
ul.C540288E.SLUS_217.07.00 A 975667200 Wed Dec 9 16:29:16 2009
ul.cfg A 320 Tue Feb 16 10:29:04 2010
33791 blocks of size 2097152. 6026 blocks available
smb: \> exit
jimmikaelkael@PC-DE-JIM:~$
If something goes wrong, review your samba configuration and restart Samba server, testparm sometimes help:
Now all you need is to have games properly installed in the proper location, and have your network properly configured.
For example, if you use PS2 wired to PC, Go to System->Preferences->Network Configuration, the connections window will open. Choose Wired tab, select 'Auto eth0' and click Modify. Go to IPv4 parameters tab and set addresses properly on manual configuration.
Authors: misfire & jimmikaelkael.