Advertising (This ad goes away for registered users. You can Login or Register)

Installing the PSPSDK (Linux or Windows)

All the Help you need is here
Post Reply
ultimakillz
Retired Mod
Posts: 805
Joined: Mon Sep 27, 2010 6:55 pm

Installing the PSPSDK (Linux or Windows)

Post by ultimakillz » Tue Mar 01, 2011 8:47 pm

table of contents
  • intro
  • installing the psptoolchain on linux
  • installing the minimalist pspsdk on linux via minpspw
  • installing the minimalist pspsdk on windows via minpspw
  • conclusion
..:: intro ::..
this tut should hopefully help anyone who wishes to bother install the psptoolchain or the minimalist pspsdk. for those of you who dont know, the psptoolchain is the "official" sdk used to develop programs for the psp. the minimalist pspsdk is also used to compile programs to run on the psp but does not include everything included in the psptoolchain, only the necessary files.

while there are merits in installing the psptoolchain from scratch, for noobs (or even your average user), the minimalist pspsdk is much easier to install and get up and running and will provide you with everything you need, hence i suggest it for those groups.

at this time i will cover three methods of installation: installing the psptoolchain on linux, installing the minimalist pspsdk on linux via minpspw, and installing the minimalist pspsdk on windows via minpspg. there are other installation methods to get the full psptoolchain on windows, but those methods will not be covered today ;)

note: this tutorial assumes that the reader has basic knowledge of how to use a computer and the appropriate operating system, which includes but is not limited to creating, moving, modifying, and deleting various files, as well as bash (linux) or dos (windows) commands. if you are not familiar with these operations i suggest you read up on them. there are tons of guides all over the internet.

..:: installing the psptoolchain on linux ::..
[spoiler]installing the pspsdk on linux can be particularly difficult, especially if you are not familiar with linux ;)

note: starting this off with the sudo su command may make this easier ;)

step #1 - install necessary packages

the pspsdk requires many additional packages be installed before it can be installed successfully. you may already have some of these packages installed, but it never hurts to check.

so, to get the necessary packages, run this command (all in one line):
sudo apt-get install autoconf automake bison flex gcc libmpfr-dev libncurses5-dev libreadline-dev libusb-dev make patch subversion texinfo wget
note: this command may not work for ALL distros. that being said these are the packages you need, so if this command doesnt work for you just get these packages using your native package manager.
once that command has finished executing, you are ready to move on to the next step :)

step #2 - download the latest psptoolchain

the psptoolchain contains all the files for installing the pspsdk.

the first thing to know is that the original source for the pspsdk, ps2dev.org, has been going on and offline (mostly offline xD) for a while now. that being said, a alternative source can be found at psp.jim.sh.

so, to attempt to download the psptoolchain from ps2dev.org, run this command:

Code: Select all

svn co svn://svn.ps2dev.org/psp/trunk/psptoolchain
9 times out of ten that will not work :\

if it does: great! :D but if (and when) it doesnt, use this command to download the psptoolchain from the backup svn:

Code: Select all

svn co http://psp.jim.sh/svn/psp/trunk/psptoolchain
which should work ;) once the download is complete, you're ready for the next step :)

as i said, all the installation scripts are set up for ps2dev.org :\ so, if you followed the steps and were able to download the psptoolchain from ps2dev.org, proceed to step #3. however if you had to resort to the backup at psp.jim.sh (which you more than likely did ;)), then you will need to proceed to step #2a before heading to step #3 :p

step #2a - modifying the psptoolchain installation scripts

as i said before, all the installation scripts for the pspsdk still reference ps2dev.org. before you proceed you will need to modify those scripts.

these are the scripts you will need to modify:
  1. 003-pspsdk-stage1.sh
  2. 006-pspsdk-stage2.sh
  3. 009-psplinkusb.sh
so, what you will have to do is gedit (or sudo gedit if you dont have priviledges) each of those scripts and make the following changes. here is an example of the original code:

Code: Select all

 ## Download the source code.
 
if test ! -d "pspsdk"; then
  
 svn checkout svn://svn.ps2dev.org/psp/trunk/pspsdk
  
else
  
 svn update pspsdk
 
fi
here is the change you need to make:

