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 

Cryptopp 5.6.0 rev 477 ported to psp

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



Joined: 20 Oct 2008
Posts: 355

PostPosted: Mon Oct 12, 2009 8:44 am    Post subject: Cryptopp 5.6.0 rev 477 ported to psp Reply with quote

used jojojaris makefile and modified to port cryptopp
I posted it in another thread but here is the official

Code:
#makfile originally by jojojaris
#but modified to port cryptopp 5.6.0 rev 447 by coolkehon
#hm makefile looks strangly familiar I've used this somewhere before

PREFIX=$(shell psp-config –psp-prefix)

PREFIX=/usr/local/pspdev/psp



TARGET_LIB = libcryptopp.a

SRCS = $(wildcard *.cpp)

ifeq ($(SRCS),)            # workaround wildcard function bug in GNU Make 3.77

SRCS = $(shell echo *.cpp)

endif

#pre objects so that they can be removed

PRE_OBJS = $(SRCS:.cpp=.o)
#here to remove the test objects from library
TESTOBJS = bench.o bench2.o test.o validat1.o validat2.o validat3.o adhoc.o datatest.o regtest.o fipsalgt.o dlltest.o
OBJS = $(filter-out $(TESTOBJS),$(PRE_OBJS))



INCDIR =

CFLAGS = -O2 -G0 -Wall \
   -DIS_LITTLE_ENDIAN #fixed this here because the psp is Little Endian

CXXFLAGS = $(CFLAGS)

ASFLAGS = $(CFLAGS)



LIBDIR =

#LDFLAGS = -flat_namespace -undefined suppress -m

LDFLAGS =

LIBS=-lstdc++



PSPSDK=$(shell psp-config --pspsdk-path)

include $(PSPSDK)/lib/build.mak



install:

   mkdir -p $(PREFIX)/include/cryptopp

   cp *.h $(PREFIX)/include/cryptopp

   cp *.a $(PREFIX)/lib

tell:

   echo $(PREFIX)


Last edited by coolkehon on Wed Nov 18, 2009 9:49 am; edited 1 time in total
Back to top
View user's profile Send private message MSN Messenger
jojojoris



Joined: 30 Mar 2008
Posts: 261

PostPosted: Mon Oct 12, 2009 8:26 pm    Post subject: Reply with quote

Again
My name is
jojojoris
NOT
jojojaris or jojojarais etc
_________________
Code:
int main(){
     SetupCallbacks();
     makeNiceGame();
     sceKernelExitGame();
}
Back to top
View user's profile Send private message
Wally



Joined: 26 Sep 2005
Posts: 672

PostPosted: Mon Oct 12, 2009 8:37 pm    Post subject: Reply with quote

jojojoris wrote:
Again
My name is
jojojoris
NOT
jojojaris or jojojarais etc


xD hilarious.

Nice port!
Back to top
View user's profile Send private message AIM Address
coolkehon



Joined: 20 Oct 2008
Posts: 355

PostPosted: Mon Oct 12, 2009 10:04 pm    Post subject: Reply with quote

jojojoris wrote:
Again
My name is
jojojoris
NOT
jojojaris or jojojarais etc


mo jo jojo ris
that is so confusing to remember especially since i always spell it wrong
Back to top
View user's profile Send private message MSN Messenger
coolkehon



Joined: 20 Oct 2008
Posts: 355

PostPosted: Wed Nov 18, 2009 9:48 am    Post subject: Reply with quote

I found a bug. I fixed it too.
When I created a hash using SHA512 it didn't work correctly. The hash didn't match on my computer and there was no reason for it. It took a while to figure out but I looked in the config.h file for cryptopp 5.5.2 and realized that IS_LITTLE_ENDIAN was not defined. when compiling you need to add -DIS_LITTLE_ENDIAN to your CFLAGS.

jojojaris could you add that to your makefile since 5.5.2 was your version.

Also the Cryptopp::Socket class doesn't work

As for cryptopp 5.6.0 there is another bug. When I connect to wifi and try to use regular sockets (not the class) it will not connect to wifi. I'm not sure if it's not loading the modules or what but I used jojojaris' EasyConnect class and it failed at the connect stage.

there are most likely more things to be check in the config but the -DIS_LITTLE_ENDIAN fixed my problem and I don't know of any other's at the moment except for maybe the one about berkely sockets being available
Back to top
View user's profile Send private message MSN Messenger
jojojoris



Joined: 30 Mar 2008
Posts: 261

PostPosted: Wed Nov 18, 2009 4:54 pm    Post subject: Reply with quote

seems i lost my crypto++ files.

I don't know what's wrong with my EasyConnect class. It works for me and i never had any problems. (i guess you are not using PSP_HEAP_SIZE_MAX() becous that won't let other modules load)

And you still spell my nickname WRONG!!!

jojojoris and not jojojaris
_________________
Code:
int main(){
     SetupCallbacks();
     makeNiceGame();
     sceKernelExitGame();
}
Back to top
View user's profile Send private message
coolkehon



Joined: 20 Oct 2008
Posts: 355

PostPosted: Thu Nov 19, 2009 1:43 am    Post subject: Reply with quote

hm sorry about the nick though i had it this time :P

if you want i can email you a copy of your cryptopp 5.5.2.
Also it's the cryptopp 5.6.0 that i ported that doesn't work with EasyConnect not the EasyConnect not working. I don't know why but it just doesn't work. It worked with 5.5.2 but not cryptopp 5.6.0. Probably something with the config.h in cryptopp

and I have PSP_HEAP_SIZE_MAX(); defined

bye jojojoris
Back to top
View user's profile Send private message MSN Messenger
jojojoris



Joined: 30 Mar 2008
Posts: 261

PostPosted: Thu Nov 19, 2009 3:20 am    Post subject: Reply with quote

well...don't use
PSP_HEAP_SIZE_MAX();
use
PSP_HEAP_SIZE_KB(-2048); //Leave 2MB for other modules

But you spelled my nickname right :D
_________________
Code:
int main(){
     SetupCallbacks();
     makeNiceGame();
     sceKernelExitGame();
}
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