Page 1 of 1

About PS2LINK 1.24 with embedded ELF.

Posted: Tue Sep 07, 2004 11:23 am
by demonbane
Hello, Everyone.

Well, I have some question of ps2link latest release.

In release note, ps2link 1.24 supports (I understood)
"All-In-One elf (irx's embedded in the elf) build target."
So I want to embeded to ps2link.elf but I can't find any resource file for embeded. I understood to search in this forum, for All-In-One elf, it require some source file, but I can't find anything. If I misunderstand to this. Please help me. Or who made ps2link to All-In-One Elf. Please inform me it's solution.

Thank you in Advanced.

Posted: Tue Sep 07, 2004 12:25 pm
by pixel
Take the sources, edit the main Makefile, change the BUILTIN_IRXS variable to 1, and compile.

Posted: Tue Sep 07, 2004 1:11 pm
by demonbane
Thanks a lot, pixel.

Posted: Tue Sep 07, 2004 7:39 pm
by demonbane
I tried to complie All-In-One ELF file and I failed.
I use gcc compiler and all of ps2dev 1.1 sdk pack in right position (I think)
But I failed

When I tried to compile ps2link 1.24. Using makefile
( In GCC, execute make.exe )

But "make" shows several error message during compiling.

Who know why it shows error message and it can't compile?
( I tried to register all of directory path to windows environment. and already failed.)

Posted: Tue Sep 07, 2004 7:44 pm
by Drakonite
demonbane wrote: But "make" shows several error message during compiling.

Who know why it shows error message and it can't compile?
It depends on the error.
Without seeing the exact error it's hard to know whats wrong.
*hint hint*

Posted: Tue Sep 07, 2004 9:26 pm
by demonbane
At first, I found during compile using "make"

First time it shows messages it coudn't find irx files ; but I checked all of irx files in "C:\PS2SDK\iop\irx" foldes.

And now;

C:\Project>set PATH=PATH;C:\PS2Dev/share;C:\PS2Dev/gcc/ee/bin;C:\PS2Dev/gcc/iop/
bin;C:\PS2Dev/gcc/dvp/bin

C:\Project>set PS2DEV=C:\PS2Dev

C:\Project>set PS2GCC=C:\PS2Dev/gcc

C:\Project>set PS2LIB=C:\PS2Dev/ps2lib

C:\Project>set PS2SDK=C:\PS2Dev\PS2SDK

C:\Project>make
DEBUG=0 LOADHIGH=0 BUILTIN_IRXS=1 ZEROCOPY=0 make -C iop
make: /bin/bash: Command not found
make: *** [iop] Error 127

C:\Project>pause
Press any key to continue . . .

Thank you in advanced.

Posted: Wed Sep 08, 2004 1:10 am
by blackdroid
the builtins magic requires that you have bash installed. for windows users that means install cygwin.

Posted: Wed Sep 08, 2004 9:19 am
by demonbane
Thanks, blackdroid.
I'll try it, today.

Posted: Wed Sep 08, 2004 1:11 pm
by demonbane
Thank you for your help, blackdroid.

I installed cygwin and compile again, and I found errors too.

