0

I'm trying to compile the latest source of ps3netsrv for my old NAS (first mycloud device with ARMv7 cpu EDIT -> Mindspeed Comcerto C2200 - ARM Cortex-A9<- )

Tried to compile the sources for linux normally with the included Makefile and I've been able to get the binary for both 64 and 32 bit, but being my nas with ARM I need to use the makefile with the exact targets for my platform.

I have slightly modified the MakeFile for arm adding on OBJS the new libraries that were not present.

Initially when I tried to compile I got an error in a condition in the main (I do not remember exactly in what line but if it was not present polarssl would have used mbedTLS instead)

I downloaded the library mbedTLS and now it seems to compile but I get this error and before it finish

cc -Wall -I. -std=gnu99 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -L.   -L.  -o ps3netsrv main.o padlock.o aes.o compat.o Console.o File.o VIsoFile.o -lstdc++ -lpthread
/usr/bin/ld: File.o: in function `File::open(char const*, int)':
File.cpp:(.text+0x8ed): undefined reference to `mbedtls_aes_setkey_dec'
/usr/bin/ld: File.cpp:(.text+0xd38): undefined reference to `mbedtls_aes_setkey_enc'
/usr/bin/ld: File.cpp:(.text+0xd7c): undefined reference to `mbedtls_aes_crypt_cbc'
/usr/bin/ld: File.cpp:(.text+0xdaa): undefined reference to `mbedtls_aes_setkey_dec'
/usr/bin/ld: File.o: in function `File::decrypt_data(mbedtls_aes_context&, unsigned char*, int, unsigned int)':
File.cpp:(.text+0x1840): undefined reference to `mbedtls_aes_crypt_cbc'

looking inside the library sources I notice that mbedtls_aes_setkey_enc function and some others are not present but there are functions under comments called mbedtls_aes_setkey_enc_ALT instead.

Tried to remove // but still the same.

Any advice?

thanks in advance

PS: as reference I started from r/ps3homebrew following this tutorial.

Frant
  • 5,382
  • 1
  • 16
  • 22
  • Can you find the names for the missing functions in the output for `nm libmbedcrypto.a` , i.e. by running `nm libmbedcrypto.a | grep _aes_` ? There are present in my freshly compiled mbedtls. – Frant Mar 08 '21 at 13:06
  • cannot find any file because also library is not compiled, should use a makefile for the it as well and compile it separately but I don't know how to edit properly.. – JostenSyon Mar 08 '21 at 14:17
  • You would not know how to compile it separately, or how to link your programs against it once compiled separately ? – Frant Mar 08 '21 at 14:42
  • right now I tried to download again th whole mbedtls project and compile it using makefile included, in that one i used this `nm libmbedcrypto.a | grep _aes_` and found the missing reference but when I tring compiling with the project (ps3netsvr) no file are generated – JostenSyon Mar 08 '21 at 15:27
  • 'no file are generated', do you mean you are not getting any error messages ? – Frant Mar 08 '21 at 15:29
  • no, I'm still getting same error message (missing reference), and no file are compiled (no binary file in the folder) – JostenSyon Mar 08 '21 at 15:39

0 Answers0