Code: Select all

 ## Download the source code.
 
if test ! -d "pspsdk"; then
  
 ##svn checkout svn://svn.ps2dev.org/psp/trunk/pspsdk

 svn checkout http://psp.jim.sh/svn/psp/trunk/pspsdk

else
  
 svn update pspsdk
 
fi
basically all you are doing if commenting out (hence the ##) the code downloading from ps2dev.org and adding code to download from psp.jim.sh.

the only other thing to notice is that this particular code is for downloading from the the pspsdk directory (which you can tell by the /pspsdk). other scripts may be downloading from a different directory, so make sure to preserve the final location from the end of the code you commented out and add it to the code you added ;)

e.g. , if the code you commented out was like this:

Code: Select all

svn checkout svn://svn.ps2dev.org/psp/trunk/psplinkusb
then make sure the code you add is like this:

Code: Select all

svn checkout http://psp.jim.sh/svn/psp/trunk/psplinkusb
once you have edited the 3 scripts, you are ready for the next step :)

step #3 - modifying your login script

now we need to make some changes to your login script. start by running this command:

Code: Select all

gedit ~/.bashrc
once it is open scroll to the very bottom and add these lines:

Code: Select all

export PSPDEV=/usr/local/pspdev
export PSPSDK=$PSPDEV/psp/sdk
export PATH=$PATH:$PSPDEV/bin:$PSPSDK/bin
after that simply save and exit gedit. now you can move on to the next step :)

step #4 - execute the toolchain script

now everything should be ready to install the psptoolchain. first thing you need to do is change directory to the psptoolchain directory like this:

Code: Select all

cd psptoolchain
now you can run the psptoolchain script:

Code: Select all

sudo ./toolchain-sudo.sh
that command will begin executing the script. the process is very large and takes around 30-40 minutes to complete depending of course on the specs of the machine. once it is complete you have successfully installed the pspsdk! congrats! now get out there are start coding!

note: if you are receiving errors such as "psp-config not found", verify that you set up the environmental variables correctly (see step #3) and that you have the permissions set correctly on the .bashrc file (this happened to me :lol:). for more information on permissions in general, see this thread: viewtopic.php?f=8&t=5240[/spoiler]
..:: installing the minimalist pspsdk on linux via minpspw::..
[spoiler]these steps should work fine on the most popular linux distributions (ubuntu, mint, debian, etc.) i personally tested them on debian.

step #1 - download the latest version of minpspw

visit the minpspw and download the version fitting for your linux distribution and architecture (32-bit or 64-bit).

step #2 - install minpspw

cd to the location you choose to save the minpspw installation package (for example, mine was /home/debian-vm/Downloads) and execute this command:

Code: Select all

sudo dpkg -i minpspw.deb
that should install the necessary files from the installation package.

step #3 - set up the environment variables (in .profile)
cd to /home (simply cd), then run this command:

Code: Select all

gedit .profile
once .profile opens, add these two lines to the bottom:

Code: Select all

export PATH=$PATH:/opt/pspsdk/bin
export PSPSDK=/opt/pspsdk
then save and close .profile.

step #4 - install additional packages
afaik there is only one necessary additional package that needs to be installed, so run this command:

Code: Select all

sudo apt-get install zlib1g-dev
that being said, there are additional packages that are extremely useful, although they're not absolutely necessary for this process. however, i suggest you install them anyway. these packages include:

Code: Select all

gcc, automake, make, subversion, wget, git
step #5 - reboot
surely i don't need to walk you through this step :lol:

once you have rebooted, the process should be complete. to verify, start a new terminal and enter this command:

Code: Select all

psp-gcc --version
the output should look like this:

Code: Select all

psp-gcc (GCC) 4.3.5
Copyright (C) Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
if your output looks similar to that, congrats! get to coding! if the response is something like "psp-gcc not found", then you did something wrong. go through the steps again and make sure you followed them correctly, and if you're still having trouble feel free to make a post.[/spoiler]
..:: installing the minimalist pspsdk on windows via minpspw ::..
[spoiler]those of us using windows (i go back and forth xD) cannot simply install the pspsdk natively, but there are alternatives. one of the best (and definitely the easiest ;)) is called minpspw, the minimalist pspsdk. this package contains everything you need to setup a basic pspsdk in a windows environment.

