About PS2LINK 1.24 with embedded ELF.

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
demonbane
Posts: 8
Joined: Tue Sep 07, 2004 10:14 am

About PS2LINK 1.24 with embedded ELF.

Post 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.
pixel
Posts: 791
Joined: Fri Jan 30, 2004 11:43 pm

Post by pixel »

Take the sources, edit the main Makefile, change the BUILTIN_IRXS variable to 1, and compile.
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
demonbane
Posts: 8
Joined: Tue Sep 07, 2004 10:14 am

Post by demonbane »

Thanks a lot, pixel.
demonbane
Posts: 8
Joined: Tue Sep 07, 2004 10:14 am

Post 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.)
User avatar
Drakonite
Site Admin
Posts: 990
Joined: Sat Jan 17, 2004 1:30 am
Contact:

Post 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*
Shoot Pixels Not People!
Makeshift Development
demonbane
Posts: 8
Joined: Tue Sep 07, 2004 10:14 am

Post 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.
blackdroid
Posts: 564
Joined: Sat Jan 17, 2004 10:22 am
Location: Sweden
Contact:

Post by blackdroid »

the builtins magic requires that you have bash installed. for windows users that means install cygwin.
Kung VU
demonbane
Posts: 8
Joined: Tue Sep 07, 2004 10:14 am

Post by demonbane »

Thanks, blackdroid.
I'll try it, today.
demonbane
Posts: 8
Joined: Tue Sep 07, 2004 10:14 am

Post 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.
blackdroid
Posts: 564
Joined: Sat Jan 17, 2004 10:22 am
Location: Sweden
Contact:

Post by blackdroid »

update your ps2link and ps2sdk sources ( I hope you used cvs to get the sources ), sbv has been comited to ps2sdk.
Kung VU
redcoat
Posts: 21
Joined: Wed Aug 11, 2004 9:30 am

Post 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. ;)
blackdroid
Posts: 564
Joined: Sat Jan 17, 2004 10:22 am
Location: Sweden
Contact:

Post 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..
Kung VU
demonbane
Posts: 8
Joined: Tue Sep 07, 2004 10:14 am

Post 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.
blackdroid
Posts: 564
Joined: Sat Jan 17, 2004 10:22 am
Location: Sweden
Contact:

Post 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.
Kung VU
BiB
Posts: 36
Joined: Fri Feb 27, 2004 8:13 am
Location: France

Post 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
demonbane
Posts: 8
Joined: Tue Sep 07, 2004 10:14 am

Thanks, Everyone

Post 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'
blackdroid
Posts: 564
Joined: Sat Jan 17, 2004 10:22 am
Location: Sweden
Contact:

Post 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 ).
Kung VU
Post Reply