1. When I turn off embedded IRX option and complier shows me
$ make
DEBUG=0 LOADHIGH=0 BUILTIN_IRXS=0 ZEROCOPY=0 make -C ee
make[1]: Entering directory `/cygdrive/c/ps2dev/project/ee'
ee-gcc -D_EE -O2 -G0 -Wall -IC:/PS2Dev/ps2sdk/ee/include -IC:/PS2Dev/ps2sdk/com
mon/include -I. -I../include -IC:/PS2Dev/sbv-1.0-lite/include -c ps2link.c -o ps
2link.o
ps2link.c:23:25: sbv_patches.h: No such file or directory
ps2link.c: In function `main':
ps2link.c:534: warning: implicit declaration of function `sbv_patch_enable_lmb'
ps2link.c:535: warning: implicit declaration of function `sbv_patch_disable_pref
ix_check'
make[1]: *** [ps2link.o] Error 1
make[1]: Leaving directory `/cygdrive/c/ps2dev/project/ee'
make: *** [ee] Error 2
2. Turn on embedded IRX option, compiler shows me
$ make
DEBUG=0 LOADHIGH=0 BUILTIN_IRXS=1 ZEROCOPY=0 make -C iop
make[1]: Entering directory `/cygdrive/c/ps2dev/project/iop'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/cygdrive/c/ps2dev/project/iop'
Embedding IRX file ps2link
/bin/bash: line 1: C:/PS2Dev/ps2sdk/bin/bin2s: No such file or directory
ee-gcc: ps2link_irx.s: No such file or directory
ee-gcc: no input files
Embedding IRX file ps2ip
/bin/bash: line 1: C:/PS2Dev/ps2sdk/bin/bin2s: No such file or directory
ee-gcc: ps2ip_irx.s: No such file or directory
ee-gcc: no input files
Embedding IRX file ps2smap
/bin/bash: line 1: C:/PS2Dev/ps2sdk/bin/bin2s: No such file or directory
ee-gcc: ps2smap_irx.s: No such file or directory
ee-gcc: no input files
Embedding IRX file iomanX
/bin/bash: line 1: C:/PS2Dev/ps2sdk/bin/bin2s: No such file or directory
ee-gcc: iomanX_irx.s: No such file or directory
ee-gcc: no input files
Embedding IRX file ps2dev9
/bin/bash: line 1: C:/PS2Dev/ps2sdk/bin/bin2s: No such file or directory
ee-gcc: ps2dev9_irx.s: No such file or directory
ee-gcc: no input files
DEBUG=0 LOADHIGH=0 BUILTIN_IRXS=1 ZEROCOPY=0 make -C ee
make[1]: Entering directory `/cygdrive/c/ps2dev/project/ee'
ee-gcc -D_EE -O2 -G0 -Wall -DBUILTIN_IRXS -IC:/PS2Dev/ps2sdk/ee/include -IC:/PS2
Dev/ps2sdk/common/include -I. -I../include -IC:/PS2Dev/sbv-1.0-lite/include -c p
s2link.c -o ps2link.o
ps2link.c:23:25: sbv_patches.h: No such file or directory
ps2link.c: In function `main':
ps2link.c:534: warning: implicit declaration of function `sbv_patch_enable_lmb'
ps2link.c:535: warning: implicit declaration of function `sbv_patch_disable_pref
ix_check'
make[1]: *** [ps2link.o] Error 1
make[1]: Leaving directory `/cygdrive/c/ps2dev/project/ee'
make: *** [ee] Error 2
Thank you in advanced!!

PS. I'm very sorry, I'm not a programer and also very poor in english.
Thank you for your help.

Posted: Wed Sep 08, 2004 4:17 pm
by blackdroid
update your ps2link and ps2sdk sources ( I hope you used cvs to get the sources ), sbv has been comited to ps2sdk.

Posted: Wed Sep 08, 2004 4:52 pm
by redcoat
That's probably not going to be enough.

When I tried to build ps2link v1.24b I discovered the following dependencies:

Code: Select all

/----------------\
| ps2link v1.24b |
\----------------/
  |  |
  |  v
  | sbv-1.0-lite
  |  |
  |  v
  | ps2lib
  |  |
  v  v
 ps2eth
Legend:
A-->B : A needs B, therefore build B first, then build A!

And I suspect the latest release will have the same dependencies so you'll also need to check-out ps2lib & ps2eth. Plus, make sure the environment variables $PS2LIB & $PS2ETH are defined with the appropriate paths. ;)

Posted: Wed Sep 08, 2004 6:12 pm
by blackdroid
ps2link needs ps2eth when building yes. sbv does not.
its even in the README that building ps2link needs PS2SDK and PS2ETH.
building the smap module alone in ps2eth does not need ps2lib..

Posted: Wed Sep 08, 2004 10:28 pm
by demonbane
I update ps2sdk and ps2link latest version using cvs. (Thanks blackdroid.)

And I compiled ps2link in cygwin.

As a short, It shows error message,too.
$ make
DEBUG=0 LOADHIGH=0 BUILTIN_IRXS=1 ZEROCOPY=0 make -C iop
make[1]: Entering directory `/cygdrive/c/ps2dev/ps2link/iop'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/cygdrive/c/ps2dev/ps2link/iop'
Embedding IRX file ps2link
Embedding IRX file ps2ip
Embedding IRX file ps2smap
Embedding IRX file iomanX
Embedding IRX file ps2dev9
DEBUG=0 LOADHIGH=0 BUILTIN_IRXS=1 ZEROCOPY=0 make -C ee
make[1]: Entering directory `/cygdrive/c/ps2dev/ps2link/ee'
ee-gcc -nostartfiles -TC:/PS2Dev/ps2sdk/ee/startup/linkfile -LC:/PS2Dev/ps2sdk/e
e/lib -LC:/PS2Dev/ps2sdk/sbv/lib ps2link_irx.o ps2ip_irx.o ps2smap_irx.o iomanX_
irx.o ps2dev9_irx.o -Wl,-Ttext -Wl,0xb0000 -Wl,--defsym -Wl,_stack_size=0x8000 -
Wl,--defsym -Wl,_stack=0x100000 -s \
-o ps2link.elf C:/PS2Dev/ps2sdk/ee/startup/crt0.o ps2link.o cmdHandler.o
excepHandler.o exceptions.o cd.o -lpatches -ldebug -lkernel -lc -lsyscall
/cygdrive/c/PS2Dev/gcc/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/bin/ld: can
not find -lpatches
collect2: ld returned 1 exit status
make[1]: *** [ps2link.elf] Error 1
make[1]: Leaving directory `/cygdrive/c/ps2dev/ps2link/ee'
make: *** [ee] Error 2
I don't understand why it shows error.

