mirror of
https://github.com/theupriser/steamify-cachyos-live-iso.git
synced 2026-10-02 15:10:26 +02:00
feat: Live session: power-off fix built for the ISO's kernels, Vapor look and layout at the live login
This commit is contained in:
1 parent
f514c24b82
commit
309b22f634
8 files changed
+62
-12
No files matched your search
Executable
+30
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
# build-live-modules.sh: builds Steamify's power-off fix for the live ISO's
|
||||
# kernels, so the Steam Machine stays off after shutting down from the live
|
||||
# session (recent kernels keep a firmware wake bit set; see Steamify's
|
||||
# patches/steamify-fremont-poweroff.c). Run as root in the build container,
|
||||
# after steamify-prepare.sh and before buildiso.sh: the headers come from the
|
||||
# same repos at the same time as the ISO's kernels, so the versions match.
|
||||
# The module checks for Fremont itself and does nothing on other hardware.
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")"
|
||||
src=archiso/airootfs/usr/local/share/steamify/steamify-fremont-poweroff.c
|
||||
[[ -f "$src" ]] || { echo "No $src: run steamify-prepare.sh first." >&2; exit 1; }
|
||||
|
||||
pacman -S --needed --noconfirm base-devel clang llvm lld linux-cachyos-headers linux-cachyos-lts-headers >/dev/null
|
||||
work="$(mktemp -d)"
|
||||
cp "$src" "$work/"
|
||||
echo 'obj-m += steamify-fremont-poweroff.o' > "$work/Makefile"
|
||||
for build in /usr/lib/modules/*/build; do
|
||||
kver="$(basename "$(dirname "$build")")"
|
||||
# CachyOS's kernels differ in compiler (linux-cachyos is clang-built):
|
||||
# build with the one the kernel was built with.
|
||||
llvm=()
|
||||
grep -q '^CONFIG_CC_IS_CLANG=y' "$build/.config" && llvm=(LLVM=1)
|
||||
make -s -C "$build" M="$work" "${llvm[@]}" clean modules
|
||||
install -Dm644 "$work/steamify-fremont-poweroff.ko" \
|
||||
"archiso/airootfs/usr/lib/modules/$kver/extra/steamify-fremont-poweroff.ko"
|
||||
echo "Power-off fix built for $kver."
|
||||
done
|
||||
rm -rf "$work"
|
||||
install -Dm644 /dev/stdin archiso/airootfs/etc/modules-load.d/steamify-fremont-poweroff.conf <<< 'steamify-fremont-poweroff'
|
||||
Reference in new issue
Block a user