Installing the PSPSDK (Linux or Windows)

Hi guys so today heres a little tut for those who want to go into psp development

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 ::..

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 ) 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:

003-pspsdk-stage1.sh

006-pspsdk-stage2.sh

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

..:: installing the minimalist pspsdk on linux via minpspw::..

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

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 © 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.

..:: installing the minimalist pspsdk on windows via minpspw ::..

those of us using windows (i go back and forth ) 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!

..:: 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!




original source

Source

Why post this coz it helped me get started on psp development