Page 1 of 1

compiling Ule ,hddmodules not loading?

Posted: Thu Jan 01, 2009 4:50 am
by NoobWithBoobs
Ive been compiling all the source code i can find to learn by example,using the prebuilt fully compiled ps2sdk from http://gshi.org/downloads/gshi_ps2sdk.7z...Ive been trying to compile Ulaunch, It compiles and functions until i try to go into ps2net from Misc. , it says loading HDDModules on screen,but freezes there.(Ive tried many versions from v3.0 to v4.3)

So i commented out something in the loadhddmodules and it popped up with the ip,gateway, etc info,but i was unable to connect to it thru xlink,as i am with ule someone else compiled..

So my question is,is it possibly because of outdated hdd files in the prebuilt toolchain?The function that locks up is calling ps2fs_irx,ps2atad_irx,and ps2hdd_irx.And im assuming they are critical to the function of ps2net.

Posted: Thu Jan 01, 2009 6:56 am
by EP
So my question is,is it possibly because of outdated hdd files in the prebuilt toolchain?The function that locks up is calling ps2fs_irx,ps2atad_irx,and ps2hdd_irx.And im assuming they are critical to the function of ps2net.
Outdated less likely, but more likely it’s the newer libraries. ULaunchELF requires a somewhat older ps2sdk build in order to work correctly as with many other older PS2 applications. Your best bet is to use the included setup.sh script to get all the working library versions that uLaunchELF builds require to work properly.

Posted: Thu Jan 01, 2009 11:29 am
by LBGSHI
Wouldn't that downgrade your PS2SDK?

I should probably take a look at the issue, and see if I can find a way to fix it, without sacrificing the up-to-date SDK.

Posted: Thu Jan 01, 2009 4:22 pm
by NoobWithBoobs
hmm,i ran the setup.sh inside the ule v4.30 folder,it updated/downgraded the toolchain,but now ule wont compile at all,saying the makefile.pref,and makefile.global were now missing..

Posted: Thu Jan 01, 2009 7:55 pm
by dlanor
LBGSHI wrote:Wouldn't that downgrade your PS2SDK?
Unfortunately, yes it will. But using the existing PS2SDK as-is to compile uLE always results in various failures and filesystem corruption after some time of using that uLE version. Thus we've had no choice but to step back and use various older versions of most libs.

In some cases that is not only to counter the problems with uLE, but also to maintain compatibility between the various libs used. (reverting to older version of one lib thus forces us to likewise revert for libs that depend on it)
I should probably take a look at the issue, and see if I can find a way to fix it, without sacrificing the up-to-date SDK.
That would be very good. Let us know what you find.

But remember that some of the problems take the form of weird unexplained filesystem corruption usually noticed only after long-term high-volume file transfers. I'm not aware of any quick and certain method for testing this well.

Best regards: dlanor

Posted: Thu Jan 01, 2009 8:10 pm
by dlanor
NoobWithBoobs wrote:hmm,i ran the setup.sh inside the ule v4.30 folder,
Exactly which folder do you mean by that ?

The setup.sh script will only work correctly if executed inside its original folder as supplied in the official release package. That is not the main folder ("uLE v4.30"), but its subfolder "Source\Changed source for external projects". It is only then that the script will be able to find the changed source files for various libs and add these to the source folders of those libs before recompiling them for use with uLE.
it updated/downgraded the toolchain,but now ule wont compile at all,saying the makefile.pref,and makefile.global were now missing..
This never happens to me, so it may be due to running the "setup.sh" script in another folder than intended. It needs to be executed by bash with the above-mentioned folder as work directory.

Best regards: dlanor

Posted: Fri Jan 02, 2009 5:07 am
by NoobWithBoobs
dlanor wrote:
The setup.sh script will only work correctly if executed inside its original folder as supplied in the official release package.
Hmm i see,well yes i did move the file ,outside of the "changed source" folder simply because ,i was havin trouble getting into that folder with msys since it has a space in its folder name.Can it enter this folder? Or will it still work correctly if i change the name of the folder to changed_source_for_external_projects?
I tryed the folder name change,and will test after work today,also noticed when running the sh,it calls for wget.exe,and says its missing..

