PSP Hacks - Forums

Go Back   PSP Hacks - Forums > PSP Community > PSP Programming & Development

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 09-05-2007, 12:31 AM
foebea foebea is offline
Programmer
PSP Hacks Member
 

Join Date: Mar 2007
Posts: 287
foebea Has a Beginner Reputation
Default

There are other threads on this site for using the PSP Toolchain on Windows with and also without Cygwin, but there seems to be a lack for true linux.

This is a quick and relatively easy tutorial for installation and configuration of both linux, the psp toolchain, and most of the libraries. Currently bzip2, freetype, jpeg, libbulletml, libmad, libmikmod, libogg, libpng, libpspvram, libTremor, libvorbis, lua, pspgl, pspirkeyb, SDL, SDL_gfx, SDL_image, SDL_mixer, SDL_ttf, sqlite and zlib.

This is accomplished in basically 3 steps. Install linux, install toolchain, install libraries. Here's how it goes.

Grab the latest Xubuntu LiveCD. http://www.xubuntu.org/get
It is under 600 megs and can be burned to a cd. Xubuntu is a lightweight linux distro which has very low default requirements but looks and runs as nicely as any distro I have used. Boot the cd and without any installation or changing your hard drive you have a full blown and active linux. You can play around with it and see if you like it. If you decide to use a different distribution they likely have different installation instructions, but if you decide to go with Xubuntu just double click on the Install icon on the desktop and it does the rest.

Now that linux is installed, download the latest PSP Toolchain at http://ps2dev.org/psp/Tools/Toolchain
Extract the PSP Toolchain archive to its own folder on the Desktop.

Go to a console by clicking on Applications (This menu acts like the Start button in windows, and is typically on the left hand side of the Toolbar) and choose Accessories, then Terminal.

Type in 'sudo su' and then enter your password to get root access. Now enter the following commands to install all the programs required to install the Toolchain. Some of them may already be installed so nothing will be done, but run them all anyway to ensure everything is up to date. Note: In the PSP Toolchain readme it says to install ncurses, but on apt-get ncurses is installed by the name libncurses5-dev so I use that here.

apt-get install autoconf
apt-get install automake
apt-get install bison
apt-get install flex
apt-get install gcc
apt-get install make
apt-get install libncurses5-dev
apt-get install libusb-dev
apt-get install patch
apt-get install subversion
apt-get install texinfo
apt-get install wget


After those have all been installed, updated, or ignored, you need to add these lines to /home/username/.bashrc by running the following commands (in the example, my username is foebea):

vi /home/foebea/.bashrc

This will start the vi editor which is easier to use than people make it out to be.
use your arrow keys to go to the bottom of the file, then go to the end of the last line using your right arrow. Press the 'a' key to tell vi to start 'insert' mode after the current character. Press 'enter' twice and then type:

export PSPDEV=/usr/local/pspdev
export PATH=$PATH:$PSPDEV/bin

Once those two lines are typed, press 'esc' to leave insert mode and then enter ':w' to save changes and ':q' to quit the program. Now your user name is set up so the next time it logs in it will be able to compile psp code. Unfortunately root is not configured as such, so in order to do the next step you need to run those lines again. You don't need to use vi this time, since you will not be using root to compile psp code there is no need to add it to the path. Just enter those two lines as commands in the console.

Now type 'echo $PATH' to make sure your path shows pspdev in the path somewhere. If it does, you are good to go and almost done.

Go into the PSP Toolchain directory that you extracted it to earlier. If you extracted it to the Desktop you can get to it by typing 'cd /home/your-username/Desktop/ps' and then press the tab key to have the system automatically type the rest of the folder name. Now press 'enter'

Run the Toolchain script by entering './toolchain.sh' and then go see 3 movies.

Once that finishes, type 'svn checkout svn://svn.ps2dev.org/psp/trunk/psplibraries'
This downloads a folder into your current directory with a script that automates the process of downloading, configuring, compiling, and installing the following libraries: bzip2, freetype, jpeg, libbulletml, libmad, libmikmod, libogg, libpng, libpspvram, libTremor, libvorbis, lua, pspgl, pspirkeyb, SDL, SDL_gfx, SDL_image, SDL_mixer, SDL_ttf, sqlite and zlib.

Thats a pretty impressive repertoire to have at your disposal.

Use 'apt-get install libtool' to install one last program that we need.
Then run ./libraries.sh

There is only one last thing that needs done to make it all happy. The current version of freetype for the PSP seems to install the include files to the wrong directory.
Enter the command 'cp -R \usr\local\pspdev\psp\include\freetype2\freetype \usr\local\pspdev\psp\include' to put it in the right place.