installation is very simple:
step #1 - download the latest version of minpspw

the latest version (currently 0.11.1) can be downloaded here:
Minimalist PSPSDK | Download Minimalist PSPSDK software for free at SourceForge.net

step #2 - select components for installation

once the download is complete run the installer. click "next", accept the license agreement and click "next" again. you should now be at the "choose components" screen. this screen lets you select what will and will not be installed. by default, "PSP DevKit", "SDK Samples", "PSP Link", "HTML Documentation", and "Basic Devpaks" are selected for installation, while "Visual Studio Support" and "Man/Info Pages" are not.

i suggest you leave all the defaults selected and they are all somewhat essential for developing for the psp. if you are going to be coding using microsoft visual studio then you need to select "Visual Studio Support" for installation. i will leave the installation of "Man/Info Pages" up to you ;)

when you are finished selecting components for installation, click "next".

step #3 - complete installation

this screen is the standard "select destination" screen. you can change the location of installation, but i highly suggest you leave it in its default location ;) when you are done click "install". once it is complete, click "next", then "finish"

step #4 - adding pspsdk environment variables

the last step to installing the pspsdk on windows is adding the pspsdk to the environmental variables. to keep this simple, i am not going to go into much detail concerning getting to menu for modifying environment variables. each version of windows is different, so just google "how to modify environment variables on windows [insert version here]".

once you have reached the environment variables menu, select the variable called "Path" in the "system variables" box and click the "edit" button. once the dialog box pops up, place the cursor at the end of the statement in the "Variable Value" box.

with the cursor at the end of the statement, add this (no spaces): ;C:\pspsdk

once that is done you are set to go. you have successfully completed installing the pspsdk on windows via minpspw! congrats! now get to coding![/spoiler]
..:: conclusion ::..
i hope this tutorial has helped answer your questions concerning installation of the pspsdk. if you still have any questions feel free to post them in this thread.

please note that NONE of this is my work, only the tutorial. all credit goes to the wonderful devs who developed all of these tools, without which there would be no psp homebrew scene. all thanks go to them!

also, im obviously no expert, so if you notice any mistakes (trust me, im sure there are plenty :lol:), feel free to post them and i will get it corrected. thanks!
Advertising
"Thanks to all you gays i am leaning allot" src

TOcean
HBL Tester
Posts: 1020
Joined: Mon Sep 27, 2010 3:08 pm
Location: Flash0:/kd/vshmain.prx
Contact:

Re: Installing the PSPSDK (Linux or Windows)

Post by TOcean » Tue Mar 01, 2011 8:50 pm

Nice works this on Linux Ubuntu?
Advertising

ultimakillz
Retired Mod
Posts: 805
Joined: Mon Sep 27, 2010 6:55 pm

Re: Installing the PSPSDK (Linux or Windows)

Post by ultimakillz » Tue Mar 01, 2011 8:54 pm

yes, it should work on ubuntu just fine ;)
"Thanks to all you gays i am leaning allot" src

flofrucht
Posts: 587
Joined: Wed Sep 29, 2010 5:46 pm
Location: /root
Contact:

Re: Installing the PSPSDK (Linux or Windows)

Post by flofrucht » Thu Mar 03, 2011 11:41 am

There was a easy install .deb for ubuntu on advancedpsp, but now it's gone :o

anyway, good tutorial, i think it will hepl many newbies :)

-flofrucht
twitter.com/flofrucht
PSPDev and scener

electrosheep
Posts: 97
Joined: Tue Jan 11, 2011 2:50 am

Re: Installing the PSPSDK (Linux or Windows)

Post by electrosheep » Mon Mar 07, 2011 1:22 pm

Thanks so much! Someone has been needing to do this for a long time.
Let me see...your grandmother's name was Beatrice?

waratte
Posts: 1320
Joined: Wed Oct 20, 2010 12:03 am

Re: Installing the PSPSDK (Linux or Windows)

Post by waratte » Mon Apr 18, 2011 3:33 am

flofrucht wrote:There was a easy install .deb for ubuntu on advancedpsp, but now it's gone :o

anyway, good tutorial, i think it will hepl many newbies :)

