Tutorial: How to setup a ps2dev env in cygwin
login to cygwin
how do i login to cygwin?
First MOD recently completed, dms4pro. had to go back in 3 times to clean up solder and pinched wires but its up and running. now i'm learning to do more than play backups.
That's great, thanks. Doing this for the PSP path settings solved a lot of my problems (y)cory1492 wrote: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
I just tried installing the toolchain and have a problem.
Install Cygwin = done.
Copy toolchain from svn = done.
chmod toolchain.sh = done.
download binutils, gcc, newlib = done.
build binutils = done.
build gcc = not done.
this is what is output on the screen
I have copied everything from the cygwin window if more info is needed.
Install Cygwin = done.
Copy toolchain from svn = done.
chmod toolchain.sh = done.
download binutils, gcc, newlib = done.
build binutils = done.
build gcc = not done.
this is what is output on the screen
Code: Select all
make[2]: Entering directory `/tmp/ps2dev/gcc-3.2.2/build-ee/gcc/fixinc'
/bin/sh ../../../gcc/fixinc/genfixes machname.h
-uThe system cannot find the file specified.
make[2]: *** [machname.h] Error 1
make[2]: Leaving directory `/tmp/ps2dev/gcc-3.2.2/build-ee/gcc/fixinc'
make[1]: *** [fixinc.sh] Error 2
make[1]: Leaving directory `/tmp/ps2dev/gcc-3.2.2/build-ee/gcc'
make: *** [all-gcc] Error 2
ERROR BUILDING GCC (gcc-3.2.2 ee)
I don't think u can change the version as the patches are for 3.2.2.EP wrote:taz030485, this is the exact issue I'm having. I tried changing gcc versions for cygwin but had no luck.
A google search for "make[2]: *** [machname.h] Error 1" shows that this error is quite prevalent with gcc and other projects.
Anyone out there know a solution?
Also are the binutils IOP and GCC IOP patches ment to be used? I can't see them anywhere in toolchain.sh, plus the versions in the name of it IOP patches are different, which aren't downloaded either.
I had tried both cygwin packages for gcc: gcc-core-3.3.3-3 and gcc-core-3.4.4-1taz030485 wrote:I don't think u can change the version as the patches are for 3.2.2.
Then I just stuck with "gcc version 3.3.3 (cygwin special)" and gave up trying to build the toolchain under Windows XP.
Edit:
According to a comment in fixlib.c "machname.h is created by black magic in the Makefile." Well I take it the magic isn't working hence the "-uThe system cannot find the file specified."
http://cygwin.lukasz.dk/cygwin-toolchain.sh is down :(
*when im installing cyg and i need to download svn gcc make wget
a) it stops at 17% or 21% left it for an hour and it times out
b)there is no svn in the extras download, either that or its not under prev or current
il even post a screen shot to prove it aint there
anyone any ideas or help?
*when im installing cyg and i need to download svn gcc make wget
a) it stops at 17% or 21% left it for an hour and it times out
b)there is no svn in the extras download, either that or its not under prev or current
il even post a screen shot to prove it aint there
anyone any ideas or help?
Try using the one in the svn repository.
svn checkout svn://svn.ps2dev.org/ps2/trunk/ps2toolchain
and then run toolchain.sh
I tried cygwin-toolchain.sh as well but it didn't work for me (failed somewhere in the build process).
Not sure about cygwin, try it again, but with a different server. I use a local one and have never had problems. It may be the server you chose has gone down.
As for svn, select the subversion package in setup. Press the view button until it goes to "full" and scroll down to subversion.
There is also a windows svn "client" you could use. Google for tortoisesvn.
svn checkout svn://svn.ps2dev.org/ps2/trunk/ps2toolchain
and then run toolchain.sh
I tried cygwin-toolchain.sh as well but it didn't work for me (failed somewhere in the build process).
Not sure about cygwin, try it again, but with a different server. I use a local one and have never had problems. It may be the server you chose has gone down.
As for svn, select the subversion package in setup. Press the view button until it goes to "full" and scroll down to subversion.
There is also a windows svn "client" you could use. Google for tortoisesvn.
Cygwin setup gives you the option to download without installing (this is what you have probably done) or to install from either the internet or a folder on your PC. Start setup again and choose to install from your PC. Choose the folder where you put your downloaded and files and the folder you want cygwin to go to. Also make sure you select text file type to be binary. You may need to select your packages again, but the only ones available are the ones you selected before. And let it install. It should put an icon on your desktop. Double click that and you'll get a prompt. From there it should be like any Unix command line interface.JorDy wrote:ok thanks ive downloaded everything you said apart from the toolchain into a folder on my desktop called cygwin(its not the actual cyg dir), what do i do next?
If you have 'make' installed you don't need 'gmake', and since it is asking for 'patch' I'd say u have 'make' or it wouldn't get past it.
'patch' is another one of the cygwin programs you need, re-run the cygwin download/installer, make sure you choose the same mirror you did the first time. In the top corner of the list of programs press the view button till it say 'full' beside it. Now scroll down the list and find the package called 'patch'. While in the list make sure you have 'wget' and 'svn' (look for subversion).
'patch' is another one of the cygwin programs you need, re-run the cygwin download/installer, make sure you choose the same mirror you did the first time. In the top corner of the list of programs press the view button till it say 'full' beside it. Now scroll down the list and find the package called 'patch'. While in the list make sure you have 'wget' and 'svn' (look for subversion).
i got it installing the toolchain but i didnt have gmake
ive done
which gmake and it says not found but ive got make.
anyway it installed most things but said no and some directories wernt there! but as it ened it said
"ERROR BUILDING BINUTILS <binutils-2.14 ee>
is this a problem? i suspect it is
and for some odd reason in stead of setting up the directory in usr/ps2dev it set it up in tmp/ps2dev
**i took some screen shots of some of the compiling areas if anyone wants to check to see if theres anythink worng id be very greatfull
http://www.megaupload.com/?d=165PWCOI
ive done
which gmake and it says not found but ive got make.
anyway it installed most things but said no and some directories wernt there! but as it ened it said
"ERROR BUILDING BINUTILS <binutils-2.14 ee>
is this a problem? i suspect it is
and for some odd reason in stead of setting up the directory in usr/ps2dev it set it up in tmp/ps2dev
**i took some screen shots of some of the compiling areas if anyone wants to check to see if theres anythink worng id be very greatfull
http://www.megaupload.com/?d=165PWCOI
JorDy,
It looks like you don't have all the ps2toolchain files. In particular you are missing the .patch files. Did you run the svn command I gave above. If you did it should have created a ps2toolchain directory with all the files you need to build. Run the ps2toolchain.sh script from that directory.
Interestingly the ps2toolchain.sh script is supposed to exit if it has a problem patching, but in your case it didn't. It looks like patch returns 0 if there is no input (ie no file). The script probably should be fixed to account for it. I would do it, but I'm still waiting to get write access to svn.
BTW don't worry about the /tmp/ps2dev stuff. Thats just a working directory where the various parts build. It will get cleaned up later. All your builds will get installed into /usr/local/ps2dev.
Also rather than taking screen shots of it building, redirect output to a file instead. It would have been smaller to upload that, and given better information.
Orfax
It looks like you don't have all the ps2toolchain files. In particular you are missing the .patch files. Did you run the svn command I gave above. If you did it should have created a ps2toolchain directory with all the files you need to build. Run the ps2toolchain.sh script from that directory.
Interestingly the ps2toolchain.sh script is supposed to exit if it has a problem patching, but in your case it didn't. It looks like patch returns 0 if there is no input (ie no file). The script probably should be fixed to account for it. I would do it, but I'm still waiting to get write access to svn.
BTW don't worry about the /tmp/ps2dev stuff. Thats just a working directory where the various parts build. It will get cleaned up later. All your builds will get installed into /usr/local/ps2dev.
Also rather than taking screen shots of it building, redirect output to a file instead. It would have been smaller to upload that, and given better information.
Orfax
i have some problem on the toolchain, wen i start toolchain.sh it beginn to compile and path all thinks but after a time it crash an says that the gcc have an error.
if there any other way without mingw or cygwin to make it unter a debian or other linux distri.
i have the mandrake 10 but i dont know it will be work for the ps2sdk.
sorry for my bad english.
if there any other way without mingw or cygwin to make it unter a debian or other linux distri.
i have the mandrake 10 but i dont know it will be work for the ps2sdk.
sorry for my bad english.
The ps2dev tools work soooo much better in linux.xynuerz wrote:i have some problem on the toolchain, wen i start toolchain.sh it beginn to compile and path all thinks but after a time it crash an says that the gcc have an error.
if there any other way without mingw or cygwin to make it unter a debian or other linux distri.
i have the mandrake 10 but i dont know it will be work for the ps2sdk.
sorry for my bad english.
If you run some version of linux (or any *nix really) I'd personally recommend doing ps2 homebrew in linux instead of windows.
One thing to look out for, which could be your problem here, is that the toolchain will have issues compiling with GCC 3.4.x. Also, make sure you have plenty of hard drive space and your computer isn't overheating while building. Those are the most common problems of 'internal compiler errors' which I would guess is what you had happen?
EDIT: Oops, sorry... I had originally typed GCC 4.x, but it's GCC 3.4 and higher that have issues
Shoot Pixels Not People!
Makeshift Development
Makeshift Development
It depends largely on your hardware and internet speed, but running the toolchain script in cygwin can easily take a couple hours.
But if it sits for a couple hours with no output to the text console... then well, something is probably wrong.
But if it sits for a couple hours with no output to the text console... then well, something is probably wrong.
Shoot Pixels Not People!
Makeshift Development
Makeshift Development
Hi all, I'm new 2 this forum and this was the first post I read besides the rules.
I followed the guide in the first post and i ran into the following error.
makefile:20: /samples/Makefile.pref: No such file or directory
makefile:21: /samples/Makefile.eeglobal: No such file or directory
C:\cygwin\usr\local\ps2dev\bin\make.exe: *** No rule to make target '/samples/Makefile.eeglobal'. Stop.
If anyone can help it would be much appriciated. Thanx.
I followed the guide in the first post and i ran into the following error.
makefile:20: /samples/Makefile.pref: No such file or directory
makefile:21: /samples/Makefile.eeglobal: No such file or directory
C:\cygwin\usr\local\ps2dev\bin\make.exe: *** No rule to make target '/samples/Makefile.eeglobal'. Stop.
If anyone can help it would be much appriciated. Thanx.
Hello I am new here.
I used the tutorial here and i had a problam -
quote:
For compiling the PS2 toolchain, you need the following packages besides from the preselected packages.
gcc
make
wget
svn
Download and install them with setup.exe. In case Cygwin complains about other missing programs, just use setup.exe to download and install them.
---
But i dont get it, how do i getting to select these packages?
After that i runned the setup without it and runned cygwin but when i wrote in cygwin : svn checkout svn://svn...... it said not such a command svn.
i need a very quick reply for these 2 problams.
Thanks Amit
I used the tutorial here and i had a problam -
quote:
For compiling the PS2 toolchain, you need the following packages besides from the preselected packages.
gcc
make
wget
svn
Download and install them with setup.exe. In case Cygwin complains about other missing programs, just use setup.exe to download and install them.
---
But i dont get it, how do i getting to select these packages?
After that i runned the setup without it and runned cygwin but when i wrote in cygwin : svn checkout svn://svn...... it said not such a command svn.
i need a very quick reply for these 2 problams.
Thanks Amit
You don't have subversion installed. Run cygwin's setup again, when you get to the package selection screen, press the view button until you see "Full" next to it. Find the package names you want and press the New column for that package until you get a version number. And for svn, its called subversion.Amitj wrote:But i dont get it, how do i getting to select these packages?
After that i runned the setup without it and runned cygwin but when i wrote in cygwin : svn checkout svn://svn...... it said not such a command svn.
Look deep into their eyes for what they have to say, Emotions take control of life everyday
Death (Nothing Is Everything)
Death (Nothing Is Everything)
C / C++. If you are not familiar with C, then I suggest you learn the language first before attempting to program for the PS2. Also it would help if you are familar with Unix environments to ease the learning process.Amitj wrote:while cygwin creating the ps2dev toolchain i followed the instructions in the tutorial and downloaded the crismon editor. but i didnt understand in which language i can program my ps2 projects, and in whch format should i save it.
Look deep into their eyes for what they have to say, Emotions take control of life everyday
Death (Nothing Is Everything)
Death (Nothing Is Everything)