Now if you want to can 'rm -rf' (delete recursively, don't ask for confirmation) \usr\local\pspdev\psp\include\freetype2 but I recommend keeping it around in case something happened when you tried to copy it, in case its not where it should be or something. If nothing else, you can just reinstall the libraries and it will put it back in the wrong place again.

Now you should have a fully working PSP Development Environment and a pretty stable system.
If there are any programs out there you want or need, you now know how to use apt-get pretty decently. (hint: rather than 'install' you can also 'remove' and 'update')

Any questions?


edit: clarification of 'Application Menu' descriptive language.
__________________
RosettaShard v.8.7 Download: www.psp-hacks.com/file/1114
RosettaShard Status: http://www.poorlywritten.com/piki/in...=The_New_Shard

Long live the one complete orbit or cycle!
Reply With Quote
  #2  
Old 11-29-2008, 06:03 PM
Furypaw's Avatar
Furypaw Furypaw is offline
Programmer
PSP Veteran
 
Join Date: Jul 2007
Location: Furypaw.rar
Posts: 1,058
Furypaw is on a distinguished road
Default

xubuntu 8.10 wants "mpfr" anyone know what that is so I can type it into apt-get install?
__________________
Reply With Quote
  #3  
Old 11-29-2008, 10:23 PM
thehman thehman is offline
PSP Veteran
 

Join Date: Mar 2007
Posts: 1,084
thehman Has a Beginner Reputation
Default

Maybe "sudo apt-get install libmpfr-dev"
__________________

ʕθ̿␣̅θ̿ʔ ℋiЬЬyℬot™
Reply With Quote
  #4  
Old 11-30-2008, 12:26 AM
Xitherun's Avatar
Xitherun Xitherun is offline
Senior Member
PSP Titan
 

Join Date: Nov 2006
Location: http://www.tacticalbread.net76.net/
Posts: 4,499
Xitherun is a glorious beacon of lightXitherun is a glorious beacon of lightXitherun is a glorious beacon of lightXitherun is a glorious beacon of lightXitherun is a glorious beacon of lightXitherun is a glorious beacon of light
Default

yeah, libmpfr-dev.

also, you can open up Synaptic Package Manager, and search for what you want.
__________________
Xylophones inspecting tortured hearts equal rambunctious unicorn's nightmares.

Reply With Quote
  #5  
Old 11-30-2008, 06:46 AM
pirata nervo pirata nervo is offline
Moderator
PSP Titan
 

Join Date: Mar 2007
Location: www.consoleworld.net
Posts: 5,556
pirata nervo is on a distinguished road
Default

You will probably need one more library (I don't remember its name now) but I remember I needed to download it
__________________

Reply With Quote
  #6  
Old 11-30-2008, 11:36 AM
thehman thehman is offline
PSP Veteran
 

Join Date: Mar 2007
Posts: 1,084
thehman Has a Beginner Reputation
Default

Quote:
Originally Posted by pirata nervo View Post
You will probably need one more library (I don't remember its name now) but I remember I needed to download it
The other library most likely is libgmp-dev
__________________

ʕθ̿␣̅θ̿ʔ ℋiЬЬyℬot™
Reply With Quote
  #7  
Old 11-30-2008, 01:41 PM
pirata nervo pirata nervo is offline
Moderator
PSP Titan
 

Join Date: Mar 2007
Location: www.consoleworld.net
Posts: 5,556
pirata nervo is on a distinguished road
Default

Yeah that was the one I was talking about
__________________

Reply With Quote
  #8  
Old 12-12-2008, 04:12 AM
Blade_punk's Avatar
Blade_punk Blade_punk is offline
Programmer
PSP Monk
 

Join Date: Nov 2006
Location: Candy Mountain
Posts: 2,741
Blade_punk will become famous soon enoughBlade_punk will become famous soon enough
Default

Hey, I've installed Ubuntu 8.10 and I'm trying to get the Toolchain + SDK setup. Everything's gone fine except after a while through running the toolchain script it throws this:
Code:
make[3]: *** [libgcc.a] Aborted
make[3]: *** Deleting file `libgcc.a'
make[3]: Leaving directory `/home/lachy/Desktop/psptoolchain/build/gcc-4.1.0/build-psp/gcc'
make[2]: *** [stmp-multilib] Error 2
make[2]: Leaving directory `/home/lachy/Desktop/psptoolchain/build/gcc-4.1.0/build-psp/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory `/home/lachy/Desktop/psptoolchain/build/gcc-4.1.0/build-psp'
make: *** [all] Error 2
../scripts/002-gcc-4.1.0-stage1.sh: Failed.
Anyone know what needs to be done?
__________________

-Rock Station-
PSN: Xsjado7

Reply With Quote
  #9  
Old 12-12-2008, 04:19 AM
Xitherun's Avatar
Xitherun Xitherun is offline
Senior Member
PSP Titan
 

Join Date: Nov 2006
Location: http://www.tacticalbread.net76.net/
Posts: 4,499
Xitherun is a glorious beacon of lightXitherun is a glorious beacon of lightXitherun is a glorious beacon of lightXitherun is a glorious beacon of lightXitherun is a glorious beacon of lightXitherun is a glorious beacon of light
Default

Quote:
Originally Posted by Blade_punk View Post
Hey, I've installed Ubuntu 8.10 and I'm trying to get the Toolchain + SDK setup. Everything's gone fine except after a while through running the toolchain script it throws this:

Anyone know what needs to be done?
I had problems with the toolchain install on 8.10 as well.

check out this thread on consoleworld.

http://forums.consoleworld.net/showthread.php?tid=698
__________________
Xylophones inspecting tortured hearts equal rambunctious unicorn's nightmares.

Reply With Quote
  #10  
Old 12-12-2008, 05:44 AM
Blade_punk's Avatar
Blade_punk Blade_punk is offline
Programmer
PSP Monk
 

Join Date: Nov 2006
Location: Candy Mountain
Posts: 2,741
Blade_punk will become famous soon enoughBlade_punk will become famous soon enough
Default

Now I'm getting
Code:
make: *** [all] Error 2
../scripts/004-newlib-1.15.0.sh: Failed.
ERROR: Could not run the toolchain script.
__________________

-Rock Station-
PSN: Xsjado7

Reply With Quote
Reply

 



Thread Tools
Display Modes

Posting Rules
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 -4. The time now is 08:57 PM.


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