talos-image-factory-apple-x86/patches/pkgs/0001-feat-add-apple-t2-patches.patch
2024-09-23 11:41:04 -05:00

59 lines
2.1 KiB
Diff

From 46161fffa7dc9a891b963de4a83931798e22ff6c Mon Sep 17 00:00:00 2001
From: Steven Kreitzer <skre@skre.me>
Date: Mon, 23 Sep 2024 10:55:12 -0500
Subject: [PATCH] feat: add apple t2 patches
---
kernel/build/pkg.yaml | 5 +++++
kernel/prepare/pkg.yaml | 12 ++++++++++++
2 files changed, 17 insertions(+)
diff --git a/kernel/build/pkg.yaml b/kernel/build/pkg.yaml
index 4a4c5ce..29ebff1 100644
--- a/kernel/build/pkg.yaml
+++ b/kernel/build/pkg.yaml
@@ -17,6 +17,11 @@ steps:
for patch in $(find /pkg/patches -type f -name "*.patch" | sort); do
patch -p1 < $patch || (echo "Failed to apply patch $patch" && exit 1)
done
+ - |
+ cd /src
+ scripts/config --enable CONFIG_SENSORS_APPLESMC
+ scripts/config --enable CONFIG_USB4
+ scripts/config --enable CONFIG_USB4_NET
build:
{{ if .BUILD_ARG_KERNEL_TARGET }}
- |
diff --git a/kernel/prepare/pkg.yaml b/kernel/prepare/pkg.yaml
index f82ddcf..8f8f633 100644
--- a/kernel/prepare/pkg.yaml
+++ b/kernel/prepare/pkg.yaml
@@ -9,6 +9,10 @@ steps:
destination: linux.tar.xz
sha256: "{{ .linux_sha256 }}"
sha512: "{{ .linux_sha512 }}"
+ - url: https://github.com/t2linux/linux-t2-patches/archive/0d1e1094a6200579e400e5ca493562c31f7b715a.tar.gz
+ destination: patches.tar.gz
+ sha256: 54b9b1b15550622c024e788c3fb6944abe751154f6f10a984c134c5e87d7e0d4
+ sha512: ea5767ef9eb9598bff803a926db80dc7021cceb92856866e161bb27af824406ceb765ce5c44361bd9f61c6b1be42fa48fc6ef1f6cb461794b4036a0df1025fa5
env:
ARCH: {{ if eq .ARCH "aarch64"}}arm64{{ else if eq .ARCH "x86_64" }}x86_64{{ else }}unsupported{{ end }}
prepare:
@@ -39,6 +43,14 @@ steps:
done
make mrproper
+ - |
+ mkdir -p /pkg/patches
+ tar xf patches.tar.gz --strip-components=1 -C /pkg/patches
+ - |
+ while IFS= read -r file; do
+ echo "==> Adding $file"
+ patch -p1 < "$file"
+ done < <(find "/pkg/patches/" -type f -name "*.patch" | sort)
- |
cd /toolchain && git clone https://github.com/a13xp0p0v/kernel-hardening-checker.git
install:
--
2.46.0