Posted: Fri Jan 02, 2009 9:17 am
by dlanor
NoobWithBoobs wrote:
dlanor wrote:
The setup.sh script will only work correctly if executed inside its original folder as supplied in the official release package.
Hmm i see,well yes i did move the file ,outside of the "changed source" folder simply because ,i was havin trouble getting into that folder with msys since it has a space in its folder name.Can it enter this folder?
I don't usually do it that way, having prepared drag-drop batch files for bash invocation and also because I use CygWin rather than MinGW for PS2Dev stuff. But any command-line interface should allow you to use arbitrary folder names, as long as you put 'exotic' names inside quotes, like in the following command line:

cd "Changed source for external projects"

I do use MinGW MSYS for development of some PC apps, so I know that its CLI will accept 'cd' commands with quoted pathnames.
Or will it still work correctly if i change the name of the folder to changed_source_for_external_projects?
It should work that way too, but I consider it silly to use that old-fashioned method with modern filesystems that do support spaces in pathnames. Simply put the name in quotes to avoid any need to change it.
I tryed the folder name change,and will test after work today,also noticed when running the sh,it calls for wget.exe,and says its missing..
This means that your MinGW installation is incomplete, so you need to add that "wget.exe" file in order to download the libcdvd files (not available through SVN).

Best regards: dlanor

Posted: Fri Jan 02, 2009 3:56 pm
by EP
LBGSHI wrote:I should probably take a look at the issue, and see if I can find a way to fix it, without sacrificing the up-to-date SDK.
As dlanor already noted, that would be very much appreciated. The setup.sh script included with uLaunchELF merely acts as a stopgap. Revisions of the ps2sdk since 1420 have caused issues with uLaunchELF and some other programs. The code appears to build fine using revisions after 1420. However, changes to the poweroff handler may have damaged hdd module loading among any number of other things. I wanted to take a closer look myself, but I shied away from it. The primary reason being that I once got burned messing with the hdd internals some years ago.

As for using older network modules from EEUG's SMS, I saw consistent corruption with host: except for revision 588. So that's why dlanor and I use those older versions of those libraries. Sometime ago I did a full barrage of tests by transferring 'dd' created hdd images using uLE's host: protocol. The best result was only with that particular combination.

Posted: Sat Jan 03, 2009 1:05 pm
by LBGSHI
Ah, wget is something I neglected to include in the prebuilt PS2SDK. I'll add that (as well as zlib, assuming there aren't any horrible obstacles to that), and shall toy around with uLE this weekend.

Posted: Sat Jan 03, 2009 3:57 pm
by NoobWithBoobs
yea,using the prebuilt compiler as it sat,it compiled ule,but it seemed to hang loading hddmodules,and perhaps host modules under ps2net.After running the setup.sh (thank you for pointing out i could use quotation marks on folders with spaces...lol),it gave me wget.exe errors,so ill continue toying with other sources to learn how all this stuff comes together,and wait anxiously for the new prebuilt with wget..
I would mess with changing the revisions,but im not even sure how to tell what revision is what,or to see what revision I am using now,lol

Posted: Sat Jan 03, 2009 10:51 pm
by LBGSHI
You could always go grab the wget binary, and paste it into your mingw/bin directory, in the meantime...

Posted: Sun Jan 04, 2009 5:26 am
by NoobWithBoobs
o ok,i thought it was much more complicated than that lol,added,and no wget error.Just to make sure im not doin this wrong...all the files/folders in the changed source folder get put where they go by the setup.sh,or do i merge those folders before setup.sh?

hmm also,i see early on running setup.sh it rmdir ps2sdk,but doesnt remake it ,cuz after its all done theres no ps2sdk folder,what could cause that error?

Posted: Sun Jan 04, 2009 12:14 pm
by dlanor
NoobWithBoobs wrote:o ok,i thought it was much more complicated than that lol,added,and no wget error.Just to make sure im not doin this wrong...all the files/folders in the changed source folder get put where they go by the setup.sh,or do i merge those folders before setup.sh?
You should do no manual merging, as the script handles it all, in the section covering lines #128-#135 of the setup.sh file, looking like this:

