forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Compiling Ruby for cfw390

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
Radek



Joined: 19 May 2008
Posts: 2

PostPosted: Mon May 19, 2008 4:11 am    Post subject: Compiling Ruby for cfw390 Reply with quote

I'm trying to build a Ruby for PSP slim with cfw390.
I found a http://forums.ps2dev.org/viewtopic.php?t=7550 , get the patch and it didn't work.

After some changes, in makefiles which I found elsewhere
Code:
PSP_FW_VERSION=380
BUILD_PRX=1


I got to the error 0x8000200D9

Then I began palying with PSP_MODULE, PSP_MAIN and PSP_HEAP attributes. I ended with
Code:
PSP_MODULE_INFO("RUBYTEST", 0x1000, 1, 1);

PSP_MAIN_THREAD_ATTR(0);
PSP_MAIN_THREAD_STACK_SIZE_KB(4096);

PSP_HEAP_SIZE_MAX();


Which ends with the same error.

You cen see the patch (ruby-1.8.6-p114.rh2.patch) and build script (build-psp.sh)
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Mon May 19, 2008 10:54 am    Post subject: Reply with quote

Code:
PSP_MODULE_INFO("RUBYTEST", 0x1000, 1, 1);
PSP_MAIN_THREAD_ATTR(0);


That's kernel mode. You need to be compiling as user mode.

Code:
PSP_MODULE_INFO("RUBYTEST", 0, 1, 1);
PSP_MAIN_THREAD_ATTR(PSP_THREAD_ATTR_USER);
Back to top
View user's profile Send private message AIM Address
Radek



Joined: 19 May 2008
Posts: 2

PostPosted: Mon May 19, 2008 4:38 pm    Post subject: Reply with quote

Changing to the usermode only by modifing line
Code:
PSP_MODULE_INFO("RubyTest", 0, VER, REV);
PSP_MAIN_THREAD_ATTR(PSP_THREAD_ATTR_USER);

leads to different error code 0x8002013C (= Librarynotfound) which only confuse me.

Are there other changes I have to do to Makefile?
Code:
  1 TARGET = rubytest
  2 OBJS = main.o
  3
  4 INCDIR =
  5 CFLAGS = -O2 -G0 -Wall -D_PSP_
  6 CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
  7 ASFLAGS = $(CFLAGS)
  8
  9 LIBDIR =
 10 LIBS = -lruby -lm
 11 LDFLAGS =
 12
 13 # EBOOT parameters
 14 EXTRA_TARGETS =         EBOOT.PBP
 15 PSP_EBOOT_TITLE =       RubyOnPSP $(shell date +%F\ %T)
 16 PSP_FW_VERSION =        380
 17 BUILD_PRX =             1
 18 # Add all the memory
 19 PSP_LARGE_MEMORY = 1
 20
 21 PSPSDK=$(shell psp-config --pspsdk-path)
 22 include $(PSPSDK)/lib/build.mak

_________________
-- Radek aka Anoq the Great Sorcerer of Calixtines, member of 1st Royal Guard "Slavic Wolves"
I'll find a way. Maybe I'll strangle them with their own intestines, it will count as a suicide.
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Mon May 19, 2008 6:38 pm    Post subject: Reply with quote

Your latest error generally means you're trying to do kernel-mode functions inside a user-mode app. You need to find and remove the kernel-mode functions. They either need to be eliminated (by doing the function some other way), or moved into an external kernel-mode prx that you load and call from the user app.
Back to top
View user's profile Send private message AIM Address
jean



Joined: 05 Jan 2008
Posts: 489

PostPosted: Tue May 20, 2008 12:24 am    Post subject: Reply with quote

A quick search could point you in the right direction; just to give you some buzzwords, a quick walkthrough has been delineated in my quest for porting pikey and a simple but good example of kernel-mode prx into wich you can move your kernel functions could be my sio Driver:
quote from pikey porting discussion:
Quote:

updated toolchain and sdk (now i'm using heimdall's 0.6 for win32)
placed fw_version = 390 in all makefiles
made sure all prx are in kernel mode
for all prx checked exported functions
surrounded all exported functions with the k1 stuff
checked compile-time constants for hooked functions' nids


simple sio console using prx to handle hardware-related functions:
http://www.ecando.it/files/pspAdvancedSio.zip
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group