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: 283
foebea User 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 09-05-2007, 05:05 AM
pirata nervo pirata nervo is offline
Moderator
PSP Titan
 
Join Date: Mar 2007
Location: www.consoleworld.net
Posts: 5,008
pirata nervo is on a distinguished road
Default

Koooooooool thank you i have linux but i never installed psp toolchain because it didnt work last time i trie
__________________

Upgrade your PSP Slim or FAT now!
NervOS Official Forum
Reply With Quote
  #3  
Old 09-05-2007, 05:48 AM
Blade_punk's Avatar
Blade_punk Blade_punk is offline
Moderator
PSP Monk
 
Join Date: Nov 2006
Location: Candy Mountain
Posts: 2,686
Blade_punk will become famous soon enoughBlade_punk will become famous soon enough
Default

great work foebea, never knew you could run xubuntu of a disc
__________________
The PSP Programming and Development Mega Thread
-Rock Station-
PSN: Xsjado7
Quote:
Why don't you try walking on your hands! Then you could use your feet for hi-5's and eating sandwiches. You know, all the important stuff!
Reply With Quote
  #4  
Old 09-05-2007, 06:17 AM
PSdonkey's Avatar
PSdonkey PSdonkey is offline
Squirrel Admin
PSP Titan
 
Join Date: Mar 2006
Posts: 9,117
PSdonkey has a reputation beyond reputePSdonkey has a reputation beyond reputePSdonkey has a reputation beyond reputePSdonkey has a reputation beyond reputePSdonkey has a reputation beyond reputePSdonkey has a reputation beyond reputePSdonkey has a reputation beyond reputePSdonkey has a reputation beyond reputePSdonkey has a reputation beyond reputePSdonkey has a reputation beyond reputePSdonkey has a reputation beyond repute
Default

Nice tutorial.

Sticked.
__________________
Want to become a PSP Dev the easy way? Check out my tutorial for the PSP here www.psp-hacks.com/forums/viewtopic.php?id=65403
Want to learn how to create your own games on the PSP? Check out my tutorial here http://www.psp-hacks.com/forums/view...693884#p693884
Want to learn how to program C++ ? Check out that tutorial here www.psp-hacks.com/forums/viewtopic.php?id=28694
Reply With Quote
  #5  
Old 09-05-2007, 07:15 PM
burrito burrito is offline
PSP Hacker
 
Join Date: Oct 2006
Posts: 821
burrito User Has a Beginner Reputation
Default

Quote:
Go to a console by clicking on Applications (start menu, for you windows folk) and choose Accessories, then Terminal.
I have Windows xp, all I see is some phone app called HyperTerminal. Is this the correct program? I tried it, but couldn't figure out how to type text (sudo su) into it.
__________________
Nobody cares about your PSP\'s firmware history.
Reply With Quote
  #6  
Old 09-05-2007, 07:24 PM
pirata nervo pirata nervo is offline
Moderator
PSP Titan
 
Join Date: Mar 2007
Location: www.consoleworld.net
Posts: 5,008
pirata nervo is on a distinguished road
Default

this is for Linux not for windows XP :sigh:
__________________

Upgrade your PSP Slim or FAT now!
NervOS Official Forum
Reply With Quote
  #7  
Old 09-05-2007, 11:22 PM
foebea foebea is offline
Programmer
PSP Hacks Member
 
Join Date: Mar 2007
Posts: 283
foebea User Has a Beginner Reputation
Default

Ah sorry, I guess the phrase (for you windows folk) is misleading. I will correct that. What I intended was to explain that the Application menu is located and behaves as does the start menu in windows. sorry for the confusion.
__________________
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
  #8  
Old 09-06-2007, 01:02 AM
foebea foebea is offline
Programmer
PSP Hacks Member
 
Join Date: Mar 2007
Posts: 283
foebea User Has a Beginner Reputation
Default

Here are a few visual tweaks you can do once you have it all set up:

Remove the bottom pager tool bar (right click) and then add the running applications list to the top tool bar. You can now move the top tool bar to the bottom if that makes more sense to you. Rather than switching to a console (ctrl-alt-f1, etc) you can run a terminal window as in the tutorial, then hit view, hide window borders, then view, hide menu bar, then right click and choose full screen.
now hit ctrl-alt-right arrow to move to your second workspace. here you can run your IDE of choice. when you want to compile just hit ctrl-alt-left arrow and you are back at a full screen console.

On my install, I have it set to save the session automatically each time I shutdown, so the terminal comes back with the same settings on each boot without me having to run anything. Very nice.

Under Applications, System is Restricted Driver Manager which will let you enable the 3d effects of your graphics card (well, mine anyways – nvidia)

There are lots of customizations you can do through Applications, Settings, Settings Manager such as window look, layout, transparency, screensavers, etc. Go there and play around. :mrgreenthumbsup:
__________________
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
  #9  
Old 09-06-2007, 06:10 PM
_prototype_ _prototype_ is offline
PSP Newbie
 
Join Date: Sep 2007
Posts: 47
_prototype_ User Has a Beginner Reputation
Default

Thanks a million! worked like a charm :)
Reply With Quote
  #10  
Old 09-14-2007, 05:31 PM
_prototype_ _prototype_ is offline
PSP Newbie
 
Join Date: Sep 2007
Posts: 47
_prototype_ User Has a Beginner Reputation
Default

I think I should mention, you should add

apt-get install libusb-dev

to the list of dependencies. I checked with Oopo (the toolchain author) and he said he still hasn't included this dependency to the toolchain script. I'm unaware if Xubuntu needs it, but I do know that Ubuntu does by default. Just to save people a bunch of troubles (pirata, maybe thats why it didn't work the first time you tried installing it).
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 11:39 PM.


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