Skip to content
Permalink
Browse files

Linux loader

Added Linux loader
  • Loading branch information...
kr105 committed Apr 1, 2016
1 parent 289be0e commit 35b6588aaea82e9fca5ae7e5ad81123c184d3b32
Showing with 4,413 additions and 158 deletions.
  1. +9 −0 README.md
  2. +29 −4 index.html
  3. +4,375 −154 js/code.js
@@ -28,6 +28,15 @@ If you're on Linux, the easiest way is probably to use `netcat`:
After you have sent the binary, it will be executed automatically.
### Linux loader
You need a FAT32 formatted USB drive plugged in on any PS4's USB port with the following files on the root directory:
`bzImage` : Kernel image that will be loaded. Recommended to use [this sources](https://github.com/fail0verflow/ps4-linux/tree/ps4-xhci-wip) to compile it.
`initramfs.cpio.gz` : The initial file system that gets loaded into memory during the Linux startup process. [This one](https://github.com/slashbeast/better-initramfs) is recommended.
The file names must match with the above and you can have more files on the same USB drive. From there you can setup the environment to run from an NFS share or from an external drive via USB (recommended) and boot a complete distro!
### Syscalls
`Get PID` - Get process ID
@@ -120,9 +120,11 @@
//setU32to(writeAddress + 1 * 4, 0x4801e883);
//setU32to(writeAddress + 2 * 4, 0xf775c085);
//setU32to(writeAddress + 3 * 4, 0x000000c3);
// WiFi-Loader
writeLoader(writeAddress);
if(sessionStorage.loadlinux == 1)
writeLinux(writeAddress) // Linux-loader
else
writeLoader(writeAddress); // WiFi-Loader
chain.start(executeAddress);
chain.write_rax_ToVariable(0);
@@ -519,13 +521,21 @@
logAdd("\"" + socketMessage + "\" sent to " + hostAddr + ":" + hostPort);
});
}
function launchLinux() {
cleanSessionVars();
sessionStorage.loadlinux = 1;
allocateSharedMemory();
setTimeout(function() { document.cookie = "codeExecutionStage=1.1"; location.reload(); }, 10);
}
</script>
</head>

<body onload="load()">
<div class="header">
<h1>PS4 WebKit Playground</h1>
<h2>CTurt, flatz, SKFU, droogie, Xerpi, Hunger, Takezo, nas, Proxima</h2>
<h2>CTurt, kR105, flatz, SKFU, droogie, Xerpi, Hunger, Takezo, nas, Proxima</h2>

<div id="environment"></div>
</div>
@@ -667,6 +677,21 @@ <h2>Modules</h2>
<button onclick="loadNamedModule()">Load Module</button>
</div>
</div>

<div class="box">
<h2>Linux loader</h2>

<div>
Make sure to have files <b>initramfs.cpio.gz</b> and <b>bzImage</b> <br/>
on a USB drive connected to the PS4 before loading this.
</div>

<br>

<div>
<button onclick="launchLinux()">Load!</button>
</div>
</div>

<div class="box">
<h2>Misc</h2>
Oops, something went wrong.

0 comments on commit 35b6588

Please sign in to comment.
You can’t perform that action at this time.