Help with Adhoc on 3.xx?

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
jo3_sum
Posts: 17
Joined: Wed Jan 30, 2008 5:38 am
Contact:

Help with Adhoc on 3.xx?

Post by jo3_sum »

Hey, i got this problem. I want to be able to put adhoc on 3.xx a homebrew. I did BlackPhoenix's example and it was made for 1.5 kernel. i tried to mod for 3.xx and i was told to make a prx loader in usermode, make a prx in kernel, and put the adhoc functions inside the prx. then run the prx from the eboot and then run the adhoc functions in the prx loader. im havin trouble with compiling the prx. (im not too worry with the loader. i mainly need help with the prx.)

heres the error:

Code: Select all

joe@joe-desktop:~/pspdev/psp/sdk/samples/adhoc/simple/adhocexamples/ad-hoc$ make
psp-gcc -I../../../_380SDK/include -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -I../../../_380SDK/include -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall  -o stubs.o stubs.s
stubs.s: Assembler messages:
stubs.s:71: Warning: ignoring changed section attributes for .text.stub
stubs.s:102: Warning: ignoring changed section attributes for .text.stub
stubs.s:112: Warning: ignoring changed section attributes for .text.stub
stubs.s:140: Warning: ignoring changed section attributes for .text.stub
stubs.s:163: Warning: ignoring changed section attributes for .text.stub
stubs.s:178: Warning: ignoring changed section attributes for .text.stub
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/crt0.o: In function `_start':
/home/joe/Desktop/psptoolchain/build/pspsdk/src/startup/crt0.c:149: undefined reference to `sceKernelCreateThread'
/home/joe/Desktop/psptoolchain/build/pspsdk/src/startup/crt0.c:150: undefined reference to `sceKernelStartThread'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/crt0.o: In function `_main':
/home/joe/Desktop/psptoolchain/build/pspsdk/src/startup/crt0.c:68: undefined reference to `strlen'
/home/joe/Desktop/psptoolchain/build/pspsdk/src/startup/crt0.c:83: undefined reference to `atexit'
/home/joe/Desktop/psptoolchain/build/pspsdk/src/startup/crt0.c:86: undefined reference to `main'
/home/joe/Desktop/psptoolchain/build/pspsdk/src/startup/crt0.c:89: undefined reference to `exit'
collect2: ld returned 1 exit status
make: *** [stubs.o] Error 1
joe@joe-desktop:~/pspdev/psp/sdk/samples/adhoc/simple/adhocexamples/ad-hoc$ mkdir
mkdir: missing operand
Try `mkdir --help' for more information.
joe@joe-desktop:~/pspdev/psp/sdk/samples/adhoc/simple/adhocexamples/ad-hoc$ 
heres my source


I thought you guys could help. If theres an example or tut for 3.xx could u tell me.
Thank You
Insert_witty_name
Posts: 376
Joined: Wed May 10, 2006 11:31 pm

Post by Insert_witty_name »

Hi.

There's no need to do the whole external kernel PRX for adhoc.

Use the functions from psputility_netmodules.h to load the needed modules. You need COMMON and ADHOC.
PSPApple
Posts: 6
Joined: Fri Mar 28, 2008 2:00 am

Re: Help with Adhoc on 3.xx?

Post by PSPApple »

jo3_sum wrote:Hey, i got this problem. I want to be able to put adhoc on 3.xx a homebrew. I did BlackPhoenix's example and it was made for 1.5 kernel. i tried to mod for 3.xx and i was told to make a prx loader in usermode, make a prx in kernel, and put the adhoc functions inside the prx. then run the prx from the eboot and then run the adhoc functions in the prx loader. im havin trouble with compiling the prx. (im not too worry with the loader. i mainly need help with the prx.)

heres the error:

Code: Select all

joe@joe-desktop:~/pspdev/psp/sdk/samples/adhoc/simple/adhocexamples/ad-hoc$ make
psp-gcc -I../../../_380SDK/include -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -I../../../_380SDK/include -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall  -o stubs.o stubs.s
stubs.s: Assembler messages:
stubs.s:71: Warning: ignoring changed section attributes for .text.stub
stubs.s:102: Warning: ignoring changed section attributes for .text.stub
stubs.s:112: Warning: ignoring changed section attributes for .text.stub
stubs.s:140: Warning: ignoring changed section attributes for .text.stub
stubs.s:163: Warning: ignoring changed section attributes for .text.stub
stubs.s:178: Warning: ignoring changed section attributes for .text.stub
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/crt0.o: In function `_start':
/home/joe/Desktop/psptoolchain/build/pspsdk/src/startup/crt0.c:149: undefined reference to `sceKernelCreateThread'
/home/joe/Desktop/psptoolchain/build/pspsdk/src/startup/crt0.c:150: undefined reference to `sceKernelStartThread'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/crt0.o: In function `_main':
/home/joe/Desktop/psptoolchain/build/pspsdk/src/startup/crt0.c:68: undefined reference to `strlen'
/home/joe/Desktop/psptoolchain/build/pspsdk/src/startup/crt0.c:83: undefined reference to `atexit'
/home/joe/Desktop/psptoolchain/build/pspsdk/src/startup/crt0.c:86: undefined reference to `main'
/home/joe/Desktop/psptoolchain/build/pspsdk/src/startup/crt0.c:89: undefined reference to `exit'
collect2: ld returned 1 exit status
make: *** [stubs.o] Error 1
joe@joe-desktop:~/pspdev/psp/sdk/samples/adhoc/simple/adhocexamples/ad-hoc$ mkdir
mkdir: missing operand
Try `mkdir --help' for more information.
joe@joe-desktop:~/pspdev/psp/sdk/samples/adhoc/simple/adhocexamples/ad-hoc$ 
heres my source


I thought you guys could help. If theres an example or tut for 3.xx could u tell me.
Thank You
I guess u missed the following line in ur makefile ;)

LDFLAGS = -mno-crt0 -nostartfiles

add this in, and try again,good luck
using 3.71m33-4

psp1000
Pirata Nervo
Posts: 409
Joined: Tue Oct 09, 2007 4:22 am

Post by Pirata Nervo »

No I dont think he missed, at least I told him to put that.
It will give A LOT MORE errors lol (because the kprx should work)
I will try using what insert_witty_name said
Image
Upgrade your PSP
jo3_sum
Posts: 17
Joined: Wed Jan 30, 2008 5:38 am
Contact:

Re: Help with Adhoc on 3.xx?

Post by jo3_sum »

PSPApple wrote:
I guess u missed the following line in ur makefile ;)

LDFLAGS = -mno-crt0 -nostartfiles

add this in, and try again,good luck
Yes, that was in my makefile.
i am about to try what insert_witty_name said too and i heard that pirata got it workin while i was sleepin. i'll ask him more about it. thx, insert_witty_name.
Insert_witty_name
Posts: 376
Joined: Wed May 10, 2006 11:31 pm

Post by Insert_witty_name »

Well, it's a fairly simple process to change it so it works on 3xx.

Remove all module loading (which is the actual part that requires kernel mode) and replace the calls with sceUtilityLoadNetModule().

Change it to a user mode app.

There's also no need for a separate user-mode thread (assuming the example uses one).

Then just compile for 3xx as normal.
Pirata Nervo
Posts: 409
Joined: Tue Oct 09, 2007 4:22 am

Post by Pirata Nervo »

I got it to work, only using the main.c and selectorMenu.cpp, I will send you on IM.
;)
Image
Upgrade your PSP
jo3_sum
Posts: 17
Joined: Wed Jan 30, 2008 5:38 am
Contact:

Post by jo3_sum »

Thx a lot pn. I can't believe my Makefile was really wrong, but my source was right :) . So after all, i guess my terminal wasn't lazy for not including the libs earlier then, lol.
Post Reply