From 516d5329a486e4adb6c1be7d98203a3667d1dc10 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 18 Mar 2026 19:19:22 +0100 Subject: [PATCH] Build custom kernel with panther lake patches --- build/packages/edge.packages | 3 + .../edge/linux-mainline-panther-lake/PKGBUILD | 209 ++++++++++++++++++ .../ptl-audio.config | 20 ++ 3 files changed, 232 insertions(+) create mode 100644 pkgbuilds/edge/linux-mainline-panther-lake/PKGBUILD create mode 100644 pkgbuilds/edge/linux-mainline-panther-lake/ptl-audio.config diff --git a/build/packages/edge.packages b/build/packages/edge.packages index 34a9f47..6aba5d1 100644 --- a/build/packages/edge.packages +++ b/build/packages/edge.packages @@ -34,6 +34,9 @@ yaru-icon-theme yay yt6801-dkms +# Kernel +linux-mainline-panther-lake + # Drivers nvidia-580xx-utils lib32-nvidia-580xx-utils diff --git a/pkgbuilds/edge/linux-mainline-panther-lake/PKGBUILD b/pkgbuilds/edge/linux-mainline-panther-lake/PKGBUILD new file mode 100644 index 0000000..f22906d --- /dev/null +++ b/pkgbuilds/edge/linux-mainline-panther-lake/PKGBUILD @@ -0,0 +1,209 @@ +# Maintainer: Omarchy +# Based on the AUR linux-mainline package by: +# Maintainer: Mikael Eriksson + +pkgbase=linux-mainline-panther-lake +pkgver=7.0rc4 +pkgrel=2 +pkgdesc="Linux Mainline (Panther Lake audio support)" +arch=(x86_64) +url="https://kernel.org/" +license=(GPL-2.0-only) +makedepends=( + bc + cpio + gettext + git + libelf + pahole + perl + python + rust + rust-bindgen + rust-src + tar + xz +) +options=( + !debug + !strip +) +_tag=v7.0-rc4 +_srcname=linux-mainline +source=( + "$_srcname::git+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git#tag=$_tag" + "config::https://aur.archlinux.org/cgit/aur.git/plain/config?h=linux-mainline" + "ptl-audio.config" +) +sha256sums=( + 'SKIP' + 'SKIP' + 'SKIP' +) +validpgpkeys=( + ABAF11C65A2970B130ABE3C479BE3E4300411886 # Linus Torvalds + 647F28654894E3BD457199BE38DBBDC86092693E # Greg Kroah-Hartman +) + +export KBUILD_BUILD_HOST=archlinux +export KBUILD_BUILD_USER=$pkgbase +export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH})" + +prepare() { + cd $_srcname + + echo "Setting version..." + echo "-$pkgrel" > localversion.10-pkgrel + echo "${pkgbase#linux}" > localversion.20-pkgname + + local src + for src in "${source[@]}"; do + src="${src%%::*}" + src="${src##*/}" + src="${src%.zst}" + [[ $src = *.patch ]] || continue + echo "Applying patch $src..." + patch -Np1 < "../$src" + done + + echo "Setting config..." + cp ../config .config + + # Merge Panther Lake audio config fragment + echo "Merging Panther Lake audio config..." + scripts/kconfig/merge_config.sh -m .config ../ptl-audio.config + + make olddefconfig + diff -u ../config .config || : + + make -s kernelrelease > version + echo "Prepared $pkgbase version $(