Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ps3 to configure.ac. #362

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,17 @@ jobs:
id: slug
run: |
echo "sha_name=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_ENV

# using pre-compiled sdk
- name: Download PSL1GHT Toolchain
run: |
curl -sL https://github.com/bucanero/ps3toolchain/releases/download/ubuntu-latest-fad3b5fb/ps3dev-ubuntu-latest-2020-08-31.tar.gz | tar xvz -C ./
echo "PS3DEV=${GITHUB_WORKSPACE}/ps3dev" >> $GITHUB_ENV
echo "PSL1GHT=${GITHUB_WORKSPACE}/ps3dev" >> $GITHUB_ENV
echo "PSL1GHT=${GITHUB_WORKSPACE}/ps3dev" >> $GITHUB_ENV

- name: build libsmb2
run: |
cd lib
make -f Makefile.PS3_PPU clean
make -f Makefile.PS3_PPU
make ps3_ppu_install -f Makefile.platform

build-ps4:
name: PS4
Expand Down
8 changes: 8 additions & 0 deletions Makefile.platform
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@ ps2_irx_all:
ps2_irx_install: ps2_irx_all
cmake --build build --target install

ps3_ppu_all:
sh ./bootstrap
sh ./configure --prefix="${PS3DEV}/host/ppu" --host=powerpc64-ps3-elf --target=-ps3-elf --build=powerpc64 --includedir="${PS3DEV}/portlibs/include" --libdir="${PS3DEV}/portlibs/ppu/lib" CFLAGS="-DPS3_PPU_PLATFORM -DNEED_READV -DNEED_WRITEV -DNEED_GETLOGIN_R -DNEED_RANDOM -DNEED_SRANDOM -DNEED_GETADDRINFO -DNEED_FREEADDRINFO -I${PSL1GHT}/ppu/include -I${PS3DEV}/portlibs/ppu/include" LDFLAGS="-L${PSL1GHT}/ppu/lib -L${PS3DEV}/portlibs/ppu/lib -lnet" --enable-examples=no --without-libkrb5
make all

ps3_ppu_install: ps3_ppu_all
make install clean

ps4_all:
cmake -S . -B build "-DCMAKE_TOOLCHAIN_FILE=/opt/pacbrew/ps4/openorbis/cmake/ps4.cmake" "-DCMAKE_INSTALL_PREFIX=/opt/pacbrew/ps4/openorbis/" "-DCMAKE_PREFIX_PATH=/opt/pacbrew/ps4/openorbis/"
cmake --build build
Expand Down
3 changes: 1 addition & 2 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,7 @@ To compile libsmb2 for the PS3 PPU, first install the PS3 toolchain and
PSL1GHT SDK and set it up.

Then to build libsmb2, run
$ cd lib
$ make -f Makefile.PS3_PPU install
$ make ps3_ppu_install -f Makefile.platform

The process will copy the resulting libsmb2.a and the include/smb2 headers to your
PSL1GHT SDK portlibs folder.
Expand Down
139 changes: 0 additions & 139 deletions include/ps3/config.h

This file was deleted.

100 changes: 0 additions & 100 deletions lib/Makefile.PS3_PPU

This file was deleted.

1 change: 1 addition & 0 deletions lib/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,7 @@ ssize_t readv(t_socket fd, const struct iovec *iov, int iovcnt);
int getlogin_r(char *buf, size_t size);
void srandom(unsigned int seed);
int random(void);

#define getaddrinfo smb2_getaddrinfo
#define freeaddrinfo smb2_freeaddrinfo

Expand Down
6 changes: 3 additions & 3 deletions lib/dcerpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ static int
dcerpc_decode_3264(struct dcerpc_context *ctx, struct dcerpc_pdu *pdu,
struct smb2_iovec *iov, int offset, void *ptr)
{
uint32_t u32 = 0;
uint32_t u32_val = 0;

if (offset < 0) {
return offset;
Expand All @@ -659,8 +659,8 @@ dcerpc_decode_3264(struct dcerpc_context *ctx, struct dcerpc_pdu *pdu,
dcerpc_get_uint64(ctx, iov, offset, ptr);
offset += 8;
} else {
dcerpc_get_uint32(ctx, iov, offset, &u32);
*(uint64_t *)ptr = u32;
dcerpc_get_uint32(ctx, iov, offset, &u32_val);
*(uint64_t *)ptr = u32_val;
offset += 4;
}
return offset;
Expand Down
Loading
Loading