mirror of
https://github.com/pspdev/pspsdk.git
synced 2025-10-03 16:51:27 +00:00
Merge pull request #72 from fjtrujy/modinfo
Create modinfo & fix some issues
This commit is contained in:
@@ -13,14 +13,14 @@ RUN cd /src && \
|
||||
make -j $(getconf _NPROCESSORS_ONLN) && \
|
||||
make -j $(getconf _NPROCESSORS_ONLN) install
|
||||
|
||||
## gcc needs to include libcglue libpsputility libpsprtc libpspnet_inet libpspnet_resolver lpspsdk libpspuser libpspkernel
|
||||
## gcc needs to include libcglue libpsputility libpsprtc libpspnet_inet libpspnet_resolver libpspmodinfo libpspuser libpspkernel
|
||||
## from pspsdk to be able to build executables, because they are part of the standard libraries
|
||||
RUN ln -sf "$PSPDEV/psp/sdk/lib/libcglue.a" "$PSPDEV/psp/lib/libcglue.a" || { exit 1; }
|
||||
RUN ln -sf "$PSPDEV/psp/sdk/lib/libpsputility.a" "$PSPDEV/psp/lib/libpsputility.a" || { exit 1; }
|
||||
RUN ln -sf "$PSPDEV/psp/sdk/lib/libpsprtc.a" "$PSPDEV/psp/lib/libpsprtc.a" || { exit 1; }
|
||||
RUN ln -sf "$PSPDEV/psp/sdk/lib/libpspnet_inet.a" "$PSPDEV/psp/lib/libpspnet_inet.a" || { exit 1; }
|
||||
RUN ln -sf "$PSPDEV/psp/sdk/lib/libpspnet_resolver.a" "$PSPDEV/psp/lib/libpspnet_resolver.a" || { exit 1; }
|
||||
RUN ln -sf "$PSPDEV/psp/sdk/lib/libpspsdk.a" "$PSPDEV/psp/lib/libpspsdk.a" || { exit 1; }
|
||||
RUN ln -sf "$PSPDEV/psp/sdk/lib/libpspmodinfo.a" "$PSPDEV/psp/lib/libpspmodinfo.a" || { exit 1; }
|
||||
RUN ln -sf "$PSPDEV/psp/sdk/lib/libpspuser.a" "$PSPDEV/psp/lib/libpspuser.a" || { exit 1; }
|
||||
RUN ln -sf "$PSPDEV/psp/sdk/lib/libpspkernel.a" "$PSPDEV/psp/lib/libpspkernel.a" || { exit 1; }
|
||||
|
||||
|
@@ -99,6 +99,7 @@ AC_CONFIG_FILES([Makefile
|
||||
src/hprm/Makefile
|
||||
src/kernel/Makefile
|
||||
src/libcglue/Makefile
|
||||
src/modinfo/Makefile
|
||||
src/mp3/Makefile
|
||||
src/mpeg/Makefile
|
||||
src/nand/Makefile
|
||||
|
@@ -13,6 +13,7 @@ SUBDIRS = \
|
||||
hprm \
|
||||
kernel \
|
||||
libcglue \
|
||||
modinfo \
|
||||
mp3 \
|
||||
mpeg \
|
||||
nand \
|
||||
|
@@ -63,9 +63,9 @@ endif
|
||||
LDFLAGS += -Wl,-zmax-page-size=128
|
||||
|
||||
ifeq ($(USE_KERNEL_LIBS),1)
|
||||
LIBS := -nostdlib $(LIBS) -lpspdebug -lpspdisplay_driver -lpspctrl_driver -lpspkernel
|
||||
LIBS := -nostdlib $(LIBS) -lpspdebug -lpspdisplay_driver -lpspctrl_driver -lpspmodinfo -lpspsdk -lpspkernel
|
||||
else
|
||||
LIBS := $(LIBS) -lpspdebug -lpspdisplay -lpspge -lpspctrl \
|
||||
LIBS := $(LIBS) -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk \
|
||||
-lpspnet -lpspnet_apctl
|
||||
endif
|
||||
|
||||
|
@@ -31,9 +31,9 @@ ASFLAGS := $(CFLAGS) $(ASFLAGS)
|
||||
LDFLAGS := $(addprefix -L,$(LIBDIR)) -Wl,-q,-T$(PSPSDK)/lib/linkfile.prx -nostartfiles -Wl,-zmax-page-size=128 $(LDFLAGS)
|
||||
|
||||
ifeq ($(USE_KERNEL_LIBS),1)
|
||||
LIBS := -nostdlib $(LIBS) -lpspdebug -lpspdisplay_driver -lpspctrl_driver -lpspkernel
|
||||
LIBS := -nostdlib $(LIBS) -lpspdebug -lpspdisplay_driver -lpspctrl_driver -lpspmodinfo -lpspsdk -lpspkernel
|
||||
else
|
||||
LIBS := $(LIBS) -lpspdebug -lpspdisplay -lpspge -lpspctrl
|
||||
LIBS := $(LIBS) -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk
|
||||
endif
|
||||
|
||||
ifeq ($(PSP_FW_VERSION),)
|
||||
|
@@ -63,8 +63,8 @@ sys_nobase_includedir = @PSPSDK_INCLUDEDIR@/sys
|
||||
sys_nobase_include_HEADERS = sys/socket.h sys/ioctl.h
|
||||
|
||||
libcglue_a_SOURCES = \
|
||||
cwd.o \
|
||||
errno.o \
|
||||
cwd.c \
|
||||
errno.c \
|
||||
fdman.c \
|
||||
glue.c \
|
||||
init.c \
|
||||
|
@@ -16,6 +16,9 @@
|
||||
|
||||
#include <pspthreadman.h>
|
||||
|
||||
/* Fuctions from errno.c */
|
||||
int __set_errno(int code);
|
||||
|
||||
#ifdef F_nanosleep
|
||||
/* note: we don't use rem as we have no signals */
|
||||
int nanosleep(const struct timespec *req, struct timespec *rem)
|
||||
|
@@ -22,26 +22,6 @@
|
||||
#include <pspnet_inet.h>
|
||||
#include "fdman.h"
|
||||
|
||||
// To avoid warnings
|
||||
int sceNetInetAccept(int s, struct sockaddr *addr, socklen_t *addrlen);
|
||||
int sceNetInetBind(int s, const struct sockaddr *my_addr, socklen_t addrlen);
|
||||
int sceNetInetConnect(int s, const struct sockaddr *serv_addr, socklen_t addrlen);
|
||||
int sceNetInetGetsockopt(int s, int level, int optname, void *optval, socklen_t *optlen);
|
||||
int sceNetInetListen(int s, int backlog);
|
||||
size_t sceNetInetRecv(int s, void *buf, size_t len, int flags);
|
||||
size_t sceNetInetRecvfrom(int s, void *buf, size_t flags, int, struct sockaddr *from, socklen_t *fromlen);
|
||||
size_t sceNetInetSend(int s, const void *buf, size_t len, int flags);
|
||||
size_t sceNetInetSendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen);
|
||||
int sceNetInetSetsockopt(int s, int level, int optname, const void *optval, socklen_t optlen);
|
||||
int sceNetInetShutdown(int s, int how);
|
||||
int sceNetInetSocket(int domain, int type, int protocol);
|
||||
int sceNetInetClose(int s);
|
||||
int sceNetInetGetErrno(void);
|
||||
int sceNetInetGetpeername(int s, struct sockaddr *name, socklen_t *namelen);
|
||||
int sceNetInetGetsockname(int s, struct sockaddr *name, socklen_t *namelen);
|
||||
ssize_t sceNetInetSendmsg(int s, const struct msghdr *msg, int flags);
|
||||
ssize_t sceNetInetRecvmsg(int s, struct msghdr *msg, int flags);
|
||||
|
||||
#ifdef F_socket
|
||||
int socket(int domain, int type, int protocol)
|
||||
{
|
||||
|
14
src/modinfo/Makefile.am
Normal file
14
src/modinfo/Makefile.am
Normal file
@@ -0,0 +1,14 @@
|
||||
libdir := @PSPSDK_LIBDIR@
|
||||
|
||||
CC = @PSP_CC@
|
||||
CCAS = $(CC)
|
||||
AR = @PSP_AR@
|
||||
RANLIB = @PSP_RANLIB@
|
||||
|
||||
CPPFLAGS =
|
||||
CFLAGS = @PSPSDK_CFLAGS@
|
||||
CCASFLAGS = $(CFLAGS)
|
||||
|
||||
lib_LIBRARIES = libpspmodinfo.a
|
||||
libpspmodinfo_a_SOURCES = \
|
||||
modinfo.S
|
@@ -18,6 +18,8 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <sys/socket.h>
|
||||
|
||||
/**
|
||||
* This struct is needed because tv_sec size is different from what newlib expect
|
||||
* Newlib expects 64bits for seconds and PSP expects 32bits
|
||||
@@ -31,9 +33,6 @@ int sceNetInetInit(void);
|
||||
int sceNetInetSelect(int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct SceNetInetTimeval *timeout);
|
||||
int sceNetInetTerm(void);
|
||||
int sceNetInetGetErrno(void);
|
||||
|
||||
/* The real sceNetInet socket prototypes are in <sys/socket.h>. */
|
||||
#ifdef DOXYGEN
|
||||
int sceNetInetAccept(int s, struct sockaddr *addr, socklen_t *addrlen);
|
||||
int sceNetInetBind(int s, const struct sockaddr *my_addr, socklen_t addrlen);
|
||||
int sceNetInetConnect(int s, const struct sockaddr *serv_addr, socklen_t addrlen);
|
||||
@@ -48,7 +47,10 @@ int sceNetInetShutdown(int s, int how);
|
||||
int sceNetInetSocket(int domain, int type, int protocol);
|
||||
int sceNetInetClose(int s);
|
||||
int sceNetInetGetErrno(void);
|
||||
#endif /* DOXYGEN */
|
||||
int sceNetInetGetpeername(int s, struct sockaddr *name, socklen_t *namelen);
|
||||
int sceNetInetGetsockname(int s, struct sockaddr *name, socklen_t *namelen);
|
||||
ssize_t sceNetInetSendmsg(int s, const struct msghdr *msg, int flags);
|
||||
ssize_t sceNetInetRecvmsg(int s, struct msghdr *msg, int flags);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -31,7 +31,7 @@ INETHELPER_OBJS = pspSdkLoadInetModules.o pspSdkInetInit.o pspSdkInetTerm.o
|
||||
MULT_SRCS = modulemgr_patches.c inethelper.c
|
||||
MULT_OBJS = $(MODULEMGR_PATCHES_OBJS) $(INETHELPER_OBJS)
|
||||
|
||||
libpspsdk_a_SOURCES = query_mod.c loadmodule.c fixup.c threadutils.c interrupt.S k1set.S modinfo.S fpu.S $(MULT_SRCS)
|
||||
libpspsdk_a_SOURCES = query_mod.c loadmodule.c fixup.c threadutils.c interrupt.S k1set.S fpu.S $(MULT_SRCS)
|
||||
libpspsdk_a_LIBADD = $(MULT_OBJS)
|
||||
|
||||
$(MODULEMGR_PATCHES_OBJS): modulemgr_patches.c
|
||||
|
@@ -616,7 +616,7 @@ typedef struct {
|
||||
*
|
||||
* @return 0 on success, otherwise one of ::PspKernelErrorCodes
|
||||
*/
|
||||
int sceKernelCreateLwMutex(SceLwMutexWorkarea *workarea, const char *name, u32 attr, int initialCount, u32 optionsPtr);
|
||||
int sceKernelCreateLwMutex(SceLwMutexWorkarea *workarea, const char *name, u32 attr, int initialCount, u32 *optionsPtr);
|
||||
|
||||
/**
|
||||
* Delete a lightweight mutex
|
||||
@@ -631,9 +631,7 @@ int sceKernelDeleteLwMutex(SceLwMutexWorkarea *workarea);
|
||||
* Try to lock a lightweight mutex
|
||||
*
|
||||
* @param workarea - The pointer to the workarea
|
||||
* @param name - The name of the lightweight mutex
|
||||
* @param lockCount - value of increase the lock counter
|
||||
* @param pTimeout - The pointer for timeout waiting
|
||||
*
|
||||
* @return 0 on success, otherwise one of ::PspKernelErrorCodes
|
||||
*/
|
||||
@@ -643,7 +641,6 @@ int sceKernelTryLockLwMutex(SceLwMutexWorkarea *workarea, int lockCount);
|
||||
* Lock a lightweight mutex
|
||||
*
|
||||
* @param workarea - The pointer to the workarea
|
||||
* @param name - The name of the lightweight mutex
|
||||
* @param lockCount - value of increase the lock counter
|
||||
* @param pTimeout - The pointer for timeout waiting
|
||||
*
|
||||
|
Reference in New Issue
Block a user