File: 0000-Backport-update-m1n1-Expand-DTBS.patch

package info (click to toggle)
asahi-scripts 20250713-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 316 kB
  • sloc: sh: 860; makefile: 117
file content (31 lines) | stat: -rw-r--r-- 847 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From: Janne Grunau <j@jannau.net>
Date: Tue, 19 Aug 2025 22:55:33 +0200
Subject: update-m1n1: Expand $DTBS if it is a directory

Allows limiting the included devices to Apple silicon macs now that the
kernel has device-trees for iphones, ipads and T2 macs as well.
Avoids having each distribution to modify their default update-m1n1
configuration for this.

Signed-off-by: Janne Grunau <j@jannau.net>
---
 update-m1n1 | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/update-m1n1 b/update-m1n1
index ae274eb..dcd79fa 100755
--- a/update-m1n1
+++ b/update-m1n1
@@ -24,6 +24,12 @@ if [ -z "$DTBS" ]; then
     exit 1
 fi
 
+# If ${DTBS} is a directory expand it to include dtbs from all Apple silicon
+# macs.
+if [ -d "$DTBS" ]; then
+    DTBS="${DTBS}/apple/t6*.dtb ${DTBS}/apple/t81*.dtb"
+fi
+
 umount=false
 
 m1n1config=/run/m1n1.conf