add PS5 kernel build pipeline with multi-distro support and arm64 cross-compile

This commit is contained in:
Dan Kluser
2026-05-08 22:15:43 +02:00
parent 1bf99c8369
commit ad45441d40
7 changed files with 178 additions and 86 deletions

View File

@@ -47,6 +47,8 @@ sudo dd if=output/ps5-ubuntu2604.img of=/dev/sdX bs=4M status=progress
| `--kernel` | Path to kernel source directory | auto-clone `v6.19.10` |
| `--img-size` | Disk image size in MB | `12000` (`32000` for `all`) |
| `--clean` | Remove all cached build artifacts and start fresh | off |
| `--kernel-only` | Build and package the kernel only, then exit | off |
| `--patches-ref` | Branch, tag, or commit SHA for patches | `v1.0` |
## Caching
@@ -105,10 +107,27 @@ All verbose output goes to `build.log`. The terminal shows a spinner with live p
The boot partition contains kexec scripts to switch between distros at runtime. Ubuntu 26.04 is the default boot target.
## Building the Kernel Standalone
Use `--kernel-only` to compile the PS5 kernel and produce installable packages without building a full disk image.
```bash
./build_image.sh --kernel-only # .deb (default)
./build_image.sh --kernel-only --distro all # .deb + .pkg.tar.zst
./build_image.sh --kernel-only --patches-ref main # fetch from specific branch/tag
./build_image.sh --kernel-only --clean # wipe and rebuild from scratch
```
Output packages are written to `linux-bin/`. Install on a running PS5 Linux system:
```bash
sudo dpkg -i linux-bin/linux-ps5_*.deb
```
## Directory Layout
```
build_image.sh # Main build script
build_image.sh # Image builder (also supports --kernel-only)
docker/
kernel-builder/ # Kernel compilation container
kernel-builder-arch/ # Repackages .deb kernel as .pkg.tar.zst