-flofrucht
I guess you are referring to something like this:

1.Download MinPSP debian package.
2.Extracting the package to /usr/local and renaming the directory to "pspdev"
3.Adding these lines at the end of your ".bashrc" file.

Code: Select all

export PSPDEV=/usr/local/pspdev
export PSPSDK=$PSPDEV/psp/sdk
export PATH=$PATH:$PSPDEV/bin:$PSPSDK/bin
:)

Halvhjearne
Posts: 664
Joined: Mon Mar 14, 2011 1:58 am
Location: Denmark

Re: Installing the PSPSDK (Linux or Windows)

Post by Halvhjearne » Fri May 20, 2011 6:37 pm

hey ultimakillz

im trying to follow your guide for linux, but i end up with this wierd error after its been running for like 30min ...:
...
...
...
make[1]: Leaving directory `/home/halvhjearne/psptoolchain/build/gdb-6.8/build-psp'
rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E *.log
At revision 2494.
cd: 22: can't cd to psplinkusb
../scripts/009-psplinkusb.sh: Failed.
ERROR: Could not run the toolchain script.
halvhjearne@halvhjearne-ubuntu:~/psptoolchain$
im kind of a noob, at using linux so i have no idea what this means(except the obvius of corse that it didnt find the psplinkusb folder)
i changed the scripts as it says in the guide, tho it does still come up with a buch of warnnigs along the way (dont know if thats normal)

im using ubuntu by the way and i really hope you know what im doing wrong here?
... ive tryed this twice now, and im just oblivius and about to puch a hole in my screen :?
Dr. Evil wrote:I used to use Windows, but it was designed by freakin' idiots.
Now i use linux allowing me to conrol the "lasers" on my "death star" with ease.
I'm Dr. Evil, and I'm aspiring to take over the world.

ultimakillz
Retired Mod
Posts: 805
Joined: Mon Sep 27, 2010 6:55 pm

Re: Installing the PSPSDK (Linux or Windows)

Post by ultimakillz » Fri May 20, 2011 6:49 pm

from the error it appears that it cannot enter the psplinkusb directory and therefore the 009-psplinkusb.sh script fails :? im not on my linux machine, but can you cd into the psplinkusb directory in terminal? open up a terminal and see if that directory exists:

Code: Select all

cd psptoolchain
ls
when i get home ill try to get on my linux machine and help more. until then maybe someone else can offer their opinion ;)
"Thanks to all you gays i am leaning allot" src

Halvhjearne
Posts: 664
Joined: Mon Mar 14, 2011 1:58 am
Location: Denmark

Re: Installing the PSPSDK (Linux or Windows)

Post by Halvhjearne » Fri May 20, 2011 6:57 pm

ultimakillz wrote:from the error it appears that it cannot enter the psplinkusb directory and therefore the 009-psplinkusb.sh script fails :? im not on my linux machine, but can you cd into the psplinkusb directory in terminal? open up a terminal and see if that directory exists:

Code: Select all

cd psptoolchain
ls
when i get home ill try to get on my linux machine and help more. until then maybe someone else can offer their opinion ;)
it dosnt exist here ...:

Code: Select all

halvhjearne@halvhjearne-ubuntu:~$ cd psptoolchain/
halvhjearne@halvhjearne-ubuntu:~/psptoolchain$ ls
build    patches     readme-ubuntu.txt  toolchain.sh
depends  readme.txt  scripts            toolchain-sudo.sh
halvhjearne@halvhjearne-ubuntu:~/psptoolchain$ 
isnt it supposed to download that, through this guide, or could i have done something wrong?
Dr. Evil wrote:I used to use Windows, but it was designed by freakin' idiots.
Now i use linux allowing me to conrol the "lasers" on my "death star" with ease.
I'm Dr. Evil, and I'm aspiring to take over the world.

ultimakillz
Retired Mod
Posts: 805
Joined: Mon Sep 27, 2010 6:55 pm

Re: Installing the PSPSDK (Linux or Windows)

Post by ultimakillz » Fri May 20, 2011 6:59 pm

it might be inside one of those directories..... like i said, im not on my linux machine so i cant tell you for sure :?
"Thanks to all you gays i am leaning allot" src

Post Reply

Return to “Tutorials”