Go Back   MaxConsole Forums > PS2 > PS2 Homebrew Games, Apps, Emulators & Misc


    Ubuntu
 
Thread Tools Display Modes
Reply
  #1  
Old 05-23-2007, 08:51 AM
Ramon Ramon is offline
Registered User
 
Registered: May 2007
Posts: 3
Ubuntu

Can I install the ps2sdk with Ubuntu? I'm using Ubuntu 6.10, just in case. If I can, how do I install it?
Reply With Quote

  #2  
Old 05-23-2007, 02:49 PM
Chilly Willy Chilly Willy is offline
Registered User
 
Registered: Dec 2005
Posts: 2,061
EDIT: instructions below are for psp... ps2 is the same, but with ps2 instead of psp. Sorry about the confusion. Also, the following are the environment variables to use for ps2:

Code:
export PS2DEV="/usr/local/ps2dev" export PS2SDK="$PS2DEV/ps2sdk" export PS2PATH="$PS2DEV/bin:$PS2DEV/ee/bin:$PS2DEV/iop/bin:$PS2DEV/dvp/bin:$PS2SDK/bin" export PATH="$PATH:$PS2PATH"
/EDIT

Yes, it's pretty simple (relatively speaking). The main thing is to make sure you have all the dependencies installed. Run synaptic (the package manager) and check that all these are installed (install them if they aren't).

autogen
autoconf
automake
bison
build-essential
flex
imagemagik
libtool
libsdl
ncurses
patchutils
pkg-config
subversion
textinfo
wget

After all that's installed, then open a shell and do this:

Code:
sudo bash mkdir -p /usr/local/pspdev chmod a+rwx /usr/local/pspdev cd /tmp svn co svn://svn.ps2dev.org/psp/trunk/psptoolchain cd psptoolchain ./toolchain.sh
That will switch you into a shell at root level, make the pspdev directory, download the toolchain building files to /tmp/psptoolchain, then run the script to download, build, and install the psp toolchain.

When you wish to compile PSP software, be sure to use these environment variables:

Code:
export PSPDEV="/usr/local/pspdev" export PSPSDK="$PSPDEV/psp/sdk" export PSPPATH="$PSPDEV/bin:$PSPDEV/psp/bin:$PSPSDK/bin" export PATH="$PATH:$PSPPATH"
If someone wants to install the pspsdk on Mac OSX, it's virtually the same, just install the dependencies with DarwinPorts: http://darwinports.opendarwin.org/

OSX won't have build-essential, instead you'll have the latest Xcode, and the X11 SDK from the Apple Developer web site (both are free).

Note: the above switches to root level to build and install the toolchain because the /usr path cannot be written from user level. That is important to remember when build libs for the SDK. For example, let's say you decide to build SDL for the PSP (it's in the repo, so why not). You would do something like this:

Code:
export PSPDEV="/usr/local/pspdev" export PSPSDK="$PSPDEV/psp/sdk" export PSPPATH="$PSPDEV/bin:$PSPDEV/psp/bin:$PSPSDK/bin" export PATH="/opt/local/bin:$PATH:$PSPPATH" mkdir projects cd projects mkdir psp cd psp svn co svn://svn.ps2dev.org/psp/trunk/SDL cd SDL sh autogen.sh LDFLAGS="-L$(psp-config --pspsdk-path)/lib -lc -lpspuser" configure --host=psp --prefix=$(psp-config --psp-prefix) make sudo bash export PSPDEV="/usr/local/pspdev" export PSPSDK="$PSPDEV/psp/sdk" export PSPPATH="$PSPDEV/bin:$PSPDEV/psp/bin:$PSPSDK/bin" export PATH="$PATH:$PSPPATH" cd /home/username/projects/psp/SDL make install
Note that we had to switch to root level and re-export the environment variables before doing make install. If you don't, it won't install in the toolchain correctly.

Note that some PSP SDK packages will require a pkg-config environment variable (notably, libogg/libvorbis).

Code:
export PKG_CONFIG_PATH="$PSPDEV/psp/lib/pkgconfig"

Last edited by Chilly Willy; 05-23-2007 at 04:20 PM. Reason: Noticed wrong toolchain
TA-085 5.00 M33-3
Reply With Quote

  #3  
Old 05-24-2007, 04:21 AM
Ramon Ramon is offline
Registered User
 
Registered: May 2007
Posts: 3
So I simply replace psp with ps2?
Reply With Quote

  #4  
Old 05-24-2007, 08:11 PM
Chilly Willy Chilly Willy is offline
Registered User
 
Registered: Dec 2005
Posts: 2,061
Yes. For example, the main toolchain install would be

Code:
sudo bash mkdir -p /usr/local/ps2dev chmod a+rwx /usr/local/ps2dev cd /tmp svn co svn://svn.ps2dev.org/ps2/trunk/ps2toolchain cd ps2toolchain ./toolchain.sh
Sorry about the mix-up. I always install both on my system, and had psp on the brain when I was answering your post, and completely missed the fact that I did the psp instead of ps2.
TA-085 5.00 M33-3
Reply With Quote

  #5  
Old 05-26-2007, 11:33 AM
Ramon Ramon is offline
Registered User
 
Registered: May 2007
Posts: 3
All right. Got it to compile now. Thank you so much! Now I have a new problem. printf() doesn't seem to work. Just in case, I'm running the .elf files using uLaunchELF. Version? I'm not sure...
Reply With Quote

  #6  
Old 05-26-2007, 04:06 PM
Chilly Willy Chilly Willy is offline
Registered User
 
Registered: Dec 2005
Posts: 2,061
Uh... I think the printf() used by default tries to print to the PC via PS2Link. If you're trying to print to the PS2 display, you need to do something different. Check the source for various examples in the PS2 SDK repo and the source of various proggies, like PGen.
TA-085 5.00 M33-3
Reply With Quote

Reply



Thread Tools
Display Modes


You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 06:15 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.

Posts and links are subject to each author on this forum and are no way affiliated with the operations and/or opinions of Maxconsole.net
Copyright © 2009 MAXCONSOLE
All images are protected by the copyright of their respective owners.