Thank you in advanced.

Posted: Wed Sep 08, 2004 11:57 pm
by blackdroid
Seems that you skipped the step to build ps2sdk, remember PS2SDKSRC should point to the dir with the ps2sdk sources.. PS2SDK should point to a release dir ( NOT the same dir as ps2sdk sources ). then in the topdir for ps2sdk type make release to build a release.

Posted: Fri Sep 10, 2004 8:53 am
by BiB
I had the same error and this is because in sbv_patches, the lib filename is not libpatches.a but libsbv_patches.a

I just made a copy libsbv_patches.a, named libpatches.a ans it worked

Thanks, Everyone

Posted: Fri Sep 10, 2004 11:21 am
by demonbane
Thanks, Everyone
Especially, blackdroid , redcoat and BIB

finally I compiled all of files.
$ make
DEBUG=0 LOADHIGH=0 BUILTIN_IRXS=1 ZEROCOPY=0 make -C iop
make[1]: Entering directory `/cygdrive/c/ps2dev/project/iop'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/cygdrive/c/ps2dev/project/iop'
Embedding IRX file ps2link
Embedding IRX file ps2ip
Embedding IRX file ps2smap
Embedding IRX file iomanX
Embedding IRX file ps2dev9
DEBUG=0 LOADHIGH=0 BUILTIN_IRXS=1 ZEROCOPY=0 make -C ee
make[1]: Entering directory `/cygdrive/c/ps2dev/project/ee'
ee-gcc -nostartfiles -TC:/PS2Dev/ps2sdk/ee/startup/linkfile -LC:/PS2Dev/ps2sdk/e
e/lib -LC:/PS2Dev/sbv-1.0-lite/lib ps2link_irx.o ps2ip_irx.o ps2smap_irx.o ioman
X_irx.o ps2dev9_irx.o -Wl,-Ttext -Wl,0xb0000 -Wl,--defsym -Wl,_stack_size=0x8000
-Wl,--defsym -Wl,_stack=0x100000 -s \
-o ps2link.elf C:/PS2Dev/ps2sdk/ee/startup/crt0.o ps2link.o cmdHandler.o
excepHandler.o exceptions.o cd.o -lsbv_patches -ldebug -lkernel -lc -lsyscall
make[1]: Leaving directory `/cygdrive/c/ps2dev/project/ee'

Posted: Fri Sep 10, 2004 6:18 pm
by blackdroid
just a word of advice.. make a habit of using make BUILTIN_IRXS=1 instead of changing the makefile each time you cvs up ( in essence that goes for all the tweakable variables, like loadhigh etc ).