Tutorial: How to setup a ps2dev env in cygwin
Tutorial: How to setup a ps2dev env in cygwin
Update #2
I've now written a full tutorial on how to install the toolchains in cygwin using toolchain.sh. http://ps2dev.lukasz.dk/cygwintutorial.html
Updated - No longer supported
This small tutorial will show you how to setup a ps2dev env in cygwin.
First of all you need to install cygwin with http://www.cygwin.com/setup.exe.
Now download this file http://cygwin.lukasz.dk/cygwin-toolchain.sh and save it in a directory in cygwin (home dir for instance) and now log into cygwin and change to the directory where you have downloaded the file to and type ./cygwin-toolchain.sh (use TAB for autocompletion). This script does not compile anything, it just downloads and extracts the binaries.
This script will now download and install the ps2dev (ee toolchain, iop toolchain, dvp toolchain, ps2sdk CVS build and ps2client) env and setup the necessary env vars ($PS2DEV, $PS2SDK and change $PATH).
Its all installed in /usr/local/ps2dev and you can test it by typing 'ee-gcc -v' and you will see that ee-gcc is installed. I've tested the script and everything should be working.
If any one wants to use this script for other systems or if they want to mirror the toolchains, please see the cygwin-toolchain.sh for instructions.
Old cygwin setup files
For those interested in how to make setup files which can be used with setup.exe from cygwin.com. You can grab those files here:
http://www.lukasz.dk/files/setup.bz2
http://www.lukasz.dk/files/setup.ini
I've now written a full tutorial on how to install the toolchains in cygwin using toolchain.sh. http://ps2dev.lukasz.dk/cygwintutorial.html
Updated - No longer supported
This small tutorial will show you how to setup a ps2dev env in cygwin.
First of all you need to install cygwin with http://www.cygwin.com/setup.exe.
Now download this file http://cygwin.lukasz.dk/cygwin-toolchain.sh and save it in a directory in cygwin (home dir for instance) and now log into cygwin and change to the directory where you have downloaded the file to and type ./cygwin-toolchain.sh (use TAB for autocompletion). This script does not compile anything, it just downloads and extracts the binaries.
This script will now download and install the ps2dev (ee toolchain, iop toolchain, dvp toolchain, ps2sdk CVS build and ps2client) env and setup the necessary env vars ($PS2DEV, $PS2SDK and change $PATH).
Its all installed in /usr/local/ps2dev and you can test it by typing 'ee-gcc -v' and you will see that ee-gcc is installed. I've tested the script and everything should be working.
If any one wants to use this script for other systems or if they want to mirror the toolchains, please see the cygwin-toolchain.sh for instructions.
Old cygwin setup files
For those interested in how to make setup files which can be used with setup.exe from cygwin.com. You can grab those files here:
http://www.lukasz.dk/files/setup.bz2
http://www.lukasz.dk/files/setup.ini
Last edited by Lukasz on Tue Dec 13, 2005 7:12 am, edited 5 times in total.
LOL this looks too easy...
edit:
I just did this update it from a clean cygwin + cygwin/x install and here is what I learned:
-make sure you log into cygwin at least once so it creates your home dir
-for whatever reason it showed all packages like I was doing the install from scratch (except the stuff I installed were marked keep instead)
When I tried to add this in on a clean install I wound up with a unhandled Win32 exception from setup.exe with the following in the cygwin setup window:
Installing
dvp-2.14-041130
/etc/postinstall/dvp-toolchain.sh
package: 0%
Total 25%
(approx. values of the progress bars)
perhaps I have left out some vital package on my install like sh or something but I doubt it...
edit:
I just did this update it from a clean cygwin + cygwin/x install and here is what I learned:
-make sure you log into cygwin at least once so it creates your home dir
-for whatever reason it showed all packages like I was doing the install from scratch (except the stuff I installed were marked keep instead)
When I tried to add this in on a clean install I wound up with a unhandled Win32 exception from setup.exe with the following in the cygwin setup window:
Installing
dvp-2.14-041130
/etc/postinstall/dvp-toolchain.sh
package: 0%
Total 25%
(approx. values of the progress bars)
perhaps I have left out some vital package on my install like sh or something but I doubt it...
Thanks for your response.
For postinstall all you should need is echo, sh and grep, since thats what I use in the postinstall script.
Its best to update/clean install your cygwin with these utils and then install the provided packages. Could look like my packages get installed before the utils mentioned above get installed/updated and therefor setup.exe crashes.
For postinstall all you should need is echo, sh and grep, since thats what I use in the postinstall script.
Its best to update/clean install your cygwin with these utils and then install the provided packages. Could look like my packages get installed before the utils mentioned above get installed/updated and therefor setup.exe crashes.
setup.exe is crashing on each of the individual packages (which I only tried to install once I made sure cygwin was working fine) when it gets to the etc/sh file, even though I have the commands echo, sh and grep installed.
I tried reinstalling cygwin again, and doing the packages agian, but the only way I have been able to get them to add the PATH is to extract the .sh file and sh file.sh (run) it directly from bash. (all the toolchain files extracted into their dirs just fine, but the sh + setup.exe is what seems to be causing the problem here)
Im stumped, about the only thing that I did differently is that I used the newest setup from cygwins site, perhaps something got broken in their last update of it with relation to the etc files?
I like the idea though of not having to build the entire toolchain whenever it is updated (although oopo's work helps to fix that) so this is great anyways.
After running the .sh files I get (to ee-gcc -v : gcc version 3.2.2 but just an error before the PATH was appended)
Edit: justaboutforgot to mention - Thanks Lukasz for your work on this!
I tried reinstalling cygwin again, and doing the packages agian, but the only way I have been able to get them to add the PATH is to extract the .sh file and sh file.sh (run) it directly from bash. (all the toolchain files extracted into their dirs just fine, but the sh + setup.exe is what seems to be causing the problem here)
Im stumped, about the only thing that I did differently is that I used the newest setup from cygwins site, perhaps something got broken in their last update of it with relation to the etc files?
I like the idea though of not having to build the entire toolchain whenever it is updated (although oopo's work helps to fix that) so this is great anyways.
After running the .sh files I get (to ee-gcc -v : gcc version 3.2.2 but just an error before the PATH was appended)
Edit: justaboutforgot to mention - Thanks Lukasz for your work on this!
Your problems got me thinking that it maybe be best to not use setup.exe because I myself also had problems with setup.exe crashing when I was creating the setup files. And setup.exe isn't meant to be customized and why would I want to depend on a system which does nothing more than download and extact some files and run a simple script.
Therefor I've decided to not use setup.exe, but instead I've made a cygwin-toolchain.sh which does the same, download and extract and setup the ps2dev env.
I will be uploading the script and new .tar.gz files in some 10 hours time or so and I will also rewrite the tutorial. I will also make the files I've used to make the whole setup it "work" with setup.exe avaliable, if others what to pursue this direction. Until then, I will just leave everything, in case some one is already downloading or want to download.
Therefor I've decided to not use setup.exe, but instead I've made a cygwin-toolchain.sh which does the same, download and extract and setup the ps2dev env.
I will be uploading the script and new .tar.gz files in some 10 hours time or so and I will also rewrite the tutorial. I will also make the files I've used to make the whole setup it "work" with setup.exe avaliable, if others what to pursue this direction. Until then, I will just leave everything, in case some one is already downloading or want to download.
-
- Posts: 564
- Joined: Sat Jan 17, 2004 10:22 am
- Location: Sweden
- Contact:
-
- Posts: 10
- Joined: Sun Jan 30, 2005 4:52 pm
- Contact:
Do you think it would be possible if you showed us how to set up the PS2 Debugger through Cygwin?
PS2 Debugger
PS2 Debugger
fr0st:
from the readme included with it, note the first line I put here. I personally would like to see a better open debugger (or an emulator+debugger for pc). Wouldnt it be nice to get a hold of the open source code from the official SCE dev pack? I think so.
from the readme included with it, note the first line I put here. I personally would like to see a better open debugger (or an emulator+debugger for pc). Wouldnt it be nice to get a hold of the open source code from the official SCE dev pack? I think so.
This is only a proof of concept build, hacked up mercilessly, see the disclaimer.
I've insterted debug printfs too, making it ugly. To use, do the following:-
1. Copy mips64r5900-sf-elf-gdb.exe to you ee/bin folder (e.g. on my system it's c:\cygwin\usr\local\ps2dev\ee\bin).
2. Make a link with "ln -s mips64r5900-sf-elf-gdb.exe ee-gdb.exe" and you should be ready to go.
There's a ps2.cmd command file there to try out. It loads the stub, inserts a breakpoint and continues execution to that
breakpoint. Launch with "ee-gdb -x ps2.cmd".
-
- Posts: 10
- Joined: Sun Jan 30, 2005 4:52 pm
- Contact:
When I tried to install this, I got this:
What should I do?
Code: Select all
wget: not found
Error: Please make sure you have 'wget' installed.
-
- Posts: 10
- Joined: Sun Jan 30, 2005 4:52 pm
- Contact:
with "ln -s mips64r5900-sf-elf-gdb.exe ee-gdb.exe"fr0st m0nkey wrote:How do I make a link?
2. Make a link with "ln -s mips64r5900-sf-elf-gdb.exe ee-gdb.exe" and you should be ready to go.
Shoot Pixels Not People!
Makeshift Development
Makeshift Development
-
- Posts: 10
- Joined: Sun Jan 30, 2005 4:52 pm
- Contact:
Here is a small script based on ooPos script that will update&reinstall the PS2SDK to whatever is currently in the cvs, of course you need cvs and make installed in cygwin to use this script.
ps2sdkupdate.sh
just download it, put it in your cygwin dir and run it with "sh ps2sdkupdate.sh"
ps2sdkupdate.sh
just download it, put it in your cygwin dir and run it with "sh ps2sdkupdate.sh"
says error building, do i need to install the ps2dev sdk first into the home/ dir?cory1492 wrote:Here is a small script based on ooPos script that will update&reinstall the PS2SDK to whatever is currently in the cvs, of course you need cvs and make installed in cygwin to use this script.
ps2sdkupdate.sh
just download it, put it in your cygwin dir and run it with "sh ps2sdkupdate.sh"
Ive updated the toolchains, read more at www.lukasz.dk
Hey Lukasz,
I followed the instructions at the beginning of the post. Didn't work. Took awhile to figure out there was some manual setup required and the instructions were listed elsewhere. (use-newiop.sh or use-oldiop.sh and setting up the symlinks /bin/mkdir -> /bin/cyg-mkdir, ...rmdir, and echo.
Would it be a good idea to put a message at the end of cygwin-toolchain.sh stating there are more things to do or actually list the remaining settings needed?
Thanks, I appriciate not having to fiddle for days or weeks. Besides the download time for cygwin it only took about an hour to get to the ps2sdk-update.sh part and that is still running (so far without any errors).
I followed the instructions at the beginning of the post. Didn't work. Took awhile to figure out there was some manual setup required and the instructions were listed elsewhere. (use-newiop.sh or use-oldiop.sh and setting up the symlinks /bin/mkdir -> /bin/cyg-mkdir, ...rmdir, and echo.
Would it be a good idea to put a message at the end of cygwin-toolchain.sh stating there are more things to do or actually list the remaining settings needed?
Thanks, I appriciate not having to fiddle for days or weeks. Besides the download time for cygwin it only took about an hour to get to the ps2sdk-update.sh part and that is still running (so far without any errors).
I set up cygwin. I ran cygwin-toolchain.sh. Then in ps2dev/bin I ran use-oldiop.sh. When I tried to run ps2sdk-update.sh it fails with cannot cd to ps2sdk. I found in the script two lines commented out;
## Remove any previous builds.
# rm -Rf ps2sdk
## Check out the latest source.
# cvs -d $CVSROOT checkout ps2sdk
## Enter the source directory.
cd ps2sdk
The 'cd ps2sdk' fails because the cvs never runs?
## Remove any previous builds.
# rm -Rf ps2sdk
## Check out the latest source.
# cvs -d $CVSROOT checkout ps2sdk
## Enter the source directory.
cd ps2sdk
The 'cd ps2sdk' fails because the cvs never runs?
You need the ee/iop toolchain installed and the paths setup to them properly to have access to ee-gcc and iop-gcc or the SDK will not build. If you already do have such done, then let me know the specific error and I will see if I can figure out why its happening (although ooPo and Pixel are MUCH better at that sort of thing than I am)Thanhda wrote:says error building, do i need to install the ps2dev sdk first into the home/ dir?cory1492 wrote:Here is a small script based on ooPos script that will update&reinstall the PS2SDK to whatever is currently in the cvs, of course you need cvs and make installed in cygwin to use this script.
ps2sdkupdate.sh
just download it, put it in your cygwin dir and run it with "sh ps2sdkupdate.sh"
lukasz has prebuilt binaries of the toolchain and on a new install with his it wasn't always the most recent release of the SDK - BUT he has since incorporated this idea, so see his website for his toolchain/sdk builder.
I use it to refresh/rebuild my SDK, cleaning up all the garbage first so everything is new (except the ports)
compound: if you are using cygwin you can also set cygwin only environment vars in your homedir's .bashrc or in /etc/bash.bashrc instead of cluttering you path in windows.
this is what the inside of my bash.bashrc file under cygwin looked like before I moved on to debian:
Code: Select all
# base-files version 3.2-1
# System-wide .bashrc file
## ps2dev env vars
export PS2DEV=/usr/local/ps2dev
export PS2SDK=$PS2DEV/ps2sdk
export PATH=$PATH:$PS2DEV/bin:$PS2DEV/ee/bin:$PS2DEV/iop/bin:$PS2DEV/dvp/bin:$PS2SDK/bin