|
3 | 3 | Runs ps4sdk elf files in-process on your PS4. |
4 | 4 |
|
5 | 5 | ## Prerequisites |
6 | | -* Basic build-tools (clang due to ps4 support) |
7 | | -* ps4dev/ps4sdk |
8 | | -* node.js to run the server |
9 | | -* socat, netcat, etc. |
| 6 | +* clang (not the OSX version though) |
| 7 | +* make |
| 8 | +* [ps4sdk](https://github.com/ps4dev/ps4sdk) |
| 9 | +* node.js to run server.js (or any alternative to serve /local) |
| 10 | +* socat, netcat, etc. to send files and to communicate with the standard IO |
10 | 11 |
|
11 | | -You will also need a current version of clang or alter the Makefile (remove -target specifically additionally ld/objectcopy may produce undesired (large) binaries). |
| 12 | +## Important |
12 | 13 |
|
13 | | -You can of course use other tools for the server, upload or debug output (socat, netcat or a C implementation for example). |
14 | | - |
15 | | -The elf loader does not support dynamically linked executables. All libraries need to be statically linked into the executable. [ps4sdk](https://github.com/ps4dev/ps4sdk) provides a variaty of position independant, statically linkable libraries, such as a libc, for the PS4. |
| 14 | +The elf loader does not support dynamically linked executables. All libraries need to be statically linked into the executable. [ps4sdk](https://github.com/ps4dev/ps4sdk) provides a variaty of position independant, statically linkable libraries, such as a libc, for the PS4. Depending on their build system and requirenments, you can compile third party libraries using the ps4-lib target of the sdk. Alternatively you will have to alter their build system to compile them as PIC statically linked libraries. |
16 | 15 |
|
17 | 16 | ## Example |
18 | 17 | ```bash |
19 | | -# build for the ps4 / we need to set all prefered defaults at build time (no args to main) |
| 18 | +# Build as raw binary to bin/ and then convert to ldr.js in /local (you can 'make keepelf=1' to debug) |
20 | 19 | make clean && make |
21 | 20 |
|
22 | 21 | # Start server |
23 | 22 | cd local |
24 | 23 | node server.js |
25 | 24 |
|
26 | | -# Browse ps4 browser to server (<local>:5350) |
27 | | -# Wait until the browser hangs in step 5 |
| 25 | +# Browse ps4 browser to local server (<local>:5350) |
| 26 | +# Wait until the browser hangs in 'step 5' |
28 | 27 |
|
29 | 28 | # Connect debug/stdio channel |
30 | 29 | socat - TCP:<ps4>:5052 |
31 | 30 |
|
32 | 31 | # Send elf file |
33 | | -socat -u FILE:../../ps4sdk-examples/libless/stress/bin/stress TCP:<ps4>:5053 |
| 32 | +socat -u FILE:ps4sdk-examples/libless/stress/bin/stress TCP:<ps4>:5053 |
34 | 33 |
|
35 | 34 | # Send kernel elf file (mode for long-running code, or module-like code) |
36 | | -socat -u FILE:../../ps4sdk-examples/kernel/function-hook/bin/function-hook TCP:<ps4>:5055 |
| 35 | +socat -u FILE:ps4sdk-examples/kernel/function-hook/bin/function-hook TCP:<ps4>:5055 |
37 | 36 |
|
38 | 37 | # Send kernel elf file (runs in webbrowser process) |
39 | | -socat -u FILE:../../libps4-examples/libless/cache/bin/cache TCP:<ps4>:5054 |
| 38 | +socat -u FILE:ps4sdk-examples/kernel/cache/bin/cache TCP:<ps4>:5054 |
40 | 39 | ``` |
41 | 40 |
|
42 | 41 | ## Docker images |
43 | | -A stand alone elf-loader container is also available (but currently a bit large): |
| 42 | +A stand alone elf-loader container is available (but currently a bit large): |
44 | 43 |
|
45 | 44 | ```bash |
46 | 45 | # Make sure newest container is used |
|
0 commit comments