feat: add CachyOS image (Gamescope + Steam)

- Add distros/cachyos image.yaml and helper files under files/
- Wire kernel packaging and --distro cachyos in build_image.sh
- Stage CachyOS artifacts in image-builder entrypoints; include cachyos in multi image
- Add boot/kexec-cachyos.sh and document in README

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Chihab Djaidja
2026-05-08 20:40:44 +02:00
parent 260d78baec
commit 292c9c02fd
16 changed files with 743 additions and 15 deletions

View File

@@ -5,7 +5,7 @@ set -ex
IMG_SIZE="${IMG_SIZE:-32000}"
SKIP_CHROOT="${SKIP_CHROOT:-false}"
DISTROS="${DISTROS:-ubuntu2404 ubuntu2604 arch alpine}"
DISTROS="${DISTROS:-ubuntu2404 ubuntu2604 arch alpine cachyos}"
STAGING="/tmp/build-staging"
EFI_LABEL="boot"
IMG="/output/ps5-multi.img"
@@ -34,22 +34,38 @@ for DISTRO in $DISTROS; do
printf 'LABEL=%-14s / ext4 rw,relatime 0 1\nLABEL=%-14s /boot/efi vfat rw,relatime 0 2\n' \
"$ROOT_LABEL" "$EFI_LABEL" > "$STAGING/fstab"
cp /repo/distros/${DISTRO}/grow-rootfs "$STAGING/"
cp /repo/distros/${DISTRO}/nm-dns.conf "$STAGING/" 2>/dev/null || true
case "$DISTRO" in
ubuntu*)
cp /repo/distros/${DISTRO}/grow-rootfs "$STAGING/"
cp /repo/distros/${DISTRO}/grow-rootfs.service "$STAGING/"
cp /kernel-debs/*.deb "$STAGING/debs/"
;;
alpine)
cp /repo/distros/${DISTRO}/grow-rootfs "$STAGING/"
cp /repo/distros/alpine/grow-rootfs.openrc "$STAGING/"
;;
arch)
cp /repo/distros/${DISTRO}/grow-rootfs "$STAGING/"
cp /repo/distros/arch/grow-rootfs.service "$STAGING/"
cp /repo/distros/arch/first-boot-setup "$STAGING/"
cp /kernel-debs/*.pkg.tar.zst "$STAGING/pkgs/"
;;
cachyos)
mkdir -p "$STAGING/files"
cp /repo/distros/cachyos/files/grow-rootfs "$STAGING/files/"
cp /repo/distros/cachyos/files/grow-rootfs.service "$STAGING/files/"
cp /repo/distros/cachyos/files/first-boot-setup "$STAGING/files/"
cp /repo/distros/cachyos/files/first-boot.service "$STAGING/files/"
cp /repo/distros/cachyos/files/gamescope-session-ps5 "$STAGING/files/"
cp /repo/distros/cachyos/files/steamos-session-select "$STAGING/files/"
cp /repo/distros/cachyos/files/return-to-gaming-mode.desktop "$STAGING/files/"
cp /repo/distros/cachyos/files/ps5-display.lua "$STAGING/files/"
cp /repo/distros/cachyos/files/plasma-workspace-env-ps5.sh "$STAGING/files/"
cp /repo/distros/cachyos/files/ps5-tty-session.sh "$STAGING/files/"
cp /kernel-debs/*.pkg.tar.zst "$STAGING/pkgs/"
;;
esac
# --- Build rootfs ---

View File

@@ -26,23 +26,40 @@ else
LABEL=$ROOT_LABEL / ext4 defaults 0 1
LABEL=$EFI_LABEL /boot/efi vfat defaults 0 1
EOF
cp /repo/distros/${DISTRO}/grow-rootfs "$STAGING/"
cp /repo/distros/${DISTRO}/nm-dns.conf "$STAGING/" 2>/dev/null || true
case "$DISTRO" in
ubuntu*)
cp /repo/distros/${DISTRO}/grow-rootfs "$STAGING/"
cp /repo/distros/${DISTRO}/grow-rootfs.service "$STAGING/"
cp /kernel-debs/*.deb "$STAGING/debs/"
;;
alpine)
cp /repo/distros/${DISTRO}/grow-rootfs "$STAGING/"
cp /repo/distros/alpine/grow-rootfs.openrc "$STAGING/"
;;
arch)
cp /repo/distros/${DISTRO}/grow-rootfs "$STAGING/"
cp /repo/distros/arch/grow-rootfs.service "$STAGING/"
cp /repo/distros/arch/first-boot-setup "$STAGING/"
mkdir -p "$STAGING/pkgs"
cp /kernel-debs/*.pkg.tar.zst "$STAGING/pkgs/"
;;
cachyos)
mkdir -p "$STAGING/files"
cp /repo/distros/cachyos/files/grow-rootfs "$STAGING/files/"
cp /repo/distros/cachyos/files/grow-rootfs.service "$STAGING/files/"
cp /repo/distros/cachyos/files/first-boot-setup "$STAGING/files/"
cp /repo/distros/cachyos/files/first-boot.service "$STAGING/files/"
cp /repo/distros/cachyos/files/gamescope-session-ps5 "$STAGING/files/"
cp /repo/distros/cachyos/files/steamos-session-select "$STAGING/files/"
cp /repo/distros/cachyos/files/return-to-gaming-mode.desktop "$STAGING/files/"
cp /repo/distros/cachyos/files/ps5-display.lua "$STAGING/files/"
cp /repo/distros/cachyos/files/plasma-workspace-env-ps5.sh "$STAGING/files/"
cp /repo/distros/cachyos/files/ps5-tty-session.sh "$STAGING/files/"
mkdir -p "$STAGING/pkgs"
cp /kernel-debs/*.pkg.tar.zst "$STAGING/pkgs/"
;;
esac
# --- Build rootfs ---