Code: Select all

echo we will now apply CSD patches to the work copies of relevant libs

cd "$SRCDIR"
cp -r ps2sdk/* "$PS2DEV/ps2sdksrc"
cp -r gsKit/* "$PS2DEV/gsKit"
cp -r ps2ftpd/* "$PS2DEV/ps2ftpd"
cp -r libjpg/* "$PS2DEV/libjpg"
cp -r libcdvd/* "$PS2DEV/libcdvd"
There $SRCDIR is the original launch directory of the script, as defined in its earliest parts, which is why it is so important that the script be launched from the folder we supply it in, so it can find the CSD stuff. (Here CSD is short for "Changed Source Directory")
hmm also,i see early on running setup.sh it rmdir ps2sdk,but doesnt remake it ,cuz after its all done theres no ps2sdk folder,what could cause that error?
I'm not sure. When all is said and done you should have in total three different folders related to ps2sdk.

The original untouched ps2sdk source should remain in $PS2DEV/uLE_BUP/ps2sdksrc/, exactly as downloaded by the commands in lines #60+#61 of the script:

Code: Select all

	cd $BUP_DIR
	svn co svn://svn.ps2dev.org/ps2/trunk/ps2sdk --revision 1420 ps2sdksrc
That unchanged source is needed to allow future changes of the CSD patches, for future uLE releases, without requiring any new downloads.

In addition to this there should also be a modified and compiled source folder created by the script at $PS2DEV/ps2sdksrc plus an installed binary folder (the one actually used by various projects including uLE) at $PS2DEV/ps2sdk/

The creation of these three folders is distributed over various parts of the script which when collected to a single sequence (ignoring other libs) would look like this:

Code: Select all

export SRCDIR="`pwd`"
export BUP_DIR=$PS2DEV/uLE_BUP
export PS2SDKSRC="$PS2DEV/ps2sdksrc"
  cd $BUP_DIR
	svn co svn://svn.ps2dev.org/ps2/trunk/ps2sdk --revision 1420 ps2sdksrc
cd $PS2DEV
rm -fr ps2sdk/*
rmdir ps2sdk
rm -fr ps2sdksrc/*
rm -fr ps2sdksrc/.svn
rmdir ps2sdksrc
cd $PS2DEV
cp -r uLE_BUP/ps2sdksrc ps2sdksrc
cd "$SRCDIR"
cp -r ps2sdk/* "$PS2DEV/ps2sdksrc"
cd $PS2DEV/ps2sdksrc && make clean && make && make install
The creation of the binary folder $PS2DEV/ps2sdk is not directly visible in this script as it is performed by the "make install" command in the final compound statement shown in the script excerpt above. So you will find the details of how it is done in the makefiles of the ps2sdksrc folder.

If the ps2sdk folder (and others ?) are not created as intended by the script, the only reason I can think of is that something is wrong with your setup, causing bash not to execute the script properly, or to do so with the wrong environment setup. But missing $PS2DEV or such should surely have resulted in multiple errors along the way, and not just one missing folder, so I'm not sure what happened to you.

Possibly you have just not defined the $PS2SDK variable as expected, which the ps2sdk makefile uses for the 'install' target directory. If so, then simply define this in your MinGW setup (or bash.bashrc) to be $PS2DEV/ps2sdk (the script expects it to be so). We should perhaps add this to the script itself, but it is commonly defined in most setups anyway (needed for many projects to find the libs).

Best regards: dlanor

Posted: Mon Jan 05, 2009 4:33 am
by NoobWithBoobs
Ok yea the ps2sdksrc folder is there as well as the one inside ule_bup,but not ps2dev/ps2sdk.

ok hmm,perhaps a vista problem,cuz ive always had collect.exe and such errors using vista,I will retry the whole thing on my desktop tomorrow which uses xp,and see how it works out

Posted: Mon Jan 05, 2009 5:51 am
by dlanor
NoobWithBoobs wrote:Ok yea the ps2sdksrc folder is there as well as the one inside ule_bup,but not ps2dev/ps2sdk.
I see, but have you double-checked that the environment variable named "PS2SDK" points to the subfolder "/ps2sdk" inside the main ps2dev folder indicated by the environment variable named "PS2DEV".

This is required in order for "make install" of the ps2sdksrc package to create the freestanding binary ps2sdk release folder, as intended. Otherwise you end up with the binary release intermixed with the source package, which is not a good idea.
ok hmm,perhaps a vista problem,cuz ive always had collect.exe and such errors using vista,I will retry the whole thing on my desktop tomorrow which uses xp,and see how it works out
I don't use Vista myself, so I can't give any advice specific to that OS, but I suspect that your problem is rather one with the MinGW/bash environment variable setup.

Best regards: dlanor

Posted: Mon Jan 05, 2009 6:48 am
by NoobWithBoobs
quote(
your MinGW setup (or bash.bashrc)
)

kinda unclear at where i am lookin for that info but i have this in msys/1.0/etc/profile:

export PS2DEV=/usr/local/ps2dev
export PATH=$PATH:$PS2DEV/bin
export PATH=$PATH:$PS2DEV/ee/bin
export PATH=$PATH:$PS2DEV/iop/bin
export PATH=$PATH:$PS2DEV/dvp/bin
export PS2SDK=$PS2DEV/ps2sdk
export PATH=$PATH:$PS2SDK/bin
export PS2SDKSRC=$PS2DEV/ps2sdksrc
export PS2LIB=$PS2DEV/ps2lib
export PS2ETH=$PS2DEV/ps2eth

Posted: Mon Jan 05, 2009 5:28 pm
by LBGSHI
Hmm...everything else aside, it seems I managed to duplicate

export PATH=$PATH:$PS2SDK/bin

...at some point. I shall have to fix that.

[EDIT: No, I didn't. Heh, I guess I was just tired at the time I looked.]

Posted: Tue Jan 06, 2009 12:53 pm
by dlanor
NoobWithBoobs wrote:quote(
your MinGW setup (or bash.bashrc)
)

kinda unclear at where i am lookin for that info but i have this in msys/1.0/etc/profile:
----- snip ----- re: your PS2DEV environment variable definitions

I do things a bit differently with my Cygwin setup, where I define these variables only for bash, as this is the main shell for all my PS2Dev work, thus affecting the environment of all other tools invoked by it as well. This environment is setup in my main "bash.bashrc" file stored at "/etc" (In fact the Windows path "E:\Cygwin\etc").

I have inserted the following text into that "bash.bashrc" file, in order to define the PS2Dev environment I use:

Code: Select all

## PS2DEV SETTINGS
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
#
export PS2SDKSRC=$PS2DEV/ps2sdksrc
export PS2GCC=$PS2DEV/gcc
export PS2LIB=$PS2DEV/ps2lib
export LIBITO=$PS2DEV/libito
export PS2DRV=$PS2DEV/ps2drv
export LIBHDD=$PS2DEV/libhdd
export PS2IP=$PS2DEV/ps2ip
export PS2ETH=$PS2DEV/ps2eth
export LIBJPG=$PS2DEV/libjpg
export GSKIT=$PS2DEV/gsKit
export GSKITSRC=$PS2DEV/gsKit
This does include several libs not used for uLE, and which you may not need at all. In fact I don't currently have all those libs installed myself, but I like to have the environment already setup if/when I do decide to work with them.

Your list of variable definitions look fine too, but since you never get the "make install" for ps2sdk to do its work properly, we must then question if the variables defined in that list are really and truly passed on to bash and the tools it invokes properly (here primarily 'make').

One way of testing this (for bash itself at least) is to simply command bash to show the environment variable value, with a command like "echo $PS2SDK". When I do this I get the echoed response "/usr/local/ps2dev/ps2sdk", exactly as defined in my list above. It would be interesting to see if your bash also gives the correct response to that command.

Best regards: dlanor

Posted: Tue Jan 06, 2009 2:45 pm
by LBGSHI
Her (his?) environment variables should be fine, unless etc\profile was modified since the PS2SDK was downloaded...but, a very valid question. I can't imagine why the ps2sdk directory would disappear (though, it's worth mentioning that using the normal script to reinstall the PS2SDK will likely break it in some severe ways...PS2SDK hasn't built properly for msys/MinGW by normal means for some time now, unless it's been fixed recently).

I've added wget.exe to the MinGW\bin directory, added zlib functionality, and added ragnarok2040's gsKit patch; version 4.4 is now available: http://gshi.org/vb/showthread.php?t=3097

I still haven't had a chance to take a look at possible improvements to the uLE solutions/issues we're faced with. It's quite likely that I'm out of my depth here in terms of experience, but that doesn't mean I won't give it a few dozen tries :)

Posted: Tue Jan 06, 2009 11:11 pm
by dlanor
LBGSHI wrote:I can't imagine why the ps2sdk directory would disappear
The reason why it disappears is very simple, as the setup.sh script deletes it in preparation for creating a new one by the "make install" command applied in the ps2sdksrc directory. It is very clearly this that somehow fails to create the new ps2sdk directory as required.
(though, it's worth mentioning that using the normal script to reinstall the PS2SDK will likely break it in some severe ways...PS2SDK hasn't built properly for msys/MinGW by normal means for some time now, unless it's been fixed recently).
I was not aware of this myself, since I use only Cygwin for PS2 development. But given what you say here I must assume that this is why the "make install" for PS2SDK doesn't work right. (possibly the other two make commands used for PS2SDK in this script also failed)

This needs to be fixed ASAP, to allow people with MinGW to update/downgrade PS2SDK (as required to compile uLE).
I've added wget.exe to the MinGW\bin directory, added zlib functionality, and added ragnarok2040's gsKit patch; version 4.4 is now available: http://gshi.org/vb/showthread.php?t=3097
New lib updates are not an issue with uLE, as it uses specific SVN versions, with revision numbers specified in the "setup.sh" script. We will probably update the script to use the improved gsKit version, but only if it does not have any dependencies on libs whose new revisions we don't want (for compatibility reasons).
I still haven't had a chance to take a look at possible improvements to the uLE solutions/issues we're faced with. It's quite likely that I'm out of my depth here in terms of experience, but that doesn't mean I won't give it a few dozen tries :)
Good, because I'm not able to deal with the MinGW issues myself.

Best regards: dlanor

Posted: Wed Jan 07, 2009 11:52 am
by LBGSHI
The reason why it disappears is very simple, as the setup.sh script deletes it in preparation for creating a new one by the "make install" command applied in the ps2sdksrc directory. It is very clearly this that somehow fails to create the new ps2sdk directory as required.
Heh, I forgot it deletes the old PS2SDK directory completely.

Posted: Wed Jan 07, 2009 7:57 pm
by radad
(though, it's worth mentioning that using the normal script to reinstall the PS2SDK will likely break it in some severe ways...PS2SDK hasn't built properly for msys/MinGW by normal means for some time now, unless it's been fixed recently).
I have built the PS2SDK with msys/MinGW recently.

Posted: Wed Jan 07, 2009 8:13 pm
by dlanor
radad wrote:
(though, it's worth mentioning that using the normal script to reinstall the PS2SDK will likely break it in some severe ways...PS2SDK hasn't built properly for msys/MinGW by normal means for some time now, unless it's been fixed recently).
I have built the PS2SDK with msys/MinGW recently.
Did you use some particular 'PS2Dev package' or precompiled toolkit for it ? Or is MinGW your normal development system ?

I should perhaps try it myself, though I normally use Cygwin for my own PS2 development. But I do need to know how/if uLE and related sources compile under MinGW as well, so I can modify my releases accordingly.

Best regards: dlanor

Posted: Wed Jan 07, 2009 8:52 pm
by radad

Posted: Thu Jan 08, 2009 11:18 am
by LBGSHI
I have built the PS2SDK with msys/MinGW recently.
Great! I shall have to try it again soon, then.