Skip to content

Commit

Permalink
feat: add 12.5 support credit: @fruitybagel
Browse files Browse the repository at this point in the history
  • Loading branch information
blacktop committed May 1, 2024
1 parent c84505e commit 8f66d7b
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

| Version | Compiles | CodeQL | Boots *(arm64/x86_64)* |
| ---------- | :------: | :---------------------------------------------------------------------------------------: | :--------------------: |
| macOS 12.5 ||| ❔ / ✅ |
| macOS 13.0 || [DB](https://github.com/blacktop/darwin-xnu-build/releases/download/v13.0/xnu-codeql.zip) | ❔ / ❔ |
| macOS 13.1 || [DB](https://github.com/blacktop/darwin-xnu-build/releases/download/v13.1/xnu-codeql.zip) | ❔ / ❔ |
| macOS 13.2 || [DB](https://github.com/blacktop/darwin-xnu-build/releases/download/v13.2/xnu-codeql.zip) | ❔ / ❔ |
Expand All @@ -24,7 +25,7 @@
| macOS 14.1 || [DB](https://github.com/blacktop/darwin-xnu-build/releases/download/v14.1/xnu-codeql.zip) | ❔ / ❔ |
| macOS 14.2 || [DB](https://github.com/blacktop/darwin-xnu-build/releases/download/v14.2/xnu-codeql.zip) | ❔ / ❔ |
| macOS 14.3 || [DB](https://github.com/blacktop/darwin-xnu-build/releases/download/v14.3/xnu-codeql.zip) | ✅ / ✅ |
| macOS 14.4 || | ✅ / ✅ |
| macOS 14.4 || [DB](https://github.com/blacktop/darwin-xnu-build/releases/download/v14.4/xnu-codeql.zip) | ✅ / ✅ |

> [!NOTE]
> CodeQL DBs built with `MACHINE_CONFIG=VMAPPLE`
Expand Down
10 changes: 8 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,16 @@ install_ipsw() {
choose_xnu() {
if [ -z "$MACOS_VERSION" ]; then
gum style --border normal --margin "1" --padding "1 2" --border-foreground 212 "Choose $(gum style --foreground 212 'macOS') version to build:"
MACOS_VERSION=$(gum choose "13.0" "13.1" "13.2" "13.3" "13.4" "13.5" "14.0" "14.1" "14.2" "14.3" "14.4")
MACOS_VERSION=$(gum choose "12.5" "13.0" "13.1" "13.2" "13.3" "13.4" "13.5" "14.0" "14.1" "14.2" "14.3" "14.4")
fi
TIGHTBEAMC="tightbeamc-not-supported"
case ${MACOS_VERSION} in
'12.5')
RELEASE_URL='https://raw.githubusercontent.com/apple-oss-distributions/distribution-macOS/macos-125/release.json'
KDK_NAME='Kernel Debug Kit 12.5 build 21G72'
KDKROOT='/Library/Developer/KDKs/KDK_12.5_21G72.kdk'
RC_DARWIN_KERNEL_VERSION='22.6.0'
;;
'13.0')
RELEASE_URL='https://raw.githubusercontent.com/apple-oss-distributions/distribution-macOS/macos-130/release.json'
KDK_NAME='Kernel Debug Kit 13.0 build 22A380'
Expand Down Expand Up @@ -261,7 +267,7 @@ patches() {
if [ "$CODEQL" -eq "0" ]; then
PATCH_DIR=""
case ${MACOS_VERSION} in
'13.0' | '13.1' | '13.2' | '13.3' | '13.4' | '13.5' | '14.0' | '14.1' | '14.2' | '14.3')
'12.5' | '13.0' | '13.1' | '13.2' | '13.3' | '13.4' | '13.5' | '14.0' | '14.1' | '14.2' | '14.3')
PATCH_DIR="${WORK_DIR}/patches"
;;
'14.4')
Expand Down
13 changes: 13 additions & 0 deletions patches/iobuffermemd_monterey.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/iokit/Kernel/IOBufferMemoryDescriptor.cpp b/iokit/Kernel/IOBufferMemoryDescriptor.cpp
index f0d246a7..f1d35835 100644
--- a/iokit/Kernel/IOBufferMemoryDescriptor.cpp
+++ b/iokit/Kernel/IOBufferMemoryDescriptor.cpp
@@ -332,7 +332,7 @@ IOBufferMemoryDescriptor::initWithPhysicalMask(
KMA_GUARD_LAST | KMA_ZERO);

if (((uint32_t) alignment) != alignment) {
- return NULL;
+ return false;
}
if (kheap == KHEAP_DATA_BUFFERS) {
kma_flags = (kma_flags_t) (kma_flags | KMA_DATA);

0 comments on commit 8f66d7b

Please sign in to comment.