Compare commits
304 Commits
use-github
...
2.1.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e94f6ac63d | ||
|
|
5e4b124b2a | ||
|
|
67df72290f | ||
|
|
ab740371c8 | ||
|
|
d508e8e9f9 | ||
|
|
39c03e3f8b | ||
|
|
94f77c20a0 | ||
|
|
2dc9961ffe | ||
|
|
24bc4432ab | ||
|
|
2a578734b9 | ||
|
|
bb56544182 | ||
|
|
70e62c946a | ||
|
|
d24eb642ce | ||
|
|
81fee375a1 | ||
|
|
581c7fcb4e | ||
|
|
4939c1dc0f | ||
|
|
f635c21f29 | ||
|
|
ed0e3ff66a | ||
|
|
7ac83d8dd6 | ||
|
|
b7bca45910 | ||
|
|
737aed5635 | ||
|
|
868cfa62c1 | ||
|
|
b561a35ca9 | ||
|
|
5542f10ea1 | ||
|
|
bccf1dc31d | ||
|
|
b50ddb6e26 | ||
|
|
4f980d7562 | ||
|
|
6780fe307f | ||
|
|
dfcb7fdb0c | ||
|
|
97d956190e | ||
|
|
41b9fcb85f | ||
|
|
4015b8bb25 | ||
|
|
be155127cf | ||
|
|
203b5cf127 | ||
|
|
fbec713b43 | ||
|
|
734e14b0cf | ||
|
|
ad1faf2ea2 | ||
|
|
58435188eb | ||
|
|
0b92e022e9 | ||
|
|
4db2e97662 | ||
|
|
d1ba89049c | ||
|
|
33d60f19d0 | ||
|
|
15d4e201f4 | ||
|
|
af67ec2bbe | ||
|
|
e30434a70e | ||
|
|
3a442e67c6 | ||
|
|
32a98e5b34 | ||
|
|
d9828999eb | ||
|
|
07daef6f63 | ||
|
|
2cccd34870 | ||
|
|
31790190be | ||
|
|
b7ecafb5ec | ||
|
|
4f6e8c4fb8 | ||
|
|
e142702c3d | ||
|
|
8b5663c3c7 | ||
|
|
7c89ab6ba3 | ||
|
|
80e2aa9447 | ||
|
|
170b00694b | ||
|
|
f5ffdd158a | ||
|
|
c504c95b50 | ||
|
|
9da6c85c98 | ||
|
|
6a58ef1dab | ||
|
|
a8f76af6bc | ||
|
|
1ec6b02cd7 | ||
|
|
8ff76ba3cd | ||
|
|
6742372e91 | ||
|
|
65caa6d028 | ||
|
|
31cb5f9367 | ||
|
|
9aacf826f2 | ||
|
|
ca34c57fde | ||
|
|
49c138bd19 | ||
|
|
c8db4663ce | ||
|
|
7fcf5fcab4 | ||
|
|
7fcb824dc2 | ||
|
|
9455d5357b | ||
|
|
3a7265e985 | ||
|
|
03ac2ec155 | ||
|
|
cfde6978f5 | ||
|
|
8ca7a2ebbb | ||
|
|
7d50f96cf1 | ||
|
|
0eb351f270 | ||
|
|
3bfa50950a | ||
|
|
2fb9fb866f | ||
|
|
87b5b49f06 | ||
|
|
4cc88d18a0 | ||
|
|
5b332eeac5 | ||
|
|
8f88444ac3 | ||
|
|
15ad0c509e | ||
|
|
0e0b1436b2 | ||
|
|
528d32cc9d | ||
|
|
8e15ed6d6e | ||
|
|
796b5bcd9e | ||
|
|
a37571a8a5 | ||
|
|
9796ecf75e | ||
|
|
cade003b31 | ||
|
|
2d8c9c5beb | ||
|
|
0a138ee435 | ||
|
|
6b414526ac | ||
|
|
a67a6d6c67 | ||
|
|
da887e3722 | ||
|
|
e65b8386ab | ||
|
|
0d7edc8e09 | ||
|
|
32080fdcc3 | ||
|
|
c2d9d01a24 | ||
|
|
cdb6603ed6 | ||
|
|
dbf7444009 | ||
|
|
c46133b0b5 | ||
|
|
dde558a951 | ||
|
|
9bdce62f59 | ||
|
|
098a4f9661 | ||
|
|
d9f23b556c | ||
|
|
0f63ce2fde | ||
|
|
adc58b417b | ||
|
|
b1bb01af69 | ||
|
|
2751ca69de | ||
|
|
e9744fffd6 | ||
|
|
e0e731b13a | ||
|
|
bb34bbb6a1 | ||
|
|
c68afc2f8e | ||
|
|
55ed78f5b4 | ||
|
|
c065aae29f | ||
|
|
8333c3d8ec | ||
|
|
b8b591a8ed | ||
|
|
4542287613 | ||
|
|
597b167285 | ||
|
|
7e5f171210 | ||
|
|
861898272b | ||
|
|
16ab3367f8 | ||
|
|
9d43d66f5d | ||
|
|
753cd6cf3f | ||
|
|
192dfb79ae | ||
|
|
d7f3d09c14 | ||
|
|
41a5731546 | ||
|
|
2e513b98ca | ||
|
|
5c1326881a | ||
|
|
1d6631f24d | ||
|
|
61872a8b94 | ||
|
|
024559885d | ||
|
|
3e0a2a2198 | ||
|
|
86be4acedb | ||
|
|
ce08129d4b | ||
|
|
56c9fd52d5 | ||
|
|
429c213f79 | ||
|
|
2ce1f1c7f9 | ||
|
|
366bb6b6c2 | ||
|
|
3f7617c7c5 | ||
|
|
bd1e8b48b5 | ||
|
|
faba9e3200 | ||
|
|
4bda620f1e | ||
|
|
3a459dbdc3 | ||
|
|
9cc08a25db | ||
|
|
1594db1624 | ||
|
|
5f54bdff54 | ||
|
|
1e0eb42c47 | ||
|
|
9e3087003c | ||
|
|
7eb1ea2055 | ||
|
|
b9c5aaa8dc | ||
|
|
b0eb0fe5d9 | ||
|
|
28ef0bb0d9 | ||
|
|
67006be28a | ||
|
|
37ff4f70e7 | ||
|
|
bcca5f8e2a | ||
|
|
a1dc492cc9 | ||
|
|
f394bee0f5 | ||
|
|
a41001130f | ||
|
|
e58dff05f2 | ||
|
|
9970e6806c | ||
|
|
1c39396ae2 | ||
|
|
431543057a | ||
|
|
d67e2e3dee | ||
|
|
6a4f2a9f02 | ||
|
|
0b68741959 | ||
|
|
9ec68a9db6 | ||
|
|
4246f91289 | ||
|
|
38657fb1c6 | ||
|
|
f6408a1054 | ||
|
|
aabb0b24ba | ||
|
|
2b39428127 | ||
|
|
be53b0a034 | ||
|
|
2cb3642c29 | ||
|
|
8feed781b2 | ||
|
|
be361d27e6 | ||
|
|
5f838259ad | ||
|
|
f3e52a1335 | ||
|
|
622c56b430 | ||
|
|
287bca39e8 | ||
|
|
b1325b77da | ||
|
|
81f35aff57 | ||
|
|
143dba4a17 | ||
|
|
da3d701075 | ||
|
|
c70238bd5d | ||
|
|
8eebf7e1e1 | ||
|
|
85cf440996 | ||
|
|
db2768a2bf | ||
|
|
48c74a1d75 | ||
|
|
73aa594ab6 | ||
|
|
42478c726b | ||
|
|
00ea5a7843 | ||
|
|
7f0a96126b | ||
|
|
c6f6fe4b43 | ||
|
|
c3dcb35b33 | ||
|
|
eefe49b837 | ||
|
|
bf3f4481dc | ||
|
|
ce6f65de1f | ||
|
|
045cc3726e | ||
|
|
60d392f969 | ||
|
|
e992fbdd14 | ||
|
|
3d40c94787 | ||
|
|
9794cc5fb1 | ||
|
|
8ae451f37f | ||
|
|
3c309d71b9 | ||
|
|
dbdddd063f | ||
|
|
0e1421f7fc | ||
|
|
3a3bba4c65 | ||
|
|
1f000d893f | ||
|
|
87469b71d0 | ||
|
|
8d838a3148 | ||
|
|
c1f5be775d | ||
|
|
7539d175b5 | ||
|
|
5a1fa12e5b | ||
|
|
6aed21aae2 | ||
|
|
c0ae23367e | ||
|
|
4bbfe465fa | ||
|
|
2fb243cc00 | ||
|
|
b74001a6e5 | ||
|
|
4e4157c125 | ||
|
|
9ef569e949 | ||
|
|
4b7c399ce6 | ||
|
|
fcf24cef88 | ||
|
|
1d37c5a4ee | ||
|
|
27d95a9aae | ||
|
|
8cae25b95a | ||
|
|
fb0ea6bb08 | ||
|
|
303a908248 | ||
|
|
3585053633 | ||
|
|
a329e80082 | ||
|
|
d9e91bd17e | ||
|
|
8a9db4c2a5 | ||
|
|
fccde7214b | ||
|
|
24cc303530 | ||
|
|
2753f88bfa | ||
|
|
4056224476 | ||
|
|
5b55d17e42 | ||
|
|
669cc0ac5f | ||
|
|
9a3181d465 | ||
|
|
728fef9256 | ||
|
|
b06feb9dbe | ||
|
|
bd51332a17 | ||
|
|
a6503bcd97 | ||
|
|
f931c3b6c2 | ||
|
|
132f12c885 | ||
|
|
bbdfb8158f | ||
|
|
1cbee930cb | ||
|
|
f77a45a587 | ||
|
|
ef32e07ac6 | ||
|
|
e4f1f6b288 | ||
|
|
ba0a6a59e5 | ||
|
|
1ff1934595 | ||
|
|
61eb938350 | ||
|
|
5a57ee1cc9 | ||
|
|
d1e721d8d7 | ||
|
|
8c99335b83 | ||
|
|
cdd81c5466 | ||
|
|
260fcf4c93 | ||
|
|
960090fd80 | ||
|
|
8203cbc756 | ||
|
|
fb88795923 | ||
|
|
7e6da1d056 | ||
|
|
a7837f1ae8 | ||
|
|
4544c99fde | ||
|
|
1f2409043d | ||
|
|
414d114b85 | ||
|
|
0749d14e1c | ||
|
|
4f44737f12 | ||
|
|
50e7f1d3ad | ||
|
|
3b551d565a | ||
|
|
b7c4ea2b89 | ||
|
|
76516394fd | ||
|
|
9cadfec802 | ||
|
|
dbae3383d0 | ||
|
|
99daa4c2b1 | ||
|
|
18ec8ca665 | ||
|
|
5f675ab9de | ||
|
|
ed002ce988 | ||
|
|
9f24c8738a | ||
|
|
5551780fcb | ||
|
|
820481a288 | ||
|
|
a32e148ec0 | ||
|
|
e7c9f4e90c | ||
|
|
692c0de9f2 | ||
|
|
dbae4db28c | ||
|
|
462d6f633a | ||
|
|
b2c01da5b2 | ||
|
|
fc650bfd97 | ||
|
|
ffeec342a9 | ||
|
|
ea12d44d68 | ||
|
|
09c3b8e3da | ||
|
|
697dbec6a1 | ||
|
|
991c059f30 | ||
|
|
40484a42dd | ||
|
|
832232dd37 | ||
|
|
f9ecafb661 | ||
|
|
42c6d6b042 | ||
|
|
1d9fbec9ef |
55
.github/workflows/build-app-wxpython.yml
vendored
@@ -2,6 +2,8 @@ name: CI - Build wxPython
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
workflow_dispatch:
|
||||
release:
|
||||
types: [published]
|
||||
@@ -9,7 +11,7 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
name: Build wxPython
|
||||
runs-on: macos-latest
|
||||
runs-on: x86_64_monterey
|
||||
if: github.repository_owner == 'dortania'
|
||||
|
||||
env:
|
||||
@@ -24,13 +26,9 @@ jobs:
|
||||
|
||||
# App Signing
|
||||
ORG_MAC_DEVELOPER_ID_APPLICATION_IDENTITY: ${{ secrets.ORG_MAC_DEVELOPER_ID_APPLICATION_IDENTITY }}
|
||||
ORG_MAC_DEVELOPER_ID_APPLICATION_CERT_P12_BASE64: ${{ secrets.ORG_MAC_DEVELOPER_ID_APPLICATION_CERT_P12_BASE64 }}
|
||||
ORG_MAC_DEVELOPER_ID_APPLICATION_CERT_P12_PASSWORD: ${{ secrets.ORG_MAC_DEVELOPER_ID_APPLICATION_CERT_P12_PASSWORD }}
|
||||
|
||||
# PKG Signing
|
||||
ORG_MAC_DEVELOPER_ID_INSTALLER_IDENTITY: ${{ secrets.ORG_MAC_DEVELOPER_ID_INSTALLER_IDENTITY }}
|
||||
ORG_MAC_DEVELOPER_ID_INSTALLER_CERT_P12_BASE64: ${{ secrets.ORG_MAC_DEVELOPER_ID_INSTALLER_CERT_P12_BASE64 }}
|
||||
ORG_MAC_DEVELOPER_ID_INSTALLER_CERT_P12_PASSWORD: ${{ secrets.ORG_MAC_DEVELOPER_ID_INSTALLER_CERT_P12_PASSWORD }}
|
||||
|
||||
# Notarization
|
||||
ORG_MAC_NOTARIZATION_TEAM_ID: ${{ secrets.ORG_MAC_NOTARIZATION_TEAM_ID }}
|
||||
@@ -40,41 +38,36 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python 3.11
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.11
|
||||
# - name: Import Application Signing Certificate
|
||||
# uses: dhinakg/import-codesign-certs@master
|
||||
# with:
|
||||
# p12-file-base64: ${{ secrets.ORG_MAC_DEVELOPER_ID_APPLICATION_CERT_P12_BASE64 }}
|
||||
# p12-password: ${{ secrets.ORG_MAC_DEVELOPER_ID_APPLICATION_CERT_P12_PASSWORD }}
|
||||
|
||||
- name: Import Application Signing Certificate
|
||||
uses: dhinakg/import-codesign-certs@master
|
||||
with:
|
||||
p12-file-base64: ${{ secrets.ORG_MAC_DEVELOPER_ID_APPLICATION_CERT_P12_BASE64 }}
|
||||
p12-password: ${{ secrets.ORG_MAC_DEVELOPER_ID_APPLICATION_CERT_P12_PASSWORD }}
|
||||
# - name: Import Installer Signing Certificate
|
||||
# uses: dhinakg/import-codesign-certs@master
|
||||
# with:
|
||||
# p12-file-base64: ${{ secrets.ORG_MAC_DEVELOPER_ID_INSTALLER_CERT_P12_BASE64 }}
|
||||
# p12-password: ${{ secrets.ORG_MAC_DEVELOPER_ID_INSTALLER_CERT_P12_PASSWORD }}
|
||||
|
||||
- name: Import Installer Signing Certificate
|
||||
uses: dhinakg/import-codesign-certs@master
|
||||
with:
|
||||
p12-file-base64: ${{ secrets.ORG_MAC_DEVELOPER_ID_INSTALLER_CERT_P12_BASE64 }}
|
||||
p12-password: ${{ secrets.ORG_MAC_DEVELOPER_ID_INSTALLER_CERT_P12_PASSWORD }}
|
||||
# - name: Install Dependencies
|
||||
# run: /Library/Frameworks/Python.framework/Versions/3.11/bin/python3 -m pip install -r requirements.txt
|
||||
|
||||
- name: Install Dependencies
|
||||
run: python3 -m pip install -r requirements.txt
|
||||
|
||||
- name: Force Universal2 charset for Python
|
||||
run: |
|
||||
python3 -m pip uninstall -y charset_normalizer
|
||||
python3 -m pip download --platform macosx_10_9_universal2 --only-binary=:all: charset-normalizer
|
||||
python3 -m pip install charset_normalizer-*-macosx_10_9_universal2.whl
|
||||
# - name: Force Universal2 charset for Python
|
||||
# run: |
|
||||
# /Library/Frameworks/Python.framework/Versions/3.11/bin/python3 -m pip uninstall -y charset_normalizer
|
||||
# /Library/Frameworks/Python.framework/Versions/3.11/bin/python3 -m pip download --platform macosx_10_9_universal2 --only-binary=:all: charset-normalizer
|
||||
# /Library/Frameworks/Python.framework/Versions/3.11/bin/python3 -m pip install charset_normalizer-*-macosx_10_9_universal2.whl
|
||||
|
||||
- name: Prepare Assets (--prepare-assets)
|
||||
run: >
|
||||
python3 Build-Project.command
|
||||
/Library/Frameworks/Python.framework/Versions/3.11/bin/python3 Build-Project.command
|
||||
--run-as-individual-steps --reset-dmg-cache
|
||||
--prepare-assets
|
||||
|
||||
- name: Prepare Application (--prepare-application)
|
||||
run: >
|
||||
python3 Build-Project.command
|
||||
/Library/Frameworks/Python.framework/Versions/3.11/bin/python3 Build-Project.command
|
||||
--application-signing-identity "${{ env.ORG_MAC_DEVELOPER_ID_APPLICATION_IDENTITY }}"
|
||||
--notarization-apple-id "${{ env.ORG_MAC_NOTARIZATION_APPLE_ID }}" --notarization-password "${{ env.ORG_MAC_NOTARIZATION_PASSWORD }}" --notarization-team-id "${{ env.ORG_MAC_NOTARIZATION_TEAM_ID }}"
|
||||
--git-branch "${{ env.branch }}" --git-commit-url "${{ env.commiturl }}" --git-commit-date "${{ env.commitdate }}"
|
||||
@@ -85,7 +78,7 @@ jobs:
|
||||
|
||||
- name: Prepare Package (--prepare-package)
|
||||
run: >
|
||||
python3 Build-Project.command
|
||||
/Library/Frameworks/Python.framework/Versions/3.11/bin/python3 Build-Project.command
|
||||
--installer-signing-identity "${{ env.ORG_MAC_DEVELOPER_ID_INSTALLER_IDENTITY }}"
|
||||
--notarization-apple-id "${{ env.ORG_MAC_NOTARIZATION_APPLE_ID }}" --notarization-password "${{ env.ORG_MAC_NOTARIZATION_PASSWORD }}" --notarization-team-id "${{ env.ORG_MAC_NOTARIZATION_TEAM_ID }}"
|
||||
--run-as-individual-steps
|
||||
@@ -93,7 +86,7 @@ jobs:
|
||||
|
||||
- name: Prepare Update Shim (--prepare-shim)
|
||||
run: >
|
||||
python3 Build-Project.command
|
||||
/Library/Frameworks/Python.framework/Versions/3.11/bin/python3 Build-Project.command
|
||||
--application-signing-identity "${{ env.ORG_MAC_DEVELOPER_ID_APPLICATION_IDENTITY }}"
|
||||
--notarization-apple-id "${{ env.ORG_MAC_NOTARIZATION_APPLE_ID }}" --notarization-password "${{ env.ORG_MAC_NOTARIZATION_PASSWORD }}" --notarization-team-id "${{ env.ORG_MAC_NOTARIZATION_TEAM_ID }}"
|
||||
--run-as-individual-steps
|
||||
|
||||
60
.github/workflows/build-site.yml
vendored
@@ -1,36 +1,52 @@
|
||||
name: CI - Build Site
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- gh-pages
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
concurrency:
|
||||
group: "pages"
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build Site and Deploy
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository_owner == 'dortania'
|
||||
steps:
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '12'
|
||||
- name: Checkout Repository
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: '0'
|
||||
persist-credentials: false
|
||||
submodules: 'recursive'
|
||||
- name: Install
|
||||
run: npm install
|
||||
working-directory: 'docs'
|
||||
- name: Build
|
||||
run: npm run build
|
||||
working-directory: 'docs'
|
||||
- name: Deploy
|
||||
uses: JamesIves/github-pages-deploy-action@3.7.1
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main'}}
|
||||
submodules: "recursive"
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
||||
BRANCH: gh-pages
|
||||
FOLDER: docs/.vuepress/dist/
|
||||
CLEAN: true
|
||||
node-version: "22"
|
||||
cache: "yarn"
|
||||
cache-dependency-path: ./docs/yarn.lock
|
||||
- name: Install Dependencies
|
||||
run: yarn install --frozen-lockfile
|
||||
working-directory: docs
|
||||
- name: Build
|
||||
run: yarn run build
|
||||
working-directory: docs
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: docs/.vuepress/dist/
|
||||
deploy:
|
||||
if: ${{ github.repository_owner == 'dortania' && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
|
||||
2
.github/workflows/validate-external.yml
vendored
@@ -2,6 +2,8 @@ name: CI - Validation (External)
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
workflow_dispatch:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
2
.github/workflows/validate.yml
vendored
@@ -2,6 +2,8 @@ name: CI - Validation
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
workflow_dispatch:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
1
.gitignore
vendored
@@ -17,7 +17,6 @@ __pycache__/
|
||||
*$py.class
|
||||
/docs/.vuepress/dist
|
||||
/docs/.vuepress/.config.js.swp
|
||||
/docs/yarn.lock
|
||||
/docs/yarn-error.log
|
||||
/docs/node_modules/
|
||||
/payloads/List.txt
|
||||
|
||||
92
CHANGELOG.md
@@ -1,6 +1,58 @@
|
||||
# OpenCore Legacy Patcher changelog
|
||||
|
||||
## 1.6.0
|
||||
## 2.1.2
|
||||
- Add additional error handling for when building OpenCore errors out
|
||||
- Prevents broken EFI from being installed to disk
|
||||
- Add additional error handling for broken settings file from OCLP 2.1.0
|
||||
- If typing for settings is wrong, app will skip setting it, delete from settings file and use default
|
||||
- Delete `/Users/Shared/.com.dortania.opencore-legacy-patcher.plist` and restart app to avoid this issue
|
||||
- Add additional warning about OCLP 2.1.0 bug where certain settings saved incorrectly
|
||||
- Delete `/Users/Shared/.com.dortania.opencore-legacy-patcher.plist` and restart app if `TypeError: unsupported type: <class 'NoneType'>` error occurs
|
||||
|
||||
## 2.1.1
|
||||
- Resolve boolean GUI settings saving incorrectly as Python's None type
|
||||
|
||||
## 2.1.0
|
||||
- Disable FeatureUnlock by default
|
||||
- Intended to maintain long term stability
|
||||
- If features unlocked by FeatureUnlock desired, can be enabled in settings
|
||||
- Disable mediaanalysisd on Metal 3802-based GPUs
|
||||
- Intended to maintain long term stability
|
||||
- If Live Text support desired, can be enabled in settings
|
||||
- Support for retaining GUI settings when building on-model
|
||||
- When switching to a different model, model-specific GUI settings will be reset
|
||||
- Note resetting saved settings not implemented yet
|
||||
- Delete `/Users/Shared/.com.dortania.opencore-legacy-patcher.plist` and restart app to reset settings
|
||||
- Resolve macOS 15.1 (24B2083) Apple Silicon installer appearing as download option
|
||||
- Resolve WhatsApp crashing on 15.1
|
||||
- Increment binaries:
|
||||
- PatcherSupportPkg 1.8.4 - release
|
||||
|
||||
## 2.0.2
|
||||
- Fix Nvidia Kepler patches not installing on Monterey
|
||||
- Fix `iMac7,1` and `iMac8,1` failing to apply root patches on macOS Sequoia
|
||||
- Avoid downgrading AppleGVA stack on AMD GCN and newer GPUs
|
||||
- Resolves VTDecoderXPC crashes
|
||||
- Thanks @ausdauersportler for the catch!
|
||||
- Resolve glitched widgets on 3802-based GPUs running macOS Sequoia 15.1
|
||||
- Resolve CoreImage crashes on 3802-based GPUs running macOS Sequoia
|
||||
- Resolve missing screen capture crop borders on non-Metal GPUs running macOS Sequoia
|
||||
- Resolve TeraScale 2 HDCP kernel panic
|
||||
- Resolve specific Wallpaper locking up on non-Metal GPUs running macOS Sequoia
|
||||
- Removes unsupported Metal-based wallpaper (Macintosh Wallpaper)
|
||||
- Resolve firmware upload incompatibilities on pre-2012 Macs with 2012+ Airport cards
|
||||
- Thanks @ausdauersportler for the catch!
|
||||
- Resolve `diskutil` failing to be located in the installer creation process
|
||||
- Thanks @niklasravnsborg for the report!
|
||||
- Increment binaries:
|
||||
- PatcherSupportPkg 1.8.3 - release
|
||||
|
||||
## 2.0.1
|
||||
- Fix MacBookPro13,3 listing 'Available patches' after having installed all applicable patches
|
||||
- Fix Nvidia Tesla and Kepler patches not installing on Monterey (and older if applicable)
|
||||
- Fix Nvidia Web Drivers incorrectly listing 'OpenGL', 'compat' and 'nvda_drv(_vrl)' missing
|
||||
|
||||
## 2.0.0
|
||||
- Set `AssociatedBundleIdentifiers` property in launch services as an array
|
||||
- Move to auto-generated pre/postinstall scripts for PKGs
|
||||
- Streamlines PKG creation process, ensuring Install and AutoPKG scripts are always in sync
|
||||
@@ -17,8 +69,44 @@
|
||||
- Only affects building EFI from another machine
|
||||
- Resolve AMD Navi MXM GPU detection for modded iMac9,x-12,x
|
||||
- Thanks @Ausdauersportler for the patch!
|
||||
- Implement early macOS Sequoia support:
|
||||
- Supporting Macs with Metal and non-Metal-based graphics:
|
||||
- MacBook5,x - 10,1
|
||||
- MacBookAir2,x - 7,x
|
||||
- MacBookPro4,1 - 14,x
|
||||
- Macmini3,1 - 7,1
|
||||
- iMac7,1 - 18,x
|
||||
- MacPro3,1 - 6,1
|
||||
- MacPro3,1 can only boot with 4 cores max currently
|
||||
- 8 cores can be re-enabled for older OSes in the GUI:
|
||||
- Settings -> Build -> MacPro3,1/Xserve2,1 Workaround
|
||||
- Xserve2,1 - 3,1
|
||||
- Xserve2,1 can only boot with 4 cores max currently
|
||||
- 8 cores can be re-enabled for older OSes in the GUI:
|
||||
- Settings -> Build -> MacPro3,1/Xserve2,1 Workaround
|
||||
- Excludes the newly dropped MacBookAir8,x series.
|
||||
- No estimate can be given when support will be added.
|
||||
- For non-Metal graphics, Photos app will be broken.
|
||||
- No estimate can be given when support will be added.
|
||||
- Implement new MetallibSupportPkg system to support macOS Sequoia on Metal 3802-based GPUs.
|
||||
- See repository for more details: [MetallibSupportPkg](https://github.com/dortania/MetallibSupportPkg).
|
||||
- Implement new Patchset Detection architecture.
|
||||
- Implement new kernel cache building architecture.
|
||||
- Resolve "Label" error in com.dortania.opencore-legacy-patcher.os-caching.plist.
|
||||
- Add macOS Sequoia icons to boot picker and GUI.
|
||||
- Resolve Memoji crashes on 3802 GPUs.
|
||||
- Resolve Photos Memories tab crash on Intel Ivy Bridge/Haswell iGPUs.
|
||||
- Increment Binaries:
|
||||
- PatcherSupportPkg 1.6.3 - release
|
||||
- PatcherSupportPkg 1.8.0 - release
|
||||
- OpenCorePkg 1.0.1 - release
|
||||
- Lilu 1.6.8 - release
|
||||
- WhateverGreen 1.6.7 - release
|
||||
- RestrictEvents 1.1.4 - release
|
||||
- FeatureUnlock 1.1.6 - release
|
||||
- DebugEnhancer 1.0.9 - release
|
||||
- CPUFriend 1.2.8 - release
|
||||
- AutoPkgInstaller 1.0.4 - release
|
||||
- CryptexFixup 1.0.3 - release
|
||||
|
||||
## 1.5.0
|
||||
- Restructure project directories
|
||||
|
||||
@@ -15,7 +15,7 @@ Our project's main goal is to breathe new life into Macs no longer supported by
|
||||
|
||||
Noteworthy features of OpenCore Legacy Patcher:
|
||||
|
||||
* Support for macOS Big Sur, Monterey, Ventura, and Sonoma
|
||||
* Support for macOS Big Sur, Monterey, Ventura, Sonoma and Sequoia
|
||||
* Native Over the Air (OTA) System Updates
|
||||
* Supports Penryn and newer Macs
|
||||
* Full support for WPA Wi-Fi and Personal Hotspot on BCM943224 and newer wireless chipsets
|
||||
@@ -106,6 +106,7 @@ To run the project from source, see here: [Build and run from source](./SOURCE.m
|
||||
* USB Top Case probing
|
||||
* Developer root patching
|
||||
* Vaulting implementation
|
||||
* macOS 15 3802 Helios Research
|
||||
* UEFI bootx64.efi research
|
||||
* universal2 build research
|
||||
* Various documentation contributions
|
||||
|
||||
@@ -31,8 +31,8 @@ pip3 install -r requirements.txt
|
||||
|
||||
If you have any installation errors, see the following troubleshooting options:
|
||||
|
||||
* Use Python 3.10
|
||||
* Our build server currently uses Python 3.10 for generating binaries used in releases
|
||||
* Use Python 3.11
|
||||
* Our build server currently uses Python 3.11 for generating binaries used in releases
|
||||
* Use .whl snapshots for installing additional dependencies
|
||||
|
||||
## Running OpenCore Legacy Patcher
|
||||
|
||||
@@ -42,7 +42,8 @@ class InstallerBackup:
|
||||
os_data.os_data.big_sur,
|
||||
os_data.os_data.monterey,
|
||||
os_data.os_data.ventura,
|
||||
os_data.os_data.sonoma
|
||||
os_data.os_data.sonoma,
|
||||
os_data.os_data.sequoia,
|
||||
],
|
||||
first_run: bool = False
|
||||
) -> None:
|
||||
@@ -57,6 +58,7 @@ class InstallerBackup:
|
||||
os_data.os_data.monterey: Path(self._directory, "12 Monterey"),
|
||||
os_data.os_data.ventura: Path(self._directory, "13 Ventura"),
|
||||
os_data.os_data.sonoma: Path(self._directory, "14 Sonoma"),
|
||||
os_data.os_data.sequoia: Path(self._directory, "15 Sequoia"),
|
||||
}
|
||||
|
||||
for os_version in self._supported_oses:
|
||||
|
||||
@@ -10,5 +10,6 @@
|
||||
"single-title": false,
|
||||
"ul-style": {
|
||||
"style": "asterisk"
|
||||
}
|
||||
},
|
||||
"link-fragments": false
|
||||
}
|
||||
|
||||
@@ -24,29 +24,29 @@ module.exports = {
|
||||
],
|
||||
base: '/OpenCore-Legacy-Patcher/',
|
||||
|
||||
watch: {
|
||||
$page(newPage, oldPage) {
|
||||
if (newPage.key !== oldPage.key) {
|
||||
requestAnimationFrame(() => {
|
||||
if (this.$route.hash) {
|
||||
const element = document.getElementById(this.$route.hash.slice(1));
|
||||
watch: {
|
||||
$page(newPage, oldPage) {
|
||||
if (newPage.key !== oldPage.key) {
|
||||
requestAnimationFrame(() => {
|
||||
if (this.$route.hash) {
|
||||
const element = document.getElementById(this.$route.hash.slice(1));
|
||||
|
||||
if (element && element.scrollIntoView) {
|
||||
element.scrollIntoView();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
if (element && element.scrollIntoView) {
|
||||
element.scrollIntoView();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
markdown: {
|
||||
extendMarkdown: md => {
|
||||
md.use(require('markdown-it-multimd-table'), {
|
||||
rowspan: true,
|
||||
});
|
||||
}
|
||||
},
|
||||
markdown: {
|
||||
extendMarkdown: md => {
|
||||
md.use(require('markdown-it-multimd-table'), {
|
||||
rowspan: true,
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
theme: 'vuepress-theme-succinct',
|
||||
globalUIComponents: [
|
||||
@@ -56,10 +56,10 @@ module.exports = {
|
||||
themeConfig: {
|
||||
lastUpdated: true,
|
||||
repo: 'https://github.com/dortania/OpenCore-Legacy-Patcher/',
|
||||
docsDir: 'docs',
|
||||
docsBranch: 'main',
|
||||
editLinks: true,
|
||||
editLinkText: 'Help us improve this page!',
|
||||
docsDir: 'docs',
|
||||
docsBranch: 'main',
|
||||
editLinks: true,
|
||||
editLinkText: 'Help us improve this page!',
|
||||
logo: 'homepage.png',
|
||||
|
||||
sidebar: [{
|
||||
@@ -67,71 +67,65 @@ module.exports = {
|
||||
collapsable: false,
|
||||
sidebarDepth: 1,
|
||||
children: [
|
||||
'START',
|
||||
'MODELS',
|
||||
'START',
|
||||
'MODELS',
|
||||
'FAQ',
|
||||
]
|
||||
|
||||
},
|
||||
{
|
||||
title: 'Setting up',
|
||||
title: 'How to install',
|
||||
collapsable: false,
|
||||
sidebarDepth: 1,
|
||||
children: [
|
||||
'INSTALLER',
|
||||
'BUILD',
|
||||
'BUILD',
|
||||
'BOOT',
|
||||
'POST-INSTALL',
|
||||
]
|
||||
|
||||
},
|
||||
{
|
||||
title: 'Installation',
|
||||
title: 'macOS Support',
|
||||
collapsable: false,
|
||||
sidebarDepth: 1,
|
||||
children: [
|
||||
'BOOT',
|
||||
'POST-INSTALL',
|
||||
'SEQUOIA-DROP',
|
||||
'SONOMA-DROP',
|
||||
'VENTURA-DROP',
|
||||
'MONTEREY-DROP',
|
||||
]
|
||||
|
||||
},
|
||||
{
|
||||
title: 'macOS Sonoma',
|
||||
{
|
||||
title: 'Application',
|
||||
collapsable: false,
|
||||
sidebarDepth: 1,
|
||||
children: [
|
||||
['SONOMA-DROP', 'macOS Sonoma Support'],
|
||||
'UPDATE',
|
||||
'UNINSTALL',
|
||||
'PROCESS',
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
title: 'macOS Ventura',
|
||||
title: 'Troubleshooting',
|
||||
collapsable: false,
|
||||
sidebarDepth: 1,
|
||||
children: [
|
||||
['VENTURA-DROP', 'macOS Ventura Support'],
|
||||
'TROUBLESHOOTING',
|
||||
'ACCEL',
|
||||
'DEBUG',
|
||||
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
title: 'macOS Monterey',
|
||||
collapsable: false,
|
||||
sidebarDepth: 1,
|
||||
children: [
|
||||
['MONTEREY-DROP', 'macOS Monterey Support'],
|
||||
]
|
||||
},
|
||||
},
|
||||
{
|
||||
title: 'Misc',
|
||||
collapsable: false,
|
||||
sidebarDepth: 1,
|
||||
children: [
|
||||
'ACCEL',
|
||||
'TROUBLESHOOTING',
|
||||
'DEBUG',
|
||||
'UPDATE',
|
||||
'UNINSTALL',
|
||||
'ICNS',
|
||||
'WINDOWS',
|
||||
'UNIVERSALCONTROL',
|
||||
'PROCESS',
|
||||
'TIMEMACHINE',
|
||||
'ICNS',
|
||||
'WINDOWS',
|
||||
'UNIVERSALCONTROL',
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -139,8 +133,8 @@ module.exports = {
|
||||
collapsable: false,
|
||||
sidebarDepth: 1,
|
||||
children: [
|
||||
'DONATE',
|
||||
'LICENSE',
|
||||
'DONATE',
|
||||
'LICENSE',
|
||||
]
|
||||
|
||||
},
|
||||
@@ -149,21 +143,22 @@ module.exports = {
|
||||
collapsable: false,
|
||||
sidebarDepth: 1,
|
||||
children: [
|
||||
'ISSUES-HOLD',
|
||||
'TERMS',
|
||||
'HOW',
|
||||
'PATCHEXPLAIN',
|
||||
'ISSUES-HOLD',
|
||||
'TERMS',
|
||||
'HOW',
|
||||
'PATCHEXPLAIN',
|
||||
]
|
||||
|
||||
},
|
||||
],
|
||||
},
|
||||
plugins: [
|
||||
'@vuepress/plugin-back-to-top',
|
||||
'@vuepress/back-to-top',
|
||||
'vuepress-plugin-smooth-scroll',
|
||||
['vuepress-plugin-medium-zoom',
|
||||
'vuepress-plugin-fulltext-search',
|
||||
['@vuepress/medium-zoom',
|
||||
{
|
||||
selector: "img",
|
||||
selector: ".theme-succinct-content :not(a) > img",
|
||||
options: {
|
||||
background: 'var(--bodyBgColor)'
|
||||
}
|
||||
|
||||
@@ -47,3 +47,22 @@ tr
|
||||
background-color var(--sideBgColor)!important
|
||||
box-shadow 0px 0px 2px var(--bodyBgColor)
|
||||
right -12%!important
|
||||
|
||||
|
||||
@media (min-width: 1000px)
|
||||
.theme-succinct-content:not(.custom)
|
||||
max-width 70%
|
||||
|
||||
.search-box .suggestion a .suggestion-row .page-title
|
||||
border-color var(--borderColor) !important
|
||||
background-color: var(--sideBgColor) !important
|
||||
|
||||
.search-box .suggestion a .suggestion-row .suggestion-content
|
||||
border-color var(--borderColor) !important
|
||||
|
||||
.search-box .suggestion a .parent-page-title
|
||||
background-color: var(--bodyBgColor) !important
|
||||
color: var(--accentColor) !important
|
||||
|
||||
.search-box .suggestion.focused a
|
||||
color: var(--navItemHoverColor) !important
|
||||
@@ -22,4 +22,4 @@ $bodyBgColorDark = #2d3033
|
||||
$sideBgColorDark = #363b40
|
||||
$badgeTipColorDark = #023e52
|
||||
|
||||
$contentWidth = 900px
|
||||
$contentWidth = 900px
|
||||
@@ -1,4 +1,4 @@
|
||||
# Working Around Legacy Acceleration Issues
|
||||
# Working Around Non-Metal Issues
|
||||
|
||||
* [Broken Background Blurs](#broken-background-blurs)
|
||||
* [Downloading older non-Metal Apps](#downloading-older-non-metal-apps)
|
||||
@@ -46,7 +46,11 @@ Metal is Apple's in-house graphics API that acts as a replacement for OpenGL/Ope
|
||||
|
||||
By default with the non-Metal acceleration patches, many background blur menus may act distorted when moving a cursor over it. With 0.4.1 and newer, users can enable a new Beta Blur feature to try and resolve the issue:
|
||||
|
||||

|
||||
![]()
|
||||
|
||||
<div align="left">
|
||||
<img src="./images/OCLP-GUI-Settings-Beta-Blur.png" alt="Beta Blur settings" width="600" />
|
||||
</div>
|
||||
|
||||
Do note that enabling beta blurs can be more demanding on slower hardware
|
||||
## Downloading older non-Metal Apps
|
||||
|
||||
45
docs/BOOT.md
@@ -6,7 +6,10 @@ Reboot the machine while holding `Option` to select the EFI Boot entry with the
|
||||
|
||||
* This will be the Mac Boot Picker
|
||||
|
||||

|
||||
|
||||
<div align="left">
|
||||
<img src="./images/efi-boot.png" alt="EFI boot" width="800" />
|
||||
</div>
|
||||
|
||||
::: details Note for Mac Pros/Xserves/iMacs with unflashed GPUs
|
||||
|
||||
@@ -27,7 +30,10 @@ Now you'll want to get a list of drive identifiers. To do so, run the following
|
||||
diskutil list
|
||||
```
|
||||
The command should produce a list of drives installed in your system:
|
||||

|
||||
|
||||
<div align="left">
|
||||
<img src="./images/Unflashed-Boot-1.png" alt="Unflashed boot" width="800" />
|
||||
</div>
|
||||
|
||||
Keep track of the drive with the OCLP install. You will need the drive identifer for later.
|
||||
|
||||
@@ -37,7 +43,11 @@ Run the following command (Replace X with the drive number):
|
||||
```sh
|
||||
diskutil mount diskXs1
|
||||
```
|
||||

|
||||
|
||||
<div align="left">
|
||||
<img src="./images/Unflashed-Boot-2.png" alt="Unflashed boot 2" width="800" />
|
||||
</div>
|
||||
|
||||
If everything is correct, the EFI partion should be mounted.
|
||||
|
||||
Now you'll want to use the `bless` command to set the default boot device:
|
||||
@@ -45,7 +55,10 @@ Now you'll want to use the `bless` command to set the default boot device:
|
||||
bless --mount /Volumes/EFI --setBoot --file /Volumes/EFI/System/Library/CoreServices/boot.efi
|
||||
```
|
||||
Once the command is run, it should produce no output.
|
||||

|
||||
|
||||
<div align="left">
|
||||
<img src="./images/Unflashed-Boot-3.png" alt="Unflashed boot 3" width="800" />
|
||||
</div>
|
||||
|
||||
If the command produces an output, ensure that you've typed it in correctly.
|
||||
|
||||
@@ -56,15 +69,20 @@ Now that you've loaded OpenCore, "select Install macOS":
|
||||
|
||||
* This will be the OpenCore Picker
|
||||
|
||||

|
||||
<div align="left">
|
||||
<img src="./images/oc-boot.png" alt="OpenCore boot" width="800" />
|
||||
</div>
|
||||
|
||||
|
||||
You will soon reach the installer screen! If you enabled verbose mode when building OCLP, a lot of text will run across the screen. From there, it's just like any normal macOS install. For an example of how the boot process looks, see the following video:
|
||||
|
||||
* [OpenCore Legacy Patcher Boot Process](https://www.youtube.com/watch?v=AN3zsbQV_n4)
|
||||
|
||||
If your Mac is looping back into the beginning of the setup after the first reboot, turn it off, start it again and hold `Option`. This time, select the option with a grey hard disk icon, it can say "macOS Installer" or the name you gave the disk during the installer process. Keep repeating this step after every reboot if necessary.
|
||||
If your Mac is looping back into the beginning of the setup after the first reboot, turn it off, start it again and hold Option. This time (after choosing `EFI Boot` first) select the option with a grey hard disk icon in the OpenCore picker. It can either say `macOS Installer` or the name you gave the disk during the installer process. Keep repeating this step after every reboot if necessary.
|
||||
|
||||

|
||||
<div align="left">
|
||||
<img src="./images/oclp-stuck-firstreboot.png" alt="Stuck on first reboot" width="800" />
|
||||
</div>
|
||||
|
||||
|
||||
::: warning
|
||||
@@ -73,5 +91,18 @@ If your Mac is looping back into the beginning of the setup after the first rebo
|
||||
|
||||
:::
|
||||
|
||||
::: warning
|
||||
|
||||
**T1 Macs**: When installing macOS Sonoma or newer on a T1 system, full disk wipe will remove T1 functionality (touchbar etc). Therefore when installing, only wipe the volume containing the operating system.
|
||||
|
||||
<div align="left">
|
||||
<img src="./images/wipe-volume.png" alt="WipeVolume" width="800" />
|
||||
</div>
|
||||
|
||||
[More info here](https://dortania.github.io/OpenCore-Legacy-Patcher/TROUBLESHOOTING.html#no-t1-functionality-after-installing-sonoma-or-newer)
|
||||
|
||||
:::
|
||||
|
||||
|
||||
# Once installed and booting, head to [Post-Installation](./POST-INSTALL.md)
|
||||
|
||||
|
||||
@@ -6,20 +6,25 @@ If you haven't downloaded OpenCore Patcher yet, do so now:
|
||||
|
||||
* [OpenCore Legacy Patcher Releases](https://github.com/dortania/Opencore-Legacy-Patcher/releases)
|
||||
|
||||
Next, run the `OpenCore-Patcher.app`:
|
||||
Next, run the `OpenCore-Patcher.app`
|
||||
|
||||

|
||||
Here we'll select Build and Install OpenCore and start building:
|
||||
|
||||
|
||||
<div align="left">
|
||||
<img src="./images/OCLP-GUI-Main-Menu.png" alt="OCLP GUI Main Menu" width="700" />
|
||||
</div>
|
||||
|
||||
::: warning
|
||||
OpenCore configurations are hardware specific.
|
||||
If you're building OpenCore for a different model than you're currently running, it is absolutely necessary to select the proper model from Settings.
|
||||
:::
|
||||
|
||||
Here we'll select Build and Install OpenCore and start building:
|
||||
|
||||
| Start Building | Finished Building |
|
||||
| :--- | :--- |
|
||||
|  |  |
|
||||
| <img src="./images/OCLP-GUI-Build-Start.png" alt="Build start" width="600" /> | <img src="./images/OCLP-GUI-Build-Finished.png" alt="Build finished" width="600" /> |
|
||||
|
||||
|
||||
Once it finishes building, you'll want to select the Install OpenCore button:
|
||||
|
||||
@@ -28,6 +33,8 @@ Once it finishes building, you'll want to select the Install OpenCore button:
|
||||
|
||||
| Select Drive | Select Partition |
|
||||
| :--- | :--- |
|
||||
|  |  |
|
||||
| <img src="./images/OCLP-GUI-EFI-Select-Disk.png" alt="Select disk" width="600" /> | <img src="./images/OCLP-GUI-EFI-Select-Partition.png" alt="Select partition" width="600" /> |
|
||||
|
||||
|
||||
|
||||
# Once finished, head to [Booting OpenCore and macOS](./BOOT.md)
|
||||
|
||||
@@ -10,7 +10,10 @@ The easiest way to debug yourself is via Patcher Settings. Here there are many d
|
||||
* "Enable OpenCore DEBUG"
|
||||
* "Enable Kext DEBUG"
|
||||
|
||||

|
||||
<div align="left">
|
||||
<img src="./images/ocdebugimage.png" alt="OCLP debug" width="600" />
|
||||
</div>
|
||||
|
||||
|
||||
When you've enabled these 3 options, rebuild OpenCore and install to your drive. This will provide much greater debug information as well as write logs to the EFI Partition.
|
||||
|
||||
@@ -18,11 +21,15 @@ When you've enabled these 3 options, rebuild OpenCore and install to your drive.
|
||||
|
||||
With "Enable OpenCore DEBUG" set, on every boot there will be a .txt file generated on the EFI Partition. To grab these logs, [download and run MountEFI](https://github.com/corpnewt/MountEFI):
|
||||
|
||||

|
||||
<div align="left">
|
||||
<img src="./images/mountefi.png" alt="Mount EFI" width="600" />
|
||||
</div>
|
||||
|
||||
Once you've mounted the EFI Partition of the drive you have macOS on, you should see some nice logs:
|
||||
|
||||

|
||||
<div align="left">
|
||||
<img src="./images/logs-efi.png" alt="Mount EFI" width="800" />
|
||||
</div>
|
||||
|
||||
## Obtaining Kernel logs from macOS
|
||||
|
||||
|
||||
148
docs/FAQ.md
Normal file
@@ -0,0 +1,148 @@
|
||||
# FAQ
|
||||
|
||||
|
||||
* [Application requirements](#application-requirements)
|
||||
* [How do I make sure I'm all up to date?](#how-do-i-make-sure-i-m-all-up-to-date)
|
||||
* [Why are the settings "not saving"?](#why-are-the-settings-not-saving)
|
||||
* [Can I use the same USB install media as a universal installer?](#can-i-use-the-same-usb-install-media-as-a-universal-installer)
|
||||
* [Can I use OTA updates?](#can-i-use-ota-updates)
|
||||
* [Can I use automatic updates?](#can-i-use-automatic-updates)
|
||||
* [Can I update to macOS betas?](#can-i-update-to-macos-betas)
|
||||
* [Can I downgrade macOS while keeping data?](#can-i-downgrade-macos-while-keeping-data)
|
||||
* [Why is my system slow?](#why-is-my-system-slow)
|
||||
* [What is Metal and non-Metal?](#what-is-metal-and-non-metal)
|
||||
* [What are FeatureUnlock and mediaanalysisd?](#what-are-featureunlock-and-mediaanalysisd)
|
||||
* [Why isn't iPhone Mirroring working?](#why-isn-t-iphone-mirroring-working)
|
||||
* [Where is Apple Intelligence?](#where-is-apple-intelligence)
|
||||
|
||||
|
||||
|
||||
## Application requirements
|
||||
The patcher application requires **OS X Yosemite 10.10** or later to run.
|
||||
* **OS X El Capitan 10.11** or later is required to make installers for macOS Ventura and later.
|
||||
|
||||
The patcher is designed to target **macOS Big Sur 11.x to macOS Sequoia 15.x**.
|
||||
* Other versions may work, albeit in a broken state. No support is provided for any version outside of the above.
|
||||
|
||||
## How do I make sure I'm all up to date?
|
||||
|
||||
Updating the OCLP installation is a three step process, first the application, second the bootloader and finally root patches.
|
||||
|
||||
Refer to [Updating OpenCore and patches](https://dortania.github.io/OpenCore-Legacy-Patcher/UPDATE.html) for how to update the application and patches.
|
||||
|
||||
## Why are the settings "not saving"?
|
||||
|
||||
Starting with OpenCore Legacy Patcher 2.1.0, the status of settings in the GUI will now be saved under ```/Users/Shared/.com.dortania.opencore-legacy-patcher.plist```. The application will utilize this file to keep track of and retain settings for relaunches and application updates, no longer requiring a reconfiguring each time. The user interface will reset if any model other than "Host Model" is selected, as building for a different model will require different settings.
|
||||
|
||||
In case of issues, delete the file and restart the application to revert the GUI to default settings, then rebuild OpenCore with newly configured settings.
|
||||
|
||||
::: warning
|
||||
|
||||
Only settings made within OCLP are accounted for, modifications made directly into the ```config.plist``` file in the EFI partition outside of OCLP **will continue to reset**. Additionally, modifying ```config.plist``` manually may lead to a state where settings showed in the GUI are not in sync compared to settings in use, due to the application not knowing whether the file has been manually modified.
|
||||
|
||||
:::
|
||||
|
||||
::: details Explainer for older versions (click to expand)
|
||||
|
||||
OpenCore Legacy Patcher is a config build tool and as such the user interface always reverts to safe defaults, the user interface therefore **does not** reflect the status of settings. Settings are accounted for and saved by the OpenCore building process and you will always have to build OpenCore again after settings change.
|
||||
|
||||
Settings are saved to a config.plist file inside your EFI partition.
|
||||
|
||||
In SIP settings, booted SIP is reported in text form e.g. "0x803" but the checkboxes **do not** reflect the applied settings. Refer to [SIP Settings](https://dortania.github.io/OpenCore-Legacy-Patcher/POST-INSTALL.html#sip-settings) for more information.
|
||||
|
||||
:::
|
||||
|
||||
## Can I use the same USB install media as a universal installer?
|
||||
|
||||
OpenCore configurations are device specific, due to different quirks needed for different systems. If you are building OpenCore for a different system that you're running, you will have to select the targeted model from Settings before building OpenCore on the USB media.
|
||||
|
||||
When building OpenCore on a different system, OCLP cannot be aware of all the hardware installed in the target, meaning safe defaults will be used. However, this may not be the most optimal experience especially with custom hardware. As such it's recommended to rebuild OpenCore **on device** to apply settings that are based on hardware detection, after the OS has been installed.
|
||||
|
||||
## Can I use OTA updates?
|
||||
|
||||
You can. However it is extremely recommended to use USB drive for major OS upgrades (such as 13 -> 14) to avoid larger issues from potentially occurring.
|
||||
|
||||
General updates are usually fine, though it is always a good idea to wait few days to see whether patches break and have to be fixed.
|
||||
|
||||
## Can I use automatic updates?
|
||||
|
||||
It is extremely recommended to disable automatic updates (even downloading) when using OCLP, as Apple has recently changed the way automatic updates work. You can still manually initiate an update when you're ready to do so. For a related "System version mismatch" error while root patching, refer to [System version mismatch error when root patching](https://dortania.github.io/OpenCore-Legacy-Patcher/TROUBLESHOOTING.html#system-version-mismatch-error-when-root-patching) for troubleshooting.
|
||||
|
||||
### Disabling updates
|
||||
|
||||
**macOS Ventura and newer:**
|
||||
|
||||
System Settings -> General -> Software Update -> (i) button next to Automatic Updates -> Disable "Download new updates when available".
|
||||
|
||||
**macOS Big Sur and Monterey:**
|
||||
|
||||
System Preferences -> Software Update -> Advanced -> Disable "Download new updates when available".
|
||||
|
||||
|
||||
## Can I update to macOS betas?
|
||||
|
||||
If you are feeling brave and don't mind having to possibly recover your system. However, be advised that no help will be given in situations where a beta was installed.
|
||||
|
||||
|
||||
## Can I downgrade macOS while keeping data?
|
||||
|
||||
macOS doesn't allow direct downgrades, as such you will have to wipe the disk in order to revert. Backup your data beforehand either via Time Machine, ASR or some other solution.
|
||||
|
||||
## Why is my system slow?
|
||||
|
||||
This can mean many things. Firstly, newer operating systems are harder to run and can appear more slow.
|
||||
|
||||
Additionally if your macOS installation is recent, Spotlight starts creating a full disk index which can cause high CPU load, high temps and general slowness. It's recommended to keep the system running for few hours, once Spotlight has indexed the load will ease. A way to check whether it's caused by Spotlight is to open Activity Monitor, choosing "All Processes" from the "View" menu item to, then sorting by the CPU value to see if a process called ```mds_stores``` is using a lot of CPU resources.
|
||||
|
||||
However, if your system is being **really** slow and you have no transparency in Dock and menubar, this typically indicates that root patches are not installed and as such there is no acceleration. Make sure to install root patches to get proper drivers and functionality. Refer to [Applying post install volume patches](https://dortania.github.io/OpenCore-Legacy-Patcher/POST-INSTALL.html#applying-post-install-volume-patches) and the [Troubleshooting](https://dortania.github.io/OpenCore-Legacy-Patcher/TROUBLESHOOTING.html) section for more information.
|
||||
|
||||
Patches can also break if automatic updates are enabled and an update modifies the system volume, refer to [System version mismatch error when root patching](https://dortania.github.io/OpenCore-Legacy-Patcher/TROUBLESHOOTING.html#system-version-mismatch-error-when-root-patching) for more information.
|
||||
|
||||
## What is Metal and Non-Metal?
|
||||
|
||||
Metal is Apple's proprietary graphics API which fully superseded OpenGL rendering of the operating system starting from macOS Mojave. When the word "Non-Metal" is used, it describes GPUs that are not Metal supported and require using OpenGL instead.
|
||||
|
||||
GPUs that support Metal are as follows:
|
||||
|
||||
* Intel HD 4000 series (Ivy Bridge/3rd gen) and newer
|
||||
* AMD HD 7000 series and newer (GCN 1)
|
||||
* NVIDIA GTX 600 and 700 series (Kepler)
|
||||
|
||||
Everything older than mentioned are Non-Metal and therefore only support OpenGL. A great rule of thumb is that Macs older than 2012 are non-Metal, with the exception of systems with upgradable GPUs. Non-Metal also includes NVIDIA Maxwell (GTX 900 series) and Pascal (GTX 1000 series) when used with patched Web Drivers on newer than macOS High Sierra.
|
||||
|
||||
Refer to [Supported models](https://dortania.github.io/OpenCore-Legacy-Patcher/MODELS.html) and [Working Around Non-Metal Issues](https://dortania.github.io/OpenCore-Legacy-Patcher/ACCEL.html) pages for more information.
|
||||
|
||||
Due to deprecation of OpenGL, many newer applications may require Metal rendering and as such will fail to run on systems with Non-Metal GPUs.
|
||||
|
||||
|
||||
## What are FeatureUnlock and mediaanalysisd?
|
||||
|
||||
FeatureUnlock is an extension to enable some macOS features, such as Sidecar or Universal Control. All features enabled by FeatureUnlock are listed [here](https://github.com/acidanthera/FeatureUnlock). Medianalysisd is utilized for face detection in Photos, as well as the Live Text feature.
|
||||
|
||||
These features have the potential to cause instability in many places and as such a decision has been made to disable them by default (mediaanalysisd only on 3802-based* systems) starting from OpenCore Legacy Patcher version 2.1.0. If you want to enable these features at the risk of additional instability, you can do so in the OCLP settings and rebuilding OpenCore.
|
||||
|
||||
| FeatureUnlock | mediaanalysisd |
|
||||
| :--- | :--- |
|
||||
|  |  |
|
||||
|
||||
|
||||
::: details *3802 systems list (click to expand)
|
||||
|
||||
* NVIDIA
|
||||
* Kepler (600-800 series GPUs)
|
||||
* Intel
|
||||
* Ivy Bridge (3rd generation, HD 4000 series GPUs)
|
||||
* Haswell (4th generation, HD/Iris 4000-5000 series GPUs)
|
||||
|
||||
These GPUs are typically met in systems from 2012-2015.
|
||||
|
||||
:::
|
||||
|
||||
## Why isn't iPhone Mirroring working?
|
||||
|
||||
iPhone Mirroring requires a T2 chip, which means it will not be available on OCLP patched systems. The connection fails due to failure to establish T2 attestation.
|
||||
|
||||
## Where is Apple Intelligence?
|
||||
|
||||
Apple Intelligence requires Neural Engine, which is only found in Apple Silicon chips.
|
||||
|
||||
@@ -1,51 +1,41 @@
|
||||
# Download and build macOS Installers
|
||||
# Creating macOS Installers
|
||||
|
||||
This document is centered around downloading and writing the macOS installer to a USB drive. If you're already familiar with how to do this, you can skip this section.
|
||||
|
||||
* Note: 16GB+ USB drive will be required for the installer
|
||||
* Note: A 32GB drive is recommended, later versions of Sonoma and Sequoia cannot fit installer and patches to a 16GB disk. 16GB drive may work for older versions.
|
||||
|
||||
## Creating the installer
|
||||
## Downloading the installer
|
||||
|
||||
With OpenCore Legacy Patcher, our new GUI includes a download menu for macOS installers. So to start off, you'll want to grab our app:
|
||||
To start off, you'll want to grab the app:
|
||||
|
||||
* [OpenCore Legacy Patcher Release Apps](https://github.com/dortania/OpenCore-Legacy-Patcher/releases)
|
||||
|
||||
For this guide, we'll be using the standard OpenCore-Patcher (GUI).
|
||||
Once downloaded, open the app and you should be greeted by the main menu.
|
||||
|
||||
Once downloaded, open the app and you should be greeted by this menu:
|
||||
First, we'll want to select the "Create macOS Installer" button. This will present you with 2 options.
|
||||
|
||||

|
||||
For this example, we'll assume you'll need an installer. Select the "Download macOS installer" to get you a list of installers. Click to download the version you want.
|
||||
|
||||
First, we'll want to select the "Create macOS Installer" button. This will present you with 2 options:
|
||||
| Main menu | Installer creation menu | Available installers |
|
||||
| :--- | :--- | --- |
|
||||
|  |  |  |
|
||||
|
||||

|
||||
|
||||
For this example, we'll assume you'll need an installer. Selecting this option will download Apple's Installer Catalogs and build a list for you to choose:
|
||||
## Creating the installer
|
||||
|
||||
| Downloading | Listed Installers | Unsupported Installer |
|
||||
| :--- | :--- | :--- |
|
||||
|  |  | 
|
||||
|
||||
Since the patcher officially supports Big Sur and newer for patching, only those entries will be shown. For ourselves, we'll select macOS 12 as that's the latest public release at the time of writing. This will download and install the macOS installer to your applications folder.
|
||||
|
||||
* Note that some machines (namely 2012 and older) may not be currently supported on macOS Ventura. If you see this prompt, you'll need to use an older version of macOS.
|
||||
|
||||
| Downloading the Installer | Requesting to install | Finished Installing |
|
||||
| :--- | :--- | :--- |
|
||||
|  |  |  |
|
||||
|
||||
Once finished, you can proceed to write the installer onto a USB drive.
|
||||
Once the download is finished, you can proceed to write the installer onto a USB drive.
|
||||
|
||||
* Note: The entire USB drive will be formatted
|
||||
|
||||
| Select Downloaded Installer | Select disk to format |
|
||||
| :--- | :--- |
|
||||
|  |  |
|
||||
| <img src="./images/OCLP-GUI-Installer-Select-Local-Installer.png" alt="Select local installer" width="600" /> | <img src="./images/OCLP-GUI-Installer-Format-USB.png" alt="Select disk to format" width="600" /> |
|
||||
|
||||
|
||||
Now the patcher will start the installer flashing!
|
||||
|
||||
| Flashing | Success Prompt | Finished Flashing |
|
||||
| :--- | :--- |
|
||||
| :--- | :--- | :--- |
|
||||
|  |  |  |
|
||||
|
||||
# Once finished, head to [Building and installing OpenCore](./BUILD.md)
|
||||
|
||||
@@ -1,14 +1,5 @@
|
||||
# Supported Models
|
||||
|
||||
### Application requirements
|
||||
The patcher application requires **OS X Yosemite 10.10** or later to run.
|
||||
* **OS X El Capitan 10.11** or later is required to make installers for macOS Ventura and later.
|
||||
|
||||
The patcher is designed to target **macOS Big Sur 11.x to macOS Sonoma 14.x**.
|
||||
* Other versions may work, albeit in a broken state. No support is provided for any version outside of the above.
|
||||
|
||||
-------
|
||||
|
||||
Any Intel-based Mac listed below can install and make use of OpenCore Legacy Patcher. To check your hardware model, open System Information and look for the `Model Identifier` key.
|
||||
* This applies even if Apple supports the model natively.
|
||||
* OpenCore Legacy Patcher does not support PowerPC- or Apple Silicon-based Macs.
|
||||
@@ -32,7 +23,7 @@ The below tables can be used to reference issues with a particular model, and se
|
||||
|
||||
### MacBook
|
||||
|
||||
| Model Name | Identifier | Tagged Issues |
|
||||
| Model Name | Identifier | Additional info |
|
||||
| :--- | :--- | :--- |
|
||||
| MacBook (13-inch, Aluminum, Late 2008) | `MacBook5,1` | - [non-Metal GPU (macOS 11+)](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108)<br>- [USB 1.1 (macOS 13+)](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1021)|
|
||||
| MacBook (13-inch, Early 2009)<br>MacBook (13-inch, Mid 2009) | `MacBook5,2` | - [non-Metal GPU (macOS 11+)](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108)<br>- [USB 1.1 (macOS 13+)](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1021)<br>- Trackpad gestures are partially broken |
|
||||
@@ -40,11 +31,11 @@ The below tables can be used to reference issues with a particular model, and se
|
||||
| MacBook (13-inch, Mid 2010) | `MacBook7,1` | ^^ |
|
||||
| MacBook (Retina, 12-inch, Early 2015) | `MacBook8,1` | - [Legacy Metal (macOS 13+)](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1008) |
|
||||
| MacBook (Retina, 12-inch, Early 2016) | `MacBook9,1` | ^^ |
|
||||
| MacBook (Retina, 12-inch, 2017) | `MacBook10,1` | - Supported by OpenCore Legacy Patcher |
|
||||
| MacBook (Retina, 12-inch, 2017) | `MacBook10,1` | - Native graphics support |
|
||||
|
||||
### MacBook Air
|
||||
|
||||
| Model Name | Identifier | Tagged Issues |
|
||||
| Model Name | Identifier | Additional info |
|
||||
| :--- | :--- | :--- |
|
||||
| MacBook Air (13-inch, Late 2008)<br>MacBook Air (13-inch, Mid 2009) | `MacBookAir2,1` | - [non-Metal GPU (macOS 11+)](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108)<br>- [USB 1.1 (macOS 13+)](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1021)|
|
||||
| MacBook Air (11-inch, Late 2010) | `MacBookAir3,1` | ^^ |
|
||||
@@ -57,13 +48,13 @@ The below tables can be used to reference issues with a particular model, and se
|
||||
| MacBook Air (13-inch, Mid 2013)<br>MacBook Air (13-inch, Early 2014) | `MacBookAir6,2` | ^^ |
|
||||
| MacBook Air (11-inch, Early 2015) | `MacBookAir7,1` | ^^ |
|
||||
| MacBook Air (13-inch, Early 2015)<br>MacBook Air (13-inch, 2017) | `MacBookAir7,2` | ^^ |
|
||||
| MacBook Air (Retina, 13-inch, 2018) | `MacBookAir8,1` | - Supported by Apple |
|
||||
| MacBook Air (Retina, 13-inch, 2018) | `MacBookAir8,1` | - Supported natively up to Sonoma<br>- Currently not supported on Sequoia due to T2 issues<br> |
|
||||
| MacBook Air (Retina, 13-inch, 2019) | `MacBookAir8,2` | ^^ |
|
||||
| MacBook Air (Retina, 13-inch, 2020) | `MacBookAir9,1` | ^^ |
|
||||
| MacBook Air (Retina, 13-inch, 2020) | `MacBookAir9,1` | Supported by Apple |
|
||||
|
||||
### MacBook Pro
|
||||
|
||||
| Model Name | Identifier | Tagged Issues |
|
||||
| Model Name | Identifier | Additional info |
|
||||
| :--- | :--- | :--- |
|
||||
| MacBook Pro (15-inch, Early 2008)<br>MacBook Pro (17-inch, Early 2008) | `MacBookPro4,1` | - [non-Metal GPU (macOS 11+)](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108)<br>- [USB 1.1 (macOS 13+)](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1021)|
|
||||
| MacBook Pro (15-inch, Late 2008)<br>MacBook Pro (15-inch, Early 2009) | `MacBookPro5,1` | ^^ |
|
||||
@@ -87,7 +78,7 @@ The below tables can be used to reference issues with a particular model, and se
|
||||
| MacBook Pro (13-inch, 2016, 2 Thunderbolt 3 ports) | `MacBookPro13,1` | ^^ |
|
||||
| MacBook Pro (13-inch, 2016, 4 Thunderbolt 3 ports) | `MacBookPro13,2` | ^^ |
|
||||
| MacBook Pro (15-inch, 2016) | `MacBookPro13,3` | ^^ |
|
||||
| MacBook Pro (13-inch, 2017, 2 Thunderbolt 3 ports) | `MacBookPro14,1` | - Supported by OpenCore Legacy Patcher |
|
||||
| MacBook Pro (13-inch, 2017, 2 Thunderbolt 3 ports) | `MacBookPro14,1` | - Native graphics support |
|
||||
| MacBook Pro (13-inch, 2017, 4 Thunderbolt 3 ports) | `MacBookPro14,2` | ^^ |
|
||||
| MacBook Pro (15-inch, 2017) | `MacBookPro14,3` | - [Legacy Metal (macOS 14+)](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1008) |
|
||||
| MacBook Pro (13-inch, 2018, 4 Thunderbolt 3 ports)<br>MacBook Pro (13-inch, 2019, 4 Thunderbolt 3 ports) | `MacBookPro15,2` | - Supported by Apple |
|
||||
@@ -99,7 +90,7 @@ The below tables can be used to reference issues with a particular model, and se
|
||||
|
||||
### Mac mini
|
||||
|
||||
| Model Name | Identifier | Tagged Issues |
|
||||
| Model Name | Identifier | Additional info |
|
||||
| :--- | :--- | :--- |
|
||||
| Mac mini (Early 2009) | `Macmini3,1` | - [non-Metal GPU (macOS 11+)](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108)<br>- [USB 1.1 (macOS 13+)](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1021) |
|
||||
| Mac mini (Mid 2010) | `Macmini4,1` | ^^ |
|
||||
@@ -109,7 +100,7 @@ The below tables can be used to reference issues with a particular model, and se
|
||||
| Mac mini (Late 2018) | `Macmini8,1` | - Supported by Apple |
|
||||
|
||||
### iMac
|
||||
| Model Name | Identifier | Tagged Issues |
|
||||
| Model Name | Identifier | Additional info |
|
||||
| :--- | :--- | :--- |
|
||||
| iMac (20-inch, Mid 2007)<br>iMac (24-inch, Mid 2007) | `iMac7,1` | - [Requires SSE4.1 CPU](https://lowendmac.com/2018/penryn-t9300-9500-cpu-upgrades-for-the-2007-imac/)<br>- [non-Metal GPU (macOS 11+)](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108)<br>- [USB 1.1 (macOS 13+)](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1021)<br>- Remove stock Bluetooth to prevent panics |
|
||||
| iMac (20-inch, Early 2008)<br>iMac (24-inch, Early 2008) | `iMac8,1` | - [non-Metal GPU (macOS 11+)](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108)<br>- [USB 1.1 (macOS 13+)](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1021) |
|
||||
@@ -130,7 +121,7 @@ The below tables can be used to reference issues with a particular model, and se
|
||||
| iMac (21.5-inch, Late 2015) | `iMac16,1` | ^^ |
|
||||
| iMac (Retina 4K, 21.5-inch, Late 2015) | `iMac16,2` | ^^ |
|
||||
| iMac (Retina 5K, 27-inch, Late 2015) | `iMac17,1` | ^^ |
|
||||
| iMac (21.5-inch, 2017) | `iMac18,1` | - Supported by OpenCore Legacy Patcher |
|
||||
| iMac (21.5-inch, 2017) | `iMac18,1` | - Native graphics support |
|
||||
| iMac (Retina 4K, 21.5-inch, 2017) | `iMac18,2` | ^^ |
|
||||
| iMac (Retina 5K, 27-inch, 2017) | `iMac18,3` | ^^ |
|
||||
| iMac (Retina 5K, 27-inch, 2019) | `iMac19,1` | - Supported by Apple |
|
||||
@@ -140,7 +131,7 @@ The below tables can be used to reference issues with a particular model, and se
|
||||
|
||||
### Mac Pro
|
||||
|
||||
| Model Name | Identifier | Tagged Issues |
|
||||
| Model Name | Identifier | Additional info |
|
||||
| :--- | :--- | :--- |
|
||||
| Mac Pro (Early 2008) | `MacPro3,1` | - [Recommend upgrade to Metal GPU](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1008)<br>- [non-Metal GPU (macOS 11+)](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108)<br>- [USB 1.1 (macOS 13+)](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1021)<br>- Remove stock Bluetooth to prevent panics |
|
||||
| Mac Pro (Early 2009) | `MacPro4,1` | - [Recommend upgrade to Metal GPU](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1008)<br>- [non-Metal GPU (macOS 11+)](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108)<br>- [USB 1.1 (macOS 13+)](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1021) |
|
||||
@@ -150,7 +141,7 @@ The below tables can be used to reference issues with a particular model, and se
|
||||
|
||||
### Xserve
|
||||
|
||||
| Model Name | Identifier | Tagged Issues |
|
||||
| Model Name | Identifier | Additional info |
|
||||
| :--- | :--- | :--- |
|
||||
| Xserve (Early 2008) | `Xserve2,1` | - Recommend upgrade to Metal GPU<br>- [non-Metal GPU (macOS 11+)](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108)<br>- [USB 1.1 (macOS 13+)](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1021)
|
||||
| Xserve (Early 2009) | `Xserve3,1` | ^^ |
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# macOS Monterey
|
||||
|
||||

|
||||
|
||||
With OpenCore Legacy Patcher v0.1.7 and newer, we've implemented beta macOS Monterey support for users. Please note that Apple has dropped a lot of hardware with this release as well as broken many of our previous patch sets. This page will be used to inform users regarding current issues and will be updated as new patch sets are developed and added to our patcher.
|
||||
|
||||
@@ -21,13 +21,19 @@ And voila! No more USB drive required.
|
||||
|
||||
To do this, run the OpenCore Patcher and head to Patcher Settings, then uncheck "Show OpenCore Bootpicker" on the Build tab:
|
||||
|
||||

|
||||
|
||||
<div align="left">
|
||||
<img src="./images/OCLP-GUI-Settings-ShowPicker.png" alt="GUI Settings ShowPicker" width="600" />
|
||||
</div>
|
||||
|
||||
|
||||
Once you've toggled it off, build your OpenCore EFI once again and install to your desired drive. Now to show the OpenCore selector, you can simply hold down the "ESC" key while clicking on EFI boot, and then you can release the "ESC" key when you see the cursor arrow at the top left.
|
||||
|
||||
## SIP settings
|
||||
|
||||
SIP, or System Integrity Protection, needs to be lowered on systems where root patching is required to patch data on disk. This will vary between OS versions and the model in question. OCLP by default will determine the proper SIP options for the OS version and Mac model, in most cases the user has no need to touch these settings. However, this part explains how the SIP settings work in OCLP, where lowered SIP is needed and where full SIP could be enabled.
|
||||
SIP, or System Integrity Protection, needs to be lowered on systems where root patching is required to patch data on disk. This will vary between OS versions and the model in question.
|
||||
|
||||
OCLP by default will determine the proper SIP options for the OS version and Mac model, in most cases the user has no need to touch these settings.
|
||||
|
||||
:::warning
|
||||
|
||||
@@ -35,14 +41,20 @@ If you're unsure whether you should change the SIP settings, leave them as-is. S
|
||||
|
||||
:::
|
||||
|
||||
SIP settings can be accessed from the Security tab shown in the images. To change SIP settings, make the changes here, return in main menu and rebuild OpenCore using the first option.
|
||||
|
||||
| SIP Enabled | SIP Lowered (Root Patching) | SIP Disabled |
|
||||
| SIP Enabled | SIP Lowered (OCLP default) | SIP Disabled |
|
||||
| :--- | :--- | :--- |
|
||||
|  |  |  |
|
||||
|
||||
|
||||
In the cases where SIP can be enabled, manually enabling it is needed. Easiest way to check whether you can fully enable SIP is the "Post Install Root Patch" section, if that section tells your system doesn't need patches (or you don't install the patches e.g. in case you don't need WiFi on a Mac Pro with upgraded GPU running Monterey) then it is safe to assume full SIP can be enabled.
|
||||
The guide in the dropdown below explains how the SIP settings work in OCLP, where lowered SIP is needed and where full SIP could be enabled.
|
||||
|
||||
::: details Configuring SIP manually (click to expand)
|
||||
|
||||
SIP settings can be accessed from the Security tab shown in the images. To change SIP settings, make the changes here, return in main menu and rebuild OpenCore using the first option.
|
||||
|
||||
In the cases where SIP can be enabled, manually enabling it is needed.
|
||||
|
||||
Easiest way to check whether you can fully enable SIP is the "Post Install Root Patch" section, if that section tells your system doesn't need patches (or you don't install the patches e.g. in case you don't need WiFi on a Mac Pro with upgraded GPU running Monterey) then it is safe to assume full SIP can be enabled.
|
||||
|
||||
**Ventura and newer**
|
||||
|
||||
@@ -51,31 +63,34 @@ All unsupported systems require lowered SIP.
|
||||
**Monterey**
|
||||
|
||||
Majority of unsupported systems from 2013 onward can enable full SIP.
|
||||
Pre-2012 systems, also known as "non-Metal" (includes Mac Pros without upgraded GPU), as well as NVIDIA Kepler and Intel HD 4000 GPUs require lowered SIP.
|
||||
|
||||
Some systems such as Mac Pros also require root patching for stock WiFi cards but if you do not need WiFi or you plan to upgrade the card, there is no need for root patching and as such SIP can be fully enabled.
|
||||
Pre-2012 systems, also known as "non-Metal", as well as NVIDIA Kepler and Intel HD 4000 GPUs require lowered SIP. Mac Pros also require lowered SIP for stock WiFi cards and stock GPUs (due to root patching) but if you do not need WiFi (or you plan to upgrade it) and you're running on an upgraded GPU, there is no need for root patching and as such SIP can be fully enabled.
|
||||
|
||||
**Big Sur**
|
||||
|
||||
All Metal capable systems from 2012 onward (incl. NVIDIA Kepler and Intel HD 4000) as well as Mac Pros with upgraded GPU can run with full SIP enabled.
|
||||
Non-Metal systems still require lowered SIP.
|
||||
|
||||
:::
|
||||
|
||||
## Applying Post Install Volume Patches
|
||||
|
||||
Post Install Volume Patches, sometimes also called root patches, are patches that have to be installed to disk for some older Macs to gain back functionality.
|
||||
|
||||
OCLP will automatically root patch your system during a first time install **if the USB install media was created within OCLP.** Users will also be prompted to install these patches after macOS updates or whenever patches are not detected on the system. We recommend rebuilding OpenCore with the latest version of OCLP to take advantage of these new features.
|
||||
|
||||
Users can also see whether applicable patches have been installed, date and version the system was root patched with in the Post-Install Menu.
|
||||
|
||||
:::warning
|
||||
|
||||
If you need to use Migration Assistant to bring over data to your new macOS install, it is **highly recommended** to avoid restoring from inside Setup Assistant and waiting to install root patches until after the transfer is complete. If root patches were automatically installed, you can use the options available in the OCLP app to remove them.
|
||||
|
||||
Using Migration Assistant while patches are installed can lead to an unbootable system, requiring a reinstall of macOS.
|
||||
|
||||
For more information on how to restore a Time Machine backup, [refer to the guide here.](https://dortania.github.io/OpenCore-Legacy-Patcher/TIMEMACHINE.html)
|
||||
|
||||
:::
|
||||
|
||||
Post Install Volume Patches, sometimes also called root patches, are patches that have to be installed to disk for some older Macs to gain back functionality.
|
||||
|
||||
OCLP will automatically root patch your system during a first time install **if the USB install media was created within OCLP.** Users will also be prompted to install these patches after macOS updates or whenever patches are not detected on the system. We recommend rebuilding OpenCore with the latest version of OCLP to take advantage of these new features.
|
||||
|
||||
Users can also see whether applicable patches have been installed, date and version the system was root patched with in the Post-Install Menu.
|
||||
|
||||
| Automatic install prompt | Status |
|
||||
| :--- | :--- |
|
||||
|  |  |
|
||||
@@ -92,6 +107,21 @@ There is also an option to remove root patches, which may be required in some si
|
||||
| :--- | :--- |
|
||||
|  |  |
|
||||
|
||||
|
||||
:::warning
|
||||
|
||||
With macOS Sequoia, MetallibSupportPkg is required to be downloaded for all 3802 systems. OCLP will handle this as long as you're connected to the internet.
|
||||
|
||||
Such systems include:
|
||||
|
||||
* NVIDIA
|
||||
* Kepler (GTX 600 - 700 series)
|
||||
* Intel
|
||||
* Ivy Bridge (HD 4000 series)
|
||||
* Haswell (Iris/HD 4000-5000 series)
|
||||
|
||||
:::
|
||||
|
||||
:::warning
|
||||
|
||||
With macOS Ventura and Macs with AMD Legacy GCN GPUs (ie. Metal), Root Patching requires a network connection to grab Apple's Kernel Debug Kit to start root patching. If your system is unable to connect to the internet, you can manually download a KDK from Apple's site:
|
||||
@@ -109,19 +139,62 @@ Machines that require this are those with AMD Metal dGPUs:
|
||||
|
||||
Below entries represent GPUs no longer natively supported, ie. requiring root volume patching with OpenCore Legacy Patcher:
|
||||
|
||||
:::details GPUs requiring patching in macOS Big Sur
|
||||
:::details GPUs requiring patching in different macOS versions
|
||||
|
||||
AMD Navi (RX 5000 - 6000 series) GPUs are non-functional in Mac Pro 2008 to 2012 using Ventura and newer due to lack of AVX2 support.
|
||||
|
||||
**Sequoia**
|
||||
|
||||
* NVIDIA:
|
||||
* Tesla (8000 - 300 series)
|
||||
* Kepler (600 - 800 series)
|
||||
* AMD:
|
||||
* TeraScale (2000 - 6000 series)
|
||||
* GCN 1-3 (7000 - R9 series)
|
||||
* Polaris (RX 4xx/5xx series, if CPU lacks AVX2)
|
||||
* Intel:
|
||||
* Iron Lake
|
||||
* Sandy Bridge (2000 - 3000 series)
|
||||
* Ivy Bridge (4000 series)
|
||||
* Haswell (4400, 4600, 5000 series)
|
||||
* Broadwell (6000 series)
|
||||
* Skylake (500 series)
|
||||
|
||||
:::
|
||||
**Sonoma**
|
||||
|
||||
:::details GPUs requiring patching in macOS Monterey
|
||||
* NVIDIA:
|
||||
* Tesla (8000 - 300 series)
|
||||
* Kepler (600 - 800 series)
|
||||
* AMD:
|
||||
* TeraScale (2000 - 6000 series)
|
||||
* GCN 1-3 (7000 - R9 series)
|
||||
* Polaris (RX 4xx/5xx series, if CPU lacks AVX2)
|
||||
* Intel:
|
||||
* Iron Lake
|
||||
* Sandy Bridge (2000 - 3000 series)
|
||||
* Ivy Bridge (4000 series)
|
||||
* Haswell (4400, 4600, 5000 series)
|
||||
* Broadwell (6000 series)
|
||||
* Skylake (500 series)
|
||||
|
||||
**Ventura**
|
||||
|
||||
* NVIDIA:
|
||||
* Tesla (8000 - 300 series)
|
||||
* Kepler (600 - 800 series)
|
||||
* AMD:
|
||||
* TeraScale (2000 - 6000 series)
|
||||
* GCN 1-3 (7000 - R9 series)
|
||||
* Polaris (RX 4xx/5xx series, if CPU lacks AVX2)
|
||||
* Intel:
|
||||
* Iron Lake
|
||||
* Sandy Bridge (2000 - 3000 series)
|
||||
* Ivy Bridge (4000 series)
|
||||
* Haswell (4400, 4600, 5000 series)
|
||||
* Broadwell (6000 series)
|
||||
* Skylake (500 series)
|
||||
|
||||
**Monterey**
|
||||
|
||||
* NVIDIA:
|
||||
* Tesla (8000 - 300 series)
|
||||
@@ -133,6 +206,17 @@ Below entries represent GPUs no longer natively supported, ie. requiring root vo
|
||||
* Sandy Bridge (2000 - 3000 series)
|
||||
* Ivy Bridge (4000 series)
|
||||
|
||||
|
||||
**Big Sur**
|
||||
|
||||
* NVIDIA:
|
||||
* Tesla (8000 - 300 series)
|
||||
* AMD:
|
||||
* TeraScale (2000 - 6000 series)
|
||||
* Intel:
|
||||
* Iron Lake
|
||||
* Sandy Bridge (2000 - 3000 series)
|
||||
|
||||
:::
|
||||
|
||||
:::details Wireless Cards requiring patching in macOS Monterey
|
||||
@@ -143,18 +227,3 @@ Below entries represent GPUs no longer natively supported, ie. requiring root vo
|
||||
* Atheros
|
||||
|
||||
:::
|
||||
|
||||
:::details GPUs requiring patching in macOS Ventura
|
||||
|
||||
* NVIDIA:
|
||||
* Kepler (600 - 800 series)
|
||||
* AMD:
|
||||
* GCN 1-3 (7000 - R9 series)
|
||||
* Polaris (RX 4xx/5xx series, if CPU lacks AVX2)
|
||||
* Intel:
|
||||
* Ivy Bridge (4000 series)
|
||||
* Haswell (4400, 4600, 5000 series)
|
||||
* Broadwell (6000 series)
|
||||
* Skylake (500 series)
|
||||
|
||||
:::
|
||||
|
||||
109
docs/SEQUOIA-DROP.md
Normal file
@@ -0,0 +1,109 @@
|
||||
# macOS Sequoia
|
||||
|
||||

|
||||
|
||||
Another year, another release.
|
||||
|
||||
This time Apple dropped surprisingly few amount of Macs. With the release of OpenCore Legacy Patcher 2.0.0, early support for macOS Sequoia has been implemented.
|
||||
|
||||
|
||||
## Newly dropped hardware
|
||||
|
||||
* MacBookAir8,1 : MacBook Air (2018)
|
||||
* MacBookAir8,2 : MacBook Air (2019)
|
||||
|
||||
## Current status
|
||||
|
||||
OpenCore Legacy Patcher 2.0.0 will support Sequoia for most models normally supported by the Patcher, however some challenges remain. You can find information about them below.
|
||||
|
||||
Unfortunately due to T2 related problems, the recently dropped MacBookAir8,x models cannot be supported at this time.
|
||||
|
||||
[More information here](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1136)
|
||||
|
||||
## Non-functional features
|
||||
|
||||
On majority of patched Macs, iPhone Mirroring and Apple Intelligence won't be functional.
|
||||
|
||||
iPhone Mirroring requires T2 for attestation and Apple Intelligence requires an NPU only found in Apple Silicon, the patcher is unable to provide a fix for these as they're hardware requirements.
|
||||
|
||||
## Issues
|
||||
|
||||
* [Dual socket CPUs with Mac Pros and Xserve](#dual-socket-cpus-with-mac-pro-2008-and-xserve-2008)
|
||||
* [T2 Security chip](#t2-security-chip)
|
||||
* [USB 1.1 (OHCI/UHCI) Support](#usb-1-1-ohci-uhci-support)
|
||||
* [Graphics support and issues](#graphics-support-and-issues)
|
||||
|
||||
|
||||
### Dual socket CPUs with Mac Pro 2008 and Xserve 2008
|
||||
|
||||
Booting Sequoia on Mac Pro 2008 (MacPro3,1) or Xserve 2008 (Xserve2,1) with more than 4 cores will cause Sequoia to panic. OpenCore Legacy Patcher will automatically disable additional cores.
|
||||
|
||||
This is due to the dual socket nature of the machine, and likely some firmware/ACPI table incompatibility.
|
||||
|
||||
**If building OpenCore for older OS, this limitation can be disabled in Settings -> Build -> "MacPro3,1/Xserve2,1 Workaround".**
|
||||
|
||||
::: warning Note
|
||||
|
||||
Dual booting Sequoia and older will not be possible with all cores enabled due to reasons described before. In these cases you will be limited to 4 cores.
|
||||
|
||||
:::
|
||||
|
||||
### T2 security chip
|
||||
|
||||
The current biggest issue we face with supporting the MacBookAir8,x (2018/19) series is the T2 chip's lack of communication when booted through OpenCorePkg.
|
||||
|
||||
What happens when one of these units boots through OpenCorePkg is that AppleKeyStore.kext panics due to timeouts with the T2 chip:
|
||||
|
||||
```
|
||||
"AppleKeyStore":3212:0: sks timeout strike 18
|
||||
"AppleKeyStore":3212:0: sks timeout strike 19
|
||||
"AppleKeyStore":3212:0: sks timeout strike 20
|
||||
panic(cpu 0 caller 0xffffff801cd12509): "AppleSEPManager panic for "AppleKeyStore": sks request timeout" @AppleSEPManagerIntel.cpp:809
|
||||
```
|
||||
|
||||
This affects not only macOS Sequoia, but macOS Ventura and Sonoma are confirmed to have the same issue. Thus an underlying problem with the MacBookAir8,x's firmware where it is not happy with OpenCorePkg.
|
||||
|
||||
We currently do not have any leads on what exactly breaks the T2.
|
||||
* MacBookPro15,2, MacBookPro16,2 and Macmini8,1 do not exhibit these issues in local testing
|
||||
* MacPro7,1 does seem to surprisingly based on reports: [MacPro7,1 - OpenCorePkg](https://forums.macrumors.com/threads/manually-configured-opencore-on-the-mac-pro.2207814/post-29418464)
|
||||
* Notes from this report were unsuccessful locally: [Cannot boot MacPro7,1 #1487](https://github.com/acidanthera/bugtracker/issues/1487)
|
||||
|
||||
|
||||
### USB 1.1 (OHCI/UHCI) Support
|
||||
|
||||
For Penryn systems, pre-2013 Mac Pros and Xserve, USB 1.1 support was outright removed in macOS Ventura, therefore this applies all the way to Sequoia.
|
||||
While USB 1.1 may seem unimportant, it handles many important devices on your system. These include:
|
||||
|
||||
* Keyboard and Trackpad for laptops
|
||||
* IR Receivers
|
||||
* Bluetooth
|
||||
|
||||
Users will need to use a USB hub for installation and post-OS updates when patches are cleaned:
|
||||
|
||||
However, the driver has recently been weakened starting from Sonoma, which means even some USB hubs may not work properly.
|
||||
|
||||
An alternative way is making sure to enable "Remote Login" in General -> Sharing before updating, which will enable SSH.
|
||||
That means you can take control using Terminal in another system by typing `ssh username@lan-ip-address` and your password.
|
||||
|
||||
After that run Post Install Volume Patching by typing `/Applications/OpenCore-Patcher.app/Contents/MacOS/OpenCore-Patcher --patch_sys_vol` and finally `sudo reboot`.
|
||||
|
||||
|
||||

|
||||
|
||||
::: warning The following systems rely on USB 1.1
|
||||
|
||||
* iMac10,x and older
|
||||
* Macmini4,1 and older
|
||||
* MacBook7,1 and older
|
||||
* MacBookAir3,1 and older
|
||||
* MacPro5,1 and older
|
||||
* Xserve 3,1 and older
|
||||
:::
|
||||
|
||||
[More information here](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1021)
|
||||
|
||||
### Graphics support and issues
|
||||
This build includes both Legacy Metal and non-Metal patches for macOS Sequoia. Refer to the following links for more information about Legacy Metal and non-Metal support and their respective issues.
|
||||
|
||||
* [Legacy Metal](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1008)
|
||||
* [Non-Metal](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108)
|
||||
@@ -1,3 +1,5 @@
|
||||
# macOS Sonoma
|
||||
|
||||

|
||||
|
||||
*Well here we are again, it's always such a pleasure~*
|
||||
@@ -31,7 +33,7 @@ OpenCore Legacy Patcher 1.0.0 will support Sonoma for all models normally suppor
|
||||
|
||||
* [Bluetooth](#bluetooth)
|
||||
* [T1 Security chip](#t1-security-chip)
|
||||
* [USB 1.1 (OHCI/UHCI) Support](#usb-11-ohciuhci-support)
|
||||
* [USB 1.1 (OHCI/UHCI) Support](#usb-1-1-ohci-uhci-support)
|
||||
* [Graphics support and issues](#graphics-support-and-issues)
|
||||
|
||||
|
||||
|
||||
@@ -7,8 +7,6 @@ OpenCore is a sophisticated boot loader used to inject and patch data in memory,
|
||||
|
||||
## How do I get started?
|
||||
|
||||
1. The first step of ensuring whether your model is supported is by checking the [Supported Models](./MODELS.md) page.
|
||||
|
||||
2. [Download and build macOS Installer](./INSTALLER.md)
|
||||
3. [Run the `OpenCore-Patcher.app`](./BUILD.md)
|
||||
4. [Reboot and boot OpenCore](./BOOT.md)
|
||||
1. Read the [FAQ](./FAQ.md) for application requirements and other information.
|
||||
2. Check that your model is supported from the [Supported Models](./MODELS.md) page.
|
||||
3. Once you've verified your model is supported, you can jump into the process in [Download and build macOS Installer](./INSTALLER.md)
|
||||
|
||||
25
docs/TIMEMACHINE.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# Restoring Time Machine backup
|
||||
|
||||
OCLP automatically installs root patches when installing from the USB drive for the first time to ensure smooth operation of the first time settings.
|
||||
|
||||
However, as an unfortunate side effect, restoring via Time Machine breaks while root patches are installed and restoring a root patched machine requires a few tricks to avoid a kernel panic.
|
||||
|
||||
To ensure a smooth Time Machine restore, follow the steps listed under:
|
||||
|
||||
1. In first time settings (Setup Assistant), do not restore the backup. Instead do all settings like you would want to start fresh.
|
||||
2. Once you reach desktop, open the OCLP application and revert root patches in the Post Install Volume Patches section.
|
||||
3. Restart your machine.
|
||||
* Note: Your Mac will feel slow due to lack of graphics drivers and resolution may be wrong. WiFi will also be unavailable in most cases, if your backup is on a network drive, use Ethernet.
|
||||
4. Login and start Migration Assistant.
|
||||
5. Go through the restoring process.
|
||||
6. Once finished, go into the OCLP app and reinstall the root patches.
|
||||
|
||||
Now you should be fully restored with Time Machine and also running with all patches.
|
||||
|
||||
|
||||
::: warning Sequoia Note
|
||||
|
||||
Time Machine restoring seems to be currently broken on Sequoia even after uninstalling root patches, leading to a loop with "Migration Finished" window. Currently the only way is to restore on older OS and then upgrade to Sequoia.
|
||||
|
||||
:::
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
# Troubleshooting
|
||||
# General troubleshooting
|
||||
|
||||
Here are some common errors that users may experience while using this patcher:
|
||||
|
||||
* [OpenCore Legacy Patcher not launching](#opencore-legacy-patcher-not-launching)
|
||||
* ["You don't have permission to save..." error when creating USB installer](#you-don-t-have-permission-to-save-error-when-creating-usb-installer)
|
||||
* [Stuck on `This version of Mac OS X is not supported on this platform` or (🚫) Prohibited Symbol](#stuck-on-this-version-of-mac-os-x-is-not-supported-on-this-platform-or-🚫-prohibited-symbol)
|
||||
* [Stuck on hard disk selection with greyed out buttons in installer](#stuck-on-hard-disk-selection-with-greyed-out-buttons-in-installer)
|
||||
* [Cannot boot macOS without the USB](#cannot-boot-macos-without-the-usb)
|
||||
* [Infinite Recovery OS Booting](#infinite-recovery-os-reboot)
|
||||
* [System version mismatch error when root patching](#system-version-mismatch-error-when-root-patching)
|
||||
* [Stuck on boot after root patching](#stuck-on-boot-after-root-patching)
|
||||
* ["Unable to resolve dependencies, error code 71" when root patching](#unable-to-resolve-dependencies-error-code-71-when-root-patching)
|
||||
* [Reboot when entering Hibernation (`Sleep Wake Failure`)](#reboot-when-entering-hibernation-sleep-wake-failure)
|
||||
@@ -22,6 +24,7 @@ Here are some common errors that users may experience while using this patcher:
|
||||
* [Stuck on "Less than a minute remaining..."](#stuck-on-less-than-a-minute-remaining)
|
||||
* [No acceleration after a Metal GPU swap on Mac Pro](#no-acceleration-after-a-metal-gpu-swap-on-mac-pro)
|
||||
* [Keyboard, Mouse and Trackpad not working in installer or after update](#keyboard-mouse-and-trackpad-not-working-in-installer-or-after-update)
|
||||
* [No T1 functionality after installing Sonoma or newer](#no-t1-functionality-after-installing-sonoma-or-newer)
|
||||
|
||||
|
||||
## OpenCore Legacy Patcher not launching
|
||||
@@ -37,8 +40,8 @@ If the application won't launch (e.g. icon will bounce in the Dock), try launchi
|
||||
In some cases, a following error saying "The bless of the installer disk failed" stating the reason as "You don't have permission to save..." may appear.
|
||||
|
||||
|
||||
<div align="center">
|
||||
<img src="./images/Error-No-Permission-To-Save.png" alt="NoPermissionToSave" width="400" />
|
||||
<div align="left">
|
||||
<img src="./images/Error-No-Permission-To-Save.png" alt="NoPermissionToSave" width="600" />
|
||||
</div>
|
||||
|
||||
|
||||
@@ -63,6 +66,12 @@ Once you've booted OpenCore at least once, your hardware should now auto-boot it
|
||||
|
||||
However, if the 🚫 Symbol only appears after the boot process has already started (the bootscreen appears/verbose boot starts), it could mean that your USB drive has failed to pass macOS' integrity checks. To resolve this, create a new installer using a different USB drive (preferably of a different model.)
|
||||
|
||||
## Stuck on hard disk selection with greyed out buttons in installer
|
||||
|
||||
Switch installer language to English. If the language selector doesn't show up, [reset NVRAM](https://support.apple.com/en-mide/102603) and boot into the installer again.
|
||||
|
||||
You can switch back to different language once macOS has installed.
|
||||
|
||||
## Cannot boot macOS without the USB
|
||||
|
||||
By default, the OpenCore Patcher won't install OpenCore onto the internal drive itself during installs.
|
||||
@@ -77,6 +86,22 @@ With OpenCore Legacy Patcher, we rely on Apple Secure Boot to ensure OS updates
|
||||
|
||||
* Note: Machines with modified root volumes will also result in an infinite recovery loop until integrity is restored.
|
||||
|
||||
## System version mismatch error when root patching
|
||||
|
||||
Updates from now on modify the system volume already while downloading, which can lead to broken patches out of a sudden as well as a "version mismatch" error while root patching, since the operating system gets into a liminal state between two versions. The "version mismatch" error is a safeguard preventing OCLP from patching on a system that is in a weird liminal state, to avoid leading to a very likely boot failure.
|
||||
|
||||
Currently there is a "PurgePendingUpdate" tool available [on the Discord server](https://discord.com/channels/417165963327176704/1037474131526029362/1255993208966742108) you can download and then run it in Terminal, to get rid of a pending update. This may be integrated into OCLP later on, however there is currently no ETA.
|
||||
|
||||
Disabling automatic macOS updates is extremely recommended once recovered, to prevent it from happening again.
|
||||
|
||||
**macOS Ventura and newer:**
|
||||
|
||||
System Settings -> General -> Software Update -> (i) button next to Automatic Updates -> Disable "Download new updates when available".
|
||||
|
||||
**macOS Big Sur and Monterey:**
|
||||
|
||||
System Preferences -> Software Update -> Advanced -> Disable "Download new updates when available".
|
||||
|
||||
## Stuck on boot after root patching
|
||||
|
||||
Boot into recovery by pressing space when your disk is selected on the OCLP bootpicker (if you have it hidden, hold ESC while starting up)
|
||||
@@ -178,13 +203,17 @@ Due to Apple dropping NVIDIA Kepler support in macOS Monterey, [MacBookPro11,3's
|
||||
|
||||
If you're having trouble with DisplayPort output on Mac Pros, try enabling Minimal Spoofing in Settings -> SMBIOS Settings and rebuild/install OpenCore. This will trick macOS drivers into thinking you have a newer MacPro7,1 and resolve the issue.
|
||||
|
||||

|
||||
|
||||
<div align="left">
|
||||
<img src="./images/OCLP-GUI-SMBIOS-Minimal.png" alt="GUI SMBIOS minimal" width="800" />
|
||||
</div>
|
||||
|
||||
|
||||
## Volume Hash Mismatch Error in macOS Monterey
|
||||
|
||||
A semi-common popup some users face is the "Volume Hash Mismatch" error:
|
||||
|
||||
<p align="center">
|
||||
<p align="left">
|
||||
<img src="./images/Hash-Mismatch.png">
|
||||
</p>
|
||||
|
||||
@@ -223,7 +252,7 @@ Because this step can take a few hours or more depending on drive speeds, be pat
|
||||
|
||||
## No acceleration after a Metal GPU swap on Mac Pro
|
||||
|
||||
If you finished installing Monterey with the original card installed (to see bootpicker for example) and swapped your GPU to a Metal supported one, you may notice that you're missing acceleration. To fix this, open OCLP and revert root patches to get your Metal-supported GPU work again.
|
||||
If you finished installing macOS with the original card installed (to see bootpicker for example) and swapped your GPU to a Metal supported one, you may notice that you're missing acceleration. To fix this, open OCLP and revert root patches to get your Metal-supported GPU work again. In macOS Ventura and newer, repatching is needed after reversion.
|
||||
|
||||
Alternatively, you can remove "AutoPkg-Assets.pkg" from /Library/Packages on the USB drive before proceeding with the installation. To see the folder, enable hidden files with `Command` + `Shift` + `.`
|
||||
|
||||
@@ -233,6 +262,16 @@ The reason for this is that the autopatcher will assume that you will be using t
|
||||
|
||||
For Macs using legacy USB 1.1 controllers, OpenCore Legacy Patcher can only restore support once it has performed root volume patches. Thus to install macOS, you need to hook up a USB hub between your Mac and Keyboard/Mouse.
|
||||
|
||||
::: warning Note
|
||||
|
||||
In macOS Sonoma, this seems to have been further weakened and some hubs may not be functional.
|
||||
|
||||
Alternative way is making sure to enable "Remote Login" in General -> Sharing before updating, which will enable SSH. That means you can take control using Terminal in another system by typing `ssh username@lan-ip-address` and your password. After that run Post Install Volume Patching by typing `/Applications/OpenCore-Patcher.app/Contents/MacOS/OpenCore-Patcher --patch_sys_vol` and finally `sudo reboot`.
|
||||
|
||||
:::
|
||||
|
||||
|
||||
|
||||
* For MacBook users, you'll need to find an external keyboard/mouse in addition to the USB hub
|
||||
|
||||
More information can be found here:
|
||||
@@ -250,5 +289,12 @@ Applicable models include:
|
||||
| Mac mini | Mid 2011 and older | Macmini3,1 - Macmini5,x | |
|
||||
| Mac Pro | Mid 2010 and older | MacPro3,1 - MacPro5,1 | |
|
||||
|
||||
<div align="left">
|
||||
<img src="./images/usb11-chart.png" alt="USB1.1 chart" width="800" />
|
||||
</div>
|
||||
|
||||

|
||||
## No T1 functionality after installing Sonoma or newer
|
||||
|
||||
If you notice your Touchbar etc not working, this means loss of T1 functionality.
|
||||
|
||||
Wiping the entire disk using Disk Utility with Sonoma or newer causes the T1 firmware to be removed, which due to removed support, the macOS Sonoma+ installer will not restore. To restore T1 functionality, Ventura or older has to be reinstalled. This can be done in another volume or external disk as well, as long as the OS is booted once. After this you can wipe the old OS or unplug the external disk.
|
||||
|
||||
@@ -1,4 +1,28 @@
|
||||
# Uninstalling OpenCore
|
||||
# Uninstall
|
||||
|
||||
This guide tells you different ways to uninstall OCLP and/or patches.
|
||||
|
||||
## Delete everything and revert back to native macOS
|
||||
|
||||
Boot a native macOS installer, go to Disk Utility and choose View -> Show All Devices. Wipe the full disk by choosing the top option on the left sidebar and start macOS installation.
|
||||
|
||||
[Reset NVRAM](https://support.apple.com/HT204063) afterwards.
|
||||
|
||||
## Uninstalling the application
|
||||
|
||||
### Version 1.5.0 and newer
|
||||
|
||||
Version 1.5.0 and newer use a Privileged Helper Tool that requires more thorough uninstallation than previous versions. Download the uninstaller package from [the releases page.](https://github.com/dortania/OpenCore-Legacy-Patcher/releases)
|
||||
|
||||
### Version 1.4.3 and older.
|
||||
|
||||
Navigate to `/Library/Application Support/` and delete the Dortania folder.
|
||||
|
||||
## Reverting root patches
|
||||
|
||||
Open the OCLP application and go into the Post Install Root Patch menu, choose Revert Root Patches.
|
||||
|
||||
If you're planning to revert back to native version, you don't have to do this. Root patches get wiped when you wipe the disk.
|
||||
|
||||
## Uninstalling the bootloader
|
||||
|
||||
@@ -13,11 +37,9 @@
|
||||
|
||||
:::warning
|
||||
|
||||
Note that after you remove OpenCore, your Mac will no longer boot and show the "prohibited" symbol. Be ready to install a natively-supported version of macOS before you uninstall OpenCore.
|
||||
Note that after you remove OpenCore, your Mac will no longer boot and show the "prohibited" symbol. Be prepared to have a bootable USB drive with either OpenCore or natively-supported version of macOS before you uninstall the bootloader.
|
||||
|
||||
* This does not apply to native Macs just using OpenCore to achieve features like AirPlay to Mac and Sidecar, but it is still recommended to reinstall macOS after removing OpenCore, if using SMBIOS spoofing to enable Universal Control and other features.
|
||||
:::
|
||||
|
||||
## Uninstalling the application
|
||||
|
||||
If you want to remove the application without reinstalling the OS, navigate to `/Library/Application Support/` and delete the Dortania folder.
|
||||
|
||||
@@ -3,7 +3,11 @@
|
||||
|
||||
Introduced in macOS 12 Monterey, Universal Control is a feature that allows a Mac to control other Macs and/or iPads, share input devices, and share files across them simultaneously. With OpenCore and FeatureUnlock, Universal Control can be unlocked for most unsupported Macs, as long as they meet the technical requirements listed on this page.
|
||||
|
||||
* Note: The following page is primarily for tinkerers, no proper support is provided outside of Discord support (see bottom of page).
|
||||
::: warning Note
|
||||
|
||||
These features are not actively tested and may break at any time. The following page is primarily for tinkerers, no proper support is provided outside of Discord support (see bottom of page).
|
||||
|
||||
:::
|
||||
|
||||
## Enabling Universal Control
|
||||
|
||||
@@ -202,7 +206,38 @@ Before we continue, please keep in mind that SMBIOS Spoofing is an advanced feat
|
||||
|
||||
### How to spoof
|
||||
|
||||
Ventura has dropped more models which includes all of the blacklisted Macs in question, making the procedure slightly different. It is important to follow the guide for the version you're on, failing to do so is likely to cause boot issues.
|
||||
|
||||
::: details macOS Sequoia
|
||||
|
||||
Firstly run OpenCore Legacy Patcher.
|
||||
|
||||
Then go to **Settings** and **SMBIOS** tab, set SMBIOS Spoof Level to **Moderate**. Set SMBIOS Spoof Model **one listed next to your native model in the table for spoofed models below.**
|
||||
|
||||
Notice that "Allow native models" and "Allow Native Spoofs" **are NOT** enabled unlike on Monterey, this is on purpose. They are no longer relevant on Sonoma and enabling them will cause boot issues.
|
||||
|
||||
| Main Settings view | SMBIOS settings |
|
||||
| :--- | :--- |
|
||||
|  |  |
|
||||
|
||||
|
||||
|
||||
::: details Table for spoofed models (click to expand)
|
||||
|
||||
Spoofing to any model with native Sonoma support should work, but these are the earliest Macs natively supported by Sonoma and thus chosen for the sake of simplicity.
|
||||
|
||||
**Reminder:** Macs that are not listed on this table work without spoofing, including systems that do not natively support Ventura as long as the other requirements are met, since they aren't blacklisted.
|
||||
|
||||
|
||||
| Mac by name | Native SMBIOS | Spoof SMBIOS |
|
||||
|-------------|---------------|--------------|
|
||||
| MacBook Air Early 2015 11" / 13" | MacBookAir7,x | MacBookAir9,1 |
|
||||
| MacBook Pro Early 2015 13" | MacBookPro12,x | MacBookPro15,2 |
|
||||
| MacBook Pro Mid 2015 15" | MacBookPro11,4 / 11,5 | MacBookPro15,2 |
|
||||
| iMac Late 2015 21" | iMac16,x | iMac19,2 |
|
||||
| Mac mini Late 2014 | Macmini7,x | MacMini8,1 |
|
||||
| Mac Pro Late 2013 | MacPro6,x | MacPro7,1 |
|
||||
|
||||
:::
|
||||
|
||||
::: details macOS Sonoma
|
||||
|
||||
|
||||
@@ -1,22 +1,45 @@
|
||||
# Updating OpenCore and Patches
|
||||
|
||||
With OpenCore Legacy Patcher, there's generally very little reason for users to update the OpenCore installation on their machine unless you feel there's a benefit with new versions for your setup, e.g. Bluetooth has stopped working with a new macOS update.
|
||||
|
||||
For those who do wish to update, simply [download the latest release](https://github.com/dortania/OpenCore-Legacy-Patcher/releases) and rerun the patcher:
|
||||
|
||||

|
||||
|
||||
Then, rebuild your OpenCore build and install again. OpenCore Will now be updated!
|
||||
|
||||
To check what version of OpenCore and the Patcher you're currently running, you can run the following in the terminal:
|
||||
|
||||
```bash
|
||||
# OpenCore Version
|
||||
nvram 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:opencore-version
|
||||
# Patcher Version
|
||||
nvram 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:OCLP-Version
|
||||
```
|
||||
|
||||

|
||||
|
||||
From this, we can see that we're running a RELEASE version of OpenCore 0.8.0 built on April 18th, 2022 with Patcher Version 0.4.5!
|
||||
# Updating OpenCore and Patches
|
||||
|
||||
This guide explains how to get fully up to date application, bootloader and patches.
|
||||
|
||||
## Updating the application
|
||||
|
||||
Latest versions of OCLP can download updates by themselves, you will get notified of a new update with the changelog.
|
||||
|
||||
[You can also manually download the latest release here.](https://github.com/dortania/OpenCore-Legacy-Patcher/releases)
|
||||
|
||||
|
||||
<div align="left">
|
||||
<img src="./images/OCLP_Update_Available.png" alt="Update Avaialble" />
|
||||
</div>
|
||||
|
||||
|
||||
## Updating patches
|
||||
|
||||
After the update, the application asks if you want to update OpenCore and root patches.
|
||||
|
||||
If you do not need to change any settings, you can click "Yes" and follow the procedure. If you want to change settings, select "No" from here and do your settings, then manually build and install OpenCore to update to the latest version of the bootloader.
|
||||
|
||||
Finally install new root patches to ensure you're running on the latest fixes for on-disk patches.
|
||||
|
||||
|
||||
<div align="left">
|
||||
<img src="./images/OCLP_Update_Successful.png" alt="Update Successful" />
|
||||
</div>
|
||||
|
||||
## Checking OCLP and OpenCore versions
|
||||
|
||||
To check what version of OpenCore bootloader and the Patcher you're currently running, you can run the following in the terminal:
|
||||
|
||||
```bash
|
||||
# OpenCore Version
|
||||
nvram 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:opencore-version
|
||||
# Patcher Version
|
||||
nvram 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:OCLP-Version
|
||||
```
|
||||
|
||||
<div align="left">
|
||||
<img src="./images/oclp-version.png" alt="OCLP version" width="600" />
|
||||
</div>
|
||||
|
||||
From this, we can see that we're running a RELEASE version of OpenCore 0.9.0 built on January 1st, 2023 with Patcher Version 0.6.0!
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# macOS Ventura
|
||||
|
||||

|
||||
|
||||
With the release of OpenCore Legacy Patcher v0.5.0 and newer, early support for macOS Ventura has been implemented for most Metal-capable Macs. This page will be used to inform users regarding current issues and will be updated as new patch sets are developed and added to our patcher.
|
||||
|
||||
@@ -3,6 +3,13 @@
|
||||
Modern versions of Windows officially support two types of firmware: UEFI and BIOS. Users may want to boot Windows through the OCLP Bootpicker, but only UEFI Installations of Windows will show up in the OCLP Bootpicker.
|
||||
Many older Macs do not "officially" support UEFI Windows installations, leading to installation failures and strange behaviour, but OCLP can be used to prevent almost all of these issues.
|
||||
|
||||
::: warning
|
||||
|
||||
When booting Windows with OpenCore, it's highly recommended to create a new 200MB **MS-DOS (FAT)** partition in Disk Utility to install OpenCore in. This will prevent Windows from overwriting OpenCore with its own bootloader in the EFI partition and causing boot issues.
|
||||
|
||||
::::
|
||||
|
||||
|
||||
## Minimum Requirements
|
||||
|
||||
This guide will focus on the installation of modern Windows (10/11) without using Boot Camp Assistant.
|
||||
@@ -232,4 +239,4 @@ Intel's iGPU drivers for the HD 3000 series do not support UEFI booting in Windo
|
||||
|
||||
### NVIDIA Tesla Black Screen after driver installation
|
||||
|
||||
The NVIDIA Tesla GPUs found in 2008-2010 Macs do not support UEFI booting in Windows. You cannot use UEFI Windows without low-level patching on these machines.
|
||||
The NVIDIA Tesla GPUs found in 2008-2010 Macs do not support UEFI booting in Windows. You cannot use UEFI Windows without low-level patching on these machines.
|
||||
|
||||
|
Before Width: | Height: | Size: 221 KiB After Width: | Height: | Size: 351 KiB |
|
Before Width: | Height: | Size: 158 KiB After Width: | Height: | Size: 273 KiB |
BIN
docs/images/OCLP_Disable_mediaanalysisd_Setting.png
Normal file
|
After Width: | Height: | Size: 203 KiB |
BIN
docs/images/OCLP_FeatureUnlock_Setting.png
Normal file
|
After Width: | Height: | Size: 178 KiB |
BIN
docs/images/OCLP_Update_Available.png
Normal file
|
After Width: | Height: | Size: 109 KiB |
BIN
docs/images/OCLP_Update_Successful.png
Normal file
|
After Width: | Height: | Size: 73 KiB |
|
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 588 KiB |
BIN
docs/images/macos-sequoia.png
Normal file
|
After Width: | Height: | Size: 629 KiB |
BIN
docs/images/macos-sequoia.png.png
Normal file
|
After Width: | Height: | Size: 399 KiB |
|
Before Width: | Height: | Size: 354 KiB After Width: | Height: | Size: 1.5 MiB |
|
Before Width: | Height: | Size: 374 KiB After Width: | Height: | Size: 1.0 MiB |
BIN
docs/images/wipe-volume.png
Normal file
|
After Width: | Height: | Size: 506 KiB |
34543
docs/package-lock.json
generated
@@ -33,19 +33,17 @@
|
||||
},
|
||||
"license": "CC-BY-NC-SA-4.0",
|
||||
"devDependencies": {
|
||||
"@vuepress/plugin-back-to-top": "^1.9.10",
|
||||
"markdown-it-multimd-table": "^4.2.3",
|
||||
"markdown-link-check": "^3.11.2",
|
||||
"markdownlint-cli": "^0.37.0",
|
||||
"@vuepress/plugin-back-to-top": "^1.9.8",
|
||||
"@vuepress/plugin-medium-zoom": "^1.9.8",
|
||||
"markdown-it-multimd-table": "^4.2.0",
|
||||
"markdown-link-check": "^3.10.3",
|
||||
"markdownlint-cli": "^0.33.0",
|
||||
"run-script-os": "^1.1.6",
|
||||
"spellchecker-cli": "^6.1.1",
|
||||
"vuepress": "^1.9.10",
|
||||
"vuepress-plugin-medium-zoom": "^1.1.9",
|
||||
"vuepress-plugin-zooming": "^1.1.8",
|
||||
"vuepress-theme-book": "0.0.9",
|
||||
"vuepress-theme-dark-new": "^0.1.2",
|
||||
"vuepress-theme-succinct": "^1.7.2",
|
||||
"vuepress-theme-yuu": "^3.1.1"
|
||||
"vuepress": "^1.9.8",
|
||||
"vuepress-plugin-fulltext-search": "^2.2.1",
|
||||
"vuepress-theme-succinct": "^1.7.2"
|
||||
},
|
||||
"homepage": "https://dortania.github.io/OpenCore-Legacy-Patcher/"
|
||||
"homepage": "https://dortania.github.io/OpenCore-Legacy-Patcher/",
|
||||
"packageManager": "yarn@1.22.19+sha1.4ba7fc5c6e704fce2066ecbfb0b0d8976fe62447"
|
||||
}
|
||||
|
||||
10692
docs/yarn.lock
Normal file
@@ -13,8 +13,8 @@ from .detections import device_probe
|
||||
class Constants:
|
||||
def __init__(self) -> None:
|
||||
# Patcher Versioning
|
||||
self.patcher_version: str = "1.6.0" # OpenCore-Legacy-Patcher
|
||||
self.patcher_support_pkg_version: str = "1.6.3" # PatcherSupportPkg
|
||||
self.patcher_version: str = "2.1.2" # OpenCore-Legacy-Patcher
|
||||
self.patcher_support_pkg_version: str = "1.8.4" # PatcherSupportPkg
|
||||
self.copyright_date: str = "Copyright © 2020-2024 Dortania"
|
||||
self.patcher_name: str = "OpenCore Legacy Patcher"
|
||||
|
||||
@@ -28,25 +28,25 @@ class Constants:
|
||||
|
||||
# OpenCore Versioning
|
||||
# https://github.com/acidanthera/OpenCorePkg
|
||||
self.opencore_version: str = "1.0.0"
|
||||
self.opencore_version: str = "1.0.1"
|
||||
|
||||
# Kext Versioning
|
||||
## Acidanthera
|
||||
## https://github.com/acidanthera
|
||||
self.lilu_version: str = "1.6.7" # Lilu
|
||||
self.whatevergreen_version: str = "1.6.6" # WhateverGreen
|
||||
self.whatevergreen_navi_version: str = "1.6.6-Navi" # WhateverGreen (Navi Patch)
|
||||
self.lilu_version: str = "1.6.8" # Lilu
|
||||
self.whatevergreen_version: str = "1.6.7" # WhateverGreen
|
||||
self.whatevergreen_navi_version: str = "1.6.7-Navi" # WhateverGreen (Navi Patch)
|
||||
self.airportbcrmfixup_version: str = "2.1.8" # AirPortBrcmFixup
|
||||
self.nvmefix_version: str = "1.1.1" # NVMeFix
|
||||
self.applealc_version: str = "1.6.3" # AppleALC
|
||||
self.restrictevents_version: str = "1.1.3" # RestrictEvents
|
||||
self.featureunlock_version: str = "1.1.5" # FeatureUnlock
|
||||
self.debugenhancer_version: str = "1.0.8" # DebugEnhancer
|
||||
self.cpufriend_version: str = "1.2.7" # CPUFriend
|
||||
self.restrictevents_version: str = "1.1.4" # RestrictEvents
|
||||
self.featureunlock_version: str = "1.1.6" # FeatureUnlock
|
||||
self.debugenhancer_version: str = "1.0.9" # DebugEnhancer
|
||||
self.cpufriend_version: str = "1.2.8" # CPUFriend
|
||||
self.bluetool_version: str = "2.6.8" # BlueToolFixup (BrcmPatchRAM)
|
||||
self.cslvfixup_version: str = "2.6.1" # CSLVFixup
|
||||
self.autopkg_version: str = "1.0.3" # AutoPkgInstaller
|
||||
self.cryptexfixup_version: str = "1.0.2" # CryptexFixup
|
||||
self.autopkg_version: str = "1.0.4" # AutoPkgInstaller
|
||||
self.cryptexfixup_version: str = "1.0.3" # CryptexFixup
|
||||
|
||||
## Apple
|
||||
## https://www.apple.com
|
||||
@@ -61,6 +61,7 @@ class Constants:
|
||||
self.apfs_zlib_v2_version: str = "12.6" # NoAVXFSCompressionTypeZlib (patched with AVXpel)
|
||||
self.multitouch_version: str = "1.0.0" # AppleUSBMultitouch
|
||||
self.topcase_version: str = "1.0.0" # AppleUSBTopCase
|
||||
self.topcase_inj_version: str = "1.0.0" # AppleTopCaseInjector
|
||||
self.intel_82574l_version: str = "1.0.0" # Intel82574L
|
||||
self.intel_8254x_version: str = "1.0.0" # AppleIntel8254XEthernet
|
||||
self.apple_usb_11_injector: str = "1.0.0" # AppleUSBUHCI/OHCI
|
||||
@@ -73,6 +74,7 @@ class Constants:
|
||||
self.t1_corecrypto_version: str = "1.0.1" # corecrypto (13.6 - T1 support)
|
||||
self.apple_spi_version: str = "1.0.0" # AppleHSSPISupport (14.4 Beta 1)
|
||||
self.apple_spi_hid_version: str = "1.0.0" # AppleHSSPIHIDDriver (14.4 Beta 1)
|
||||
self.kernel_relay_version: str = "1.0.0" # KernelRelayHost (15.0 Beta 3)
|
||||
|
||||
## Apple - Dortania Modified
|
||||
self.bcm570_version: str = "1.0.2" # CatalinaBCM5701Ethernet
|
||||
@@ -80,7 +82,7 @@ class Constants:
|
||||
self.corecaptureelcap_version: str = "1.0.2" # corecaptureElCap
|
||||
self.io80211elcap_version: str = "2.0.1" # IO80211ElCap
|
||||
self.io80211legacy_version: str = "1.0.0" # IO80211FamilyLegacy (Ventura)
|
||||
self.ioskywalk_version: str = "1.1.0" # IOSkywalkFamily (Ventura)
|
||||
self.ioskywalk_version: str = "1.2.0" # IOSkywalkFamily (Ventura)
|
||||
self.bigsursdxc_version: str = "1.0.0" # BigSurSDXC
|
||||
self.monterey_ahci_version: str = "1.0.0" # CatalinaAHCI
|
||||
|
||||
@@ -96,8 +98,8 @@ class Constants:
|
||||
self.btspoof_version: str = "1.0.0" # Bluetooth-Spoof
|
||||
self.aspp_override_version: str = "1.0.1" # ACPI_SMC_PlatformPlugin Override
|
||||
self.ecm_override_version: str = "1.0.0" # AppleUSBECM Override
|
||||
self.rsrhelper_version: str = "1.0.0" # RSRHelper
|
||||
self.amfipass_version: str = "1.4.0" # AMFIPass
|
||||
self.rsrhelper_version: str = "1.0.2" # RSRHelper
|
||||
self.amfipass_version: str = "1.4.1" # AMFIPass
|
||||
self.amfipass_compatibility_version: str = "1.2.1" # Minimum AMFIPass version required
|
||||
|
||||
## Syncretic
|
||||
@@ -177,15 +179,15 @@ class Constants:
|
||||
## SMBIOS Settings
|
||||
self.serial_settings: str = "None" # Set SMBIOS level used
|
||||
self.override_smbios: str = "Default" # Set SMBIOS model used
|
||||
self.allow_native_spoofs: bool = False # Allow native models to recieve spoofs
|
||||
self.allow_native_spoofs: bool = False # Allow native models to receive spoofs
|
||||
|
||||
### Serial Number Overrides
|
||||
self.custom_serial_number: str = "" # Set SMBIOS serial number
|
||||
self.custom_board_serial_number: str = "" # Set SMBIOS board serial number
|
||||
|
||||
## FeatureUnlock Settings
|
||||
self.fu_status: bool = True # Enable FeatureUnlock
|
||||
self.fu_arguments: str = None # Set FeatureUnlock arguments
|
||||
self.fu_status: bool = False # Enable FeatureUnlock
|
||||
self.fu_arguments: str = None # Set FeatureUnlock arguments
|
||||
|
||||
## Security Settings
|
||||
self.sip_status: bool = True # System Integrity Protection
|
||||
@@ -232,6 +234,7 @@ class Constants:
|
||||
self.disable_connectdrivers: bool = False # Disable ConnectDrivers (hibernation)
|
||||
self.set_vmm_cpuid: bool = False # Set VMM bit inside CPUID
|
||||
self.disable_mediaanalysisd: bool = False # Set mediaanalysisd to spawn
|
||||
self.force_quad_thread: bool = False # Force quad thread mode (cpus=4)
|
||||
self.set_alc_usage: bool = True # Set AppleALC usage
|
||||
self.allow_3rd_party_drives: bool = True # Allow ThridPartyDrives quirk
|
||||
self.allow_nvme_fixing: bool = True # Allow NVMe Kernel Space Patches
|
||||
@@ -244,6 +247,7 @@ class Constants:
|
||||
os_data.os_data.monterey,
|
||||
os_data.os_data.ventura,
|
||||
os_data.os_data.sonoma,
|
||||
os_data.os_data.sequoia,
|
||||
]
|
||||
|
||||
@property
|
||||
@@ -450,6 +454,10 @@ class Constants:
|
||||
def top_case_path(self):
|
||||
return self.payload_kexts_path / Path(f"Misc/AppleUSBTopCase-v{self.topcase_version}.zip")
|
||||
|
||||
@property
|
||||
def top_case_inj_path(self):
|
||||
return self.payload_kexts_path / Path(f"Misc/AppleTopCaseInjector-v{self.topcase_inj_version}.zip")
|
||||
|
||||
@property
|
||||
def t1_key_store_path(self):
|
||||
return self.payload_kexts_path / Path(f"Misc/AppleKeyStore-v{self.t1_key_store_version}.zip")
|
||||
@@ -474,6 +482,10 @@ class Constants:
|
||||
def apple_spi_hid_path(self):
|
||||
return self.payload_kexts_path / Path(f"Misc/AppleHSSPIHIDDriver-v{self.apple_spi_hid_version}.zip")
|
||||
|
||||
@property
|
||||
def kernel_relay_path(self):
|
||||
return self.payload_kexts_path / Path(f"Misc/KernelRelayHost-v{self.kernel_relay_version}.zip")
|
||||
|
||||
@property
|
||||
def mousse_path(self):
|
||||
return self.payload_kexts_path / Path(f"SSE/AAAMouSSE-v{self.mousse_version}.zip")
|
||||
@@ -777,6 +789,10 @@ class Constants:
|
||||
def icon_path_macos_sonoma(self):
|
||||
return self.icns_resource_path / Path("Sonoma.icns")
|
||||
|
||||
@property
|
||||
def icon_path_macos_sequoia(self):
|
||||
return self.icns_resource_path / Path("Sequoia.icns")
|
||||
|
||||
@property
|
||||
def gui_path(self):
|
||||
return self.payload_path / Path("Icon/Resources.zip")
|
||||
@@ -798,6 +814,10 @@ class Constants:
|
||||
def kdk_download_path(self):
|
||||
return self.payload_path / Path("KDK.dmg")
|
||||
|
||||
@property
|
||||
def metallib_download_path(self):
|
||||
return self.payload_path / Path("MetallibSupportPkg.pkg")
|
||||
|
||||
@property
|
||||
def icons_path(self):
|
||||
return [
|
||||
@@ -805,7 +825,8 @@ class Constants:
|
||||
str(self.icon_path_macos_big_sur),
|
||||
str(self.icon_path_macos_monterey),
|
||||
str(self.icon_path_macos_ventura),
|
||||
str(self.icon_path_macos_sonoma)
|
||||
str(self.icon_path_macos_sonoma),
|
||||
str(self.icon_path_macos_sequoia),
|
||||
]
|
||||
|
||||
sbm_values = [
|
||||
|
||||
@@ -24,6 +24,8 @@ SupportedSMBIOS = [
|
||||
"MacBookAir6,2",
|
||||
"MacBookAir7,1",
|
||||
"MacBookAir7,2",
|
||||
# "MacBookAir8,1",
|
||||
# "MacBookAir8,2",
|
||||
# MacBook Pro
|
||||
"MacBookPro4,1",
|
||||
"MacBookPro5,1",
|
||||
|
||||
@@ -507,7 +507,7 @@ smbios_dictionary = {
|
||||
"FirmwareFeatures": "0x8FD8FF42E",
|
||||
"SecureBootModel": "j140k",
|
||||
"CPU Generation": cpu_data.CPUGen.coffee_lake.value,
|
||||
"Max OS Supported": os_data.os_data.max_os,
|
||||
"Max OS Supported": os_data.os_data.sonoma,
|
||||
"Wireless Model": device_probe.Broadcom.Chipsets.AppleBCMWLANBusInterfacePCIe,
|
||||
"Bluetooth Model": bluetooth_data.bluetooth_data.UART,
|
||||
"Screen Size": 13,
|
||||
@@ -524,7 +524,7 @@ smbios_dictionary = {
|
||||
"FirmwareFeatures": "0x8FD8FF42E",
|
||||
"SecureBootModel": "j140k", # TODO: Verify
|
||||
"CPU Generation": cpu_data.CPUGen.coffee_lake.value,
|
||||
"Max OS Supported": os_data.os_data.max_os,
|
||||
"Max OS Supported": os_data.os_data.sonoma,
|
||||
"Wireless Model": device_probe.Broadcom.Chipsets.AppleBCMWLANBusInterfacePCIe,
|
||||
"Bluetooth Model": bluetooth_data.bluetooth_data.UART,
|
||||
"Screen Size": 13,
|
||||
@@ -543,7 +543,7 @@ smbios_dictionary = {
|
||||
"FirmwareFeatures": "0x8FD8FF42E",
|
||||
"SecureBootModel": "x589amlu",
|
||||
"CPU Generation": cpu_data.CPUGen.coffee_lake.value,
|
||||
"Max OS Supported": os_data.os_data.max_os,
|
||||
"Max OS Supported": os_data.os_data.sonoma,
|
||||
"Wireless Model": device_probe.Broadcom.Chipsets.AppleBCMWLANBusInterfacePCIe,
|
||||
"Bluetooth Model": bluetooth_data.bluetooth_data.UART,
|
||||
"Screen Size": 13,
|
||||
@@ -561,7 +561,7 @@ smbios_dictionary = {
|
||||
"FirmwareFeatures": "0x8FD8FF42E",
|
||||
"SecureBootModel": "j140a",
|
||||
"CPU Generation": cpu_data.CPUGen.coffee_lake.value,
|
||||
"Max OS Supported": os_data.os_data.max_os,
|
||||
"Max OS Supported": os_data.os_data.sonoma,
|
||||
"Wireless Model": device_probe.Broadcom.Chipsets.AppleBCMWLANBusInterfacePCIe,
|
||||
"Bluetooth Model": bluetooth_data.bluetooth_data.UART,
|
||||
"Screen Size": 13,
|
||||
|
||||
@@ -12,6 +12,7 @@ from .. import constants
|
||||
from ..detections import device_probe
|
||||
|
||||
from ..datasets import (
|
||||
cpu_data,
|
||||
smbios_data,
|
||||
bluetooth_data
|
||||
)
|
||||
@@ -44,19 +45,26 @@ class BuildBluetooth:
|
||||
self._prebuilt_assumption()
|
||||
|
||||
|
||||
def _bluetooth_firmware_incompatibility_workaround(self) -> None:
|
||||
"""
|
||||
For Mac firmwares that are unable to perform firmware uploads.
|
||||
Namely Macs with BCM2070 and BCM2046 chipsets, as well as pre-2012 Macs with upgraded chipsets.
|
||||
"""
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["bluetoothInternalControllerInfo"] = binascii.unhexlify("0000000000000000000000000000")
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["bluetoothExternalDongleFailed"] = binascii.unhexlify("00")
|
||||
self.config["NVRAM"]["Delete"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"] += ["bluetoothInternalControllerInfo", "bluetoothExternalDongleFailed"]
|
||||
|
||||
|
||||
def _on_model(self) -> None:
|
||||
"""
|
||||
On-Model Hardware Detection Handling
|
||||
"""
|
||||
|
||||
if self.computer.bluetooth_chipset in ["BRCM2070 Hub", "BRCM2046 Hub"]:
|
||||
logging.info("- Fixing Legacy Bluetooth for macOS Monterey")
|
||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("BlueToolFixup.kext", self.constants.bluetool_version, self.constants.bluetool_path)
|
||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("Bluetooth-Spoof.kext", self.constants.btspoof_version, self.constants.btspoof_path)
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " -btlfxallowanyaddr"
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["bluetoothInternalControllerInfo"] = binascii.unhexlify("0000000000000000000000000000")
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["bluetoothExternalDongleFailed"] = binascii.unhexlify("00")
|
||||
self.config["NVRAM"]["Delete"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"] += ["bluetoothInternalControllerInfo", "bluetoothExternalDongleFailed"]
|
||||
self._bluetooth_firmware_incompatibility_workaround()
|
||||
elif self.computer.bluetooth_chipset == "BRCM20702 Hub":
|
||||
# BCM94331 can include either BCM2070 or BRCM20702 v1 Bluetooth chipsets
|
||||
# Note Monterey only natively supports BRCM20702 v2 (found with BCM94360)
|
||||
@@ -65,6 +73,13 @@ class BuildBluetooth:
|
||||
if self.computer.wifi.chipset == device_probe.Broadcom.Chipsets.AirPortBrcm4360:
|
||||
logging.info("- Fixing Legacy Bluetooth for macOS Monterey")
|
||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("BlueToolFixup.kext", self.constants.bluetool_version, self.constants.bluetool_path)
|
||||
|
||||
# Older Mac firmwares (pre-2012) don't support the new chipsets correctly (regardless of WiFi card)
|
||||
if self.model in smbios_data.smbios_dictionary:
|
||||
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] < cpu_data.CPUGen.ivy_bridge.value:
|
||||
logging.info("- Fixing Legacy Bluetooth for macOS Monterey")
|
||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("BlueToolFixup.kext", self.constants.bluetool_version, self.constants.bluetool_path)
|
||||
self._bluetooth_firmware_incompatibility_workaround()
|
||||
elif self.computer.bluetooth_chipset == "3rd Party Bluetooth 4.0 Hub":
|
||||
logging.info("- Detected 3rd Party Bluetooth Chipset")
|
||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("BlueToolFixup.kext", self.constants.bluetool_version, self.constants.bluetool_path)
|
||||
@@ -87,7 +102,5 @@ class BuildBluetooth:
|
||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("BlueToolFixup.kext", self.constants.bluetool_version, self.constants.bluetool_path)
|
||||
if smbios_data.smbios_dictionary[self.model]["Bluetooth Model"] <= bluetooth_data.bluetooth_data.BRCM2070.value:
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " -btlfxallowanyaddr"
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["bluetoothInternalControllerInfo"] = binascii.unhexlify("0000000000000000000000000000")
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["bluetoothExternalDongleFailed"] = binascii.unhexlify("00")
|
||||
self.config["NVRAM"]["Delete"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"] += ["bluetoothInternalControllerInfo", "bluetoothExternalDongleFailed"]
|
||||
self._bluetooth_firmware_incompatibility_workaround()
|
||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("Bluetooth-Spoof.kext", self.constants.btspoof_version, self.constants.btspoof_path)
|
||||
@@ -67,6 +67,9 @@ class BuildOpenCore:
|
||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("Lilu.kext", self.constants.lilu_version, self.constants.lilu_path)
|
||||
self.config["Kernel"]["Quirks"]["DisableLinkeditJettison"] = True
|
||||
|
||||
# macOS Sequoia support for Lilu plugins
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " -lilubetaall"
|
||||
|
||||
# Call support functions
|
||||
for function in [
|
||||
firmware.BuildFirmware,
|
||||
|
||||
@@ -199,6 +199,12 @@ class BuildFirmware:
|
||||
logging.info("- Adding IOHIDFamily patch")
|
||||
support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Patch"], "Identifier", "com.apple.iokit.IOHIDFamily")["Enabled"] = True
|
||||
|
||||
# MacPro3,1/Xserve2,1 cannot boot with more than 4 threads in Sequoia
|
||||
# Note cpus=4 only overrides if more than 4 threads are present. So same on dual-core units
|
||||
if self.constants.force_quad_thread is True:
|
||||
logging.info("- Adding CPU Thread Limit Patch")
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " cpus=4"
|
||||
|
||||
|
||||
def _firmware_driver_handling(self) -> None:
|
||||
"""
|
||||
|
||||
@@ -354,7 +354,8 @@ class BuildGraphicsAudio:
|
||||
|
||||
# Due to regression in AppleALC 1.6.4+, temporarily use 1.6.3 and set override
|
||||
if support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("AppleALC.kext")["Enabled"] is True:
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " -lilubetaall"
|
||||
if "-lilubetaall" not in self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"]:
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " -lilubetaall"
|
||||
|
||||
|
||||
def _firmware_handling(self) -> None:
|
||||
|
||||
@@ -18,7 +18,8 @@ from ..detections import device_probe
|
||||
from ..datasets import (
|
||||
model_array,
|
||||
smbios_data,
|
||||
cpu_data
|
||||
cpu_data,
|
||||
os_data
|
||||
)
|
||||
|
||||
|
||||
@@ -64,8 +65,14 @@ xw
|
||||
if self.constants.fu_status is False:
|
||||
return
|
||||
|
||||
if not self.model in smbios_data.smbios_dictionary:
|
||||
return
|
||||
|
||||
if smbios_data.smbios_dictionary[self.model]["Max OS Supported"] >= os_data.os_data.sonoma:
|
||||
return
|
||||
|
||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("FeatureUnlock.kext", self.constants.featureunlock_version, self.constants.featureunlock_path)
|
||||
if self.constants.fu_arguments is not None:
|
||||
if self.constants.fu_arguments is not None and self.constants.fu_arguments != "":
|
||||
logging.info(f"- Adding additional FeatureUnlock args: {self.constants.fu_arguments}")
|
||||
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += self.constants.fu_arguments
|
||||
|
||||
@@ -199,6 +206,7 @@ xw
|
||||
logging.info("- Enabling SPI-based top case support")
|
||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleHSSPISupport.kext", self.constants.apple_spi_version, self.constants.apple_spi_path)
|
||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleHSSPIHIDDriver.kext", self.constants.apple_spi_hid_version, self.constants.apple_spi_hid_path)
|
||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleTopCaseInjector.kext", self.constants.topcase_inj_version, self.constants.top_case_inj_path)
|
||||
|
||||
|
||||
#On-device probing
|
||||
@@ -298,7 +306,7 @@ xw
|
||||
# And MacPro4,1, MacPro5,1 and Xserve3,1 are the only post-Penryn Macs that lack an internal USB hub
|
||||
# - Ref: https://techcommunity.microsoft.com/t5/microsoft-usb-blog/reasons-to-avoid-companion-controllers/ba-p/270710
|
||||
#
|
||||
# To be paired for sys_patch_dict.py's 'Legacy USB 1.1' patchset
|
||||
# To be paired for usb11.py's 'Legacy USB 1.1' patchset
|
||||
#
|
||||
# Note: With macOS 14.1, injection of these kexts causes a panic.
|
||||
# To avoid this, a MaxKernel is configured with XNU 23.0.0 (macOS 14.0).
|
||||
@@ -380,4 +388,5 @@ xw
|
||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("corecrypto_T1.kext", self.constants.t1_corecrypto_version, self.constants.t1_corecrypto_path)
|
||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleSSE.kext", self.constants.t1_sse_version, self.constants.t1_sse_path)
|
||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleKeyStore.kext", self.constants.t1_key_store_version, self.constants.t1_key_store_path)
|
||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleCredentialManager.kext", self.constants.t1_credential_version, self.constants.t1_credential_path)
|
||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleCredentialManager.kext", self.constants.t1_credential_version, self.constants.t1_credential_path)
|
||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("KernelRelayHost.kext", self.constants.kernel_relay_version, self.constants.kernel_relay_path)
|
||||
@@ -10,7 +10,8 @@ from ...detections import device_probe
|
||||
|
||||
from ...datasets import (
|
||||
smbios_data,
|
||||
cpu_data
|
||||
cpu_data,
|
||||
os_data
|
||||
)
|
||||
|
||||
|
||||
@@ -55,6 +56,11 @@ class BuildWiredNetworking:
|
||||
# the kernel driver to prevent a kernel panic
|
||||
# - DriverKit: com.apple.DriverKit.AppleUserECM.dext
|
||||
# - Kext: AppleUSBECM.kext
|
||||
if not self.model in smbios_data.smbios_dictionary:
|
||||
return
|
||||
if smbios_data.smbios_dictionary[self.model]["Max OS Supported"] >= os_data.os_data.sonoma:
|
||||
return
|
||||
|
||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("ECM-Override.kext", self.constants.ecm_override_version, self.constants.ecm_override_path)
|
||||
|
||||
|
||||
@@ -66,6 +72,8 @@ class BuildWiredNetworking:
|
||||
# See ECM logic for why it's always enabled
|
||||
if not self.model in smbios_data.smbios_dictionary:
|
||||
return
|
||||
if smbios_data.smbios_dictionary[self.model]["Max OS Supported"] >= os_data.os_data.sonoma:
|
||||
return
|
||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("CatalinaIntelI210Ethernet.kext", self.constants.i210_version, self.constants.i210_path)
|
||||
# Ivy Bridge and newer natively support DriverKit, so set MinKernel to 23.0.0
|
||||
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] >= cpu_data.CPUGen.ivy_bridge.value:
|
||||
|
||||
@@ -12,6 +12,11 @@ from .. import constants
|
||||
from ..support import utilities
|
||||
from ..detections import device_probe
|
||||
|
||||
from ..datasets import (
|
||||
smbios_data,
|
||||
os_data
|
||||
)
|
||||
|
||||
|
||||
class BuildSecurity:
|
||||
"""
|
||||
@@ -83,5 +88,6 @@ class BuildSecurity:
|
||||
logging.info("- Disabling SecureBootModel")
|
||||
self.config["Misc"]["Security"]["SecureBootModel"] = "Disabled"
|
||||
|
||||
logging.info("- Enabling AMFIPass")
|
||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("AMFIPass.kext", self.constants.amfipass_version, self.constants.amfipass_path)
|
||||
if smbios_data.smbios_dictionary[self.model]["Max OS Supported"] < os_data.os_data.sonoma:
|
||||
logging.info("- Enabling AMFIPass")
|
||||
support.BuildSupport(self.model, self.constants, self.config).enable_kext("AMFIPass.kext", self.constants.amfipass_version, self.constants.amfipass_path)
|
||||
|
||||
@@ -29,7 +29,7 @@ class CatalogProducts:
|
||||
catalog: dict,
|
||||
install_assistants_only: bool = True,
|
||||
only_vmm_install_assistants: bool = True,
|
||||
max_install_assistant_version: CatalogVersion = CatalogVersion.SONOMA
|
||||
max_install_assistant_version: CatalogVersion = CatalogVersion.SEQUOIA
|
||||
) -> None:
|
||||
self.catalog: dict = catalog
|
||||
self.ia_only: bool = install_assistants_only
|
||||
@@ -55,7 +55,7 @@ class CatalogProducts:
|
||||
# Ensure Apple Silicon specific Installers are not listed
|
||||
if "VMM-x86_64" not in data["MobileAssetProperties"]["SupportedDeviceModels"]:
|
||||
if self.vmm_only:
|
||||
return {}
|
||||
return {"Missing VMM Support": True}
|
||||
|
||||
version = data["MobileAssetProperties"]["OSVersion"]
|
||||
build = data["MobileAssetProperties"]["Build"]
|
||||
@@ -82,7 +82,7 @@ class CatalogProducts:
|
||||
|
||||
With macOS Sequoia, the Info.plist is no longer present in the InstallAssistant's assets
|
||||
"""
|
||||
|
||||
_does_support_vmm = False
|
||||
for entry in data["Assets"]:
|
||||
if "SupportedDeviceModels" not in entry:
|
||||
continue
|
||||
@@ -94,6 +94,8 @@ class CatalogProducts:
|
||||
if self.vmm_only:
|
||||
continue
|
||||
|
||||
_does_support_vmm = True
|
||||
|
||||
build = entry["Build"]
|
||||
version = entry["OSVersion"]
|
||||
|
||||
@@ -109,6 +111,10 @@ class CatalogProducts:
|
||||
"Catalog": CatalogURL().catalog_url_to_seed(catalog_url),
|
||||
}
|
||||
|
||||
if _does_support_vmm is False:
|
||||
if self.vmm_only:
|
||||
return {"Missing VMM Support": True}
|
||||
|
||||
return {}
|
||||
|
||||
|
||||
@@ -325,9 +331,18 @@ class CatalogProducts:
|
||||
|
||||
if plist_contents:
|
||||
if Path(package["URL"]).name == "Info.plist":
|
||||
_product_map.update(self._legacy_parse_info_plist(plist_contents))
|
||||
result = self._legacy_parse_info_plist(plist_contents)
|
||||
else:
|
||||
_product_map.update(self._parse_mobile_asset_plist(plist_contents))
|
||||
result = self._parse_mobile_asset_plist(plist_contents)
|
||||
|
||||
if result == {"Missing VMM Support": True}:
|
||||
_product_map = {}
|
||||
break
|
||||
|
||||
_product_map.update(result)
|
||||
|
||||
if _product_map == {}:
|
||||
continue
|
||||
|
||||
if _product_map["Version"] is not None:
|
||||
_product_map["Title"] = self._build_installer_name(_product_map["Version"], _product_map["Catalog"])
|
||||
|
||||
@@ -29,7 +29,7 @@ class CatalogURL:
|
||||
extension (CatalogExtension): Extension for the catalog URL
|
||||
"""
|
||||
def __init__(self,
|
||||
version: CatalogVersion = CatalogVersion.SONOMA,
|
||||
version: CatalogVersion = CatalogVersion.SEQUOIA,
|
||||
seed: SeedType = SeedType.PublicRelease,
|
||||
extension: CatalogExtension = CatalogExtension.PLIST
|
||||
) -> None:
|
||||
|
||||
@@ -2,8 +2,12 @@
|
||||
defaults.py: Generate default data for host/target
|
||||
"""
|
||||
|
||||
import logging
|
||||
import plistlib
|
||||
import subprocess
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
from .. import constants
|
||||
|
||||
from ..detections import device_probe
|
||||
@@ -22,19 +26,52 @@ from ..datasets import (
|
||||
|
||||
class GenerateDefaults:
|
||||
|
||||
def __init__(self, model: str, host_is_target: bool, global_constants: constants.Constants) -> None:
|
||||
def __init__(self, model: str, host_is_target: bool, global_constants: constants.Constants, ignore_settings_file: bool = False) -> None:
|
||||
self.constants: constants.Constants = global_constants
|
||||
|
||||
self.model: str = model
|
||||
|
||||
self.host_is_target: bool = host_is_target
|
||||
self.ignore_settings_file: bool = ignore_settings_file
|
||||
|
||||
# Reset Variables
|
||||
self.constants.sip_status = True
|
||||
self.constants.secure_status = False
|
||||
self.constants.disable_cs_lv = False
|
||||
self.constants.disable_amfi = False
|
||||
self.constants.fu_status = True
|
||||
self.constants.fu_status = False
|
||||
|
||||
# Reset Variables - GUI override
|
||||
# Match constants.py for model specific settings
|
||||
# TODO: Write a sane system for this...
|
||||
self.constants.firewire_boot = False
|
||||
self.constants.xhci_boot = False
|
||||
self.constants.nvme_boot = False
|
||||
self.constants.force_quad_thread = False
|
||||
self.constants.enable_wake_on_wlan = False
|
||||
self.constants.disable_tb = False
|
||||
self.constants.dGPU_switch = False
|
||||
self.constants.disallow_cpufriend = False
|
||||
self.constants.disable_mediaanalysisd = False
|
||||
self.constants.set_alc_usage = True
|
||||
self.constants.nvram_write = True
|
||||
self.constants.allow_nvme_fixing = True
|
||||
self.constants.allow_3rd_party_drives = True
|
||||
self.constants.disable_fw_throttle = False
|
||||
self.constants.software_demux = False
|
||||
self.constants.disable_connectdrivers = False
|
||||
self.constants.amd_gop_injection = False
|
||||
self.constants.nvidia_kepler_gop_injection = False
|
||||
self.constants.disable_cs_lv = False
|
||||
self.constants.disable_amfi = False
|
||||
self.constants.secure_status = False
|
||||
self.constants.serial_settings = "None"
|
||||
self.constants.override_smbios = "Default"
|
||||
self.constants.allow_native_spoofs = False
|
||||
self.constants.allow_oc_everywhere = False
|
||||
self.constants.sip_status = True
|
||||
self.constants.custom_sip_value = None
|
||||
|
||||
|
||||
self.constants.fu_arguments = None
|
||||
|
||||
@@ -55,6 +92,8 @@ class GenerateDefaults:
|
||||
self._misc_hardwares_probe()
|
||||
self._smbios_probe()
|
||||
self._check_amfipass_supported()
|
||||
self._load_gui_defaults()
|
||||
|
||||
|
||||
def _general_probe(self) -> None:
|
||||
"""
|
||||
@@ -71,6 +110,11 @@ class GenerateDefaults:
|
||||
global_settings.GlobalEnviromentSettings().write_property("MacBookPro_TeraScale_2_Accel", False)
|
||||
self.constants.allow_ts2_accel = False
|
||||
|
||||
if self.model in ["MacPro3,1", "Xserve2,1"]:
|
||||
self.constants.force_quad_thread = True
|
||||
else:
|
||||
self.constants.force_quad_thread = False
|
||||
|
||||
if self.model in smbios_data.smbios_dictionary:
|
||||
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] >= cpu_data.CPUGen.skylake.value:
|
||||
# On 2016-2017 MacBook Pros, 15" devices used a stock Samsung SSD with IONVMeController
|
||||
@@ -115,7 +159,6 @@ class GenerateDefaults:
|
||||
# As we don't spoof on native models, we can safely ignore this
|
||||
spoof_model = self.model
|
||||
|
||||
|
||||
if spoof_model in smbios_data.smbios_dictionary:
|
||||
if smbios_data.smbios_dictionary[spoof_model]["SecureBootModel"] is not None:
|
||||
if self.constants.sip_status is False:
|
||||
@@ -181,7 +224,6 @@ class GenerateDefaults:
|
||||
is_modern_wifi = True
|
||||
|
||||
else:
|
||||
print("Checking WiFi")
|
||||
if self.model not in smbios_data.smbios_dictionary:
|
||||
return
|
||||
if (
|
||||
@@ -198,7 +240,6 @@ class GenerateDefaults:
|
||||
device_probe.Broadcom.Chipsets.AirportBrcmNIC,
|
||||
]
|
||||
):
|
||||
print("Modern WiFi")
|
||||
is_modern_wifi = True
|
||||
|
||||
if is_legacy_wifi is False and is_modern_wifi is False:
|
||||
@@ -206,16 +247,18 @@ class GenerateDefaults:
|
||||
|
||||
# 12.0: Legacy Wireless chipsets require root patching
|
||||
# 14.0: Modern Wireless chipsets require root patching
|
||||
self.constants.sip_status = False
|
||||
self.constants.secure_status = False
|
||||
self.constants.disable_cs_lv = True
|
||||
self.constants.disable_amfi = True
|
||||
if self.model in smbios_data.smbios_dictionary:
|
||||
if smbios_data.smbios_dictionary[self.model]["Max OS Supported"] < os_data.os_data.sonoma:
|
||||
self.constants.sip_status = True
|
||||
self.constants.sip_status = False
|
||||
self.constants.secure_status = False
|
||||
self.constants.disable_cs_lv = True
|
||||
self.constants.disable_amfi = True
|
||||
|
||||
if is_legacy_wifi is True:
|
||||
# 13.0: Enabling AirPlay to Mac patches breaks Control Center on legacy chipsets
|
||||
# AirPlay to Mac was unsupported regardless, so we can safely disable it
|
||||
self.constants.fu_status = True
|
||||
self.constants.fu_arguments = " -disable_sidecar_mac"
|
||||
# if is_legacy_wifi is True:
|
||||
# # 13.0: Enabling AirPlay to Mac patches breaks Control Center on legacy chipsets
|
||||
# # AirPlay to Mac was unsupported regardless, so we can safely disable it
|
||||
# self.constants.fu_arguments = " -disable_sidecar_mac"
|
||||
|
||||
|
||||
def _misc_hardwares_probe(self) -> None:
|
||||
@@ -268,6 +311,7 @@ class GenerateDefaults:
|
||||
device_probe.NVIDIA.Archs.Kepler,
|
||||
]:
|
||||
self.constants.disable_amfi = True
|
||||
self.constants.disable_mediaanalysisd = True
|
||||
|
||||
if arch in [
|
||||
device_probe.AMD.Archs.Legacy_GCN_7000,
|
||||
@@ -359,3 +403,46 @@ class GenerateDefaults:
|
||||
|
||||
self.constants.disable_amfi = False
|
||||
self.constants.disable_cs_lv = False
|
||||
|
||||
|
||||
def _load_gui_defaults(self) -> None:
|
||||
"""
|
||||
Load GUI defaults from global settings
|
||||
"""
|
||||
if not self.host_is_target:
|
||||
return
|
||||
if self.ignore_settings_file is True:
|
||||
return
|
||||
|
||||
settings_plist = global_settings.GlobalEnviromentSettings().global_settings_plist
|
||||
if not Path(settings_plist).exists():
|
||||
return
|
||||
|
||||
try:
|
||||
plist = plistlib.load(Path(settings_plist).open("rb"))
|
||||
except Exception as e:
|
||||
logging.error("Error: Unable to read global settings file")
|
||||
logging.error(e)
|
||||
return
|
||||
|
||||
for key in plist:
|
||||
if not key.startswith("GUI:"):
|
||||
continue
|
||||
|
||||
constants_key = key.replace("GUI:", "")
|
||||
|
||||
if plist[key] == "PYTHON_NONE_VALUE":
|
||||
plist[key] = None
|
||||
|
||||
if hasattr(self.constants, constants_key):
|
||||
# Check if type is different
|
||||
original_type = type(getattr(self.constants, constants_key))
|
||||
new_type = type(plist[key])
|
||||
if original_type != new_type:
|
||||
logging.error(f"Global settings type mismatch for {constants_key}: {original_type} vs {new_type}")
|
||||
logging.error(f"Removing {key} from global settings")
|
||||
global_settings.GlobalEnviromentSettings().delete_property(key)
|
||||
continue
|
||||
|
||||
logging.info(f"Setting {constants_key} to {plist[key]}")
|
||||
setattr(self.constants, constants_key, plist[key])
|
||||
@@ -44,6 +44,25 @@ class GlobalEnviromentSettings:
|
||||
return None
|
||||
|
||||
|
||||
def delete_property(self, property_name: str) -> None:
|
||||
"""
|
||||
Deletes a property from the global settings file
|
||||
"""
|
||||
if Path(self.global_settings_plist).exists():
|
||||
try:
|
||||
plist = plistlib.load(Path(self.global_settings_plist).open("rb"))
|
||||
except Exception as e:
|
||||
logging.error("Error: Unable to read global settings file")
|
||||
logging.error(e)
|
||||
return
|
||||
if property_name in plist:
|
||||
del plist[property_name]
|
||||
try:
|
||||
plistlib.dump(plist, Path(self.global_settings_plist).open("wb"))
|
||||
except PermissionError:
|
||||
logging.info("Failed to write to global settings")
|
||||
|
||||
|
||||
def write_property(self, property_name: str, property_value) -> None:
|
||||
"""
|
||||
Writes a property to the global settings file
|
||||
|
||||
@@ -135,7 +135,7 @@ class InstallerCreation():
|
||||
|
||||
with script_location.open("w") as script:
|
||||
script.write(f'''#!/bin/bash
|
||||
erase_disk='diskutil eraseDisk HFS+ OCLP-Installer {disk}'
|
||||
erase_disk='/usr/sbin/diskutil eraseDisk HFS+ OCLP-Installer {disk}'
|
||||
if $erase_disk; then
|
||||
"{createinstallmedia_path}" --volume /Volumes/OCLP-Installer --nointeraction{additional_args}
|
||||
fi
|
||||
|
||||
274
opencore_legacy_patcher/support/metallib_handler.py
Normal file
@@ -0,0 +1,274 @@
|
||||
"""
|
||||
metallib_handler.py: Library for handling Metal libraries
|
||||
"""
|
||||
|
||||
import logging
|
||||
import requests
|
||||
import subprocess
|
||||
import packaging.version
|
||||
|
||||
from typing import cast
|
||||
from pathlib import Path
|
||||
|
||||
from . import network_handler, subprocess_wrapper
|
||||
from .. import constants
|
||||
|
||||
from ..datasets import os_data
|
||||
|
||||
|
||||
METALLIB_INSTALL_PATH: str = "/Library/Application Support/Dortania/MetallibSupportPkg"
|
||||
METALLIB_API_LINK: str = "https://dortania.github.io/MetallibSupportPkg/manifest.json"
|
||||
|
||||
METALLIB_ASSET_LIST: list = None
|
||||
|
||||
|
||||
class MetalLibraryObject:
|
||||
|
||||
def __init__(self, global_constants: constants.Constants,
|
||||
host_build: str, host_version: str,
|
||||
ignore_installed: bool = False, passive: bool = False
|
||||
) -> None:
|
||||
|
||||
self.constants: constants.Constants = global_constants
|
||||
|
||||
self.host_build: str = host_build # ex. 20A5384c
|
||||
self.host_version: str = host_version # ex. 11.0.1
|
||||
|
||||
self.passive: bool = passive # Don't perform actions requiring elevated privileges
|
||||
|
||||
self.ignore_installed: bool = ignore_installed # If True, will ignore any installed MetallibSupportPkg PKGs and download the latest
|
||||
self.metallib_already_installed: bool = False
|
||||
|
||||
self.metallib_installed_path: str = ""
|
||||
|
||||
self.metallib_url: str = ""
|
||||
self.metallib_url_build: str = ""
|
||||
self.metallib_url_version: str = ""
|
||||
|
||||
self.metallib_url_is_exactly_match: bool = False
|
||||
|
||||
self.metallib_closest_match_url: str = ""
|
||||
self.metallib_closest_match_url_build: str = ""
|
||||
self.metallib_closest_match_url_version: str = ""
|
||||
|
||||
self.success: bool = False
|
||||
|
||||
self.error_msg: str = ""
|
||||
|
||||
self._get_latest_metallib()
|
||||
|
||||
|
||||
def _get_remote_metallibs(self) -> dict:
|
||||
"""
|
||||
Get the MetallibSupportPkg list from the API
|
||||
"""
|
||||
|
||||
global METALLIB_ASSET_LIST
|
||||
|
||||
logging.info("Pulling metallib list from MetallibSupportPkg API")
|
||||
if METALLIB_ASSET_LIST:
|
||||
return METALLIB_ASSET_LIST
|
||||
|
||||
try:
|
||||
results = network_handler.NetworkUtilities().get(
|
||||
METALLIB_API_LINK,
|
||||
headers={
|
||||
"User-Agent": f"OCLP/{self.constants.patcher_version}"
|
||||
},
|
||||
timeout=5
|
||||
)
|
||||
except (requests.exceptions.Timeout, requests.exceptions.TooManyRedirects, requests.exceptions.ConnectionError):
|
||||
logging.info("Could not contact MetallibSupportPkg API")
|
||||
return None
|
||||
|
||||
if results.status_code != 200:
|
||||
logging.info("Could not fetch Metallib list")
|
||||
return None
|
||||
|
||||
METALLIB_ASSET_LIST = results.json()
|
||||
|
||||
return METALLIB_ASSET_LIST
|
||||
|
||||
|
||||
def _get_latest_metallib(self) -> None:
|
||||
"""
|
||||
Get the latest MetallibSupportPkg PKG
|
||||
"""
|
||||
|
||||
parsed_version = cast(packaging.version.Version, packaging.version.parse(self.host_version))
|
||||
|
||||
if os_data.os_conversion.os_to_kernel(str(parsed_version.major)) < os_data.os_data.sequoia:
|
||||
self.error_msg = "MetallibSupportPkg is not required for macOS Sonoma or older"
|
||||
logging.warning(f"{self.error_msg}")
|
||||
return
|
||||
|
||||
self.metallib_installed_path = self._local_metallib_installed()
|
||||
if self.metallib_installed_path:
|
||||
logging.info(f"metallib already installed ({Path(self.metallib_installed_path).name}), skipping")
|
||||
self.metallib_already_installed = True
|
||||
self.success = True
|
||||
return
|
||||
|
||||
remote_metallib_version = self._get_remote_metallibs()
|
||||
|
||||
if remote_metallib_version is None:
|
||||
logging.warning("Failed to fetch metallib list, falling back to local metallib matching")
|
||||
|
||||
# First check if a metallib matching the current macOS version is installed
|
||||
# ex. 13.0.1 vs 13.0
|
||||
loose_version = f"{parsed_version.major}.{parsed_version.minor}"
|
||||
logging.info(f"Checking for metallibs loosely matching {loose_version}")
|
||||
self.metallib_installed_path = self._local_metallib_installed(match=loose_version, check_version=True)
|
||||
if self.metallib_installed_path:
|
||||
logging.info(f"Found matching metallib: {Path(self.metallib_installed_path).name}")
|
||||
self.metallib_already_installed = True
|
||||
self.success = True
|
||||
return
|
||||
|
||||
older_version = f"{parsed_version.major}.{parsed_version.minor - 1 if parsed_version.minor > 0 else 0}"
|
||||
logging.info(f"Checking for metallibs matching {older_version}")
|
||||
self.metallib_installed_path = self._local_metallib_installed(match=older_version, check_version=True)
|
||||
if self.metallib_installed_path:
|
||||
logging.info(f"Found matching metallib: {Path(self.metallib_installed_path).name}")
|
||||
self.metallib_already_installed = True
|
||||
self.success = True
|
||||
return
|
||||
|
||||
logging.warning(f"Couldn't find metallib matching {self.host_version} or {older_version}, please install one manually")
|
||||
|
||||
self.error_msg = f"Could not contact MetallibSupportPkg API, and no metallib matching {self.host_version} ({self.host_build}) or {older_version} was installed.\nPlease ensure you have a network connection or manually install a metallib."
|
||||
|
||||
return
|
||||
|
||||
|
||||
# First check exact match
|
||||
for metallib in remote_metallib_version:
|
||||
if (metallib["build"] != self.host_build):
|
||||
continue
|
||||
self.metallib_url = metallib["url"]
|
||||
self.metallib_url_build = metallib["build"]
|
||||
self.metallib_url_version = metallib["version"]
|
||||
self.metallib_url_is_exactly_match = True
|
||||
break
|
||||
|
||||
# If no exact match, check for closest match
|
||||
if self.metallib_url == "":
|
||||
for metallib in remote_metallib_version:
|
||||
metallib_version = cast(packaging.version.Version, packaging.version.parse(metallib["version"]))
|
||||
if metallib_version > parsed_version:
|
||||
continue
|
||||
if metallib_version.major != parsed_version.major:
|
||||
continue
|
||||
if metallib_version.minor not in range(parsed_version.minor - 1, parsed_version.minor + 1):
|
||||
continue
|
||||
|
||||
# The metallib list is already sorted by version then date, so the first match is the closest
|
||||
self.metallib_closest_match_url = metallib["url"]
|
||||
self.metallib_closest_match_url_build = metallib["build"]
|
||||
self.metallib_closest_match_url_version = metallib["version"]
|
||||
self.metallib_url_is_exactly_match = False
|
||||
break
|
||||
|
||||
if self.metallib_url == "":
|
||||
if self.metallib_closest_match_url == "":
|
||||
logging.warning(f"No metallibs found for {self.host_build} ({self.host_version})")
|
||||
self.error_msg = f"No metallibs found for {self.host_build} ({self.host_version})"
|
||||
return
|
||||
logging.info(f"No direct match found for {self.host_build}, falling back to closest match")
|
||||
logging.info(f"Closest Match: {self.metallib_closest_match_url_build} ({self.metallib_closest_match_url_version})")
|
||||
|
||||
self.metallib_url = self.metallib_closest_match_url
|
||||
self.metallib_url_build = self.metallib_closest_match_url_build
|
||||
self.metallib_url_version = self.metallib_closest_match_url_version
|
||||
else:
|
||||
logging.info(f"Direct match found for {self.host_build} ({self.host_version})")
|
||||
|
||||
|
||||
# Check if this metallib is already installed
|
||||
self.metallib_installed_path = self._local_metallib_installed(match=self.metallib_url_build)
|
||||
if self.metallib_installed_path:
|
||||
logging.info(f"metallib already installed ({Path(self.metallib_installed_path).name}), skipping")
|
||||
self.metallib_already_installed = True
|
||||
self.success = True
|
||||
return
|
||||
|
||||
logging.info("Following metallib is recommended:")
|
||||
logging.info(f"- metallib Build: {self.metallib_url_build}")
|
||||
logging.info(f"- metallib Version: {self.metallib_url_version}")
|
||||
logging.info(f"- metallib URL: {self.metallib_url}")
|
||||
|
||||
self.success = True
|
||||
|
||||
|
||||
def _local_metallib_installed(self, match: str = None, check_version: bool = False) -> str:
|
||||
"""
|
||||
Check if a metallib is already installed
|
||||
"""
|
||||
|
||||
if self.ignore_installed:
|
||||
return None
|
||||
|
||||
if not Path(METALLIB_INSTALL_PATH).exists():
|
||||
return None
|
||||
|
||||
for metallib_folder in Path(METALLIB_INSTALL_PATH).iterdir():
|
||||
if not metallib_folder.is_dir():
|
||||
continue
|
||||
if check_version:
|
||||
if match not in metallib_folder.name:
|
||||
continue
|
||||
else:
|
||||
if not metallib_folder.name.endswith(f"-{match}"):
|
||||
continue
|
||||
|
||||
return metallib_folder
|
||||
|
||||
return None
|
||||
|
||||
|
||||
def retrieve_download(self, override_path: str = "") -> network_handler.DownloadObject:
|
||||
"""
|
||||
Retrieve MetallibSupportPkg PKG download object
|
||||
"""
|
||||
|
||||
self.success = False
|
||||
self.error_msg = ""
|
||||
|
||||
if self.metallib_already_installed:
|
||||
logging.info("No download required, metallib already installed")
|
||||
self.success = True
|
||||
return None
|
||||
|
||||
if self.metallib_url == "":
|
||||
self.error_msg = "Could not retrieve metallib catalog, no metallib to download"
|
||||
logging.error(self.error_msg)
|
||||
return None
|
||||
|
||||
logging.info(f"Returning DownloadObject for metallib: {Path(self.metallib_url).name}")
|
||||
self.success = True
|
||||
|
||||
metallib_download_path = self.constants.metallib_download_path if override_path == "" else Path(override_path)
|
||||
return network_handler.DownloadObject(self.metallib_url, metallib_download_path)
|
||||
|
||||
|
||||
def install_metallib(self, metallib: str = None) -> None:
|
||||
"""
|
||||
Install MetallibSupportPkg PKG
|
||||
"""
|
||||
|
||||
if not self.success:
|
||||
logging.error("Cannot install metallib, no metallib was successfully retrieved")
|
||||
return False
|
||||
|
||||
if self.metallib_already_installed:
|
||||
logging.info("No installation required, metallib already installed")
|
||||
return True
|
||||
|
||||
result = subprocess_wrapper.run_as_root([
|
||||
"/usr/sbin/installer", "-pkg", metallib if metallib else self.constants.metallib_download_path, "-target", "/"
|
||||
], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
if result.returncode != 0:
|
||||
subprocess_wrapper.log(result)
|
||||
return False
|
||||
|
||||
return True
|
||||
@@ -2,6 +2,7 @@
|
||||
validation.py: Validation class for the patcher
|
||||
"""
|
||||
|
||||
import atexit
|
||||
import logging
|
||||
import subprocess
|
||||
|
||||
@@ -18,9 +19,13 @@ from ..support import subprocess_wrapper
|
||||
from ..datasets import (
|
||||
example_data,
|
||||
model_array,
|
||||
sys_patch_dict,
|
||||
os_data
|
||||
)
|
||||
from ..sys_patch.patchsets import (
|
||||
HardwarePatchsetDetection,
|
||||
PatchType,
|
||||
DynamicPatchset
|
||||
)
|
||||
|
||||
|
||||
class PatcherValidation:
|
||||
@@ -119,48 +124,55 @@ class PatcherValidation:
|
||||
minor_kernel (int): Minor kernel version
|
||||
"""
|
||||
|
||||
patchset = sys_patch_dict.SystemPatchDictionary(major_kernel, minor_kernel, self.constants.legacy_accel_support, self.constants.detected_os_version).patchset_dict
|
||||
host_os_float = float(f"{major_kernel}.{minor_kernel}")
|
||||
patch_type_merge_exempt = ["MechanismPlugins"]
|
||||
patch_type_overwrite_exempt = []
|
||||
|
||||
for patch_subject in patchset:
|
||||
for patch_core in patchset[patch_subject]:
|
||||
patch_os_min_float = float(f'{patchset[patch_subject][patch_core]["OS Support"]["Minimum OS Support"]["OS Major"]}.{patchset[patch_subject][patch_core]["OS Support"]["Minimum OS Support"]["OS Minor"]}')
|
||||
patch_os_max_float = float(f'{patchset[patch_subject][patch_core]["OS Support"]["Maximum OS Support"]["OS Major"]}.{patchset[patch_subject][patch_core]["OS Support"]["Maximum OS Support"]["OS Minor"]}')
|
||||
if (host_os_float < patch_os_min_float or host_os_float > patch_os_max_float):
|
||||
continue
|
||||
for install_type in ["Install", "Install Non-Root"]:
|
||||
if install_type in patchset[patch_subject][patch_core]:
|
||||
for install_directory in patchset[patch_subject][patch_core][install_type]:
|
||||
for install_file in patchset[patch_subject][patch_core][install_type][install_directory]:
|
||||
source_file = str(self.constants.payload_local_binaries_root_path) + "/" + patchset[patch_subject][patch_core][install_type][install_directory][install_file] + install_directory + "/" + install_file
|
||||
if not Path(source_file).exists():
|
||||
logging.info(f"File not found: {source_file}")
|
||||
raise Exception(f"Failed to find {source_file}")
|
||||
if self.verify_unused_files is True:
|
||||
patchset = HardwarePatchsetDetection(self.constants, xnu_major=major_kernel, xnu_minor=minor_kernel, validation=True).patches
|
||||
|
||||
for patch_core in patchset:
|
||||
# Check if any unknown PathType is present
|
||||
for install_type in patchset[patch_core]:
|
||||
if install_type not in PatchType:
|
||||
raise Exception(f"Unknown PatchType: {install_type}")
|
||||
|
||||
for install_type in [PatchType.OVERWRITE_SYSTEM_VOLUME, PatchType.OVERWRITE_DATA_VOLUME, PatchType.MERGE_SYSTEM_VOLUME, PatchType.MERGE_DATA_VOLUME]:
|
||||
if install_type in patchset[patch_core]:
|
||||
for install_directory in patchset[patch_core][install_type]:
|
||||
for install_file in patchset[patch_core][install_type][install_directory]:
|
||||
try:
|
||||
if patchset[patch_core][install_type][install_directory][install_file] in DynamicPatchset:
|
||||
continue
|
||||
except TypeError:
|
||||
pass
|
||||
|
||||
# Technically there is nothing wrong with using a .framework with OVERWRITE, but it's a good indicator of a mistake
|
||||
if install_type in [PatchType.OVERWRITE_SYSTEM_VOLUME, PatchType.OVERWRITE_DATA_VOLUME]:
|
||||
if install_file.endswith(".framework") and install_file not in patch_type_overwrite_exempt:
|
||||
raise Exception(f"{install_file} used with {install_type}, are you certain this is correct?")
|
||||
elif install_type in [PatchType.MERGE_SYSTEM_VOLUME, PatchType.MERGE_DATA_VOLUME]:
|
||||
if not install_file.endswith(".framework") and install_file not in patch_type_merge_exempt:
|
||||
raise Exception(f"{install_file} used with {install_type}, are you certain this is correct?")
|
||||
|
||||
source_file = str(self.constants.payload_local_binaries_root_path) + "/" + patchset[patch_core][install_type][install_directory][install_file] + install_directory + "/" + install_file
|
||||
if not Path(source_file).exists():
|
||||
logging.info(f"File not found: {source_file}")
|
||||
raise Exception(f"Failed to find {source_file}")
|
||||
if self.verify_unused_files is True:
|
||||
if source_file not in self.active_patchset_files:
|
||||
self.active_patchset_files.append(source_file)
|
||||
|
||||
logging.info(f"Validating against Darwin {major_kernel}.{minor_kernel}")
|
||||
if not sys_patch_helpers.SysPatchHelpers(self.constants).generate_patchset_plist(patchset, f"OpenCore-Legacy-Patcher-{major_kernel}.{minor_kernel}.plist", None):
|
||||
if not sys_patch_helpers.SysPatchHelpers(self.constants).generate_patchset_plist(patchset, f"OpenCore-Legacy-Patcher-{major_kernel}.{minor_kernel}.plist", None, None):
|
||||
raise Exception("Failed to generate patchset plist")
|
||||
|
||||
# Remove the plist file after validation
|
||||
Path(self.constants.payload_path / f"OpenCore-Legacy-Patcher-{major_kernel}.{minor_kernel}.plist").unlink()
|
||||
|
||||
|
||||
def _validate_sys_patch(self) -> None:
|
||||
def _unmount_dmg(self) -> None:
|
||||
"""
|
||||
Validates sys_patch modules
|
||||
Unmounts the Universal-Binaries.dmg
|
||||
"""
|
||||
|
||||
if not Path(self.constants.payload_local_binaries_root_path_dmg).exists():
|
||||
dl_obj = network_handler.DownloadObject(f"https://github.com/dortania/PatcherSupportPkg/releases/download/{self.constants.patcher_support_pkg_version}/Universal-Binaries.dmg", self.constants.payload_local_binaries_root_path_dmg)
|
||||
dl_obj.download(spawn_thread=False)
|
||||
if dl_obj.download_complete is False:
|
||||
logging.info("Failed to download Universal-Binaries.dmg")
|
||||
raise Exception("Failed to download Universal-Binaries.dmg")
|
||||
|
||||
logging.info("Validating Root Patch File integrity")
|
||||
|
||||
if Path(self.constants.payload_path / Path("Universal-Binaries_overlay")).exists():
|
||||
subprocess.run(
|
||||
[
|
||||
@@ -183,6 +195,23 @@ class PatcherValidation:
|
||||
|
||||
raise Exception("Failed to unmount Universal-Binaries.dmg")
|
||||
|
||||
|
||||
def _validate_sys_patch(self) -> None:
|
||||
"""
|
||||
Validates sys_patch modules
|
||||
"""
|
||||
|
||||
if not Path(self.constants.payload_local_binaries_root_path_dmg).exists():
|
||||
dl_obj = network_handler.DownloadObject(f"https://github.com/dortania/PatcherSupportPkg/releases/download/{self.constants.patcher_support_pkg_version}/Universal-Binaries.dmg", self.constants.payload_local_binaries_root_path_dmg)
|
||||
dl_obj.download(spawn_thread=False)
|
||||
if dl_obj.download_complete is False:
|
||||
logging.info("Failed to download Universal-Binaries.dmg")
|
||||
raise Exception("Failed to download Universal-Binaries.dmg")
|
||||
|
||||
logging.info("Validating Root Patch File integrity")
|
||||
|
||||
self._unmount_dmg()
|
||||
|
||||
output = subprocess.run(
|
||||
[
|
||||
"/usr/bin/hdiutil", "attach", "-noverify", f"{self.constants.payload_local_binaries_root_path_dmg}",
|
||||
@@ -202,8 +231,9 @@ class PatcherValidation:
|
||||
|
||||
logging.info("Mounted Universal-Binaries.dmg")
|
||||
|
||||
atexit.register(self._unmount_dmg)
|
||||
|
||||
for supported_os in [os_data.os_data.big_sur, os_data.os_data.monterey, os_data.os_data.ventura, os_data.os_data.sonoma]:
|
||||
for supported_os in [os_data.os_data.big_sur, os_data.os_data.monterey, os_data.os_data.ventura, os_data.os_data.sonoma, os_data.os_data.sequoia]:
|
||||
for i in range(0, 10):
|
||||
self._validate_root_patch_files(supported_os, i)
|
||||
|
||||
|
||||
@@ -78,7 +78,11 @@ class InstallAutomaticPatchingServices:
|
||||
|
||||
kexts = []
|
||||
for kext in Path("/Library/Extensions").glob("*.kext"):
|
||||
if not Path(f"{kext}/Contents/Info.plist").exists():
|
||||
try:
|
||||
if not Path(f"{kext}/Contents/Info.plist").exists():
|
||||
continue
|
||||
except Exception as e:
|
||||
logging.info(f" - Failed to check if {kext.name} is a directory: {e}")
|
||||
continue
|
||||
try:
|
||||
kext_plist = plistlib.load(open(f"{kext}/Contents/Info.plist", "rb"))
|
||||
|
||||
@@ -12,7 +12,6 @@ import markdown2
|
||||
import subprocess
|
||||
import webbrowser
|
||||
|
||||
from ..detections import DetectRootPatch
|
||||
|
||||
from ... import constants
|
||||
|
||||
@@ -28,6 +27,10 @@ from ...support import (
|
||||
global_settings,
|
||||
network_handler,
|
||||
)
|
||||
from ..patchsets import (
|
||||
HardwarePatchsetDetection,
|
||||
HardwarePatchsetValidation
|
||||
)
|
||||
|
||||
|
||||
class StartAutomaticPatching:
|
||||
@@ -142,12 +145,12 @@ Please check the Github page for more information about this release."""
|
||||
|
||||
if utilities.check_seal() is True:
|
||||
logging.info("- Detected Snapshot seal intact, detecting patches")
|
||||
patches = DetectRootPatch(self.constants.computer.real_model, self.constants).detect_patch_set()
|
||||
patches = HardwarePatchsetDetection(self.constants).device_properties
|
||||
if not any(not patch.startswith("Settings") and not patch.startswith("Validation") and patches[patch] is True for patch in patches):
|
||||
patches = {}
|
||||
if patches:
|
||||
logging.info("- Detected applicable patches, determining whether possible to patch")
|
||||
if patches["Validation: Patching Possible"] is False:
|
||||
if patches[HardwarePatchsetValidation.PATCHING_NOT_POSSIBLE] is True:
|
||||
logging.info("- Cannot run patching")
|
||||
return
|
||||
|
||||
@@ -186,10 +189,12 @@ Please check the Github page for more information about this release."""
|
||||
if self._determine_if_versions_match():
|
||||
self._determine_if_boot_matches()
|
||||
|
||||
|
||||
def _onWebviewNav(self, event):
|
||||
url = event.GetURL()
|
||||
webbrowser.open(url)
|
||||
|
||||
|
||||
def _determine_if_versions_match(self):
|
||||
"""
|
||||
Determine if the booted version of OCLP matches the installed version
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
"""
|
||||
detections: Detect and generate patch sets for the host
|
||||
"""
|
||||
from .detect import DetectRootPatch
|
||||
from .generate import GenerateRootPatchSets
|
||||
@@ -1,822 +0,0 @@
|
||||
"""
|
||||
detect.py: Hardware Detection Logic for Root Patching
|
||||
"""
|
||||
|
||||
import logging
|
||||
import plistlib
|
||||
import py_sip_xnu
|
||||
import packaging.version
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
from ... import constants
|
||||
|
||||
from ...detections import (
|
||||
amfi_detect,
|
||||
device_probe
|
||||
)
|
||||
from ...support import (
|
||||
kdk_handler,
|
||||
network_handler,
|
||||
utilities
|
||||
)
|
||||
from ...datasets import (
|
||||
cpu_data,
|
||||
model_array,
|
||||
os_data,
|
||||
sip_data,
|
||||
smbios_data
|
||||
)
|
||||
|
||||
|
||||
class DetectRootPatch:
|
||||
"""
|
||||
Library for querying root volume patches applicable for booted system
|
||||
"""
|
||||
|
||||
def __init__(self, model: str, global_constants: constants.Constants,
|
||||
os_major: int = None, os_minor: int = None,
|
||||
os_build: str = None, os_version: str = None
|
||||
) -> None:
|
||||
|
||||
self.model: str = model
|
||||
|
||||
self.constants: constants.Constants = global_constants
|
||||
if os_major is None:
|
||||
os_major = self.constants.detected_os
|
||||
if os_minor is None:
|
||||
os_minor = self.constants.detected_os_minor
|
||||
if os_build is None:
|
||||
os_build = self.constants.detected_os_build
|
||||
if os_version is None:
|
||||
os_version = self.constants.detected_os_version
|
||||
|
||||
self.os_major: int = os_major
|
||||
self.os_minor: int = os_minor
|
||||
self.os_build: str = os_build
|
||||
self.os_version: str = os_version
|
||||
|
||||
self.computer = self.constants.computer
|
||||
|
||||
# GPU Patch Detection
|
||||
self.nvidia_tesla = False
|
||||
self.kepler_gpu = False
|
||||
self.nvidia_web = False
|
||||
self.amd_ts1 = False
|
||||
self.amd_ts2 = False
|
||||
self.iron_gpu = False
|
||||
self.sandy_gpu = False
|
||||
self.ivy_gpu = False
|
||||
self.haswell_gpu = False
|
||||
self.broadwell_gpu = False
|
||||
self.skylake_gpu = False
|
||||
self.legacy_gcn = False
|
||||
self.legacy_gcn_v2 = False
|
||||
self.legacy_polaris = False
|
||||
self.legacy_vega = False
|
||||
|
||||
# Misc Patch Detection
|
||||
self.brightness_legacy = False
|
||||
self.legacy_audio = False
|
||||
self.legacy_wifi = False
|
||||
self.modern_wifi = False
|
||||
self.legacy_gmux = False
|
||||
self.legacy_keyboard_backlight = False
|
||||
self.legacy_uhci_ohci = False
|
||||
self.legacy_pcie_webcam = False
|
||||
self.legacy_t1_chip = False
|
||||
|
||||
# Patch Requirements
|
||||
self.amfi_must_disable = False
|
||||
self.amfi_shim_bins = False
|
||||
self.supports_metal = False
|
||||
self.needs_nv_web_checks = False
|
||||
self.requires_root_kc = False
|
||||
|
||||
# Validation Checks
|
||||
self.sip_enabled = False
|
||||
self.sbm_enabled = False
|
||||
self.amfi_enabled = False
|
||||
self.fv_enabled = False
|
||||
self.dosdude_patched = False
|
||||
self.missing_kdk = False
|
||||
self.has_network = False
|
||||
self.unsupported_os = False
|
||||
|
||||
self.missing_whatever_green = False
|
||||
self.missing_nv_web_nvram = False
|
||||
self.missing_nv_web_opengl = False
|
||||
self.missing_nv_compat = False
|
||||
|
||||
|
||||
def _detect_gpus(self):
|
||||
"""
|
||||
Query GPUs and set flags for applicable patches
|
||||
"""
|
||||
|
||||
gpus = self.constants.computer.gpus
|
||||
non_metal_os = os_data.os_data.catalina
|
||||
for i, gpu in enumerate(gpus):
|
||||
if gpu.class_code and gpu.class_code != 0xFFFFFFFF:
|
||||
logging.info(f"Found GPU ({i}): {utilities.friendly_hex(gpu.vendor_id)}:{utilities.friendly_hex(gpu.device_id)}")
|
||||
if gpu.arch in [device_probe.NVIDIA.Archs.Tesla] and self.constants.force_nv_web is False:
|
||||
if self.os_major > non_metal_os:
|
||||
self.nvidia_tesla = True
|
||||
self.amfi_must_disable = True
|
||||
if os_data.os_data.ventura in self.constants.legacy_accel_support:
|
||||
self.amfi_shim_bins = True
|
||||
self.legacy_keyboard_backlight = self._check_legacy_keyboard_backlight()
|
||||
self.requires_root_kc = True
|
||||
elif gpu.arch == device_probe.NVIDIA.Archs.Kepler and self.constants.force_nv_web is False:
|
||||
if self.os_major > os_data.os_data.big_sur:
|
||||
# Kepler drivers were dropped with Beta 7
|
||||
# 12.0 Beta 5: 21.0.0 - 21A5304g
|
||||
# 12.0 Beta 6: 21.1.0 - 21A5506j
|
||||
# 12.0 Beta 7: 21.1.0 - 21A5522h
|
||||
if (
|
||||
self.os_major >= os_data.os_data.ventura or
|
||||
(
|
||||
"21A5506j" not in self.os_build and
|
||||
self.os_major == os_data.os_data.monterey and
|
||||
self.os_minor > 0
|
||||
)
|
||||
):
|
||||
self.kepler_gpu = True
|
||||
self.supports_metal = True
|
||||
if self.os_major >= os_data.os_data.ventura:
|
||||
self.amfi_must_disable = True
|
||||
if (self.os_major == os_data.os_data.ventura and self.os_minor >= 4) or self.os_major > os_data.os_data.ventura:
|
||||
self.amfi_shim_bins = True
|
||||
elif gpu.arch in [
|
||||
device_probe.NVIDIA.Archs.Fermi,
|
||||
device_probe.NVIDIA.Archs.Kepler,
|
||||
device_probe.NVIDIA.Archs.Maxwell,
|
||||
device_probe.NVIDIA.Archs.Pascal,
|
||||
]:
|
||||
if self.os_major > os_data.os_data.mojave:
|
||||
self.nvidia_web = True
|
||||
self.amfi_must_disable = True
|
||||
if os_data.os_data.ventura in self.constants.legacy_accel_support:
|
||||
self.amfi_shim_bins = True
|
||||
self.needs_nv_web_checks = True
|
||||
self.requires_root_kc = True
|
||||
elif gpu.arch == device_probe.AMD.Archs.TeraScale_1:
|
||||
if self.os_major > non_metal_os:
|
||||
self.amd_ts1 = True
|
||||
self.amfi_must_disable = True
|
||||
if os_data.os_data.ventura in self.constants.legacy_accel_support:
|
||||
self.amfi_shim_bins = True
|
||||
self.requires_root_kc = True
|
||||
elif gpu.arch == device_probe.AMD.Archs.TeraScale_2:
|
||||
if self.os_major > non_metal_os:
|
||||
self.amd_ts2 = True
|
||||
self.amfi_must_disable = True
|
||||
if os_data.os_data.ventura in self.constants.legacy_accel_support:
|
||||
self.amfi_shim_bins = True
|
||||
self.requires_root_kc = True
|
||||
elif gpu.arch in [
|
||||
device_probe.AMD.Archs.Legacy_GCN_7000,
|
||||
device_probe.AMD.Archs.Legacy_GCN_8000,
|
||||
device_probe.AMD.Archs.Legacy_GCN_9000,
|
||||
device_probe.AMD.Archs.Polaris,
|
||||
]:
|
||||
if self.os_major > os_data.os_data.monterey:
|
||||
if self.constants.computer.rosetta_active is True:
|
||||
continue
|
||||
|
||||
if gpu.arch == device_probe.AMD.Archs.Polaris:
|
||||
# Check if host supports AVX2.0
|
||||
# If not, enable legacy GCN patch
|
||||
# MacBookPro13,3 does include an unsupported framebuffer, thus we'll patch to ensure
|
||||
# full compatibility (namely power states, etc)
|
||||
# Reference: https://github.com/dortania/bugtracker/issues/292
|
||||
# TODO: Probe framebuffer families further
|
||||
# Sonoma note: MacBookPro14,3 has the same issue...
|
||||
# iMac18,2/3 is partially affected, however currently it seems the generic framebuffer
|
||||
# is sufficient. Only MacBookPro14,3 needs this for dGPU handling
|
||||
if self.model not in ["MacBookPro13,3", "MacBookPro14,3"]:
|
||||
if "AVX2" in self.constants.computer.cpu.leafs:
|
||||
continue
|
||||
self.legacy_polaris = True
|
||||
else:
|
||||
if self.model == "MacBookPro13,3":
|
||||
self.legacy_gcn = True
|
||||
elif self.model == "MacBookPro14,3":
|
||||
if self.os_major < os_data.os_data.sonoma:
|
||||
continue
|
||||
self.legacy_gcn_v2 = True
|
||||
else:
|
||||
self.legacy_gcn = True
|
||||
self.supports_metal = True
|
||||
self.requires_root_kc = True
|
||||
self.amfi_must_disable = True
|
||||
elif gpu.arch == device_probe.AMD.Archs.Vega:
|
||||
if self.os_major > os_data.os_data.monterey:
|
||||
if "AVX2" in self.constants.computer.cpu.leafs:
|
||||
continue
|
||||
|
||||
self.legacy_vega = True
|
||||
self.supports_metal = True
|
||||
self.requires_root_kc = True
|
||||
self.amfi_must_disable = True
|
||||
elif gpu.arch == device_probe.Intel.Archs.Iron_Lake:
|
||||
if self.os_major > non_metal_os:
|
||||
self.iron_gpu = True
|
||||
self.amfi_must_disable = True
|
||||
if os_data.os_data.ventura in self.constants.legacy_accel_support:
|
||||
self.amfi_shim_bins = True
|
||||
self.legacy_keyboard_backlight = self._check_legacy_keyboard_backlight()
|
||||
self.requires_root_kc = True
|
||||
elif gpu.arch == device_probe.Intel.Archs.Sandy_Bridge:
|
||||
if self.os_major > non_metal_os:
|
||||
self.sandy_gpu = True
|
||||
self.amfi_must_disable = True
|
||||
if os_data.os_data.ventura in self.constants.legacy_accel_support:
|
||||
self.amfi_shim_bins = True
|
||||
self.legacy_keyboard_backlight = self._check_legacy_keyboard_backlight()
|
||||
self.requires_root_kc = True
|
||||
elif gpu.arch == device_probe.Intel.Archs.Ivy_Bridge:
|
||||
if self.os_major > os_data.os_data.big_sur:
|
||||
self.ivy_gpu = True
|
||||
if self.os_major >= os_data.os_data.ventura:
|
||||
self.amfi_must_disable = True
|
||||
if (self.os_major == os_data.os_data.ventura and self.os_minor >= 4) or self.os_major > os_data.os_data.ventura:
|
||||
self.amfi_shim_bins = True
|
||||
self.supports_metal = True
|
||||
elif gpu.arch == device_probe.Intel.Archs.Haswell:
|
||||
if self.os_major > os_data.os_data.monterey:
|
||||
self.haswell_gpu = True
|
||||
self.amfi_must_disable = True
|
||||
if (self.os_major == os_data.os_data.ventura and self.os_minor >= 4) or self.os_major > os_data.os_data.ventura:
|
||||
self.amfi_shim_bins = True
|
||||
self.supports_metal = True
|
||||
elif gpu.arch == device_probe.Intel.Archs.Broadwell:
|
||||
if self.os_major > os_data.os_data.monterey:
|
||||
self.broadwell_gpu = True
|
||||
self.amfi_must_disable = True
|
||||
self.supports_metal = True
|
||||
elif gpu.arch == device_probe.Intel.Archs.Skylake:
|
||||
if self.os_major > os_data.os_data.monterey:
|
||||
self.skylake_gpu = True
|
||||
self.amfi_must_disable = True
|
||||
self.supports_metal = True
|
||||
|
||||
if self.supports_metal is True:
|
||||
# Avoid patching Metal and non-Metal GPUs if both present, prioritize Metal GPU
|
||||
# Main concerns are for iMac12,x with Sandy iGPU and Kepler dGPU
|
||||
self.nvidia_tesla = False
|
||||
self.nvidia_web = False
|
||||
self.amd_ts1 = False
|
||||
self.amd_ts2 = False
|
||||
self.iron_gpu = False
|
||||
self.sandy_gpu = False
|
||||
self.legacy_keyboard_backlight = False
|
||||
|
||||
if self.legacy_gcn is True or self.legacy_gcn_v2 is True:
|
||||
# We can only support one or the other due to the nature of relying
|
||||
# on portions of the native AMD stack for Polaris and Vega
|
||||
# Thus we'll prioritize legacy GCN due to being the internal card
|
||||
# ex. MacPro6,1 and MacBookPro11,5 with eGPUs
|
||||
self.legacy_polaris = False
|
||||
self.legacy_vega = False
|
||||
|
||||
if self.os_major <= os_data.os_data.monterey:
|
||||
# Always assume Root KC requirement on Monterey and older
|
||||
self.requires_root_kc = True
|
||||
else:
|
||||
if self.requires_root_kc is True:
|
||||
self.missing_kdk = not self._check_kdk()
|
||||
|
||||
|
||||
|
||||
def _check_networking_support(self):
|
||||
"""
|
||||
Query for network requirement, ex. KDK downloading
|
||||
|
||||
On macOS Ventura, networking support is required to download KDKs.
|
||||
However for machines such as BCM94322, BCM94328 and Atheros chipsets,
|
||||
users may only have wifi as their only supported network interface.
|
||||
Thus we'll allow for KDK-less installs for these machines on first run.
|
||||
On subsequent runs, we'll require networking to be enabled.
|
||||
"""
|
||||
|
||||
# Increase OS check if modern wifi is detected
|
||||
if self.os_major < (os_data.os_data.ventura if self.legacy_wifi is True else os_data.os_data.sonoma):
|
||||
return
|
||||
if self.legacy_wifi is False and self.modern_wifi is False:
|
||||
return
|
||||
if self.requires_root_kc is False:
|
||||
return
|
||||
if self.missing_kdk is False:
|
||||
return
|
||||
if self.has_network is True:
|
||||
return
|
||||
|
||||
# Verify whether OCLP already installed network patches to the root volume
|
||||
# If so, require networking to be enabled (user just needs to connect to wifi)
|
||||
oclp_patch_path = "/System/Library/CoreServices/OpenCore-Legacy-Patcher.plist"
|
||||
if Path(oclp_patch_path).exists():
|
||||
oclp_plist = plistlib.load(open(oclp_patch_path, "rb"))
|
||||
if "Legacy Wireless" in oclp_plist or "Modern Wireless" in oclp_plist:
|
||||
return
|
||||
|
||||
# Due to the reliance of KDKs for most older patches, we'll allow KDK-less
|
||||
# installs for Legacy Wifi patches and remove others
|
||||
self.missing_kdk = False
|
||||
self.requires_root_kc = False
|
||||
|
||||
# Reset patches needing KDK
|
||||
self.nvidia_tesla = False
|
||||
self.nvidia_web = False
|
||||
self.amd_ts1 = False
|
||||
self.amd_ts2 = False
|
||||
self.iron_gpu = False
|
||||
self.sandy_gpu = False
|
||||
self.legacy_gcn = False
|
||||
self.legacy_gcn_v2 = False
|
||||
self.legacy_polaris = False
|
||||
self.legacy_vega = False
|
||||
self.brightness_legacy = False
|
||||
self.legacy_audio = False
|
||||
self.legacy_gmux = False
|
||||
self.legacy_keyboard_backlight = False
|
||||
|
||||
# Currently all graphics patches require a KDK
|
||||
if self.os_major >= os_data.os_data.sonoma:
|
||||
self.kepler_gpu = False
|
||||
self.ivy_gpu = False
|
||||
self.haswell_gpu = False
|
||||
self.broadwell_gpu = False
|
||||
self.skylake_gpu = False
|
||||
|
||||
|
||||
def _check_dgpu_status(self):
|
||||
"""
|
||||
Query whether system has an active dGPU
|
||||
"""
|
||||
|
||||
dgpu = self.constants.computer.dgpu
|
||||
if dgpu:
|
||||
if dgpu.class_code and dgpu.class_code == 0xFFFFFFFF:
|
||||
# If dGPU is disabled via class-codes, assume demuxed
|
||||
return False
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def _detect_demux(self):
|
||||
"""
|
||||
Query whether system has been demuxed (ex. MacBookPro8,2, disabled dGPU)
|
||||
"""
|
||||
|
||||
# If GFX0 is missing, assume machine was demuxed
|
||||
# -wegnoegpu would also trigger this, so ensure arg is not present
|
||||
if not "-wegnoegpu" in (utilities.get_nvram("boot-args", decode=True) or ""):
|
||||
igpu = self.constants.computer.igpu
|
||||
dgpu = self._check_dgpu_status()
|
||||
if igpu and not dgpu:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def _check_legacy_keyboard_backlight(self):
|
||||
"""
|
||||
Query whether system has a legacy keyboard backlight
|
||||
|
||||
Returns:
|
||||
bool: True if legacy keyboard backlight, False otherwise
|
||||
"""
|
||||
|
||||
# iMac12,x+ have an 'ACPI0008' device, but it's not a keyboard backlight
|
||||
# Best to assume laptops will have a keyboard backlight
|
||||
if self.model.startswith("MacBook"):
|
||||
return self.constants.computer.ambient_light_sensor
|
||||
return False
|
||||
|
||||
|
||||
def _check_nv_web_nvram(self):
|
||||
"""
|
||||
Query for Nvidia Web Driver property: nvda_drv_vrl or nvda_drv
|
||||
|
||||
Returns:
|
||||
bool: True if property is present, False otherwise
|
||||
"""
|
||||
|
||||
nv_on = utilities.get_nvram("boot-args", decode=True)
|
||||
if nv_on:
|
||||
if "nvda_drv_vrl=" in nv_on:
|
||||
return True
|
||||
nv_on = utilities.get_nvram("nvda_drv")
|
||||
if nv_on:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def _check_nv_web_opengl(self):
|
||||
"""
|
||||
Query for Nvidia Web Driver property: ngfxgl
|
||||
|
||||
Verify Web Drivers will run in OpenGL mode
|
||||
|
||||
Returns:
|
||||
bool: True if property is present, False otherwise
|
||||
"""
|
||||
|
||||
nv_on = utilities.get_nvram("boot-args", decode=True)
|
||||
if nv_on:
|
||||
if "ngfxgl=" in nv_on:
|
||||
return True
|
||||
for gpu in self.constants.computer.gpus:
|
||||
if isinstance(gpu, device_probe.NVIDIA):
|
||||
if gpu.disable_metal is True:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def _check_nv_compat(self):
|
||||
"""
|
||||
Query for Nvidia Web Driver property: ngfxcompat
|
||||
|
||||
Verify Web Drivers will skip NVDAStartupWeb compatibility check
|
||||
|
||||
Returns:
|
||||
bool: True if property is present, False otherwise
|
||||
"""
|
||||
|
||||
nv_on = utilities.get_nvram("boot-args", decode=True)
|
||||
if nv_on:
|
||||
if "ngfxcompat=" in nv_on:
|
||||
return True
|
||||
for gpu in self.constants.computer.gpus:
|
||||
if isinstance(gpu, device_probe.NVIDIA):
|
||||
if gpu.force_compatible is True:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def _check_whatevergreen(self):
|
||||
"""
|
||||
Query whether WhateverGreen.kext is loaded
|
||||
|
||||
Returns:
|
||||
bool: True if loaded, False otherwise
|
||||
"""
|
||||
|
||||
return utilities.check_kext_loaded("as.vit9696.WhateverGreen")
|
||||
|
||||
|
||||
def _check_os_compat(self) -> bool:
|
||||
"""
|
||||
Base check to ensure patcher is compatible with host OS
|
||||
"""
|
||||
min_os = os_data.os_data.big_sur
|
||||
max_os = os_data.os_data.sonoma
|
||||
if self.os_major < min_os or self.os_major > max_os:
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
def _check_kdk(self):
|
||||
"""
|
||||
Query whether Kernel Debug Kit is installed
|
||||
|
||||
Returns:
|
||||
bool: True if installed, False otherwise
|
||||
"""
|
||||
|
||||
return kdk_handler.KernelDebugKitObject(self.constants, self.os_build, self.os_version, passive=True).kdk_already_installed
|
||||
|
||||
|
||||
def _check_sip(self):
|
||||
"""
|
||||
Query System Integrity checks required for patching
|
||||
|
||||
Returns:
|
||||
tuple: (list, str, str) of SIP values, SIP hex, SIP error message
|
||||
"""
|
||||
|
||||
if self.os_major > os_data.os_data.catalina:
|
||||
if self.nvidia_web is True:
|
||||
sip = sip_data.system_integrity_protection.root_patch_sip_big_sur_3rd_part_kexts
|
||||
sip_hex = "0xA03"
|
||||
sip_value = (
|
||||
f"For Hackintoshes, please set csr-active-config to '030A0000' ({sip_hex})\nFor non-OpenCore Macs, please run 'csrutil disable' and \n'csrutil authenticated-root disable' in RecoveryOS"
|
||||
)
|
||||
elif self.os_major >= os_data.os_data.ventura:
|
||||
sip = sip_data.system_integrity_protection.root_patch_sip_ventura
|
||||
sip_hex = "0x803"
|
||||
sip_value = (
|
||||
f"For Hackintoshes, please set csr-active-config to '03080000' ({sip_hex})\nFor non-OpenCore Macs, please run 'csrutil disable' and \n'csrutil authenticated-root disable' in RecoveryOS"
|
||||
)
|
||||
else:
|
||||
sip = sip_data.system_integrity_protection.root_patch_sip_big_sur
|
||||
sip_hex = "0x802"
|
||||
sip_value = (
|
||||
f"For Hackintoshes, please set csr-active-config to '02080000' ({sip_hex})\nFor non-OpenCore Macs, please run 'csrutil disable' and \n'csrutil authenticated-root disable' in RecoveryOS"
|
||||
)
|
||||
else:
|
||||
sip = sip_data.system_integrity_protection.root_patch_sip_mojave
|
||||
sip_hex = "0x603"
|
||||
sip_value = f"For Hackintoshes, please set csr-active-config to '03060000' ({sip_hex})\nFor non-OpenCore Macs, please run 'csrutil disable' in RecoveryOS"
|
||||
return (sip, sip_value, sip_hex)
|
||||
|
||||
|
||||
def _check_uhci_ohci(self):
|
||||
"""
|
||||
Query whether host has UHCI/OHCI controllers, and requires USB 1.1 patches
|
||||
|
||||
Returns:
|
||||
bool: True if UHCI/OHCI patches required, False otherwise
|
||||
"""
|
||||
|
||||
if self.os_major < os_data.os_data.ventura:
|
||||
return False
|
||||
|
||||
# If we're on a hackintosh, check for UHCI/OHCI controllers
|
||||
if self.constants.host_is_hackintosh is True:
|
||||
for controller in self.constants.computer.usb_controllers:
|
||||
if (
|
||||
isinstance(controller, device_probe.UHCIController) or
|
||||
isinstance(controller, device_probe.OHCIController)
|
||||
):
|
||||
return True
|
||||
return False
|
||||
|
||||
if self.model not in smbios_data.smbios_dictionary:
|
||||
return False
|
||||
|
||||
# If we're on a Mac, check for Penryn or older
|
||||
# This is due to Apple implementing an internal USB hub on post-Penryn (excluding MacPro4,1, MacPro5,1 and Xserve3,1)
|
||||
# Ref: https://techcommunity.microsoft.com/t5/microsoft-usb-blog/reasons-to-avoid-companion-controllers/ba-p/270710
|
||||
if (
|
||||
smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.CPUGen.penryn.value or \
|
||||
self.model in ["MacPro4,1", "MacPro5,1", "Xserve3,1"]
|
||||
):
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
|
||||
# Entry point for patch set detection
|
||||
def detect_patch_set(self):
|
||||
"""
|
||||
Query patch sets required for host
|
||||
|
||||
Returns:
|
||||
dict: Dictionary of patch sets
|
||||
"""
|
||||
|
||||
self.has_network = network_handler.NetworkUtilities().verify_network_connection()
|
||||
|
||||
if self.os_major >= os_data.os_data.sonoma:
|
||||
self.legacy_pcie_webcam = self.constants.computer.pcie_webcam
|
||||
self.legacy_t1_chip = self.constants.computer.t1_chip
|
||||
|
||||
if self.legacy_t1_chip is True:
|
||||
self.amfi_must_disable = True
|
||||
|
||||
if self._check_uhci_ohci() is True:
|
||||
self.legacy_uhci_ohci = True
|
||||
self.requires_root_kc = True
|
||||
|
||||
if self.model in model_array.LegacyBrightness:
|
||||
if self.os_major > os_data.os_data.catalina:
|
||||
self.brightness_legacy = True
|
||||
|
||||
if self.model in ["iMac7,1", "iMac8,1"] or (self.model in model_array.LegacyAudio and utilities.check_kext_loaded("as.vit9696.AppleALC") is False):
|
||||
# Special hack for systems with botched GOPs
|
||||
# TL;DR: No Boot Screen breaks Lilu, therefore breaking audio
|
||||
if self.os_major > os_data.os_data.catalina:
|
||||
self.legacy_audio = True
|
||||
|
||||
if (
|
||||
isinstance(self.constants.computer.wifi, device_probe.Broadcom)
|
||||
and self.constants.computer.wifi.chipset in [device_probe.Broadcom.Chipsets.AirPortBrcm4331, device_probe.Broadcom.Chipsets.AirPortBrcm43224]
|
||||
) or (isinstance(self.constants.computer.wifi, device_probe.Atheros) and self.constants.computer.wifi.chipset == device_probe.Atheros.Chipsets.AirPortAtheros40):
|
||||
if self.os_major > os_data.os_data.big_sur:
|
||||
self.legacy_wifi = True
|
||||
if self.os_major >= os_data.os_data.ventura:
|
||||
# Due to extracted frameworks for IO80211.framework and co, check library validation
|
||||
self.amfi_must_disable = True
|
||||
if self.os_major > os_data.os_data.ventura:
|
||||
self.amfi_shim_bins = True
|
||||
|
||||
if (
|
||||
isinstance(self.constants.computer.wifi, device_probe.Broadcom)
|
||||
and self.constants.computer.wifi.chipset in [
|
||||
device_probe.Broadcom.Chipsets.AirPortBrcm4360,
|
||||
device_probe.Broadcom.Chipsets.AirportBrcmNIC,
|
||||
# We don't officially support this chipset, however we'll throw a bone to hackintosh users
|
||||
device_probe.Broadcom.Chipsets.AirPortBrcmNICThirdParty,
|
||||
]):
|
||||
if self.os_major > os_data.os_data.ventura:
|
||||
self.modern_wifi = True
|
||||
self.amfi_shim_bins = True
|
||||
|
||||
# if self.model in ["MacBookPro5,1", "MacBookPro5,2", "MacBookPro5,3", "MacBookPro8,2", "MacBookPro8,3"]:
|
||||
if self.model in ["MacBookPro8,2", "MacBookPro8,3"]:
|
||||
# Sierra uses a legacy GMUX control method needed for dGPU switching on MacBookPro5,x
|
||||
# Same method is also used for demuxed machines
|
||||
# Note that MacBookPro5,x machines are extremely unstable with this patch set, so disabled until investigated further
|
||||
# Ref: https://github.com/dortania/OpenCore-Legacy-Patcher/files/7360909/KP-b10-030.txt
|
||||
if self.os_major > os_data.os_data.high_sierra:
|
||||
if self.model in ["MacBookPro8,2", "MacBookPro8,3"]:
|
||||
# Ref: https://doslabelectronics.com/Demux.html
|
||||
if self._detect_demux() is True:
|
||||
self.legacy_gmux = True
|
||||
else:
|
||||
self.legacy_gmux = True
|
||||
|
||||
self._detect_gpus()
|
||||
# This must be performed last, as it may override previous decisions
|
||||
# Namely, whether we allow patches requiring KDKs
|
||||
self._check_networking_support()
|
||||
|
||||
self.root_patch_dict = {
|
||||
"Graphics: Nvidia Tesla": self.nvidia_tesla,
|
||||
"Graphics: Nvidia Kepler": self.kepler_gpu,
|
||||
"Graphics: Nvidia Web Drivers": self.nvidia_web,
|
||||
"Graphics: AMD TeraScale 1": self.amd_ts1,
|
||||
"Graphics: AMD TeraScale 2": self.amd_ts2,
|
||||
"Graphics: AMD Legacy GCN": self.legacy_gcn,
|
||||
"Graphics: AMD Legacy GCN (2017)": self.legacy_gcn_v2,
|
||||
"Graphics: AMD Legacy Polaris": self.legacy_polaris,
|
||||
"Graphics: AMD Legacy Vega": self.legacy_vega,
|
||||
"Graphics: Intel Ironlake": self.iron_gpu,
|
||||
"Graphics: Intel Sandy Bridge": self.sandy_gpu,
|
||||
"Graphics: Intel Ivy Bridge": self.ivy_gpu,
|
||||
"Graphics: Intel Haswell": self.haswell_gpu,
|
||||
"Graphics: Intel Broadwell": self.broadwell_gpu,
|
||||
"Graphics: Intel Skylake": self.skylake_gpu,
|
||||
"Brightness: Legacy Backlight Control": self.brightness_legacy,
|
||||
"Audio: Legacy Realtek": self.legacy_audio,
|
||||
"Networking: Legacy Wireless": self.legacy_wifi,
|
||||
"Networking: Modern Wireless": self.modern_wifi,
|
||||
"Miscellaneous: Legacy GMUX": self.legacy_gmux,
|
||||
"Miscellaneous: Legacy Keyboard Backlight": self.legacy_keyboard_backlight,
|
||||
"Miscellaneous: Legacy USB 1.1": self.legacy_uhci_ohci,
|
||||
"Miscellaneous: PCIe FaceTime Camera": self.legacy_pcie_webcam,
|
||||
"Miscellaneous: T1 Security Chip": self.legacy_t1_chip,
|
||||
"Settings: Requires AMFI exemption": self.amfi_must_disable,
|
||||
"Settings: Supports Auxiliary Cache": not self.requires_root_kc,
|
||||
"Settings: Kernel Debug Kit missing": self.missing_kdk if self.os_major >= os_data.os_data.ventura.value else False,
|
||||
"Validation: Patching Possible": self.verify_patch_allowed(),
|
||||
"Validation: Unpatching Possible": self._verify_unpatch_allowed(),
|
||||
f"Validation: Unsupported Host OS": self.unsupported_os,
|
||||
f"Validation: SIP is enabled (Required: {self._check_sip()[2]} or higher)": self.sip_enabled,
|
||||
f"Validation: Currently Booted SIP: ({hex(py_sip_xnu.SipXnu().get_sip_status().value)})": self.sip_enabled,
|
||||
"Validation: SecureBootModel is enabled": self.sbm_enabled,
|
||||
f"Validation: {'AMFI' if self.constants.host_is_hackintosh is True or self._get_amfi_level_needed() > 2 else 'Library Validation'} is enabled": self.amfi_enabled if self.amfi_must_disable is True else False,
|
||||
"Validation: FileVault is enabled": self.fv_enabled,
|
||||
"Validation: System is dosdude1 patched": self.dosdude_patched,
|
||||
"Validation: WhateverGreen.kext missing": self.missing_whatever_green if self.nvidia_web is True else False,
|
||||
"Validation: Force OpenGL property missing": self.missing_nv_web_opengl if self.nvidia_web is True else False,
|
||||
"Validation: Force compat property missing": self.missing_nv_compat if self.nvidia_web is True else False,
|
||||
"Validation: nvda_drv(_vrl) variable missing": self.missing_nv_web_nvram if self.nvidia_web is True else False,
|
||||
"Validation: Network Connection Required": (not self.has_network) if (self.requires_root_kc and self.missing_kdk and self.os_major >= os_data.os_data.ventura.value) else False,
|
||||
}
|
||||
|
||||
return self.root_patch_dict
|
||||
|
||||
|
||||
def _get_amfi_level_needed(self):
|
||||
"""
|
||||
Query the AMFI level needed for the patcher to work
|
||||
|
||||
Returns:
|
||||
int: AMFI level needed
|
||||
"""
|
||||
|
||||
if self.amfi_must_disable is False:
|
||||
return amfi_detect.AmfiConfigDetectLevel.NO_CHECK
|
||||
|
||||
if self.os_major < os_data.os_data.big_sur:
|
||||
return amfi_detect.AmfiConfigDetectLevel.NO_CHECK
|
||||
|
||||
amfipass_version = utilities.check_kext_loaded("com.dhinakg.AMFIPass")
|
||||
if amfipass_version:
|
||||
if packaging.version.parse(amfipass_version) >= packaging.version.parse(self.constants.amfipass_compatibility_version):
|
||||
# If AMFIPass is loaded, our binaries will work
|
||||
return amfi_detect.AmfiConfigDetectLevel.NO_CHECK
|
||||
|
||||
if self.os_major >= os_data.os_data.ventura:
|
||||
if self.amfi_shim_bins is True:
|
||||
# Currently we require AMFI outright disabled
|
||||
# in Ventura to work with shim'd binaries
|
||||
return amfi_detect.AmfiConfigDetectLevel.ALLOW_ALL
|
||||
|
||||
return amfi_detect.AmfiConfigDetectLevel.LIBRARY_VALIDATION
|
||||
|
||||
|
||||
def verify_patch_allowed(self, print_errors: bool = False):
|
||||
"""
|
||||
Validate that the patcher can be run
|
||||
|
||||
Parameters:
|
||||
print_errors (bool): Print errors to console
|
||||
|
||||
Returns:
|
||||
bool: True if patching is allowed, False otherwise
|
||||
"""
|
||||
|
||||
sip_dict = self._check_sip()
|
||||
sip = sip_dict[0]
|
||||
sip_value = sip_dict[1]
|
||||
|
||||
self.sip_enabled, self.sbm_enabled, self.fv_enabled, self.dosdude_patched = utilities.patching_status(sip, self.os_major)
|
||||
self.amfi_enabled = not amfi_detect.AmfiConfigurationDetection().check_config(self._get_amfi_level_needed())
|
||||
|
||||
self.unsupported_os = not self._check_os_compat()
|
||||
|
||||
if self.nvidia_web is True:
|
||||
self.missing_nv_web_nvram = not self._check_nv_web_nvram()
|
||||
self.missing_nv_web_opengl = not self._check_nv_web_opengl()
|
||||
self.missing_nv_compat = not self._check_nv_compat()
|
||||
self.missing_whatever_green = not self._check_whatevergreen()
|
||||
|
||||
if print_errors is True:
|
||||
if self.sip_enabled is True:
|
||||
logging.info("\nCannot patch! Please disable System Integrity Protection (SIP).")
|
||||
logging.info("Disable SIP in Patcher Settings and Rebuild OpenCore\n")
|
||||
logging.info("Ensure the following bits are set for csr-active-config:")
|
||||
logging.info("\n".join(sip))
|
||||
logging.info(sip_value)
|
||||
|
||||
if self.sbm_enabled is True:
|
||||
logging.info("\nCannot patch! Please disable Apple Secure Boot.")
|
||||
logging.info("Disable SecureBootModel in Patcher Settings and Rebuild OpenCore")
|
||||
logging.info("For Hackintoshes, set SecureBootModel to Disabled")
|
||||
|
||||
if self.fv_enabled is True:
|
||||
logging.info("\nCannot patch! Please disable FileVault.")
|
||||
logging.info("For OCLP Macs, please rebuild your config with 0.2.5 or newer")
|
||||
logging.info("For others, Go to System Preferences -> Security and disable FileVault")
|
||||
|
||||
if self.amfi_enabled is True and self.amfi_must_disable is True:
|
||||
logging.info("\nCannot patch! Please disable AMFI.")
|
||||
logging.info("For Hackintoshes, please add amfi_get_out_of_my_way=1 to boot-args")
|
||||
|
||||
if self.dosdude_patched is True:
|
||||
logging.info("\nCannot patch! Detected machine has already been patched by another patcher")
|
||||
logging.info("Please ensure your install is either clean or patched with OpenCore Legacy Patcher")
|
||||
|
||||
if self.nvidia_web is True:
|
||||
if self.missing_nv_web_opengl is True:
|
||||
logging.info("\nCannot patch! Force OpenGL property missing")
|
||||
logging.info("Please ensure ngfxgl=1 is set in boot-args")
|
||||
|
||||
if self.missing_nv_compat is True:
|
||||
logging.info("\nCannot patch! Force Nvidia compatibility property missing")
|
||||
logging.info("Please ensure ngfxcompat=1 is set in boot-args")
|
||||
|
||||
if self.missing_nv_web_nvram is True:
|
||||
logging.info("\nCannot patch! nvda_drv(_vrl) variable missing")
|
||||
logging.info("Please ensure nvda_drv_vrl=1 is set in boot-args")
|
||||
|
||||
if self.missing_whatever_green is True:
|
||||
logging.info("\nCannot patch! WhateverGreen.kext missing")
|
||||
logging.info("Please ensure WhateverGreen.kext is installed")
|
||||
|
||||
if (not self.has_network) if (self.requires_root_kc and self.missing_kdk and self.os_major >= os_data.os_data.ventura.value) else False:
|
||||
logging.info("\nCannot patch! Network Connection Required")
|
||||
logging.info("Please ensure you have an active internet connection")
|
||||
|
||||
if self.unsupported_os is True:
|
||||
logging.info("\nCannot patch! Unsupported Host OS")
|
||||
logging.info("Please ensure you are running a patcher-supported OS")
|
||||
|
||||
if any(
|
||||
[
|
||||
# General patch checks
|
||||
self.sip_enabled, self.sbm_enabled, self.fv_enabled, self.dosdude_patched, self.unsupported_os,
|
||||
|
||||
# non-Metal specific
|
||||
self.amfi_enabled if self.amfi_must_disable is True else False,
|
||||
|
||||
# Web Driver specific
|
||||
self.missing_nv_web_nvram if self.nvidia_web is True else False,
|
||||
self.missing_nv_web_opengl if self.nvidia_web is True else False,
|
||||
self.missing_nv_compat if self.nvidia_web is True else False,
|
||||
self.missing_whatever_green if self.nvidia_web is True else False,
|
||||
|
||||
# KDK specific
|
||||
(not self.has_network) if (self.requires_root_kc and self.missing_kdk and self.os_major >= os_data.os_data.ventura.value) else False
|
||||
]
|
||||
):
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
|
||||
def _verify_unpatch_allowed(self):
|
||||
"""
|
||||
Validate that the unpatcher can be run
|
||||
|
||||
Preconditions:
|
||||
Must be called after verify_patch_allowed()
|
||||
|
||||
Returns:
|
||||
bool: True if unpatching is allowed, False otherwise
|
||||
"""
|
||||
|
||||
return not self.sip_enabled
|
||||
@@ -1,212 +0,0 @@
|
||||
"""
|
||||
generate.py: Class for generating patch sets for the current host
|
||||
"""
|
||||
|
||||
import logging
|
||||
|
||||
from ... import constants
|
||||
|
||||
from ...datasets import sys_patch_dict
|
||||
from ...support import utilities
|
||||
from ...detections import device_probe
|
||||
|
||||
|
||||
class GenerateRootPatchSets:
|
||||
"""
|
||||
Library for generating patch sets for the current host
|
||||
|
||||
Parameters:
|
||||
model (str): Model identifier
|
||||
global_constants (constants.Constants): Global constants object
|
||||
hardware_details (dict): Dictionary of hardware details generated by detect_patch_set()
|
||||
|
||||
Usage:
|
||||
>>> from resources.sys_patch import sys_patch_generate
|
||||
>>> patchset = sys_patch_generate.GenerateRootPatches("iMac7,1", self.constants, self.hardware_details).patchset
|
||||
|
||||
"""
|
||||
|
||||
def __init__(self, model: str, global_constants: constants.Constants, hardware_details: dict) -> None:
|
||||
self.model: str = model
|
||||
self.constants: constants.Constants = global_constants
|
||||
self.hardware_details: dict = hardware_details
|
||||
|
||||
self.patchset: dict = self._generate_patchset()
|
||||
|
||||
|
||||
def _generate_patchset(self) -> dict:
|
||||
"""
|
||||
Generate Patchset dictionary for the current system
|
||||
|
||||
Returns:
|
||||
dict: Dictionary of patches to be applied from sys_patch_dict.py
|
||||
"""
|
||||
|
||||
all_hardware_patchset: dict = sys_patch_dict.SystemPatchDictionary(self.constants.detected_os, self.constants.detected_os_minor, self.constants.legacy_accel_support, self.constants.detected_os_version).patchset_dict
|
||||
required_patches: dict = {}
|
||||
|
||||
utilities.cls()
|
||||
|
||||
logging.info("The following patches will be applied:")
|
||||
|
||||
if self.hardware_details["Graphics: Intel Ironlake"] is True:
|
||||
required_patches.update({"Non-Metal Common": all_hardware_patchset["Graphics"]["Non-Metal Common"]})
|
||||
required_patches.update({"WebKit Monterey Common": all_hardware_patchset["Graphics"]["WebKit Monterey Common"]})
|
||||
required_patches.update({"Intel Ironlake": all_hardware_patchset["Graphics"]["Intel Ironlake"]})
|
||||
|
||||
if self.hardware_details["Graphics: Intel Sandy Bridge"] is True:
|
||||
required_patches.update({"Non-Metal Common": all_hardware_patchset["Graphics"]["Non-Metal Common"]})
|
||||
required_patches.update({"High Sierra GVA": all_hardware_patchset["Graphics"]["High Sierra GVA"]})
|
||||
required_patches.update({"WebKit Monterey Common": all_hardware_patchset["Graphics"]["WebKit Monterey Common"]})
|
||||
required_patches.update({"Intel Sandy Bridge": all_hardware_patchset["Graphics"]["Intel Sandy Bridge"]})
|
||||
# Patchset breaks Display Profiles, don't install if primary GPU is AMD. Give users option to disable patch in settings to restore Display Profiles
|
||||
if self.constants.computer.real_model not in ["Macmini5,2", "iMac12,1", "iMac12,2"]:
|
||||
required_patches.update({"Revert Non-Metal ColorSync Workaround": all_hardware_patchset["Graphics"]["Revert Non-Metal ColorSync Workaround"]})
|
||||
|
||||
if self.hardware_details["Graphics: Intel Ivy Bridge"] is True:
|
||||
required_patches.update({"Metal 3802 Common": all_hardware_patchset["Graphics"]["Metal 3802 Common"]})
|
||||
required_patches.update({"Metal 3802 Common Extended": all_hardware_patchset["Graphics"]["Metal 3802 Common Extended"]})
|
||||
required_patches.update({"Catalina GVA": all_hardware_patchset["Graphics"]["Catalina GVA"]})
|
||||
required_patches.update({"Monterey OpenCL": all_hardware_patchset["Graphics"]["Monterey OpenCL"]})
|
||||
required_patches.update({"Big Sur OpenCL": all_hardware_patchset["Graphics"]["Big Sur OpenCL"]})
|
||||
required_patches.update({"WebKit Monterey Common": all_hardware_patchset["Graphics"]["WebKit Monterey Common"]})
|
||||
required_patches.update({"Intel Ivy Bridge": all_hardware_patchset["Graphics"]["Intel Ivy Bridge"]})
|
||||
|
||||
if self.hardware_details["Graphics: Intel Haswell"] is True:
|
||||
required_patches.update({"Metal 3802 Common": all_hardware_patchset["Graphics"]["Metal 3802 Common"]})
|
||||
required_patches.update({"Metal 3802 Common Extended": all_hardware_patchset["Graphics"]["Metal 3802 Common Extended"]})
|
||||
required_patches.update({"Monterey GVA": all_hardware_patchset["Graphics"]["Monterey GVA"]})
|
||||
required_patches.update({"Monterey OpenCL": all_hardware_patchset["Graphics"]["Monterey OpenCL"]})
|
||||
required_patches.update({"Intel Haswell": all_hardware_patchset["Graphics"]["Intel Haswell"]})
|
||||
|
||||
if self.hardware_details["Graphics: Intel Broadwell"] is True:
|
||||
required_patches.update({"Monterey GVA": all_hardware_patchset["Graphics"]["Monterey GVA"]})
|
||||
required_patches.update({"Monterey OpenCL": all_hardware_patchset["Graphics"]["Monterey OpenCL"]})
|
||||
required_patches.update({"Intel Broadwell": all_hardware_patchset["Graphics"]["Intel Broadwell"]})
|
||||
|
||||
if self.hardware_details["Graphics: Intel Skylake"] is True:
|
||||
required_patches.update({"Revert GVA Downgrade": all_hardware_patchset["Graphics"]["Revert GVA Downgrade"]})
|
||||
required_patches.update({"Monterey OpenCL": all_hardware_patchset["Graphics"]["Monterey OpenCL"]})
|
||||
required_patches.update({"Intel Skylake": all_hardware_patchset["Graphics"]["Intel Skylake"]})
|
||||
|
||||
if self.hardware_details["Graphics: Nvidia Tesla"] is True:
|
||||
required_patches.update({"Non-Metal Common": all_hardware_patchset["Graphics"]["Non-Metal Common"]})
|
||||
required_patches.update({"WebKit Monterey Common": all_hardware_patchset["Graphics"]["WebKit Monterey Common"]})
|
||||
required_patches.update({"Nvidia Tesla": all_hardware_patchset["Graphics"]["Nvidia Tesla"]})
|
||||
|
||||
if self.hardware_details["Graphics: Nvidia Web Drivers"] is True:
|
||||
required_patches.update({"Non-Metal Common": all_hardware_patchset["Graphics"]["Non-Metal Common"]})
|
||||
required_patches.update({"Non-Metal IOAccelerator Common": all_hardware_patchset["Graphics"]["Non-Metal IOAccelerator Common"]})
|
||||
required_patches.update({"Non-Metal CoreDisplay Common": all_hardware_patchset["Graphics"]["Non-Metal CoreDisplay Common"]})
|
||||
required_patches.update({"WebKit Monterey Common": all_hardware_patchset["Graphics"]["WebKit Monterey Common"]})
|
||||
required_patches.update({"Nvidia Web Drivers": all_hardware_patchset["Graphics"]["Nvidia Web Drivers"]})
|
||||
required_patches.update({"Non-Metal Enforcement": all_hardware_patchset["Graphics"]["Non-Metal Enforcement"]})
|
||||
|
||||
if self.hardware_details["Graphics: Nvidia Kepler"] is True:
|
||||
required_patches.update({"Metal 3802 Common": all_hardware_patchset["Graphics"]["Metal 3802 Common"]})
|
||||
required_patches.update({"Metal 3802 Common Extended": all_hardware_patchset["Graphics"]["Metal 3802 Common Extended"]})
|
||||
required_patches.update({"Catalina GVA": all_hardware_patchset["Graphics"]["Catalina GVA"]})
|
||||
required_patches.update({"Monterey OpenCL": all_hardware_patchset["Graphics"]["Monterey OpenCL"]})
|
||||
required_patches.update({"Big Sur OpenCL": all_hardware_patchset["Graphics"]["Big Sur OpenCL"]})
|
||||
required_patches.update({"WebKit Monterey Common": all_hardware_patchset["Graphics"]["WebKit Monterey Common"]})
|
||||
required_patches.update({"Nvidia Kepler": all_hardware_patchset["Graphics"]["Nvidia Kepler"]})
|
||||
for gpu in self.constants.computer.gpus:
|
||||
# Handle mixed GPU situations (ie. MacBookPro11,3: Haswell iGPU + Kepler dGPU)
|
||||
if gpu.arch == device_probe.Intel.Archs.Haswell:
|
||||
if "Catalina GVA" in required_patches:
|
||||
del(required_patches["Catalina GVA"])
|
||||
break
|
||||
|
||||
if self.hardware_details["Graphics: AMD TeraScale 1"] is True:
|
||||
required_patches.update({"Non-Metal Common": all_hardware_patchset["Graphics"]["Non-Metal Common"]})
|
||||
required_patches.update({"WebKit Monterey Common": all_hardware_patchset["Graphics"]["WebKit Monterey Common"]})
|
||||
required_patches.update({"AMD TeraScale Common": all_hardware_patchset["Graphics"]["AMD TeraScale Common"]})
|
||||
required_patches.update({"AMD TeraScale 1": all_hardware_patchset["Graphics"]["AMD TeraScale 1"]})
|
||||
|
||||
if self.hardware_details["Graphics: AMD TeraScale 2"] is True:
|
||||
required_patches.update({"Non-Metal Common": all_hardware_patchset["Graphics"]["Non-Metal Common"]})
|
||||
required_patches.update({"Non-Metal IOAccelerator Common": all_hardware_patchset["Graphics"]["Non-Metal IOAccelerator Common"]})
|
||||
required_patches.update({"WebKit Monterey Common": all_hardware_patchset["Graphics"]["WebKit Monterey Common"]})
|
||||
required_patches.update({"AMD TeraScale Common": all_hardware_patchset["Graphics"]["AMD TeraScale Common"]})
|
||||
required_patches.update({"AMD TeraScale 2": all_hardware_patchset["Graphics"]["AMD TeraScale 2"]})
|
||||
if self.constants.allow_ts2_accel is False or self.constants.detected_os not in self.constants.legacy_accel_support:
|
||||
# TeraScale 2 MacBooks with faulty GPUs are highly prone to crashing with AMDRadeonX3000 attached
|
||||
# Additionally, AMDRadeonX3000 requires IOAccelerator downgrade which is not installed without 'Non-Metal IOAccelerator Common'
|
||||
del(required_patches["AMD TeraScale 2"]["Install"]["/System/Library/Extensions"]["AMDRadeonX3000.kext"])
|
||||
|
||||
if self.hardware_details["Graphics: AMD Legacy GCN"] is True or self.hardware_details["Graphics: AMD Legacy Polaris"] is True:
|
||||
if self.hardware_details["Graphics: Intel Skylake"] is False:
|
||||
# GVA downgrade not required if Skylake is present
|
||||
required_patches.update({"Monterey GVA": all_hardware_patchset["Graphics"]["Monterey GVA"]})
|
||||
required_patches.update({"Monterey OpenCL": all_hardware_patchset["Graphics"]["Monterey OpenCL"]})
|
||||
if self.hardware_details["Graphics: AMD Legacy GCN"] is True:
|
||||
required_patches.update({"AMD Legacy GCN": all_hardware_patchset["Graphics"]["AMD Legacy GCN"]})
|
||||
else:
|
||||
required_patches.update({"AMD Legacy Polaris": all_hardware_patchset["Graphics"]["AMD Legacy Polaris"]})
|
||||
required_patches.update({"Revert GVA Downgrade": all_hardware_patchset["Graphics"]["Revert GVA Downgrade"]})
|
||||
if "AVX2" not in self.constants.computer.cpu.leafs:
|
||||
required_patches.update({"AMD OpenCL": all_hardware_patchset["Graphics"]["AMD OpenCL"]})
|
||||
if self.hardware_details["Graphics: AMD Legacy GCN (2017)"] is True:
|
||||
required_patches.update({"AMD Legacy GCN v2": all_hardware_patchset["Graphics"]["AMD Legacy GCN v2"]})
|
||||
|
||||
if self.hardware_details["Graphics: AMD Legacy Vega"] is True:
|
||||
required_patches.update({"Monterey GVA": all_hardware_patchset["Graphics"]["Monterey GVA"]})
|
||||
required_patches.update({"Monterey OpenCL": all_hardware_patchset["Graphics"]["Monterey OpenCL"]})
|
||||
required_patches.update({"AMD Legacy Vega": all_hardware_patchset["Graphics"]["AMD Legacy Vega"]})
|
||||
required_patches.update({"AMD OpenCL": all_hardware_patchset["Graphics"]["AMD OpenCL"]})
|
||||
if self.hardware_details["Graphics: AMD Legacy GCN"] is True:
|
||||
required_patches.update({"AMD Legacy Vega Extended": all_hardware_patchset["Graphics"]["AMD Legacy Vega Extended"]})
|
||||
else:
|
||||
required_patches.update({"Revert GVA Downgrade": all_hardware_patchset["Graphics"]["Revert GVA Downgrade"]})
|
||||
|
||||
if self.hardware_details["Brightness: Legacy Backlight Control"] is True:
|
||||
required_patches.update({"Legacy Backlight Control": all_hardware_patchset["Brightness"]["Legacy Backlight Control"]})
|
||||
|
||||
if self.hardware_details["Audio: Legacy Realtek"] is True:
|
||||
if self.model in ["iMac7,1", "iMac8,1"]:
|
||||
required_patches.update({"Legacy Realtek": all_hardware_patchset["Audio"]["Legacy Realtek"]})
|
||||
else:
|
||||
required_patches.update({"Legacy Non-GOP": all_hardware_patchset["Audio"]["Legacy Non-GOP"]})
|
||||
|
||||
if self.hardware_details["Networking: Legacy Wireless"] is True:
|
||||
required_patches.update({"Legacy Wireless": all_hardware_patchset["Networking"]["Legacy Wireless"]})
|
||||
required_patches.update({"Legacy Wireless Extended": all_hardware_patchset["Networking"]["Legacy Wireless Extended"]})
|
||||
|
||||
if self.hardware_details["Networking: Modern Wireless"] is True:
|
||||
required_patches.update({"Legacy Wireless": all_hardware_patchset["Networking"]["Modern Wireless"]})
|
||||
|
||||
if self.hardware_details["Miscellaneous: Legacy GMUX"] is True:
|
||||
required_patches.update({"Legacy GMUX": all_hardware_patchset["Miscellaneous"]["Legacy GMUX"]})
|
||||
|
||||
if self.hardware_details["Miscellaneous: Legacy Keyboard Backlight"] is True:
|
||||
required_patches.update({"Legacy Keyboard Backlight": all_hardware_patchset["Miscellaneous"]["Legacy Keyboard Backlight"]})
|
||||
|
||||
if self.hardware_details["Miscellaneous: Legacy USB 1.1"] is True:
|
||||
required_patches.update({"Legacy USB 1.1": all_hardware_patchset["Miscellaneous"]["Legacy USB 1.1"]})
|
||||
required_patches.update({"Legacy USB 1.1 Extended": all_hardware_patchset["Miscellaneous"]["Legacy USB 1.1 Extended"]})
|
||||
|
||||
if self.hardware_details["Miscellaneous: PCIe FaceTime Camera"] is True:
|
||||
required_patches.update({"PCIe FaceTime Camera": all_hardware_patchset["Miscellaneous"]["PCIe FaceTime Camera"]})
|
||||
|
||||
if self.hardware_details["Miscellaneous: T1 Security Chip"] is True:
|
||||
required_patches.update({"T1 Security Chip": all_hardware_patchset["Miscellaneous"]["T1 Security Chip"]})
|
||||
|
||||
if required_patches:
|
||||
host_os_float = float(f"{self.constants.detected_os}.{self.constants.detected_os_minor}")
|
||||
|
||||
# Prioritize Monterey GVA patches
|
||||
if "Catalina GVA" in required_patches and "Monterey GVA" in required_patches:
|
||||
del(required_patches["Catalina GVA"])
|
||||
|
||||
for patch_name in list(required_patches):
|
||||
patch_os_min_float = float(f'{required_patches[patch_name]["OS Support"]["Minimum OS Support"]["OS Major"]}.{required_patches[patch_name]["OS Support"]["Minimum OS Support"]["OS Minor"]}')
|
||||
patch_os_max_float = float(f'{required_patches[patch_name]["OS Support"]["Maximum OS Support"]["OS Major"]}.{required_patches[patch_name]["OS Support"]["Maximum OS Support"]["OS Minor"]}')
|
||||
if (host_os_float < patch_os_min_float or host_os_float > patch_os_max_float):
|
||||
del(required_patches[patch_name])
|
||||
else:
|
||||
if required_patches[patch_name]["Display Name"]:
|
||||
logging.info(f"- {required_patches[patch_name]['Display Name']}")
|
||||
else:
|
||||
logging.info("- No patch sets found for booted model")
|
||||
|
||||
return required_patches
|
||||
@@ -40,7 +40,7 @@ class AuxiliaryKernelCollection(BaseKernelCache):
|
||||
collection to be used.
|
||||
"""
|
||||
|
||||
print("- Forcing Auxiliary Kernel Collection usage")
|
||||
logging.info("- Forcing Auxiliary Kernel Collection usage")
|
||||
result = subprocess_wrapper.run_as_root(["/usr/bin/killall", "syspolicyd", "kernelmanagerd"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
if result.returncode != 0:
|
||||
logging.info("- Unable to kill syspolicyd and kernelmanagerd")
|
||||
|
||||
@@ -8,6 +8,8 @@ import plistlib
|
||||
from pathlib import Path
|
||||
from datetime import datetime
|
||||
|
||||
from ...patchsets import PatchType
|
||||
|
||||
from ....datasets import os_data
|
||||
from ....support import subprocess_wrapper
|
||||
|
||||
@@ -126,7 +128,7 @@ class KernelCacheSupport:
|
||||
for key in oclp_plist_data:
|
||||
if isinstance(oclp_plist_data[key], (bool, int)):
|
||||
continue
|
||||
for install_type in ["Install", "Install Non-Root"]:
|
||||
for install_type in [PatchType.OVERWRITE_SYSTEM_VOLUME, PatchType.OVERWRITE_DATA_VOLUME, PatchType.MERGE_SYSTEM_VOLUME, PatchType.MERGE_DATA_VOLUME]:
|
||||
if install_type not in oclp_plist_data[key]:
|
||||
continue
|
||||
for location in oclp_plist_data[key][install_type]:
|
||||
|
||||
6
opencore_legacy_patcher/sys_patch/patchsets/__init__.py
Normal file
@@ -0,0 +1,6 @@
|
||||
"""
|
||||
patchsets module
|
||||
"""
|
||||
|
||||
from .base import PatchType, DynamicPatchset
|
||||
from .detect import HardwarePatchsetDetection, HardwarePatchsetSettings, HardwarePatchsetValidation
|
||||
35
opencore_legacy_patcher/sys_patch/patchsets/base.py
Normal file
@@ -0,0 +1,35 @@
|
||||
"""
|
||||
base.py: Base class for all patch sets
|
||||
"""
|
||||
|
||||
from enum import StrEnum
|
||||
|
||||
|
||||
class PatchType(StrEnum):
|
||||
"""
|
||||
Type of patch
|
||||
"""
|
||||
OVERWRITE_SYSTEM_VOLUME = "Overwrite System Volume"
|
||||
OVERWRITE_DATA_VOLUME = "Overwrite Data Volume"
|
||||
MERGE_SYSTEM_VOLUME = "Merge System Volume"
|
||||
MERGE_DATA_VOLUME = "Merge Data Volume"
|
||||
REMOVE_SYSTEM_VOLUME = "Remove System Volume"
|
||||
REMOVE_DATA_VOLUME = "Remove Data Volume"
|
||||
EXECUTE = "Execute"
|
||||
|
||||
|
||||
class DynamicPatchset(StrEnum):
|
||||
MetallibSupportPkg = "MetallibSupportPkg"
|
||||
|
||||
|
||||
class BasePatchset:
|
||||
|
||||
def __init__(self) -> None:
|
||||
# XNU Kernel versions
|
||||
self.macOS_12_0_B7: float = 21.1
|
||||
self.macOS_12_4: float = 21.5
|
||||
self.macOS_12_5: float = 21.6
|
||||
self.macOS_13_3: float = 22.4
|
||||
self.macOS_14_1: float = 23.1
|
||||
self.macOS_14_2: float = 23.2
|
||||
self.macOS_14_4: float = 23.4
|
||||
549
opencore_legacy_patcher/sys_patch/patchsets/detect.py
Normal file
@@ -0,0 +1,549 @@
|
||||
"""
|
||||
detect.py: Detects patches for a given system
|
||||
"""
|
||||
|
||||
import logging
|
||||
import plistlib
|
||||
import subprocess
|
||||
import py_sip_xnu
|
||||
import packaging.version
|
||||
|
||||
from enum import StrEnum
|
||||
from pathlib import Path
|
||||
from functools import cache
|
||||
|
||||
from .hardware.base import BaseHardware, HardwareVariantGraphicsSubclass
|
||||
|
||||
from .hardware.graphics import (
|
||||
intel_iron_lake,
|
||||
intel_sandy_bridge,
|
||||
intel_ivy_bridge,
|
||||
intel_haswell,
|
||||
intel_broadwell,
|
||||
intel_skylake,
|
||||
|
||||
nvidia_tesla,
|
||||
nvidia_kepler,
|
||||
nvidia_webdriver,
|
||||
|
||||
amd_terascale_1,
|
||||
amd_terascale_2,
|
||||
amd_legacy_gcn,
|
||||
amd_polaris,
|
||||
amd_vega,
|
||||
)
|
||||
from .hardware.networking import (
|
||||
legacy_wireless,
|
||||
modern_wireless,
|
||||
)
|
||||
from .hardware.misc import (
|
||||
display_backlight,
|
||||
gmux,
|
||||
keyboard_backlight,
|
||||
legacy_audio,
|
||||
pcie_webcam,
|
||||
t1_security,
|
||||
usb11,
|
||||
)
|
||||
|
||||
from ... import constants
|
||||
|
||||
from ...datasets import sip_data
|
||||
from ...datasets.os_data import os_data
|
||||
from ...support import (
|
||||
network_handler,
|
||||
utilities,
|
||||
kdk_handler,
|
||||
metallib_handler
|
||||
)
|
||||
from ...detections import (
|
||||
amfi_detect,
|
||||
device_probe
|
||||
)
|
||||
|
||||
|
||||
class HardwarePatchsetSettings(StrEnum):
|
||||
"""
|
||||
Enum for patch settings
|
||||
"""
|
||||
KERNEL_DEBUG_KIT_REQUIRED = "Settings: Kernel Debug Kit required"
|
||||
KERNEL_DEBUG_KIT_MISSING = "Settings: Kernel Debug Kit missing"
|
||||
METALLIB_SUPPORT_PKG_REQUIRED = "Settings: MetallibSupportPkg.pkg required"
|
||||
METALLIB_SUPPORT_PKG_MISSING = "Settings: MetallibSupportPkg.pkg missing"
|
||||
|
||||
|
||||
class HardwarePatchsetValidation(StrEnum):
|
||||
"""
|
||||
Enum for validation settings
|
||||
"""
|
||||
UNSUPPORTED_HOST_OS = "Validation: Unsupported Host OS"
|
||||
MISSING_NETWORK_CONNECTION = "Validation: Missing Network Connection"
|
||||
FILEVAULT_ENABLED = "Validation: FileVault is enabled"
|
||||
SIP_ENABLED = "Validation: System Integrity Protection is enabled"
|
||||
SECURE_BOOT_MODEL_ENABLED = "Validation: SecureBootModel is enabled"
|
||||
AMFI_ENABLED = "Validation: AMFI is enabled"
|
||||
WHATEVERGREEN_MISSING = "Validation: WhateverGreen.kext missing"
|
||||
FORCE_OPENGL_MISSING = "Validation: Force OpenGL property missing"
|
||||
FORCE_COMPAT_MISSING = "Validation: Force compat property missing"
|
||||
NVDA_DRV_MISSING = "Validation: nvda_drv(_vrl) variable missing"
|
||||
PATCHING_NOT_POSSIBLE = "Validation: Patching not possible"
|
||||
UNPATCHING_NOT_POSSIBLE = "Validation: Unpatching not possible"
|
||||
|
||||
|
||||
class HardwarePatchsetDetection:
|
||||
|
||||
def __init__(self, constants: constants.Constants,
|
||||
xnu_major: int = None, xnu_minor: int = None,
|
||||
os_build: str = None, os_version: str = None,
|
||||
validation: bool = False # Whether to run validation checks
|
||||
) -> None:
|
||||
self._constants = constants
|
||||
|
||||
self._xnu_major = xnu_major or self._constants.detected_os
|
||||
self._xnu_minor = xnu_minor or self._constants.detected_os_minor
|
||||
self._os_build = os_build or self._constants.detected_os_build
|
||||
self._os_version = os_version or self._constants.detected_os_version
|
||||
self._validation = validation
|
||||
|
||||
self._hardware_variants = [
|
||||
intel_iron_lake.IntelIronLake,
|
||||
intel_sandy_bridge.IntelSandyBridge,
|
||||
intel_ivy_bridge.IntelIvyBridge,
|
||||
intel_haswell.IntelHaswell,
|
||||
intel_broadwell.IntelBroadwell,
|
||||
intel_skylake.IntelSkylake,
|
||||
|
||||
nvidia_tesla.NvidiaTesla,
|
||||
nvidia_kepler.NvidiaKepler,
|
||||
nvidia_webdriver.NvidiaWebDriver,
|
||||
|
||||
amd_terascale_1.AMDTeraScale1,
|
||||
amd_terascale_2.AMDTeraScale2,
|
||||
amd_legacy_gcn.AMDLegacyGCN,
|
||||
amd_polaris.AMDPolaris,
|
||||
amd_vega.AMDVega,
|
||||
|
||||
legacy_wireless.LegacyWireless,
|
||||
modern_wireless.ModernWireless,
|
||||
|
||||
display_backlight.DisplayBacklight,
|
||||
gmux.GraphicsMultiplexer,
|
||||
keyboard_backlight.KeyboardBacklight,
|
||||
legacy_audio.LegacyAudio,
|
||||
pcie_webcam.PCIeFaceTimeCamera,
|
||||
t1_security.T1SecurityChip,
|
||||
usb11.USB11Controller,
|
||||
]
|
||||
|
||||
self.device_properties = None
|
||||
self.patches = None
|
||||
|
||||
self.can_patch = False
|
||||
self.can_unpatch = False
|
||||
|
||||
self._detect()
|
||||
|
||||
|
||||
def _validation_check_unsupported_host_os(self) -> bool:
|
||||
"""
|
||||
Determine if host OS is unsupported
|
||||
"""
|
||||
_min_os = os_data.big_sur.value
|
||||
_max_os = os_data.sequoia.value
|
||||
if self._dortania_internal_check() is True:
|
||||
return False
|
||||
if self._xnu_major < _min_os or self._xnu_major > _max_os:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
@cache
|
||||
def _validation_check_missing_network_connection(self) -> bool:
|
||||
"""
|
||||
Determine if network connection is present
|
||||
"""
|
||||
return network_handler.NetworkUtilities().verify_network_connection() is False
|
||||
|
||||
|
||||
@cache
|
||||
def _validation_check_filevault_is_enabled(self) -> bool:
|
||||
"""
|
||||
Determine if FileVault is enabled
|
||||
"""
|
||||
# macOS 11.0 introduced a FileVault check for root patching
|
||||
if self._xnu_major < os_data.big_sur.value:
|
||||
return False
|
||||
|
||||
# OpenCore Legacy Patcher exposes whether it patched APFS.kext to allow for FileVault
|
||||
nvram = utilities.get_nvram("OCLP-Settings", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102", decode=True)
|
||||
if nvram:
|
||||
if "-allow_fv" in nvram:
|
||||
return False
|
||||
|
||||
return "FileVault is Off" not in subprocess.run(["/usr/bin/fdesetup", "status"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
|
||||
|
||||
|
||||
def _validation_check_system_integrity_protection_enabled(self, configs: list[str]) -> bool:
|
||||
"""
|
||||
Determine if System Integrity Protection is enabled
|
||||
"""
|
||||
return utilities.csr_decode(configs)
|
||||
|
||||
|
||||
def _validation_check_secure_boot_model_enabled(self) -> bool:
|
||||
"""
|
||||
Determine if SecureBootModel is enabled
|
||||
"""
|
||||
return utilities.check_secure_boot_level()
|
||||
|
||||
|
||||
def _validation_check_amfi_enabled(self, level: amfi_detect.AmfiConfigDetectLevel) -> bool:
|
||||
"""
|
||||
Determine if AMFI is enabled
|
||||
"""
|
||||
return not amfi_detect.AmfiConfigurationDetection().check_config(self._override_amfi_level(level))
|
||||
|
||||
|
||||
def _validation_check_whatevergreen_missing(self) -> bool:
|
||||
"""
|
||||
Determine if WhateverGreen.kext is missing
|
||||
"""
|
||||
return utilities.check_kext_loaded("as.vit9696.WhateverGreen") is False
|
||||
|
||||
|
||||
@cache
|
||||
def _validation_check_force_opengl_missing(self) -> bool:
|
||||
"""
|
||||
Determine if Force OpenGL property is missing
|
||||
"""
|
||||
nv_on = utilities.get_nvram("boot-args", decode=True)
|
||||
if nv_on:
|
||||
if "ngfxgl=" in nv_on:
|
||||
return False
|
||||
for gpu in self._constants.computer.gpus:
|
||||
if isinstance(gpu, device_probe.NVIDIA):
|
||||
if gpu.disable_metal is True:
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
def _validation_check_force_compat_missing(self) -> bool:
|
||||
"""
|
||||
Determine if Force compat property is missing
|
||||
"""
|
||||
nv_on = utilities.get_nvram("boot-args", decode=True)
|
||||
if nv_on:
|
||||
if "ngfxcompat=" in nv_on:
|
||||
return False
|
||||
for gpu in self._constants.computer.gpus:
|
||||
if isinstance(gpu, device_probe.NVIDIA):
|
||||
if gpu.force_compatible is True:
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
def _validation_check_nvda_drv_missing(self) -> bool:
|
||||
"""
|
||||
Determine if nvda_drv(_vrl) variable is missing
|
||||
"""
|
||||
nv_on = utilities.get_nvram("boot-args", decode=True)
|
||||
if nv_on:
|
||||
if "nvda_drv_vrl=" in nv_on:
|
||||
return False
|
||||
nv_on = utilities.get_nvram("nvda_drv")
|
||||
if nv_on:
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
@cache
|
||||
def _override_amfi_level(self, level: amfi_detect.AmfiConfigDetectLevel) -> amfi_detect.AmfiConfigDetectLevel:
|
||||
"""
|
||||
Override level required based on whether AMFIPass is loaded
|
||||
"""
|
||||
amfipass_version = utilities.check_kext_loaded("com.dhinakg.AMFIPass")
|
||||
if amfipass_version:
|
||||
if packaging.version.parse(amfipass_version) >= packaging.version.parse(self._constants.amfipass_compatibility_version):
|
||||
# If AMFIPass is loaded, our binaries will work
|
||||
return amfi_detect.AmfiConfigDetectLevel.NO_CHECK
|
||||
return level
|
||||
|
||||
|
||||
def _dortania_internal_check(self) -> None:
|
||||
"""
|
||||
Determine whether to unlock Dortania Developer mode
|
||||
"""
|
||||
return Path("~/.dortania_developer").expanduser().exists()
|
||||
|
||||
|
||||
def _already_has_networking_patches(self) -> bool:
|
||||
"""
|
||||
Check if network patches are already applied
|
||||
"""
|
||||
oclp_patch_path = "/System/Library/CoreServices/OpenCore-Legacy-Patcher.plist"
|
||||
if not Path(oclp_patch_path).exists():
|
||||
return False
|
||||
try:
|
||||
oclp_plist = plistlib.load(open(oclp_patch_path, "rb"))
|
||||
except Exception as e:
|
||||
return False
|
||||
if "Legacy Wireless" in oclp_plist or "Modern Wireless" in oclp_plist:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def _is_cached_kernel_debug_kit_present(self) -> bool:
|
||||
"""
|
||||
Check if Kernel Debug Kit is present
|
||||
"""
|
||||
return kdk_handler.KernelDebugKitObject(self._constants, self._os_build, self._os_version, passive=True).kdk_already_installed
|
||||
|
||||
|
||||
def _is_cached_metallib_support_pkg_present(self) -> bool:
|
||||
"""
|
||||
Check if MetallibSupportPkg is present
|
||||
"""
|
||||
return metallib_handler.MetalLibraryObject(self._constants, self._os_build, self._os_version).metallib_already_installed
|
||||
|
||||
|
||||
def _can_patch(self, requirements: dict, ignore_keys: list[str] = []) -> bool:
|
||||
"""
|
||||
Check if patching is possible
|
||||
"""
|
||||
for key, value in requirements.items():
|
||||
if key in ignore_keys:
|
||||
continue
|
||||
if not key.startswith("Validation:"):
|
||||
continue
|
||||
if value is True:
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
def _convert_required_sip_config_to_int(self, configs: list[str]) -> int:
|
||||
"""
|
||||
Convert required SIP configurations to integer
|
||||
"""
|
||||
value = 0
|
||||
for config in configs:
|
||||
if config in sip_data.system_integrity_protection.csr_values_extended:
|
||||
value += sip_data.system_integrity_protection.csr_values_extended[config]["value"]
|
||||
|
||||
return value
|
||||
|
||||
|
||||
def _strip_incompatible_hardware(self, present_hardware: list[BaseHardware]) -> list[BaseHardware]:
|
||||
"""
|
||||
Strip out incompatible hardware. Priority is given to Metal GPUs (specifically 31001 when applicable)
|
||||
|
||||
Notes:
|
||||
- Non-Metal GPUs are stripped out if any Metal GPUs are present
|
||||
- Metal 3802 GPUs are stripped out if Metal 31001 GPUs are present on macOS Sequoia or newer
|
||||
- Exception is made for "Graphics: AMD Legacy GCN" on Sequoia or newer
|
||||
- Special handling is done in amd_legacy_gcn.py
|
||||
"""
|
||||
non_metal_gpu_present = False
|
||||
metal_gpu_present = False
|
||||
metal_3802_gpu_present = False
|
||||
metal_31001_gpu_present = False
|
||||
metal_31001_name = None
|
||||
|
||||
for hardware in present_hardware:
|
||||
hardware: BaseHardware
|
||||
sub_variant = hardware.hardware_variant_graphics_subclass()
|
||||
if sub_variant == HardwareVariantGraphicsSubclass.METAL_31001_GRAPHICS:
|
||||
metal_31001_gpu_present = True
|
||||
metal_31001_name = hardware.name()
|
||||
elif sub_variant == HardwareVariantGraphicsSubclass.METAL_3802_GRAPHICS:
|
||||
metal_3802_gpu_present = True
|
||||
elif sub_variant == HardwareVariantGraphicsSubclass.NON_METAL_GRAPHICS:
|
||||
non_metal_gpu_present = True
|
||||
|
||||
metal_gpu_present = metal_31001_gpu_present or metal_3802_gpu_present
|
||||
|
||||
if metal_gpu_present and non_metal_gpu_present:
|
||||
logging.error("Cannot mix Metal and Non-Metal GPUs")
|
||||
logging.error("Stripping out Non-Metal GPUs")
|
||||
for hardware in list(present_hardware):
|
||||
if hardware.hardware_variant_graphics_subclass() == HardwareVariantGraphicsSubclass.NON_METAL_GRAPHICS:
|
||||
logging.info(f" Stripping out {hardware.name()}")
|
||||
present_hardware.remove(hardware)
|
||||
|
||||
if metal_3802_gpu_present and metal_31001_gpu_present and self._xnu_major >= os_data.sequoia.value:
|
||||
if metal_31001_name != "Graphics: AMD Legacy GCN":
|
||||
logging.error("Cannot mix Metal 3802 and Metal 31001 GPUs on macOS Sequoia or newer")
|
||||
logging.error("Stripping out Metal 3802 GPUs")
|
||||
for hardware in list(present_hardware):
|
||||
if hardware.hardware_variant_graphics_subclass() == HardwareVariantGraphicsSubclass.METAL_3802_GRAPHICS:
|
||||
logging.error(f" Stripping out {hardware.name()}")
|
||||
present_hardware.remove(hardware)
|
||||
|
||||
return present_hardware
|
||||
|
||||
|
||||
def _handle_missing_network_connection(self, requirements: dict, device_properties: dict) -> tuple[dict, dict]:
|
||||
"""
|
||||
Sync network connection requirements
|
||||
"""
|
||||
if self._can_patch(requirements, ignore_keys=[HardwarePatchsetValidation.MISSING_NETWORK_CONNECTION]) is False:
|
||||
return requirements, device_properties
|
||||
logging.info("Network connection missing, checking whether network patches are applicable")
|
||||
if self._already_has_networking_patches() is True:
|
||||
logging.info("Network patches are already applied, requiring network connection")
|
||||
return requirements, device_properties
|
||||
|
||||
if not any([key.startswith("Networking:") for key in device_properties.keys()]):
|
||||
logging.info("Network patches are not applicable, requiring network connection")
|
||||
return requirements, device_properties
|
||||
|
||||
logging.info("Network patches are applicable, removing other patches")
|
||||
for key in list(device_properties.keys()):
|
||||
if key.startswith("Networking:"):
|
||||
continue
|
||||
device_properties.pop(key, None)
|
||||
|
||||
requirements[HardwarePatchsetValidation.MISSING_NETWORK_CONNECTION] = False
|
||||
requirements[HardwarePatchsetSettings.KERNEL_DEBUG_KIT_REQUIRED] = False
|
||||
requirements[HardwarePatchsetSettings.KERNEL_DEBUG_KIT_MISSING] = False
|
||||
requirements[HardwarePatchsetSettings.METALLIB_SUPPORT_PKG_REQUIRED] = False
|
||||
requirements[HardwarePatchsetSettings.METALLIB_SUPPORT_PKG_MISSING] = False
|
||||
|
||||
return requirements, device_properties
|
||||
|
||||
|
||||
def _handle_sip_breakdown(self, requirements: dict, required_sip_configs: list[str]) -> dict:
|
||||
"""
|
||||
Handle SIP breakdown
|
||||
"""
|
||||
current_sip_status = hex(py_sip_xnu.SipXnu().get_sip_status().value)
|
||||
expected_sip_status = hex(self._convert_required_sip_config_to_int(required_sip_configs))
|
||||
sip_string = f"Validation: Booted SIP: {current_sip_status} vs expected: {expected_sip_status}"
|
||||
index = list(requirements.keys()).index(HardwarePatchsetValidation.SIP_ENABLED)
|
||||
return dict(list(requirements.items())[:index+1] + [(sip_string, True)] + list(requirements.items())[index+1:])
|
||||
|
||||
|
||||
def _detect(self) -> None:
|
||||
"""
|
||||
Detect patches for a given system
|
||||
"""
|
||||
present_hardware = []
|
||||
device_properties = {}
|
||||
patches = {}
|
||||
|
||||
requires_metallib_support_pkg = False
|
||||
missing_metallib_support_pkg = False
|
||||
requires_kernel_debug_kit = False
|
||||
missing_kernel_debug_kit = False
|
||||
requires_network_connection = False
|
||||
has_nvidia_web_drivers = False
|
||||
highest_amfi_level = amfi_detect.AmfiConfigDetectLevel.NO_CHECK
|
||||
required_sip_configs = []
|
||||
|
||||
# First pass to find all present hardware
|
||||
for hardware in self._hardware_variants:
|
||||
item: BaseHardware = hardware(
|
||||
xnu_major = self._xnu_major,
|
||||
xnu_minor = self._xnu_minor,
|
||||
os_build = self._os_build,
|
||||
global_constants = self._constants
|
||||
)
|
||||
# During validation, don't skip missing items
|
||||
# This is to ensure we can validate all files
|
||||
if self._validation is False:
|
||||
if item.present() is False: # Skip if not present
|
||||
continue
|
||||
if item.native_os() is True: # Skip if native OS
|
||||
continue
|
||||
present_hardware.append(item)
|
||||
|
||||
if self._validation is False:
|
||||
present_hardware = self._strip_incompatible_hardware(present_hardware)
|
||||
|
||||
# Second pass to determine requirements
|
||||
for item in present_hardware:
|
||||
item: BaseHardware
|
||||
device_properties[item.name()] = True
|
||||
|
||||
if item.name() == "Graphics: Nvidia Web Drivers":
|
||||
has_nvidia_web_drivers = True
|
||||
|
||||
for config in item.required_system_integrity_protection_configurations():
|
||||
if config not in required_sip_configs:
|
||||
required_sip_configs.append(config)
|
||||
|
||||
if item.requires_metallib_support_pkg() is True:
|
||||
requires_metallib_support_pkg = True
|
||||
if item.requires_kernel_debug_kit() is True:
|
||||
requires_kernel_debug_kit = True
|
||||
if item.required_amfi_level() > highest_amfi_level:
|
||||
highest_amfi_level = item.required_amfi_level()
|
||||
|
||||
if self._validation is False:
|
||||
if requires_metallib_support_pkg is True:
|
||||
missing_metallib_support_pkg = not self._is_cached_metallib_support_pkg_present()
|
||||
if requires_kernel_debug_kit is True:
|
||||
missing_kernel_debug_kit = not self._is_cached_kernel_debug_kit_present()
|
||||
|
||||
requires_network_connection = missing_metallib_support_pkg or missing_kernel_debug_kit
|
||||
|
||||
requirements = {
|
||||
HardwarePatchsetSettings.KERNEL_DEBUG_KIT_REQUIRED: requires_kernel_debug_kit,
|
||||
HardwarePatchsetSettings.KERNEL_DEBUG_KIT_MISSING: missing_kernel_debug_kit,
|
||||
HardwarePatchsetSettings.METALLIB_SUPPORT_PKG_REQUIRED: requires_metallib_support_pkg,
|
||||
HardwarePatchsetSettings.METALLIB_SUPPORT_PKG_MISSING: missing_metallib_support_pkg,
|
||||
|
||||
HardwarePatchsetValidation.UNSUPPORTED_HOST_OS: self._validation_check_unsupported_host_os(),
|
||||
HardwarePatchsetValidation.MISSING_NETWORK_CONNECTION: self._validation_check_missing_network_connection() if requires_network_connection else False,
|
||||
HardwarePatchsetValidation.FILEVAULT_ENABLED: self._validation_check_filevault_is_enabled(),
|
||||
HardwarePatchsetValidation.SIP_ENABLED: self._validation_check_system_integrity_protection_enabled(required_sip_configs),
|
||||
HardwarePatchsetValidation.SECURE_BOOT_MODEL_ENABLED: self._validation_check_secure_boot_model_enabled(),
|
||||
HardwarePatchsetValidation.AMFI_ENABLED: self._validation_check_amfi_enabled(highest_amfi_level),
|
||||
HardwarePatchsetValidation.WHATEVERGREEN_MISSING: self._validation_check_whatevergreen_missing() if has_nvidia_web_drivers is True else False,
|
||||
HardwarePatchsetValidation.FORCE_OPENGL_MISSING: self._validation_check_force_opengl_missing() if has_nvidia_web_drivers is True else False,
|
||||
HardwarePatchsetValidation.FORCE_COMPAT_MISSING: self._validation_check_force_compat_missing() if has_nvidia_web_drivers is True else False,
|
||||
HardwarePatchsetValidation.NVDA_DRV_MISSING: self._validation_check_nvda_drv_missing() if has_nvidia_web_drivers is True else False,
|
||||
}
|
||||
|
||||
_cant_patch = False
|
||||
_cant_unpatch = requirements[HardwarePatchsetValidation.SIP_ENABLED]
|
||||
|
||||
if self._validation is False:
|
||||
if requirements[HardwarePatchsetValidation.SIP_ENABLED] is True:
|
||||
requirements = self._handle_sip_breakdown(requirements, required_sip_configs)
|
||||
if requirements[HardwarePatchsetValidation.MISSING_NETWORK_CONNECTION] is True:
|
||||
requirements, device_properties = self._handle_missing_network_connection(requirements, device_properties)
|
||||
|
||||
# Third pass to sync stripped hardware (ie. '_handle_missing_network_connection()')
|
||||
for item in present_hardware:
|
||||
item: BaseHardware
|
||||
if item.name() not in device_properties:
|
||||
continue
|
||||
patches.update(item.patches())
|
||||
|
||||
_cant_patch = not self._can_patch(requirements)
|
||||
|
||||
requirements[HardwarePatchsetValidation.PATCHING_NOT_POSSIBLE] = _cant_patch
|
||||
requirements[HardwarePatchsetValidation.UNPATCHING_NOT_POSSIBLE] = _cant_unpatch
|
||||
|
||||
self.can_patch = not _cant_patch
|
||||
self.can_unpatch = not _cant_unpatch
|
||||
|
||||
device_properties.update(requirements)
|
||||
|
||||
self.device_properties = device_properties
|
||||
self.patches = patches
|
||||
|
||||
|
||||
def detailed_errors(self) -> None:
|
||||
"""
|
||||
Print out detailed errors
|
||||
"""
|
||||
logging.error("- Breakdown:")
|
||||
for key, value in self.device_properties.items():
|
||||
if not key.startswith("Validation:"):
|
||||
continue
|
||||
if key in [HardwarePatchsetValidation.PATCHING_NOT_POSSIBLE, HardwarePatchsetValidation.UNPATCHING_NOT_POSSIBLE]:
|
||||
continue
|
||||
if value is False:
|
||||
continue
|
||||
logging.error(f" - {key.replace('Validation: ', '')}")
|
||||
176
opencore_legacy_patcher/sys_patch/patchsets/hardware/base.py
Normal file
@@ -0,0 +1,176 @@
|
||||
"""
|
||||
base.py: Base class for hardware patch set detection
|
||||
"""
|
||||
|
||||
from enum import StrEnum
|
||||
from pathlib import Path
|
||||
|
||||
from ..base import BasePatchset
|
||||
|
||||
from ....constants import Constants
|
||||
|
||||
from ....datasets.os_data import os_data
|
||||
from ....datasets.sip_data import system_integrity_protection
|
||||
from ....detections.amfi_detect import AmfiConfigDetectLevel
|
||||
from ....detections import device_probe
|
||||
|
||||
|
||||
class HardwareVariant(StrEnum):
|
||||
"""
|
||||
Hardware variant for patch set
|
||||
"""
|
||||
GRAPHICS: str = "Graphics"
|
||||
NETWORKING: str = "Networking"
|
||||
AUDIO: str = "Audio"
|
||||
MISCELLANEOUS: str = "Miscellaneous"
|
||||
|
||||
|
||||
class HardwareVariantGraphicsSubclass(StrEnum):
|
||||
"""
|
||||
Graphics hardware variant subclass
|
||||
"""
|
||||
NON_METAL_GRAPHICS: str = "Non-Metal Graphics"
|
||||
METAL_3802_GRAPHICS: str = "Metal 3802 Graphics"
|
||||
METAL_31001_GRAPHICS: str = "Metal 31001 Graphics"
|
||||
HEADLESS_GRAPHICS: str = "Headless Graphics"
|
||||
NOT_APPLICABLE: str = "N/A"
|
||||
|
||||
|
||||
class BaseHardware(BasePatchset):
|
||||
|
||||
def __init__(self, xnu_major, xnu_minor, os_build, global_constants: Constants) -> None:
|
||||
super().__init__()
|
||||
self._xnu_major = xnu_major
|
||||
self._xnu_minor = xnu_minor
|
||||
self._os_build = os_build
|
||||
self._constants = global_constants
|
||||
self._computer = global_constants.computer
|
||||
|
||||
self._xnu_float = float(f"{self._xnu_major}.{self._xnu_minor}")
|
||||
|
||||
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Name of the patch set
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
def present(self) -> bool:
|
||||
"""
|
||||
Whether the hardware is present in the system
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
def native_os(self) -> bool:
|
||||
"""
|
||||
Is on native OS
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
def hardware_variant(self) -> HardwareVariant:
|
||||
"""
|
||||
What hardware variant is this patch set for
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
def hardware_variant_graphics_subclass(self) -> HardwareVariantGraphicsSubclass:
|
||||
"""
|
||||
What subclass of graphics
|
||||
"""
|
||||
return HardwareVariantGraphicsSubclass.NOT_APPLICABLE
|
||||
|
||||
|
||||
def required_amfi_level(self) -> AmfiConfigDetectLevel:
|
||||
"""
|
||||
What level of AMFI configuration is required for this patch set
|
||||
Currently defaulted to AMFI needing to be disabled
|
||||
"""
|
||||
return AmfiConfigDetectLevel.ALLOW_ALL
|
||||
|
||||
|
||||
def requires_primary_kernel_cache(self) -> bool:
|
||||
"""
|
||||
Whether patch set requires access to the primary kernel cache
|
||||
ex. Boot/System Kernel Collection on Big Sur and newer
|
||||
"""
|
||||
return False
|
||||
|
||||
|
||||
def requires_kernel_debug_kit(self) -> bool:
|
||||
"""
|
||||
Whether patch set requires access to the Kernel Debug Kit
|
||||
"""
|
||||
return False
|
||||
|
||||
|
||||
def requires_metallib_support_pkg(self) -> bool:
|
||||
"""
|
||||
Whether patch set requires access to the MetallibSupportPkg PKG
|
||||
"""
|
||||
return False
|
||||
|
||||
|
||||
def required_system_integrity_protection_configurations(self) -> list[str]:
|
||||
"""
|
||||
List of required SIP configurations for the patch set
|
||||
"""
|
||||
if self._xnu_major >= os_data.ventura.value:
|
||||
return system_integrity_protection.root_patch_sip_ventura
|
||||
if self._xnu_major >= os_data.big_sur.value:
|
||||
return system_integrity_protection.root_patch_sip_big_sur
|
||||
return system_integrity_protection.root_patch_sip_mojave
|
||||
|
||||
|
||||
def patches(self) -> dict:
|
||||
"""
|
||||
Dictionary of patches
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
def _is_gpu_architecture_present(self, gpu_architectures: list[device_probe.GPU]) -> bool:
|
||||
"""
|
||||
Check if a GPU architecture is present
|
||||
"""
|
||||
for gpu in self._computer.gpus:
|
||||
if not gpu.class_code:
|
||||
continue
|
||||
if not gpu.arch:
|
||||
continue
|
||||
if gpu.class_code == 0xFFFFFFFF:
|
||||
continue
|
||||
|
||||
if gpu.arch in gpu_architectures:
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
|
||||
def _resolve_monterey_framebuffers(self) -> str:
|
||||
"""
|
||||
Resolve patchset directory for framebuffers last supported in Monterey:
|
||||
- AppleIntelBDWGraphics.kext
|
||||
- AppleIntelBDWGraphicsFramebuffer.kext
|
||||
- AppleIntelFramebufferAzul.kext
|
||||
- AppleIntelHD5000Graphics.kext
|
||||
- AppleIntelSKLGraphics.kext
|
||||
- AppleIntelSKLGraphicsFramebuffer.kext
|
||||
- AMDRadeonX4000.kext
|
||||
- AMDRadeonX5000.kext
|
||||
"""
|
||||
if self._xnu_major < os_data.sonoma.value:
|
||||
return "12.5"
|
||||
if self._xnu_float < self.macOS_14_4:
|
||||
return "12.5-23"
|
||||
return "12.5-23.4"
|
||||
|
||||
|
||||
def _dortania_internal_check(self) -> None:
|
||||
"""
|
||||
Determine whether to unlock Dortania Developer mode
|
||||
"""
|
||||
return Path("~/.dortania_developer").expanduser().exists()
|
||||
@@ -0,0 +1,134 @@
|
||||
"""
|
||||
amd_legacy_gcn.py: AMD Legacy GCN detection
|
||||
"""
|
||||
|
||||
from ..base import BaseHardware, HardwareVariant, HardwareVariantGraphicsSubclass
|
||||
|
||||
from ...base import PatchType
|
||||
|
||||
from ...shared_patches.monterey_gva import MontereyGVA
|
||||
from ...shared_patches.monterey_opencl import MontereyOpenCL
|
||||
from ...shared_patches.amd_opencl import AMDOpenCL
|
||||
|
||||
from .....constants import Constants
|
||||
from .....detections import device_probe
|
||||
|
||||
from .....datasets.os_data import os_data
|
||||
|
||||
|
||||
class AMDLegacyGCN(BaseHardware):
|
||||
|
||||
def __init__(self, xnu_major, xnu_minor, os_build, global_constants: Constants) -> None:
|
||||
super().__init__(xnu_major, xnu_minor, os_build, global_constants)
|
||||
|
||||
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Display name for end users
|
||||
"""
|
||||
return f"{self.hardware_variant()}: AMD Legacy GCN"
|
||||
|
||||
|
||||
def present(self) -> bool:
|
||||
"""
|
||||
Targeting AMD Legacy GCN GPUs
|
||||
"""
|
||||
return self._is_gpu_architecture_present(
|
||||
gpu_architectures=[
|
||||
device_probe.AMD.Archs.Legacy_GCN_7000,
|
||||
device_probe.AMD.Archs.Legacy_GCN_8000,
|
||||
device_probe.AMD.Archs.Legacy_GCN_9000
|
||||
]
|
||||
) and self._computer.rosetta_active is False # Rosetta 2 mimics an AMD R9 270X
|
||||
|
||||
|
||||
def native_os(self) -> bool:
|
||||
"""
|
||||
Dropped support with macOS 13, Ventura
|
||||
"""
|
||||
return self._xnu_major < os_data.ventura.value
|
||||
|
||||
|
||||
def hardware_variant(self) -> HardwareVariant:
|
||||
"""
|
||||
Type of hardware variant
|
||||
"""
|
||||
return HardwareVariant.GRAPHICS
|
||||
|
||||
|
||||
def hardware_variant_graphics_subclass(self) -> HardwareVariantGraphicsSubclass:
|
||||
"""
|
||||
Type of hardware variant subclass
|
||||
"""
|
||||
return HardwareVariantGraphicsSubclass.METAL_31001_GRAPHICS
|
||||
|
||||
|
||||
def requires_kernel_debug_kit(self) -> bool:
|
||||
"""
|
||||
Apple no longer provides standalone kexts in the base OS
|
||||
"""
|
||||
return self._xnu_major >= os_data.ventura.value
|
||||
|
||||
|
||||
def _model_specific_patches(self) -> dict:
|
||||
"""
|
||||
Model specific patches
|
||||
"""
|
||||
# If 3802 GPU present, use stock Monterey bronze bundle even on Sequoia
|
||||
bronze_bundle_source = "12.5"
|
||||
if self._is_gpu_architecture_present(
|
||||
[
|
||||
device_probe.Intel.Archs.Ivy_Bridge,
|
||||
device_probe.Intel.Archs.Haswell,
|
||||
device_probe.NVIDIA.Archs.Kepler,
|
||||
]
|
||||
) is False:
|
||||
if self._xnu_major >= os_data.sequoia:
|
||||
bronze_bundle_source = "12.5-24"
|
||||
|
||||
return {
|
||||
"AMD Legacy GCN": {
|
||||
PatchType.OVERWRITE_SYSTEM_VOLUME: {
|
||||
"/System/Library/Extensions": {
|
||||
"AMD7000Controller.kext": "12.5",
|
||||
"AMD8000Controller.kext": "12.5",
|
||||
"AMD9000Controller.kext": "12.5",
|
||||
"AMD9500Controller.kext": "12.5",
|
||||
"AMD10000Controller.kext": "12.5",
|
||||
"AMDRadeonX4000.kext": self._resolve_monterey_framebuffers(),
|
||||
"AMDRadeonX4000HWServices.kext": "12.5",
|
||||
"AMDFramebuffer.kext": "12.5" if self._xnu_float < self.macOS_13_3 else "12.5-GCN",
|
||||
"AMDSupport.kext": "12.5",
|
||||
|
||||
"AMDRadeonVADriver.bundle": "12.5",
|
||||
"AMDRadeonVADriver2.bundle": "12.5",
|
||||
"AMDRadeonX4000GLDriver.bundle": "12.5",
|
||||
"AMDMTLBronzeDriver.bundle": bronze_bundle_source,
|
||||
"AMDShared.bundle": "12.5",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
def patches(self) -> dict:
|
||||
"""
|
||||
Patches for AMD Legacy GCN GPUs
|
||||
"""
|
||||
if self.native_os() is True:
|
||||
return {}
|
||||
|
||||
_base = {}
|
||||
|
||||
# AMD GCN and newer GPUs can still use the native GVA stack
|
||||
_base.update({
|
||||
**MontereyGVA(self._xnu_major, self._xnu_minor, self._constants.detected_os_version).revert_patches(),
|
||||
})
|
||||
|
||||
_base.update({
|
||||
**MontereyOpenCL(self._xnu_major, self._xnu_minor, self._constants.detected_os_version).patches(),
|
||||
**AMDOpenCL(self._xnu_major, self._xnu_minor, self._constants.detected_os_version).patches(),
|
||||
**self._model_specific_patches(),
|
||||
})
|
||||
|
||||
return _base
|
||||
@@ -0,0 +1,127 @@
|
||||
"""
|
||||
amd_navi.py: AMD Navi detection (Not implemented, only present for reference)
|
||||
"""
|
||||
|
||||
from ..base import BaseHardware, HardwareVariant, HardwareVariantGraphicsSubclass
|
||||
|
||||
from ...base import PatchType
|
||||
|
||||
from ...shared_patches.monterey_opencl import MontereyOpenCL
|
||||
from ...shared_patches.amd_opencl import AMDOpenCL
|
||||
|
||||
from .....constants import Constants
|
||||
from .....detections import device_probe
|
||||
|
||||
from .....datasets.os_data import os_data
|
||||
|
||||
|
||||
class AMDNavi(BaseHardware):
|
||||
|
||||
def __init__(self, xnu_major, xnu_minor, os_build, global_constants: Constants) -> None:
|
||||
super().__init__(xnu_major, xnu_minor, os_build, global_constants)
|
||||
|
||||
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Display name for end users
|
||||
"""
|
||||
return f"{self.hardware_variant()}: AMD Navi"
|
||||
|
||||
|
||||
def present(self) -> bool:
|
||||
"""
|
||||
Targeting AMD Navi GPUs with CPUs lacking AVX2.0
|
||||
"""
|
||||
return self._is_gpu_architecture_present(
|
||||
gpu_architectures=[
|
||||
device_probe.AMD.Archs.Navi
|
||||
]
|
||||
) and "AVX2" not in self._computer.cpu.leafs and self._dortania_internal_check() is True
|
||||
|
||||
|
||||
def native_os(self) -> bool:
|
||||
"""
|
||||
Dropped support with macOS 13, Ventura
|
||||
"""
|
||||
return self._xnu_major < os_data.ventura.value
|
||||
|
||||
|
||||
def hardware_variant(self) -> HardwareVariant:
|
||||
"""
|
||||
Type of hardware variant
|
||||
"""
|
||||
return HardwareVariant.GRAPHICS
|
||||
|
||||
|
||||
def hardware_variant_graphics_subclass(self) -> HardwareVariantGraphicsSubclass:
|
||||
"""
|
||||
Type of hardware variant subclass
|
||||
"""
|
||||
return HardwareVariantGraphicsSubclass.METAL_31001_GRAPHICS
|
||||
|
||||
|
||||
def requires_kernel_debug_kit(self) -> bool:
|
||||
"""
|
||||
Apple no longer provides standalone kexts in the base OS
|
||||
"""
|
||||
return self._xnu_major >= os_data.ventura.value
|
||||
|
||||
|
||||
def _model_specific_patches(self) -> dict:
|
||||
"""
|
||||
Model specific patches
|
||||
"""
|
||||
return {
|
||||
"AMD Navi": {
|
||||
PatchType.OVERWRITE_SYSTEM_VOLUME: {
|
||||
"AMDRadeonX6000.kext": self._resolve_monterey_framebuffers(),
|
||||
"AMDRadeonX6000Framebuffer.kext": "12.5",
|
||||
|
||||
"AMDRadeonVADriver2.bundle": "12.5",
|
||||
"AMDRadeonX6000GLDriver.bundle": "12.5",
|
||||
"AMDRadeonX6000MTLDriver.bundle": "12.5" if self._xnu_major < os_data.sequoia else "12.5-24",
|
||||
"AMDRadeonX6000Shared.bundle": "12.5",
|
||||
|
||||
"AMDShared.bundle": "12.5",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
def _model_specific_patches_extended(self) -> dict:
|
||||
"""
|
||||
Support mixed legacy and modern AMD GPUs
|
||||
Specifically systems using AMD GCN 1-3 and Navi (ex. MacPro6,1 with eGPU)
|
||||
Assume 'AMD Legacy GCN' patchset is installed alongside this
|
||||
"""
|
||||
if self._is_gpu_architecture_present([
|
||||
device_probe.AMD.Archs.Legacy_GCN_7000,
|
||||
device_probe.AMD.Archs.Legacy_GCN_8000,
|
||||
device_probe.AMD.Archs.Legacy_GCN_9000
|
||||
]) is False:
|
||||
return {}
|
||||
|
||||
return {
|
||||
"AMD Navi Extended": {
|
||||
PatchType.OVERWRITE_SYSTEM_VOLUME: {
|
||||
"/System/Library/Extensions": {
|
||||
"AMDRadeonX6000HWServices.kext": "12.5",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
def patches(self) -> dict:
|
||||
"""
|
||||
Patches for AMD Navi GPUs
|
||||
"""
|
||||
if self.native_os() is True:
|
||||
return {}
|
||||
|
||||
return {
|
||||
**MontereyOpenCL(self._xnu_major, self._xnu_minor, self._constants.detected_os_version).patches(),
|
||||
**AMDOpenCL(self._xnu_major, self._xnu_minor, self._constants.detected_os_version).patches(),
|
||||
**self._model_specific_patches(),
|
||||
**self._model_specific_patches_extended(),
|
||||
}
|
||||
@@ -0,0 +1,147 @@
|
||||
"""
|
||||
amd_polaris.py: AMD Polaris detection
|
||||
"""
|
||||
|
||||
from .amd_legacy_gcn import AMDLegacyGCN
|
||||
|
||||
from ..base import BaseHardware, HardwareVariant, HardwareVariantGraphicsSubclass
|
||||
|
||||
from ...base import PatchType
|
||||
|
||||
from ...shared_patches.monterey_gva import MontereyGVA
|
||||
from ...shared_patches.monterey_opencl import MontereyOpenCL
|
||||
from ...shared_patches.amd_opencl import AMDOpenCL
|
||||
|
||||
from .....constants import Constants
|
||||
from .....detections import device_probe
|
||||
|
||||
from .....datasets.os_data import os_data
|
||||
|
||||
|
||||
class AMDPolaris(BaseHardware):
|
||||
|
||||
def __init__(self, xnu_major, xnu_minor, os_build, global_constants: Constants) -> None:
|
||||
super().__init__(xnu_major, xnu_minor, os_build, global_constants)
|
||||
|
||||
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Display name for end users
|
||||
"""
|
||||
return f"{self.hardware_variant()}: AMD Polaris"
|
||||
|
||||
|
||||
def present(self) -> bool:
|
||||
"""
|
||||
Targeting AMD Polaris GPUs with CPUs lacking AVX2.0 or missing Framebuffer patches (ie. MacBookPro13,3 and MacBookPro14,3)
|
||||
"""
|
||||
return self._is_gpu_architecture_present(
|
||||
gpu_architectures=[
|
||||
device_probe.AMD.Archs.Polaris
|
||||
]
|
||||
) and ("AVX2" not in self._computer.cpu.leafs or self._computer.real_model in ["MacBookPro13,3", "MacBookPro14,3"])
|
||||
|
||||
|
||||
def native_os(self) -> bool:
|
||||
"""
|
||||
Dropped support with macOS 13, Ventura
|
||||
"""
|
||||
return self._xnu_major < os_data.ventura.value
|
||||
|
||||
|
||||
def hardware_variant(self) -> HardwareVariant:
|
||||
"""
|
||||
Type of hardware variant
|
||||
"""
|
||||
return HardwareVariant.GRAPHICS
|
||||
|
||||
|
||||
def hardware_variant_graphics_subclass(self) -> HardwareVariantGraphicsSubclass:
|
||||
"""
|
||||
Type of hardware variant subclass
|
||||
"""
|
||||
return HardwareVariantGraphicsSubclass.METAL_31001_GRAPHICS
|
||||
|
||||
|
||||
def requires_kernel_debug_kit(self) -> bool:
|
||||
"""
|
||||
Apple no longer provides standalone kexts in the base OS
|
||||
"""
|
||||
return self._xnu_major >= os_data.ventura.value
|
||||
|
||||
|
||||
def _model_specific_patches(self) -> dict:
|
||||
"""
|
||||
Model specific patches
|
||||
"""
|
||||
|
||||
# For MacBookPro13,3 missing framebuffers (ex. 'ATY,Berbice')
|
||||
if self._computer.real_model in ["MacBookPro13,3"]:
|
||||
# Since dropped at the same time, we can use the same patches
|
||||
result = AMDLegacyGCN(self._xnu_major, self._xnu_minor, self._os_build, self._constants)._model_specific_patches()
|
||||
# Have to rename 'AMD Legacy GCN' to 'AMD Polaris' for model detection
|
||||
return {"AMD Polaris": result["AMD Legacy GCN"]}
|
||||
|
||||
# For MacBookPro14,3 (and other AMD dGPUs that no longer function in Sonoma)
|
||||
# iMac18,2/3 still function with the generic framebuffer, however if issues arise
|
||||
# we'll downgrade them as well.
|
||||
if self._computer.real_model in ["MacBookPro14,3"]:
|
||||
if self._xnu_major < os_data.sonoma.value:
|
||||
return {}
|
||||
return {
|
||||
"AMD Polaris": {
|
||||
PatchType.OVERWRITE_SYSTEM_VOLUME: {
|
||||
"/System/Library/Extensions": {
|
||||
"AMD9500Controller.kext": "13.5.2",
|
||||
"AMD10000Controller.kext": "13.5.2",
|
||||
"AMDFramebuffer.kext": "13.5.2",
|
||||
"AMDSupport.kext": "13.5.2",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
# Assuming non-AVX2.0 CPUs
|
||||
# Note missing framebuffers are not restored (ex. 'ATY,Berbice')
|
||||
return {
|
||||
"AMD Polaris": {
|
||||
PatchType.OVERWRITE_SYSTEM_VOLUME: {
|
||||
"/System/Library/Extensions": {
|
||||
"AMDRadeonX4000.kext": self._resolve_monterey_framebuffers(),
|
||||
"AMDRadeonX4000HWServices.kext": "12.5",
|
||||
"AMDRadeonVADriver2.bundle": "12.5",
|
||||
"AMDRadeonX4000GLDriver.bundle": "12.5",
|
||||
"AMDMTLBronzeDriver.bundle": "12.5" if self._xnu_major < os_data.sequoia else "12.5-24",
|
||||
"AMDShared.bundle": "12.5",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
def patches(self) -> dict:
|
||||
"""
|
||||
Patches for AMD Polaris GPUs
|
||||
"""
|
||||
if self.native_os() is True:
|
||||
return {}
|
||||
|
||||
# Minimal amount of patches required for 2017 Polaris
|
||||
if self._computer.real_model in ["MacBookPro14,3"]:
|
||||
return self._model_specific_patches()
|
||||
|
||||
_base = {
|
||||
**MontereyOpenCL(self._xnu_major, self._xnu_minor, self._constants.detected_os_version).patches(),
|
||||
**self._model_specific_patches(),
|
||||
}
|
||||
if "AVX2" not in self._computer.cpu.leafs:
|
||||
_base.update({
|
||||
**AMDOpenCL(self._xnu_major, self._xnu_minor, self._constants.detected_os_version).patches(),
|
||||
})
|
||||
|
||||
# AMD GCN and newer GPUs can still use the native GVA stack
|
||||
_base.update({
|
||||
**MontereyGVA(self._xnu_major, self._xnu_minor, self._constants.detected_os_version).revert_patches(),
|
||||
})
|
||||
|
||||
return _base
|
||||
@@ -0,0 +1,112 @@
|
||||
"""
|
||||
amd_terascale_1.py: AMD TeraScale 1 detection
|
||||
"""
|
||||
|
||||
from ..base import BaseHardware, HardwareVariant, HardwareVariantGraphicsSubclass
|
||||
|
||||
from ...base import PatchType
|
||||
|
||||
from ...shared_patches.non_metal import NonMetal
|
||||
from ...shared_patches.monterey_webkit import MontereyWebKit
|
||||
from ...shared_patches.amd_terascale import AMDTeraScale
|
||||
|
||||
from .....constants import Constants
|
||||
from .....detections import device_probe
|
||||
|
||||
from .....datasets.os_data import os_data
|
||||
|
||||
|
||||
class AMDTeraScale1(BaseHardware):
|
||||
|
||||
def __init__(self, xnu_major, xnu_minor, os_build, global_constants: Constants) -> None:
|
||||
super().__init__(xnu_major, xnu_minor, os_build, global_constants)
|
||||
|
||||
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Display name for end users
|
||||
"""
|
||||
return f"{self.hardware_variant()}: AMD TeraScale 1"
|
||||
|
||||
|
||||
def present(self) -> bool:
|
||||
"""
|
||||
Targeting AMD TeraScale GPUs
|
||||
"""
|
||||
return self._is_gpu_architecture_present(
|
||||
gpu_architectures=[
|
||||
device_probe.AMD.Archs.TeraScale_1
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
def native_os(self) -> bool:
|
||||
"""
|
||||
Dropped support with macOS 10.14, Mojave
|
||||
"""
|
||||
return self._xnu_major < os_data.mojave.value
|
||||
|
||||
|
||||
def hardware_variant(self) -> HardwareVariant:
|
||||
"""
|
||||
Type of hardware variant
|
||||
"""
|
||||
return HardwareVariant.GRAPHICS
|
||||
|
||||
|
||||
def hardware_variant_graphics_subclass(self) -> HardwareVariantGraphicsSubclass:
|
||||
"""
|
||||
Type of hardware variant subclass
|
||||
"""
|
||||
return HardwareVariantGraphicsSubclass.NON_METAL_GRAPHICS
|
||||
|
||||
|
||||
def requires_kernel_debug_kit(self) -> bool:
|
||||
"""
|
||||
Apple no longer provides standalone kexts in the base OS
|
||||
"""
|
||||
return self._xnu_major >= os_data.ventura.value
|
||||
|
||||
|
||||
def _model_specific_patches(self) -> dict:
|
||||
"""
|
||||
Model specific patches
|
||||
"""
|
||||
return {
|
||||
"AMD TeraScale 1": {
|
||||
PatchType.OVERWRITE_SYSTEM_VOLUME: {
|
||||
"/System/Library/Extensions": {
|
||||
"AMD2400Controller.kext": "10.13.6",
|
||||
"AMD2600Controller.kext": "10.13.6",
|
||||
"AMD3800Controller.kext": "10.13.6",
|
||||
"AMD4600Controller.kext": "10.13.6",
|
||||
"AMD4800Controller.kext": "10.13.6",
|
||||
"ATIRadeonX2000.kext": "10.13.6" if self._xnu_major < os_data.ventura else "10.13.6 TS1",
|
||||
"ATIRadeonX2000GA.plugin": "10.13.6",
|
||||
"ATIRadeonX2000GLDriver.bundle": "10.13.6",
|
||||
"ATIRadeonX2000VADriver.bundle": "10.13.6",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
def patches(self) -> dict:
|
||||
"""
|
||||
Patches for AMD TeraScale 1 GPUs
|
||||
"""
|
||||
if self.native_os() is True:
|
||||
return {}
|
||||
|
||||
if self._xnu_major not in self._constants.legacy_accel_support and self._dortania_internal_check() is False:
|
||||
return {
|
||||
**AMDTeraScale(self._xnu_major, self._xnu_minor, self._os_build).patches(),
|
||||
**self._model_specific_patches()
|
||||
}
|
||||
|
||||
return {
|
||||
**NonMetal(self._xnu_major, self._xnu_minor, self._os_build).patches(),
|
||||
**MontereyWebKit(self._xnu_major, self._xnu_minor, self._os_build).patches(),
|
||||
**AMDTeraScale(self._xnu_major, self._xnu_minor, self._os_build).patches(),
|
||||
**self._model_specific_patches(),
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
"""
|
||||
amd_terascale_2.py: AMD TeraScale 2 detection
|
||||
"""
|
||||
|
||||
from ..base import BaseHardware, HardwareVariant, HardwareVariantGraphicsSubclass
|
||||
|
||||
from ...base import PatchType
|
||||
|
||||
from ...shared_patches.non_metal import NonMetal
|
||||
from ...shared_patches.non_metal_ioaccel import NonMetalIOAccelerator
|
||||
from ...shared_patches.monterey_webkit import MontereyWebKit
|
||||
from ...shared_patches.amd_terascale import AMDTeraScale
|
||||
|
||||
from .....constants import Constants
|
||||
from .....detections import device_probe
|
||||
|
||||
from .....datasets.os_data import os_data
|
||||
|
||||
|
||||
class AMDTeraScale2(BaseHardware):
|
||||
|
||||
def __init__(self, xnu_major, xnu_minor, os_build, global_constants: Constants) -> None:
|
||||
super().__init__(xnu_major, xnu_minor, os_build, global_constants)
|
||||
|
||||
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Display name for end users
|
||||
"""
|
||||
return f"{self.hardware_variant()}: AMD TeraScale 2"
|
||||
|
||||
|
||||
def present(self) -> bool:
|
||||
"""
|
||||
Targeting AMD TeraScale GPUs
|
||||
"""
|
||||
return self._is_gpu_architecture_present(
|
||||
gpu_architectures=[
|
||||
device_probe.AMD.Archs.TeraScale_2
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
def native_os(self) -> bool:
|
||||
"""
|
||||
Dropped support with macOS 10.14, Mojave
|
||||
"""
|
||||
return self._xnu_major < os_data.mojave.value
|
||||
|
||||
|
||||
def hardware_variant(self) -> HardwareVariant:
|
||||
"""
|
||||
Type of hardware variant
|
||||
"""
|
||||
return HardwareVariant.GRAPHICS
|
||||
|
||||
|
||||
def hardware_variant_graphics_subclass(self) -> HardwareVariantGraphicsSubclass:
|
||||
"""
|
||||
Type of hardware variant subclass
|
||||
"""
|
||||
return HardwareVariantGraphicsSubclass.NON_METAL_GRAPHICS
|
||||
|
||||
|
||||
def requires_kernel_debug_kit(self) -> bool:
|
||||
"""
|
||||
Apple no longer provides standalone kexts in the base OS
|
||||
"""
|
||||
return self._xnu_major >= os_data.ventura.value
|
||||
|
||||
|
||||
def _model_specific_patches(self) -> dict:
|
||||
"""
|
||||
Model specific patches
|
||||
"""
|
||||
_base = {
|
||||
"AMD TeraScale 2": {
|
||||
PatchType.OVERWRITE_SYSTEM_VOLUME: {
|
||||
"/System/Library/Extensions": {
|
||||
"AMD5000Controller.kext": "10.13.6",
|
||||
"AMD6000Controller.kext": "10.13.6",
|
||||
"AMDRadeonVADriver.bundle": "10.13.6",
|
||||
"AMDRadeonVADriver2.bundle": "10.13.6",
|
||||
"AMDRadeonX3000.kext": "10.13.6",
|
||||
"AMDRadeonX3000GLDriver.bundle": "10.13.6",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
# TeraScale 2 MacBooks with faulty GPUs are highly prone to crashing with AMDRadeonX3000 attached
|
||||
if self._constants.allow_ts2_accel is False and self._constants.host_is_hackintosh is False:
|
||||
_base["AMD TeraScale 2"][PatchType.OVERWRITE_SYSTEM_VOLUME]["/System/Library/Extensions"].pop("AMDRadeonX3000.kext")
|
||||
|
||||
return _base
|
||||
|
||||
|
||||
def patches(self) -> dict:
|
||||
"""
|
||||
Patches for AMD TeraScale 2 GPUs
|
||||
"""
|
||||
if self.native_os() is True:
|
||||
return {}
|
||||
|
||||
if self._xnu_major not in self._constants.legacy_accel_support and self._dortania_internal_check() is False:
|
||||
return {
|
||||
**AMDTeraScale(self._xnu_major, self._xnu_minor, self._os_build).patches(),
|
||||
**self._model_specific_patches()
|
||||
}
|
||||
|
||||
return {
|
||||
**NonMetal(self._xnu_major, self._xnu_minor, self._os_build).patches(),
|
||||
**NonMetalIOAccelerator(self._xnu_major, self._xnu_minor, self._os_build).patches(),
|
||||
**MontereyWebKit(self._xnu_major, self._xnu_minor, self._os_build).patches(),
|
||||
**AMDTeraScale(self._xnu_major, self._xnu_minor, self._os_build).patches(),
|
||||
**self._model_specific_patches(),
|
||||
}
|
||||
@@ -0,0 +1,132 @@
|
||||
"""
|
||||
amd_vega.py: AMD Vega detection
|
||||
"""
|
||||
|
||||
from ..base import BaseHardware, HardwareVariant, HardwareVariantGraphicsSubclass
|
||||
|
||||
from ...base import PatchType
|
||||
|
||||
from ...shared_patches.monterey_gva import MontereyGVA
|
||||
from ...shared_patches.monterey_opencl import MontereyOpenCL
|
||||
from ...shared_patches.amd_opencl import AMDOpenCL
|
||||
|
||||
from .....constants import Constants
|
||||
from .....detections import device_probe
|
||||
|
||||
from .....datasets.os_data import os_data
|
||||
|
||||
|
||||
class AMDVega(BaseHardware):
|
||||
|
||||
def __init__(self, xnu_major, xnu_minor, os_build, global_constants: Constants) -> None:
|
||||
super().__init__(xnu_major, xnu_minor, os_build, global_constants)
|
||||
|
||||
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Display name for end users
|
||||
"""
|
||||
return f"{self.hardware_variant()}: AMD Vega"
|
||||
|
||||
|
||||
def present(self) -> bool:
|
||||
"""
|
||||
Targeting AMD Vega GPUs with CPUs lacking AVX2.0
|
||||
"""
|
||||
return self._is_gpu_architecture_present(
|
||||
gpu_architectures=[
|
||||
device_probe.AMD.Archs.Vega
|
||||
]
|
||||
) and "AVX2" not in self._computer.cpu.leafs
|
||||
|
||||
|
||||
def native_os(self) -> bool:
|
||||
"""
|
||||
Dropped support with macOS 13, Ventura
|
||||
"""
|
||||
return self._xnu_major < os_data.ventura.value
|
||||
|
||||
|
||||
def hardware_variant(self) -> HardwareVariant:
|
||||
"""
|
||||
Type of hardware variant
|
||||
"""
|
||||
return HardwareVariant.GRAPHICS
|
||||
|
||||
|
||||
def hardware_variant_graphics_subclass(self) -> HardwareVariantGraphicsSubclass:
|
||||
"""
|
||||
Type of hardware variant subclass
|
||||
"""
|
||||
return HardwareVariantGraphicsSubclass.METAL_31001_GRAPHICS
|
||||
|
||||
|
||||
def requires_kernel_debug_kit(self) -> bool:
|
||||
"""
|
||||
Apple no longer provides standalone kexts in the base OS
|
||||
"""
|
||||
return self._xnu_major >= os_data.ventura.value
|
||||
|
||||
|
||||
def _model_specific_patches(self) -> dict:
|
||||
"""
|
||||
Model specific patches
|
||||
"""
|
||||
return {
|
||||
"AMD Vega": {
|
||||
PatchType.OVERWRITE_SYSTEM_VOLUME: {
|
||||
"/System/Library/Extensions": {
|
||||
"AMDRadeonX5000.kext": self._resolve_monterey_framebuffers(),
|
||||
|
||||
"AMDRadeonVADriver2.bundle": "12.5",
|
||||
"AMDRadeonX5000GLDriver.bundle": "12.5",
|
||||
"AMDRadeonX5000MTLDriver.bundle": "12.5" if self._xnu_major < os_data.sequoia else "12.5-24",
|
||||
"AMDRadeonX5000Shared.bundle": "12.5",
|
||||
|
||||
"AMDShared.bundle": "12.5",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
def _model_specific_patches_extended(self) -> dict:
|
||||
"""
|
||||
Support mixed legacy and modern AMD GPUs
|
||||
Specifically systems using AMD GCN 1-3 and Vega (ex. MacPro6,1 with eGPU)
|
||||
Assume 'AMD Legacy GCN' patchset is installed alongside this
|
||||
"""
|
||||
if self._is_gpu_architecture_present([
|
||||
device_probe.AMD.Archs.Legacy_GCN_7000,
|
||||
device_probe.AMD.Archs.Legacy_GCN_8000,
|
||||
device_probe.AMD.Archs.Legacy_GCN_9000
|
||||
]) is False:
|
||||
return {}
|
||||
|
||||
return {
|
||||
"AMD Vega Extended": {
|
||||
PatchType.OVERWRITE_SYSTEM_VOLUME: {
|
||||
"/System/Library/Extensions": {
|
||||
"AMDRadeonX5000HWServices.kext": "12.5",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
def patches(self) -> dict:
|
||||
"""
|
||||
Patches for AMD Vega GPUs
|
||||
"""
|
||||
if self.native_os() is True:
|
||||
return {}
|
||||
|
||||
return {
|
||||
# AMD GCN and newer GPUs can still use the native GVA stack
|
||||
**MontereyGVA(self._xnu_major, self._xnu_minor, self._constants.detected_os_version).revert_patches(),
|
||||
|
||||
**MontereyOpenCL(self._xnu_major, self._xnu_minor, self._constants.detected_os_version).patches(),
|
||||
**AMDOpenCL(self._xnu_major, self._xnu_minor, self._constants.detected_os_version).patches(),
|
||||
**self._model_specific_patches(),
|
||||
**self._model_specific_patches_extended(),
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
"""
|
||||
intel_broadwell.py: Intel Broadwell detection
|
||||
"""
|
||||
|
||||
from ..base import BaseHardware, HardwareVariant, HardwareVariantGraphicsSubclass
|
||||
|
||||
from ...base import PatchType
|
||||
|
||||
from ...shared_patches.monterey_gva import MontereyGVA
|
||||
from ...shared_patches.monterey_opencl import MontereyOpenCL
|
||||
|
||||
from .....constants import Constants
|
||||
from .....detections import device_probe
|
||||
|
||||
from .....datasets.os_data import os_data
|
||||
|
||||
|
||||
class IntelBroadwell(BaseHardware):
|
||||
|
||||
def __init__(self, xnu_major, xnu_minor, os_build, global_constants: Constants) -> None:
|
||||
super().__init__(xnu_major, xnu_minor, os_build, global_constants)
|
||||
|
||||
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Display name for end users
|
||||
"""
|
||||
return f"{self.hardware_variant()}: Intel Broadwell"
|
||||
|
||||
|
||||
def present(self) -> bool:
|
||||
"""
|
||||
Targeting Intel Broadwell GPUs
|
||||
"""
|
||||
return self._is_gpu_architecture_present(
|
||||
gpu_architectures=[
|
||||
device_probe.Intel.Archs.Broadwell
|
||||
]
|
||||
)
|
||||
|
||||
def hardware_variant(self) -> HardwareVariant:
|
||||
"""
|
||||
Type of hardware variant
|
||||
"""
|
||||
return HardwareVariant.GRAPHICS
|
||||
|
||||
|
||||
def hardware_variant_graphics_subclass(self) -> HardwareVariantGraphicsSubclass:
|
||||
"""
|
||||
Type of hardware variant subclass
|
||||
"""
|
||||
return HardwareVariantGraphicsSubclass.METAL_31001_GRAPHICS
|
||||
|
||||
|
||||
def native_os(self) -> bool:
|
||||
"""
|
||||
Dropped support with macOS 13, Ventura
|
||||
"""
|
||||
return self._xnu_major < os_data.ventura.value
|
||||
|
||||
|
||||
def _model_specific_patches(self) -> dict:
|
||||
"""
|
||||
Model specific patches
|
||||
"""
|
||||
return {
|
||||
"Intel Broadwell": {
|
||||
PatchType.OVERWRITE_SYSTEM_VOLUME: {
|
||||
"/System/Library/Extensions": {
|
||||
"AppleIntelBDWGraphics.kext": self._resolve_monterey_framebuffers(),
|
||||
"AppleIntelBDWGraphicsFramebuffer.kext": self._resolve_monterey_framebuffers(),
|
||||
"AppleIntelBDWGraphicsGLDriver.bundle": "12.5",
|
||||
"AppleIntelBDWGraphicsMTLDriver.bundle": "12.5-22" if self._xnu_major < os_data.sequoia else "12.5-24",
|
||||
"AppleIntelBDWGraphicsVADriver.bundle": "12.5",
|
||||
"AppleIntelBDWGraphicsVAME.bundle": "12.5",
|
||||
"AppleIntelGraphicsShared.bundle": "12.5",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
def patches(self) -> dict:
|
||||
"""
|
||||
Patches for Intel Broadwell iGPUs
|
||||
"""
|
||||
if self.native_os() is True:
|
||||
return {}
|
||||
|
||||
return {
|
||||
**MontereyGVA(self._xnu_major, self._xnu_minor, self._constants.detected_os_version).patches(),
|
||||
**MontereyOpenCL(self._xnu_major, self._xnu_minor, self._constants.detected_os_version).patches(),
|
||||
**self._model_specific_patches(),
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
"""
|
||||
intel_haswell.py: Intel Haswell detection
|
||||
"""
|
||||
|
||||
from ..base import BaseHardware, HardwareVariant, HardwareVariantGraphicsSubclass
|
||||
|
||||
from ...base import PatchType
|
||||
|
||||
from ...shared_patches.metal_3802 import LegacyMetal3802
|
||||
from ...shared_patches.monterey_gva import MontereyGVA
|
||||
from ...shared_patches.monterey_opencl import MontereyOpenCL
|
||||
|
||||
from .....constants import Constants
|
||||
from .....detections import device_probe
|
||||
|
||||
from .....datasets.os_data import os_data
|
||||
|
||||
|
||||
class IntelHaswell(BaseHardware):
|
||||
|
||||
def __init__(self, xnu_major, xnu_minor, os_build, global_constants: Constants) -> None:
|
||||
super().__init__(xnu_major, xnu_minor, os_build, global_constants)
|
||||
|
||||
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Display name for end users
|
||||
"""
|
||||
return f"{self.hardware_variant()}: Intel Haswell"
|
||||
|
||||
|
||||
def present(self) -> bool:
|
||||
"""
|
||||
Targeting Intel Haswell GPUs
|
||||
"""
|
||||
return self._is_gpu_architecture_present(
|
||||
gpu_architectures=[
|
||||
device_probe.Intel.Archs.Haswell
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
def native_os(self) -> bool:
|
||||
"""
|
||||
Dropped support with macOS 13, Ventura
|
||||
"""
|
||||
return self._xnu_major < os_data.ventura.value
|
||||
|
||||
|
||||
def hardware_variant(self) -> HardwareVariant:
|
||||
"""
|
||||
Type of hardware variant
|
||||
"""
|
||||
return HardwareVariant.GRAPHICS
|
||||
|
||||
|
||||
def hardware_variant_graphics_subclass(self) -> HardwareVariantGraphicsSubclass:
|
||||
"""
|
||||
Type of hardware variant subclass
|
||||
"""
|
||||
return HardwareVariantGraphicsSubclass.METAL_3802_GRAPHICS
|
||||
|
||||
|
||||
def requires_metallib_support_pkg(self) -> bool:
|
||||
"""
|
||||
New compiler format introduced in macOS 15, Sequoia
|
||||
"""
|
||||
return self._xnu_major >= os_data.sequoia.value
|
||||
|
||||
|
||||
def _model_specific_patches(self) -> dict:
|
||||
"""
|
||||
Model specific patches
|
||||
"""
|
||||
return {
|
||||
"Intel Haswell": {
|
||||
PatchType.OVERWRITE_SYSTEM_VOLUME: {
|
||||
"/System/Library/Extensions": {
|
||||
"AppleIntelFramebufferAzul.kext": self._resolve_monterey_framebuffers(),
|
||||
"AppleIntelHD5000Graphics.kext": self._resolve_monterey_framebuffers(),
|
||||
"AppleIntelHD5000GraphicsGLDriver.bundle": "12.5",
|
||||
"AppleIntelHD5000GraphicsMTLDriver.bundle": "12.5",
|
||||
"AppleIntelHD5000GraphicsVADriver.bundle": "12.5",
|
||||
"AppleIntelHSWVA.bundle": "12.5",
|
||||
"AppleIntelGraphicsShared.bundle": "12.5",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
def _framebuffer_only_patches(self) -> dict:
|
||||
"""
|
||||
Framebuffer only patches
|
||||
"""
|
||||
return {
|
||||
"Intel Haswell": {
|
||||
PatchType.OVERWRITE_SYSTEM_VOLUME: {
|
||||
"/System/Library/Extensions": {
|
||||
"AppleIntelFramebufferAzul.kext": self._resolve_monterey_framebuffers(),
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
def patches(self) -> dict:
|
||||
"""
|
||||
Patches for Intel Haswell iGPUs
|
||||
"""
|
||||
if self.native_os() is True:
|
||||
return {}
|
||||
|
||||
return {
|
||||
**LegacyMetal3802(self._xnu_major, self._xnu_minor, self._constants.detected_os_version).patches(),
|
||||
**MontereyGVA(self._xnu_major, self._xnu_minor, self._constants.detected_os_version).patches(),
|
||||
**MontereyOpenCL(self._xnu_major, self._xnu_minor, self._constants.detected_os_version).patches(),
|
||||
**self._model_specific_patches(),
|
||||
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
"""
|
||||
intel_iron_lake.py: Intel Iron Lake detection
|
||||
"""
|
||||
|
||||
from ..base import BaseHardware, HardwareVariant, HardwareVariantGraphicsSubclass
|
||||
|
||||
from ...base import PatchType
|
||||
|
||||
from ...shared_patches.non_metal import NonMetal
|
||||
from ...shared_patches.monterey_webkit import MontereyWebKit
|
||||
|
||||
from .....constants import Constants
|
||||
from .....detections import device_probe
|
||||
|
||||
from .....datasets.os_data import os_data
|
||||
|
||||
|
||||
class IntelIronLake(BaseHardware):
|
||||
|
||||
def __init__(self, xnu_major, xnu_minor, os_build, global_constants: Constants) -> None:
|
||||
super().__init__(xnu_major, xnu_minor, os_build, global_constants)
|
||||
|
||||
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Display name for end users
|
||||
"""
|
||||
return f"{self.hardware_variant()}: Intel Iron Lake"
|
||||
|
||||
|
||||
def present(self) -> bool:
|
||||
"""
|
||||
Targeting Intel Iron Lake GPUs
|
||||
"""
|
||||
return self._is_gpu_architecture_present(
|
||||
gpu_architectures=[
|
||||
device_probe.Intel.Archs.Iron_Lake
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
def native_os(self) -> bool:
|
||||
"""
|
||||
Dropped support with macOS 10.14, Mojave
|
||||
"""
|
||||
return self._xnu_major < os_data.mojave.value
|
||||
|
||||
|
||||
def hardware_variant(self) -> HardwareVariant:
|
||||
"""
|
||||
Type of hardware variant
|
||||
"""
|
||||
return HardwareVariant.GRAPHICS
|
||||
|
||||
|
||||
def hardware_variant_graphics_subclass(self) -> HardwareVariantGraphicsSubclass:
|
||||
"""
|
||||
Type of hardware variant subclass
|
||||
"""
|
||||
return HardwareVariantGraphicsSubclass.NON_METAL_GRAPHICS
|
||||
|
||||
|
||||
def requires_kernel_debug_kit(self) -> bool:
|
||||
"""
|
||||
Apple no longer provides standalone kexts in the base OS
|
||||
"""
|
||||
return self._xnu_major >= os_data.ventura.value
|
||||
|
||||
|
||||
def _model_specific_patches(self) -> dict:
|
||||
"""
|
||||
Model specific patches
|
||||
"""
|
||||
return {
|
||||
"Intel Iron Lake": {
|
||||
PatchType.OVERWRITE_SYSTEM_VOLUME: {
|
||||
"/System/Library/Extensions": {
|
||||
"AppleIntelHDGraphics.kext": "10.13.6",
|
||||
"AppleIntelHDGraphicsFB.kext": "10.13.6",
|
||||
"AppleIntelHDGraphicsGA.plugin": "10.13.6",
|
||||
"AppleIntelHDGraphicsGLDriver.bundle": "10.13.6",
|
||||
"AppleIntelHDGraphicsVADriver.bundle": "10.13.6",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
def patches(self) -> dict:
|
||||
"""
|
||||
Patches for Intel Iron Lake iGPUs
|
||||
"""
|
||||
if self.native_os() is True:
|
||||
return {}
|
||||
|
||||
if self._xnu_major not in self._constants.legacy_accel_support and self._dortania_internal_check() is False:
|
||||
return {**self._model_specific_patches()}
|
||||
|
||||
return {
|
||||
**NonMetal(self._xnu_major, self._xnu_minor, self._os_build).patches(),
|
||||
**MontereyWebKit(self._xnu_major, self._xnu_minor, self._os_build).patches(),
|
||||
**self._model_specific_patches(),
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
"""
|
||||
intel_ivy_bridge.py: Intel Ivy Bridge detection
|
||||
"""
|
||||
|
||||
from ..base import BaseHardware, HardwareVariant, HardwareVariantGraphicsSubclass
|
||||
|
||||
from ...base import PatchType
|
||||
|
||||
from ...shared_patches.metal_3802 import LegacyMetal3802
|
||||
from ...shared_patches.big_sur_gva import BigSurGVA
|
||||
from ...shared_patches.monterey_opencl import MontereyOpenCL
|
||||
from ...shared_patches.big_sur_opencl import BigSurOpenCL
|
||||
from ...shared_patches.monterey_webkit import MontereyWebKit
|
||||
|
||||
from .....constants import Constants
|
||||
from .....detections import device_probe
|
||||
|
||||
from .....datasets.os_data import os_data
|
||||
|
||||
|
||||
class IntelIvyBridge(BaseHardware):
|
||||
|
||||
def __init__(self, xnu_major, xnu_minor, os_build, global_constants: Constants) -> None:
|
||||
super().__init__(xnu_major, xnu_minor, os_build, global_constants)
|
||||
|
||||
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Display name for end users
|
||||
"""
|
||||
return f"{self.hardware_variant()}: Intel Ivy Bridge"
|
||||
|
||||
|
||||
def present(self) -> bool:
|
||||
"""
|
||||
Targeting Intel Ivy Bridge GPUs
|
||||
"""
|
||||
return self._is_gpu_architecture_present(
|
||||
gpu_architectures=[
|
||||
device_probe.Intel.Archs.Ivy_Bridge
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
def native_os(self) -> bool:
|
||||
"""
|
||||
Dropped support with macOS 12, Monterey
|
||||
"""
|
||||
return self._xnu_major < os_data.monterey.value
|
||||
|
||||
|
||||
def hardware_variant(self) -> HardwareVariant:
|
||||
"""
|
||||
Type of hardware variant
|
||||
"""
|
||||
return HardwareVariant.GRAPHICS
|
||||
|
||||
|
||||
def hardware_variant_graphics_subclass(self) -> HardwareVariantGraphicsSubclass:
|
||||
"""
|
||||
Type of hardware variant subclass
|
||||
"""
|
||||
return HardwareVariantGraphicsSubclass.METAL_3802_GRAPHICS
|
||||
|
||||
|
||||
def requires_metallib_support_pkg(self) -> bool:
|
||||
"""
|
||||
New compiler format introduced in macOS 15, Sequoia
|
||||
"""
|
||||
return self._xnu_major >= os_data.sequoia.value
|
||||
|
||||
|
||||
def _resolve_ivy_bridge_framebuffers(self) -> str:
|
||||
"""
|
||||
Resolve patchset directory for Ivy Bridge framebuffers:
|
||||
- AppleIntelFramebufferCapri.kext
|
||||
- AppleIntelHD4000Graphics.kext
|
||||
"""
|
||||
if self._xnu_major < os_data.sonoma:
|
||||
return "11.7.10"
|
||||
if self._xnu_float < self.macOS_14_4:
|
||||
return "11.7.10-23"
|
||||
return "11.7.10-23.4"
|
||||
|
||||
|
||||
def _model_specific_patches(self) -> dict:
|
||||
"""
|
||||
Model specific patches
|
||||
"""
|
||||
return {
|
||||
"Intel Ivy Bridge": {
|
||||
PatchType.OVERWRITE_SYSTEM_VOLUME: {
|
||||
"/System/Library/Extensions": {
|
||||
"AppleIntelHD4000GraphicsGLDriver.bundle": "11.7.10",
|
||||
"AppleIntelHD4000GraphicsMTLDriver.bundle": "11.7.10" if self._xnu_major < os_data.ventura else "11.7.10-22",
|
||||
"AppleIntelHD4000GraphicsVADriver.bundle": "11.7.10",
|
||||
"AppleIntelFramebufferCapri.kext": self._resolve_ivy_bridge_framebuffers(),
|
||||
"AppleIntelHD4000Graphics.kext": self._resolve_ivy_bridge_framebuffers(),
|
||||
"AppleIntelIVBVA.bundle": "11.7.10",
|
||||
"AppleIntelGraphicsShared.bundle": "11.7.10", # libIGIL-Metal.dylib pulled from 11.0 Beta 6
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
def patches(self) -> dict:
|
||||
"""
|
||||
Patches for Intel Ivy Bridge iGPUs
|
||||
"""
|
||||
if self.native_os() is True:
|
||||
return {}
|
||||
|
||||
return {
|
||||
**LegacyMetal3802(self._xnu_major, self._xnu_minor, self._constants.detected_os_version).patches(),
|
||||
**BigSurGVA(self._xnu_major, self._xnu_minor, self._constants.detected_os_version).patches(),
|
||||
**MontereyOpenCL(self._xnu_major, self._xnu_minor, self._constants.detected_os_version).patches(),
|
||||
**BigSurOpenCL(self._xnu_major, self._xnu_minor, self._constants.detected_os_version).patches(),
|
||||
**MontereyWebKit(self._xnu_major, self._xnu_minor, self._os_build).patches(),
|
||||
**self._model_specific_patches(),
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
"""
|
||||
intel_sandy_bridge.py: Intel Sandy Bridge detection
|
||||
"""
|
||||
|
||||
from ..base import BaseHardware, HardwareVariant, HardwareVariantGraphicsSubclass
|
||||
|
||||
from ...base import PatchType
|
||||
|
||||
from ...shared_patches.non_metal import NonMetal
|
||||
from ...shared_patches.monterey_webkit import MontereyWebKit
|
||||
from ...shared_patches.high_sierra_gva import HighSierraGVA
|
||||
|
||||
from .....constants import Constants
|
||||
from .....detections import device_probe
|
||||
|
||||
from .....datasets.os_data import os_data
|
||||
|
||||
|
||||
class IntelSandyBridge(BaseHardware):
|
||||
|
||||
def __init__(self, xnu_major, xnu_minor, os_build, global_constants: Constants) -> None:
|
||||
super().__init__(xnu_major, xnu_minor, os_build, global_constants)
|
||||
|
||||
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Display name for end users
|
||||
"""
|
||||
return f"{self.hardware_variant()}: Intel Sandy Bridge"
|
||||
|
||||
|
||||
def present(self) -> bool:
|
||||
"""
|
||||
Targeting Intel Sandy Bridge GPUs
|
||||
"""
|
||||
return self._is_gpu_architecture_present(
|
||||
gpu_architectures=[
|
||||
device_probe.Intel.Archs.Sandy_Bridge
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
def native_os(self) -> bool:
|
||||
"""
|
||||
Dropped support with macOS 10.14, Mojave
|
||||
"""
|
||||
return self._xnu_major < os_data.mojave.value
|
||||
|
||||
|
||||
def hardware_variant(self) -> HardwareVariant:
|
||||
"""
|
||||
Type of hardware variant
|
||||
"""
|
||||
return HardwareVariant.GRAPHICS
|
||||
|
||||
|
||||
def hardware_variant_graphics_subclass(self) -> HardwareVariantGraphicsSubclass:
|
||||
"""
|
||||
Type of hardware variant subclass
|
||||
"""
|
||||
return HardwareVariantGraphicsSubclass.NON_METAL_GRAPHICS
|
||||
|
||||
|
||||
def requires_kernel_debug_kit(self) -> bool:
|
||||
"""
|
||||
Requires replacing a number of kexts in the BootKC
|
||||
"""
|
||||
if self._xnu_major >= os_data.ventura.value:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def _model_specific_patches(self) -> dict:
|
||||
"""
|
||||
Model specific patches
|
||||
"""
|
||||
return {
|
||||
"Intel Sandy Bridge": {
|
||||
PatchType.OVERWRITE_SYSTEM_VOLUME: {
|
||||
"/System/Library/Extensions": {
|
||||
"AppleIntelHD3000Graphics.kext": "10.13.6",
|
||||
"AppleIntelHD3000GraphicsGA.plugin": "10.13.6",
|
||||
"AppleIntelHD3000GraphicsGLDriver.bundle": "10.13.6",
|
||||
"AppleIntelHD3000GraphicsVADriver.bundle": "10.13.6",
|
||||
"AppleIntelSNBGraphicsFB.kext": "10.13.6",
|
||||
"AppleIntelSNBVA.bundle": "10.13.6",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
def patches(self) -> dict:
|
||||
"""
|
||||
Patches for Intel Sandy Bridge GPUs
|
||||
"""
|
||||
if self.native_os() is True:
|
||||
return {}
|
||||
|
||||
if self._xnu_major not in self._constants.legacy_accel_support and self._dortania_internal_check() is False:
|
||||
return {**self._model_specific_patches()}
|
||||
|
||||
return {
|
||||
**NonMetal(self._xnu_major, self._xnu_minor, self._os_build).patches(),
|
||||
**HighSierraGVA(self._xnu_major, self._xnu_minor, self._os_build).patches(),
|
||||
**MontereyWebKit(self._xnu_major, self._xnu_minor, self._os_build).patches(),
|
||||
**self._model_specific_patches(),
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
"""
|
||||
intel_skylake.py: Intel Skylake detection
|
||||
"""
|
||||
|
||||
from ..base import BaseHardware, HardwareVariant, HardwareVariantGraphicsSubclass
|
||||
|
||||
from ...base import PatchType
|
||||
|
||||
from ...shared_patches.monterey_opencl import MontereyOpenCL
|
||||
|
||||
from .....constants import Constants
|
||||
from .....detections import device_probe
|
||||
|
||||
from .....datasets.os_data import os_data
|
||||
|
||||
|
||||
class IntelSkylake(BaseHardware):
|
||||
|
||||
def __init__(self, xnu_major, xnu_minor, os_build, global_constants: Constants) -> None:
|
||||
super().__init__(xnu_major, xnu_minor, os_build, global_constants)
|
||||
|
||||
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Display name for end users
|
||||
"""
|
||||
return f"{self.hardware_variant()}: Intel Skylake"
|
||||
|
||||
|
||||
def present(self) -> bool:
|
||||
"""
|
||||
Targeting Intel Skylake GPUs
|
||||
"""
|
||||
return self._is_gpu_architecture_present(
|
||||
gpu_architectures=[
|
||||
device_probe.Intel.Archs.Skylake
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
def native_os(self) -> bool:
|
||||
"""
|
||||
Dropped support with macOS 13, Ventura
|
||||
"""
|
||||
return self._xnu_major < os_data.ventura.value
|
||||
|
||||
|
||||
def hardware_variant(self) -> HardwareVariant:
|
||||
"""
|
||||
Type of hardware variant
|
||||
"""
|
||||
return HardwareVariant.GRAPHICS
|
||||
|
||||
|
||||
def hardware_variant_graphics_subclass(self) -> HardwareVariantGraphicsSubclass:
|
||||
"""
|
||||
Type of hardware variant subclass
|
||||
"""
|
||||
return HardwareVariantGraphicsSubclass.METAL_31001_GRAPHICS
|
||||
|
||||
|
||||
def _model_specific_patches(self) -> dict:
|
||||
"""
|
||||
Model specific patches
|
||||
"""
|
||||
return {
|
||||
"Intel Skylake": {
|
||||
PatchType.OVERWRITE_SYSTEM_VOLUME: {
|
||||
"/System/Library/Extensions": {
|
||||
"AppleIntelSKLGraphics.kext": self._resolve_monterey_framebuffers(),
|
||||
"AppleIntelSKLGraphicsFramebuffer.kext": self._resolve_monterey_framebuffers(),
|
||||
"AppleIntelSKLGraphicsGLDriver.bundle": "12.5",
|
||||
"AppleIntelSKLGraphicsMTLDriver.bundle": "12.5" if self._xnu_major < os_data.sequoia else "12.5-24",
|
||||
"AppleIntelSKLGraphicsVADriver.bundle": "12.5",
|
||||
"AppleIntelSKLGraphicsVAME.bundle": "12.5",
|
||||
"AppleIntelGraphicsShared.bundle": "12.5",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
def patches(self) -> dict:
|
||||
"""
|
||||
Patches for Intel Skylake iGPUs
|
||||
"""
|
||||
if self.native_os() is True:
|
||||
return {}
|
||||
|
||||
return {
|
||||
**MontereyOpenCL(self._xnu_major, self._xnu_minor, self._constants.detected_os_version).patches(),
|
||||
**self._model_specific_patches(),
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
"""
|
||||
nvidia_kepler.py: Nvidia Kepler detection
|
||||
"""
|
||||
|
||||
from ..base import BaseHardware, HardwareVariant, HardwareVariantGraphicsSubclass
|
||||
|
||||
from ...base import PatchType
|
||||
|
||||
from ...shared_patches.metal_3802 import LegacyMetal3802
|
||||
from ...shared_patches.monterey_opencl import MontereyOpenCL
|
||||
from ...shared_patches.big_sur_opencl import BigSurOpenCL
|
||||
from ...shared_patches.monterey_webkit import MontereyWebKit
|
||||
|
||||
from .....constants import Constants
|
||||
from .....detections import device_probe
|
||||
|
||||
from .....datasets.os_data import os_data
|
||||
|
||||
|
||||
class NvidiaKepler(BaseHardware):
|
||||
|
||||
def __init__(self, xnu_major, xnu_minor, os_build, global_constants: Constants) -> None:
|
||||
super().__init__(xnu_major, xnu_minor, os_build, global_constants)
|
||||
|
||||
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Display name for end users
|
||||
"""
|
||||
return f"{self.hardware_variant()}: Nvidia Kepler"
|
||||
|
||||
|
||||
def present(self) -> bool:
|
||||
"""
|
||||
Targeting Nvidia Kepler GPUs
|
||||
"""
|
||||
return self._is_gpu_architecture_present(
|
||||
gpu_architectures=[
|
||||
device_probe.NVIDIA.Archs.Kepler
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
def native_os(self) -> bool:
|
||||
"""
|
||||
Dropped support with macOS 12.0 Beta 7, Monterey
|
||||
"""
|
||||
if self._xnu_major < os_data.monterey:
|
||||
return True
|
||||
|
||||
if self._xnu_major == os_data.monterey:
|
||||
if self._xnu_minor <= 0: # 12.0 Beta 8 increased XNU minor
|
||||
if self._os_build != "21A5522h": # 12.0 Beta 7
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
|
||||
def hardware_variant(self) -> HardwareVariant:
|
||||
"""
|
||||
Type of hardware variant
|
||||
"""
|
||||
return HardwareVariant.GRAPHICS
|
||||
|
||||
|
||||
def hardware_variant_graphics_subclass(self) -> HardwareVariantGraphicsSubclass:
|
||||
"""
|
||||
Type of hardware variant subclass
|
||||
"""
|
||||
return HardwareVariantGraphicsSubclass.METAL_3802_GRAPHICS
|
||||
|
||||
|
||||
def requires_metallib_support_pkg(self) -> bool:
|
||||
"""
|
||||
New compiler format introduced in macOS 15, Sequoia
|
||||
"""
|
||||
return self._xnu_major >= os_data.sequoia.value
|
||||
|
||||
|
||||
def _resolve_kepler_geforce_framebuffers(self) -> str:
|
||||
"""
|
||||
Resolve patchset directory for GeForce.kext
|
||||
"""
|
||||
if self._xnu_major < os_data.sonoma:
|
||||
return "12.0 Beta 6"
|
||||
if self._xnu_float < self.macOS_14_4:
|
||||
return "12.0 Beta 6-23"
|
||||
return "12.0 Beta 6-23.4"
|
||||
|
||||
|
||||
def _model_specific_patches(self) -> dict:
|
||||
"""
|
||||
Model specific patches
|
||||
"""
|
||||
return {
|
||||
"Nvidia Kepler": {
|
||||
PatchType.OVERWRITE_SYSTEM_VOLUME: {
|
||||
"/System/Library/Extensions": {
|
||||
"GeForce.kext": self._resolve_kepler_geforce_framebuffers(),
|
||||
"NVDAGF100Hal.kext": "12.0 Beta 6",
|
||||
"NVDAGK100Hal.kext": "12.0 Beta 6",
|
||||
"NVDAResman.kext": "12.0 Beta 6",
|
||||
"NVDAStartup.kext": "12.0 Beta 6",
|
||||
"GeForceAIRPlugin.bundle": "11.0 Beta 3",
|
||||
"GeForceGLDriver.bundle": "11.0 Beta 3",
|
||||
"GeForceMTLDriver.bundle": "11.0 Beta 3" if self._xnu_major <= os_data.monterey else f"11.0 Beta 3-22",
|
||||
"GeForceVADriver.bundle": "12.0 Beta 6",
|
||||
},
|
||||
},
|
||||
PatchType.MERGE_SYSTEM_VOLUME: {
|
||||
"/System/Library/Frameworks": {
|
||||
# XNU 21.6 (macOS 12.5)
|
||||
**({ "Metal.framework": "12.5 Beta 2"} if (self._xnu_float >= self.macOS_12_5 and self._xnu_major < os_data.ventura) else {}),
|
||||
},
|
||||
"/System/Library/PrivateFrameworks": {
|
||||
"GPUCompiler.framework": "11.6",
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
def patches(self) -> dict:
|
||||
"""
|
||||
Patches for Nvidia Kepler GPUs
|
||||
"""
|
||||
if self.native_os() is True:
|
||||
return {}
|
||||
|
||||
return {
|
||||
**LegacyMetal3802(self._xnu_major, self._xnu_minor, self._constants.detected_os_version).patches(),
|
||||
**MontereyOpenCL(self._xnu_major, self._xnu_minor, self._constants.detected_os_version).patches(),
|
||||
**BigSurOpenCL(self._xnu_major, self._xnu_minor, self._constants.detected_os_version).patches(),
|
||||
**MontereyWebKit(self._xnu_major, self._xnu_minor, self._os_build).patches(),
|
||||
**self._model_specific_patches(),
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
"""
|
||||
nvidia_tesla.py: Nvidia Tesla detection
|
||||
"""
|
||||
|
||||
from ..base import BaseHardware, HardwareVariant, HardwareVariantGraphicsSubclass
|
||||
|
||||
from ...base import PatchType
|
||||
|
||||
from ...shared_patches.non_metal import NonMetal
|
||||
from ...shared_patches.monterey_webkit import MontereyWebKit
|
||||
|
||||
from .....constants import Constants
|
||||
from .....detections import device_probe
|
||||
|
||||
from .....datasets.os_data import os_data
|
||||
|
||||
|
||||
class NvidiaTesla(BaseHardware):
|
||||
|
||||
def __init__(self, xnu_major, xnu_minor, os_build, global_constants: Constants) -> None:
|
||||
super().__init__(xnu_major, xnu_minor, os_build, global_constants)
|
||||
|
||||
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Display name for end users
|
||||
"""
|
||||
return f"{self.hardware_variant()}: Nvidia Tesla"
|
||||
|
||||
|
||||
def present(self) -> bool:
|
||||
"""
|
||||
Targeting Nvidia Tesla GPUs
|
||||
"""
|
||||
return self._is_gpu_architecture_present(
|
||||
gpu_architectures=[
|
||||
device_probe.NVIDIA.Archs.Tesla
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
def native_os(self) -> bool:
|
||||
"""
|
||||
Dropped support with macOS 10.14, Mojave
|
||||
"""
|
||||
return self._xnu_major < os_data.mojave.value
|
||||
|
||||
|
||||
def hardware_variant(self) -> HardwareVariant:
|
||||
"""
|
||||
Type of hardware variant
|
||||
"""
|
||||
return HardwareVariant.GRAPHICS
|
||||
|
||||
|
||||
def hardware_variant_graphics_subclass(self) -> HardwareVariantGraphicsSubclass:
|
||||
"""
|
||||
Type of hardware variant subclass
|
||||
"""
|
||||
return HardwareVariantGraphicsSubclass.NON_METAL_GRAPHICS
|
||||
|
||||
|
||||
def requires_kernel_debug_kit(self) -> bool:
|
||||
"""
|
||||
Apple no longer provides standalone kexts in the base OS
|
||||
"""
|
||||
return self._xnu_major >= os_data.ventura.value
|
||||
|
||||
|
||||
def _model_specific_patches(self) -> dict:
|
||||
"""
|
||||
Model specific patches
|
||||
"""
|
||||
return {
|
||||
"Nvidia Tesla": {
|
||||
PatchType.OVERWRITE_SYSTEM_VOLUME: {
|
||||
"/System/Library/Extensions": {
|
||||
"GeForceGA.bundle": "10.13.6",
|
||||
"GeForceTesla.kext": "10.13.6",
|
||||
"GeForceTeslaGLDriver.bundle": "10.13.6",
|
||||
"GeForceTeslaVADriver.bundle": "10.13.6",
|
||||
"NVDANV50HalTesla.kext": "10.13.6",
|
||||
"NVDAResmanTesla.kext": "10.13.6",
|
||||
# Apple dropped NVDAStartup in 12.0 Beta 7 (XNU 21.1)
|
||||
**({ "NVDAStartup.kext": "12.0 Beta 6" } if self._xnu_float >= self.macOS_12_0_B7 else {})
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
def patches(self) -> dict:
|
||||
"""
|
||||
Patches for Nvidia Tesla GPUs
|
||||
"""
|
||||
if self.native_os() is True:
|
||||
return {}
|
||||
|
||||
if self._xnu_major not in self._constants.legacy_accel_support and self._dortania_internal_check() is False:
|
||||
return {**self._model_specific_patches()}
|
||||
|
||||
return {
|
||||
**NonMetal(self._xnu_major, self._xnu_minor, self._os_build).patches(),
|
||||
**MontereyWebKit(self._xnu_major, self._xnu_minor, self._os_build).patches(),
|
||||
**self._model_specific_patches(),
|
||||
}
|
||||
@@ -0,0 +1,164 @@
|
||||
"""
|
||||
nvidia_webdriver.py: Nvidia Web Driver detection
|
||||
"""
|
||||
|
||||
from ..base import BaseHardware, HardwareVariant, HardwareVariantGraphicsSubclass
|
||||
|
||||
from ...base import PatchType
|
||||
|
||||
from ...shared_patches.non_metal import NonMetal
|
||||
from ...shared_patches.monterey_webkit import MontereyWebKit
|
||||
from ...shared_patches.non_metal_ioaccel import NonMetalIOAccelerator
|
||||
from ...shared_patches.non_metal_coredisplay import NonMetalCoreDisplay
|
||||
from ...shared_patches.non_metal_enforcement import NonMetalEnforcement
|
||||
|
||||
from .....constants import Constants
|
||||
from .....detections import device_probe
|
||||
|
||||
from .....datasets.os_data import os_data
|
||||
from .....datasets.sip_data import system_integrity_protection
|
||||
|
||||
|
||||
class NvidiaWebDriver(BaseHardware):
|
||||
|
||||
def __init__(self, xnu_major, xnu_minor, os_build, global_constants: Constants) -> None:
|
||||
super().__init__(xnu_major, xnu_minor, os_build, global_constants)
|
||||
|
||||
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Display name for end users
|
||||
"""
|
||||
return f"{self.hardware_variant()}: Nvidia Web Drivers"
|
||||
|
||||
|
||||
def present(self) -> bool:
|
||||
"""
|
||||
Targeting Nvidia Fermi, Maxwell, Pascal GPUs
|
||||
"""
|
||||
return self._is_gpu_architecture_present(
|
||||
gpu_architectures=[
|
||||
device_probe.NVIDIA.Archs.Fermi,
|
||||
device_probe.NVIDIA.Archs.Maxwell,
|
||||
device_probe.NVIDIA.Archs.Pascal,
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
def native_os(self) -> bool:
|
||||
"""
|
||||
Dropped support with macOS 10.14, Mojave
|
||||
"""
|
||||
return self._xnu_major < os_data.mojave.value
|
||||
|
||||
|
||||
def hardware_variant(self) -> HardwareVariant:
|
||||
"""
|
||||
Type of hardware variant
|
||||
"""
|
||||
return HardwareVariant.GRAPHICS
|
||||
|
||||
|
||||
def hardware_variant_graphics_subclass(self) -> HardwareVariantGraphicsSubclass:
|
||||
"""
|
||||
Type of hardware variant subclass
|
||||
"""
|
||||
return HardwareVariantGraphicsSubclass.NON_METAL_GRAPHICS
|
||||
|
||||
|
||||
def requires_kernel_debug_kit(self) -> bool:
|
||||
"""
|
||||
Apple no longer provides standalone kexts in the base OS
|
||||
"""
|
||||
return self._xnu_major >= os_data.ventura.value
|
||||
|
||||
|
||||
def required_system_integrity_protection_configurations(self) -> list[str]:
|
||||
"""
|
||||
List of required SIP configurations for the patch set
|
||||
"""
|
||||
return system_integrity_protection.root_patch_sip_big_sur_3rd_part_kexts
|
||||
|
||||
|
||||
def _model_specific_patches(self) -> dict:
|
||||
"""
|
||||
Model specific patches
|
||||
"""
|
||||
return {
|
||||
"Nvidia Web Drivers": {
|
||||
PatchType.OVERWRITE_SYSTEM_VOLUME: {
|
||||
"/System/Library/Extensions": {
|
||||
"GeForceAIRPluginWeb.bundle": "WebDriver-387.10.10.10.40.140",
|
||||
"GeForceGLDriverWeb.bundle": "WebDriver-387.10.10.10.40.140",
|
||||
"GeForceMTLDriverWeb.bundle": "WebDriver-387.10.10.10.40.140",
|
||||
"GeForceVADriverWeb.bundle": "WebDriver-387.10.10.10.40.140",
|
||||
|
||||
# Tesla-only files
|
||||
"GeForceTeslaGAWeb.bundle": "WebDriver-387.10.10.10.40.140",
|
||||
"GeForceTeslaGLDriverWeb.bundle": "WebDriver-387.10.10.10.40.140",
|
||||
"GeForceTeslaVADriverWeb.bundle": "WebDriver-387.10.10.10.40.140",
|
||||
},
|
||||
},
|
||||
PatchType.OVERWRITE_DATA_VOLUME: {
|
||||
"/Library/Extensions": {
|
||||
"GeForceWeb.kext": "WebDriver-387.10.10.10.40.140",
|
||||
"NVDAGF100HalWeb.kext": "WebDriver-387.10.10.10.40.140",
|
||||
"NVDAGK100HalWeb.kext": "WebDriver-387.10.10.10.40.140",
|
||||
"NVDAGM100HalWeb.kext": "WebDriver-387.10.10.10.40.140",
|
||||
"NVDAGP100HalWeb.kext": "WebDriver-387.10.10.10.40.140",
|
||||
"NVDAResmanWeb.kext": "WebDriver-387.10.10.10.40.140",
|
||||
"NVDAStartupWeb.kext": "WebDriver-387.10.10.10.40.140",
|
||||
|
||||
# Tesla-only files
|
||||
"GeForceTeslaWeb.kext": "WebDriver-387.10.10.10.40.140",
|
||||
"NVDANV50HalTeslaWeb.kext": "WebDriver-387.10.10.10.40.140",
|
||||
"NVDAResmanTeslaWeb.kext": "WebDriver-387.10.10.10.40.140",
|
||||
},
|
||||
|
||||
# Disabled due to issues with Pref pane stripping 'nvda_drv' NVRAM
|
||||
# variables
|
||||
# "/Library/PreferencePanes": {
|
||||
# "NVIDIA Driver Manager.prefPane": "WebDriver-387.10.10.10.40.140",
|
||||
# },
|
||||
# "/Library/LaunchAgents": {
|
||||
# "com.nvidia.nvagent.plist": "WebDriver-387.10.10.10.40.140",
|
||||
# },
|
||||
# "/Library/LaunchDaemons": {
|
||||
# "com.nvidia.nvroothelper.plist": "WebDriver-387.10.10.10.40.140",
|
||||
# },
|
||||
},
|
||||
PatchType.MERGE_SYSTEM_VOLUME: {
|
||||
"/System/Library/PrivateFrameworks": {
|
||||
# Restore OpenCL by adding missing compiler files
|
||||
**({ "GPUCompiler.framework": "11.6"} if self._xnu_major >= os_data.monterey else {}),
|
||||
},
|
||||
},
|
||||
PatchType.REMOVE_SYSTEM_VOLUME: {
|
||||
"/System/Library/Extensions": [
|
||||
# Due to how late the Auxiliary cache loads, NVDAStartup will match first and then the Web Driver kexts.
|
||||
# This has no effect for Maxwell and Pascal, however for development purposes, Tesla and Kepler are partially supported.
|
||||
"NVDAStartup.kext",
|
||||
],
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
def patches(self) -> dict:
|
||||
"""
|
||||
Patches for Nvidia Web Drivers
|
||||
"""
|
||||
if self.native_os() is True:
|
||||
return {}
|
||||
|
||||
if self._xnu_major not in self._constants.legacy_accel_support and self._dortania_internal_check() is False:
|
||||
return {**self._model_specific_patches()}
|
||||
|
||||
return {
|
||||
**NonMetal(self._xnu_major, self._xnu_minor, self._os_build).patches(),
|
||||
**NonMetalIOAccelerator(self._xnu_major, self._xnu_minor, self._os_build).patches(),
|
||||
**NonMetalCoreDisplay(self._xnu_major, self._xnu_minor, self._os_build).patches(),
|
||||
**MontereyWebKit(self._xnu_major, self._xnu_minor, self._os_build).patches(),
|
||||
**self._model_specific_patches(),
|
||||
**NonMetalEnforcement(self._xnu_major, self._xnu_minor, self._os_build).patches(),
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
"""
|
||||
display_backlight.py: Legacy Backlight Control detection
|
||||
"""
|
||||
|
||||
from ..base import BaseHardware, HardwareVariant
|
||||
|
||||
from ...base import PatchType
|
||||
|
||||
from .....constants import Constants
|
||||
|
||||
from .....datasets.os_data import os_data
|
||||
|
||||
|
||||
class DisplayBacklight(BaseHardware):
|
||||
|
||||
def __init__(self, xnu_major, xnu_minor, os_build, global_constants: Constants) -> None:
|
||||
super().__init__(xnu_major, xnu_minor, os_build, global_constants)
|
||||
|
||||
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Display name for end users
|
||||
"""
|
||||
return f"{self.hardware_variant()}: Legacy Backlight Control"
|
||||
|
||||
|
||||
def present(self) -> bool:
|
||||
"""
|
||||
Targeting Legacy Backlight Controllers
|
||||
"""
|
||||
return self._computer.real_model in [
|
||||
"MacBook5,2",
|
||||
"iMac7,1",
|
||||
"iMac8,1",
|
||||
"iMac9,1",
|
||||
]
|
||||
|
||||
|
||||
def native_os(self) -> bool:
|
||||
"""
|
||||
Dropped support with macOS 10.13, High Sierra
|
||||
"""
|
||||
return self._xnu_major < os_data.high_sierra.value
|
||||
|
||||
|
||||
def hardware_variant(self) -> HardwareVariant:
|
||||
"""
|
||||
Type of hardware variant
|
||||
"""
|
||||
return HardwareVariant.MISCELLANEOUS
|
||||
|
||||
|
||||
def requires_kernel_debug_kit(self) -> bool:
|
||||
"""
|
||||
Apple no longer provides standalone kexts in the base OS
|
||||
"""
|
||||
return self._xnu_major >= os_data.ventura.value
|
||||
|
||||
|
||||
def patches(self) -> dict:
|
||||
"""
|
||||
Patches for Legacy Backlight Control
|
||||
"""
|
||||
if self.native_os() is True:
|
||||
return {}
|
||||
|
||||
return {
|
||||
"Legacy Backlight Control": {
|
||||
PatchType.OVERWRITE_SYSTEM_VOLUME: {
|
||||
"/System/Library/Extensions": {
|
||||
"AppleBacklight.kext": "10.12.6",
|
||||
"AppleBacklightExpert.kext": "10.12.6",
|
||||
},
|
||||
},
|
||||
PatchType.MERGE_SYSTEM_VOLUME: {
|
||||
"/System/Library/PrivateFrameworks": {
|
||||
"DisplayServices.framework": "10.12.6",
|
||||
},
|
||||
},
|
||||
PatchType.REMOVE_SYSTEM_VOLUME: {
|
||||
"/System/Library/Extensions/AppleGraphicsControl.kext/Contents/PlugIns": [
|
||||
"AGDCBacklightControl.kext",
|
||||
],
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
"""
|
||||
gmux.py: Legacy GMUX detection
|
||||
"""
|
||||
|
||||
from ..base import BaseHardware, HardwareVariant
|
||||
|
||||
from ...base import PatchType
|
||||
|
||||
from .....constants import Constants
|
||||
from .....support import utilities
|
||||
|
||||
from .....datasets.os_data import os_data
|
||||
|
||||
|
||||
class GraphicsMultiplexer(BaseHardware):
|
||||
|
||||
def __init__(self, xnu_major, xnu_minor, os_build, global_constants: Constants) -> None:
|
||||
super().__init__(xnu_major, xnu_minor, os_build, global_constants)
|
||||
|
||||
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Display name for end users
|
||||
"""
|
||||
return f"{self.hardware_variant()}: Legacy GMUX"
|
||||
|
||||
|
||||
def _check_dgpu_status(self) -> bool:
|
||||
"""
|
||||
Query whether system has an active dGPU
|
||||
"""
|
||||
dgpu = self._computer.dgpu
|
||||
if dgpu:
|
||||
if dgpu.class_code and dgpu.class_code == 0xFFFFFFFF:
|
||||
# If dGPU is disabled via class-codes, assume demuxed
|
||||
return False
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def _detect_demux(self) -> bool:
|
||||
"""
|
||||
Query whether system has been demuxed (ex. MacBookPro8,2, disabled dGPU)
|
||||
"""
|
||||
# If GFX0 is missing, assume machine was demuxed
|
||||
# -wegnoegpu would also trigger this, so ensure arg is not present
|
||||
if not "-wegnoegpu" in (utilities.get_nvram("boot-args", decode=True) or ""):
|
||||
igpu = self._constants.computer.igpu
|
||||
dgpu = self._check_dgpu_status()
|
||||
if igpu and not dgpu:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def present(self) -> bool:
|
||||
"""
|
||||
Targeting Legacy GMUX Controllers
|
||||
Ref: https://doslabelectronics.com/Demux.html
|
||||
|
||||
Sierra uses a legacy GMUX control method needed for dGPU switching on MacBookPro5,x
|
||||
Same method is also used for demuxed machines
|
||||
Note that MacBookPro5,x machines are extremely unstable with this patch set, so disabled until investigated further
|
||||
Ref: https://github.com/dortania/OpenCore-Legacy-Patcher/files/7360909/KP-b10-030.txt
|
||||
"""
|
||||
return self._computer.real_model in ["MacBookPro8,2", "MacBookPro8,3"] and self._detect_demux()
|
||||
|
||||
|
||||
def native_os(self) -> bool:
|
||||
"""
|
||||
Dropped support with macOS 10.13, High Sierra
|
||||
"""
|
||||
return self._xnu_major < os_data.sierra.value
|
||||
|
||||
|
||||
def hardware_variant(self) -> HardwareVariant:
|
||||
"""
|
||||
Type of hardware variant
|
||||
"""
|
||||
return HardwareVariant.MISCELLANEOUS
|
||||
|
||||
|
||||
def requires_kernel_debug_kit(self) -> bool:
|
||||
"""
|
||||
Apple no longer provides standalone kexts in the base OS
|
||||
"""
|
||||
return self._xnu_major >= os_data.ventura.value
|
||||
|
||||
|
||||
def patches(self) -> dict:
|
||||
"""
|
||||
Patches for Legacy GMUX Controllers
|
||||
"""
|
||||
if self.native_os() is True:
|
||||
return {}
|
||||
|
||||
if self._xnu_major not in self._constants.legacy_accel_support:
|
||||
return {}
|
||||
|
||||
return {
|
||||
"Legacy GMUX": {
|
||||
PatchType.OVERWRITE_SYSTEM_VOLUME: {
|
||||
"/System/Library/Extensions/AppleGraphicsControl.kext/Contents/PlugIns": {
|
||||
"AppleMuxControl.kext": "10.12.6",
|
||||
},
|
||||
},
|
||||
PatchType.REMOVE_SYSTEM_VOLUME: {
|
||||
"/System/Library/Extensions": [
|
||||
"AppleBacklight.kext",
|
||||
],
|
||||
"/System/Library/Extensions/AppleGraphicsControl.kext/Contents/PlugIns": [
|
||||
"AGDCBacklightControl.kext",
|
||||
"AppleMuxControl.kext",
|
||||
],
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
"""
|
||||
keyboard_backlight.py: Legacy Keyboard Backlight detection
|
||||
"""
|
||||
|
||||
from ..base import BaseHardware, HardwareVariant
|
||||
|
||||
from ...base import PatchType
|
||||
|
||||
from .....constants import Constants
|
||||
from .....detections import device_probe
|
||||
|
||||
from .....datasets.os_data import os_data
|
||||
|
||||
|
||||
class KeyboardBacklight(BaseHardware):
|
||||
|
||||
def __init__(self, xnu_major, xnu_minor, os_build, global_constants: Constants) -> None:
|
||||
super().__init__(xnu_major, xnu_minor, os_build, global_constants)
|
||||
|
||||
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Display name for end users
|
||||
"""
|
||||
return f"{self.hardware_variant()}: Legacy Keyboard Backlight"
|
||||
|
||||
|
||||
def present(self) -> bool:
|
||||
"""
|
||||
Targeting Legacy Keyboard Backlight (ie. non-Metal Macs)
|
||||
"""
|
||||
return self._computer.real_model.startswith("MacBook") and self._is_gpu_architecture_present(
|
||||
gpu_architectures=[
|
||||
device_probe.Intel.Archs.Iron_Lake,
|
||||
device_probe.Intel.Archs.Sandy_Bridge,
|
||||
device_probe.AMD.Archs.TeraScale_1,
|
||||
device_probe.AMD.Archs.TeraScale_2,
|
||||
device_probe.NVIDIA.Archs.Tesla,
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
def native_os(self) -> bool:
|
||||
"""
|
||||
Dropped support with macOS 11, Big Sur
|
||||
"""
|
||||
return self._xnu_major < os_data.big_sur.value
|
||||
|
||||
|
||||
def hardware_variant(self) -> HardwareVariant:
|
||||
"""
|
||||
Type of hardware variant
|
||||
"""
|
||||
return HardwareVariant.MISCELLANEOUS
|
||||
|
||||
|
||||
def requires_kernel_debug_kit(self) -> bool:
|
||||
"""
|
||||
Apple no longer provides standalone kexts in the base OS
|
||||
"""
|
||||
return self._xnu_major >= os_data.ventura.value
|
||||
|
||||
|
||||
def patches(self) -> dict:
|
||||
"""
|
||||
Patches for Legacy Keyboard Backlight
|
||||
"""
|
||||
if self.native_os() is True:
|
||||
return {}
|
||||
|
||||
if self._xnu_major not in self._constants.legacy_accel_support:
|
||||
return {}
|
||||
|
||||
return {
|
||||
"Legacy Keyboard Backlight": {
|
||||
PatchType.EXECUTE: {
|
||||
"/usr/bin/defaults write /Library/Preferences/.GlobalPreferences.plist Moraea_BacklightHack -bool true": True,
|
||||
}
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
"""
|
||||
legacy_audio.py: Legacy Audio detection
|
||||
"""
|
||||
|
||||
from ..base import BaseHardware, HardwareVariant
|
||||
|
||||
from ...base import PatchType
|
||||
|
||||
from .....constants import Constants
|
||||
from .....support import utilities
|
||||
|
||||
from .....datasets.os_data import os_data
|
||||
|
||||
|
||||
class LegacyAudio(BaseHardware):
|
||||
|
||||
def __init__(self, xnu_major, xnu_minor, os_build, global_constants: Constants) -> None:
|
||||
super().__init__(xnu_major, xnu_minor, os_build, global_constants)
|
||||
|
||||
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Display name for end users
|
||||
"""
|
||||
return f"{self.hardware_variant()}: Legacy Audio"
|
||||
|
||||
|
||||
def present(self) -> bool:
|
||||
"""
|
||||
Targeting Realtek Audio and machines without AppleALC
|
||||
"""
|
||||
return self._computer.real_model in ["iMac7,1", "iMac8,1"] or (
|
||||
self._computer.real_model in ["MacBook5,1",
|
||||
"MacBook5,2",
|
||||
"MacBook6,1",
|
||||
"MacBook7,1",
|
||||
"MacBookAir2,1",
|
||||
"MacBookAir3,1",
|
||||
"MacBookAir3,2",
|
||||
"MacBookAir4,1",
|
||||
"MacBookAir4,2",
|
||||
"MacBookPro4,1",
|
||||
"MacBookPro5,1",
|
||||
"MacBookPro5,2",
|
||||
"MacBookPro5,3",
|
||||
"MacBookPro5,4",
|
||||
"MacBookPro5,5",
|
||||
"MacBookPro6,1",
|
||||
"MacBookPro6,2",
|
||||
"MacBookPro7,1",
|
||||
"MacBookPro8,1",
|
||||
"MacBookPro8,2",
|
||||
"MacBookPro8,3",
|
||||
"Macmini3,1",
|
||||
"Macmini4,1",
|
||||
"Macmini5,1",
|
||||
"Macmini5,2",
|
||||
"Macmini5,3",
|
||||
"iMac9,1",
|
||||
"iMac10,1",
|
||||
"iMac11,1",
|
||||
"iMac11,2",
|
||||
"iMac11,3",
|
||||
"iMac12,1",
|
||||
"iMac12,2",
|
||||
"MacPro3,1"
|
||||
] and utilities.check_kext_loaded("as.vit9696.AppleALC") is False)
|
||||
|
||||
|
||||
def native_os(self) -> bool:
|
||||
"""
|
||||
- iMac7,1 and iMac8,1 last supported in macOS 10.11, El Capitan
|
||||
- All other models pre-2012 models last supported in macOS 10.13, High Sierra
|
||||
"""
|
||||
if self._computer.real_model in ["iMac7,1", "iMac8,1"]:
|
||||
return self._xnu_major < os_data.sierra.value
|
||||
return self._xnu_major < os_data.mojave.value
|
||||
|
||||
|
||||
def hardware_variant(self) -> HardwareVariant:
|
||||
"""
|
||||
Type of hardware variant
|
||||
"""
|
||||
return HardwareVariant.MISCELLANEOUS
|
||||
|
||||
|
||||
def _missing_gop_patches(self) -> dict:
|
||||
"""
|
||||
Patches for graphics cards with missing GOP (ie. breaking AppleALC functionality)
|
||||
"""
|
||||
return {
|
||||
"Legacy Non-GOP": {
|
||||
PatchType.OVERWRITE_SYSTEM_VOLUME: {
|
||||
"/System/Library/Extensions": {
|
||||
"AppleHDA.kext": "10.13.6",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
def _realtek_audio_patches(self) -> dict:
|
||||
"""
|
||||
Patches for Realtek Audio
|
||||
"""
|
||||
return {
|
||||
"Legacy Realtek": {
|
||||
PatchType.OVERWRITE_SYSTEM_VOLUME: {
|
||||
"/System/Library/Extensions": {
|
||||
"AppleHDA.kext": "10.11.6",
|
||||
"IOAudioFamily.kext": "10.11.6",
|
||||
},
|
||||
},
|
||||
PatchType.REMOVE_SYSTEM_VOLUME: {
|
||||
"/System/Library/Extensions": [
|
||||
"AppleVirtIO.kext",
|
||||
"AppleVirtualGraphics.kext",
|
||||
"AppleVirtualPlatform.kext",
|
||||
"ApplePVPanic.kext",
|
||||
"AppleVirtIOStorage.kext",
|
||||
"AvpFairPlayDriver.kext",
|
||||
],
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
def patches(self) -> dict:
|
||||
"""
|
||||
Patches for legacy audio
|
||||
"""
|
||||
if self.native_os() is True:
|
||||
return {}
|
||||
|
||||
if self._computer.real_model in ["iMac7,1", "iMac8,1"]:
|
||||
return self._realtek_audio_patches()
|
||||
return self._missing_gop_patches()
|
||||
@@ -0,0 +1,66 @@
|
||||
"""
|
||||
pci_webcam.py: PCIe FaceTime Camera detection
|
||||
"""
|
||||
|
||||
from ..base import BaseHardware, HardwareVariant
|
||||
|
||||
from ...base import PatchType
|
||||
|
||||
from .....constants import Constants
|
||||
|
||||
from .....datasets.os_data import os_data
|
||||
|
||||
|
||||
class PCIeFaceTimeCamera(BaseHardware):
|
||||
|
||||
def __init__(self, xnu_major, xnu_minor, os_build, global_constants: Constants) -> None:
|
||||
super().__init__(xnu_major, xnu_minor, os_build, global_constants)
|
||||
|
||||
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Display name for end users
|
||||
"""
|
||||
return f"{self.hardware_variant()}: PCIe FaceTime Camera"
|
||||
|
||||
|
||||
def present(self) -> bool:
|
||||
"""
|
||||
Targeting PCIe FaceTime Cameras
|
||||
"""
|
||||
return self._computer.pcie_webcam
|
||||
|
||||
|
||||
def native_os(self) -> bool:
|
||||
"""
|
||||
Dropped support with macOS 14 Developer Beta 1 (23A5257q)
|
||||
"""
|
||||
return self._xnu_major < os_data.sonoma.value or self._os_build == "23A5257q"
|
||||
|
||||
|
||||
def hardware_variant(self) -> HardwareVariant:
|
||||
"""
|
||||
Type of hardware variant
|
||||
"""
|
||||
return HardwareVariant.MISCELLANEOUS
|
||||
|
||||
|
||||
def patches(self) -> dict:
|
||||
"""
|
||||
Patches for PCIe FaceTime Camera
|
||||
"""
|
||||
if self.native_os() is True:
|
||||
return {}
|
||||
|
||||
return {
|
||||
"PCIe FaceTime Camera": {
|
||||
PatchType.OVERWRITE_SYSTEM_VOLUME: {
|
||||
"/System/Library/Frameworks/CoreMediaIO.framework/Versions/A/Resources": {
|
||||
"AppleCamera.plugin": "14.0 Beta 1"
|
||||
},
|
||||
"/System/Library/LaunchDaemons": {
|
||||
"com.apple.cmio.AppleCameraAssistant.plist": "14.0 Beta 1"
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
"""
|
||||
t1_security.py: T1 Security Chip detection
|
||||
"""
|
||||
|
||||
from ..base import BaseHardware, HardwareVariant
|
||||
|
||||
from ...base import PatchType
|
||||
|
||||
from .....constants import Constants
|
||||
|
||||
from .....datasets.os_data import os_data
|
||||
|
||||
|
||||
class T1SecurityChip(BaseHardware):
|
||||
|
||||
def __init__(self, xnu_major, xnu_minor, os_build, global_constants: Constants) -> None:
|
||||
super().__init__(xnu_major, xnu_minor, os_build, global_constants)
|
||||
|
||||
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Display name for end users
|
||||
"""
|
||||
return f"{self.hardware_variant()}: T1 Security Chip"
|
||||
|
||||
|
||||
def present(self) -> bool:
|
||||
"""
|
||||
Targeting T1 Security Chip
|
||||
"""
|
||||
return self._computer.t1_chip
|
||||
|
||||
|
||||
def native_os(self) -> bool:
|
||||
"""
|
||||
Dropped support with macOS 14, Sonoma
|
||||
"""
|
||||
return self._xnu_major < os_data.sonoma.value
|
||||
|
||||
|
||||
def hardware_variant(self) -> HardwareVariant:
|
||||
"""
|
||||
Type of hardware variant
|
||||
"""
|
||||
return HardwareVariant.MISCELLANEOUS
|
||||
|
||||
|
||||
def patches(self) -> dict:
|
||||
"""
|
||||
Patches for T1 Security Chip
|
||||
"""
|
||||
if self.native_os() is True:
|
||||
return {}
|
||||
|
||||
return {
|
||||
"T1 Security Chip": {
|
||||
PatchType.OVERWRITE_SYSTEM_VOLUME: {
|
||||
# Required for Apple Pay
|
||||
"/usr/lib": {
|
||||
"libNFC_Comet.dylib": "13.6",
|
||||
"libNFC_HAL.dylib": "13.6",
|
||||
|
||||
"libnfshared.dylib": "13.6",
|
||||
"libnfshared.dylibOld.dylib": "13.6",
|
||||
"libnfstorage.dylib": "13.6",
|
||||
"libnfrestore.dylib": "13.6",
|
||||
|
||||
"libPN548_API.dylib": "13.6"
|
||||
},
|
||||
"/usr/libexec": {
|
||||
"biometrickitd": "13.6", # Required for Touch ID
|
||||
"nfcd": "13.6", # Required for Apple Pay
|
||||
"nfrestore_service": "13.6", # Required for Apple Pay
|
||||
},
|
||||
"/usr/standalone/firmware/nfrestore/firmware/fw": {
|
||||
"PN549_FW_02_01_5A_rev88207.bin": "13.6",
|
||||
"SN100V_FW_A3_01_01_81_rev127208.bin": "13.6",
|
||||
"SN200V_FW_B1_02_01_86_rev127266.bin": "13.6",
|
||||
"SN300V_FW_B0_02_01_22_rev129172.bin": "13.6",
|
||||
}
|
||||
},
|
||||
PatchType.MERGE_SYSTEM_VOLUME: {
|
||||
"/System/Library/Frameworks/LocalAuthentication.framework/Support": {
|
||||
"SharedUtils.framework": f"13.6-{self._xnu_major}", # Required for Password Authentication (SharedUtils.framework)
|
||||
**({ "MechanismPlugins": "15.0 Beta 4" } if self._xnu_major >= os_data.sequoia else {}), # Required to add a TouchID fingerprint
|
||||
},
|
||||
"/System/Library/PrivateFrameworks": {
|
||||
"EmbeddedOSInstall.framework": "13.6", # Required for biometrickitd
|
||||
**({ "NearField.framework": "14.5" } if self._xnu_major >= os_data.sequoia else {}),
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
|
||||
|
||||
"""
|
||||
usb11.py: Legacy USB 1.1 Controller detection
|
||||
"""
|
||||
|
||||
from ..base import BaseHardware, HardwareVariant
|
||||
|
||||
from ...base import PatchType
|
||||
|
||||
from .....constants import Constants
|
||||
from .....detections import device_probe
|
||||
|
||||
from .....datasets.os_data import os_data
|
||||
from .....datasets import smbios_data, cpu_data
|
||||
|
||||
|
||||
class USB11Controller(BaseHardware):
|
||||
|
||||
def __init__(self, xnu_major, xnu_minor, os_build, global_constants: Constants) -> None:
|
||||
super().__init__(xnu_major, xnu_minor, os_build, global_constants)
|
||||
|
||||
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Display name for end users
|
||||
"""
|
||||
return f"{self.hardware_variant()}: Legacy USB 1.1"
|
||||
|
||||
|
||||
def present(self) -> bool:
|
||||
"""
|
||||
Targeting UHCI/OHCI controllers
|
||||
"""
|
||||
# If we're on a hackintosh, check for UHCI/OHCI controllers
|
||||
if self._constants.host_is_hackintosh is True:
|
||||
for controller in self._computer.usb_controllers:
|
||||
if (
|
||||
isinstance(controller, device_probe.UHCIController) or
|
||||
isinstance(controller, device_probe.OHCIController)
|
||||
):
|
||||
return True
|
||||
return False
|
||||
|
||||
if self._computer.real_model not in smbios_data.smbios_dictionary:
|
||||
return False
|
||||
|
||||
# If we're on a Mac, check for Penryn or older
|
||||
# This is due to Apple implementing an internal USB hub on post-Penryn (excluding MacPro4,1, MacPro5,1 and Xserve3,1)
|
||||
# Ref: https://techcommunity.microsoft.com/t5/microsoft-usb-blog/reasons-to-avoid-companion-controllers/ba-p/270710
|
||||
if (
|
||||
smbios_data.smbios_dictionary[self._computer.real_model]["CPU Generation"] <= cpu_data.CPUGen.penryn.value or \
|
||||
self._computer.real_model in ["MacPro4,1", "MacPro5,1", "Xserve3,1"]
|
||||
):
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
|
||||
def native_os(self) -> bool:
|
||||
"""
|
||||
Dropped support with macOS 13, Ventura
|
||||
"""
|
||||
return self._xnu_major < os_data.ventura.value
|
||||
|
||||
|
||||
def hardware_variant(self) -> HardwareVariant:
|
||||
"""
|
||||
Type of hardware variant
|
||||
"""
|
||||
return HardwareVariant.MISCELLANEOUS
|
||||
|
||||
|
||||
def _base_patches(self) -> dict:
|
||||
"""
|
||||
Base patches for USB 1.1 Controller
|
||||
"""
|
||||
return {
|
||||
"Legacy USB 1.1": {
|
||||
PatchType.OVERWRITE_SYSTEM_VOLUME: {
|
||||
"/System/Library/Extensions": {
|
||||
"IOUSBHostFamily.kext": "12.6.2" if self._xnu_float < self.macOS_14_4 else "12.6.2-23.4",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
def _extended_patches(self) -> dict:
|
||||
"""
|
||||
Extended patches for USB 1.1 Controller
|
||||
"""
|
||||
if self._xnu_float < self.macOS_14_1:
|
||||
return {}
|
||||
|
||||
return {
|
||||
# Injection of UHCI/OHCI causes a panic on 14.1+
|
||||
"Legacy USB 1.1 Extended": {
|
||||
PatchType.OVERWRITE_SYSTEM_VOLUME: {
|
||||
"/System/Library/Extensions/IOUSBHostFamily.kext/Contents/PlugIns": {
|
||||
"AppleUSBOHCI.kext": "12.6.2-USB",
|
||||
"AppleUSBOHCIPCI.kext": "12.6.2-USB",
|
||||
"AppleUSBUHCI.kext": "12.6.2-USB",
|
||||
"AppleUSBUHCIPCI.kext": "12.6.2-USB",
|
||||
},
|
||||
"/System/Library/Extensions": {
|
||||
**({ "AppleUSBAudio.kext": "14.5" } if self._xnu_major >= os_data.sequoia else {}),
|
||||
**({ "AppleUSBCDC.kext": "14.5" } if self._xnu_major >= os_data.sequoia else {}),
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
def patches(self) -> dict:
|
||||
"""
|
||||
Patches for USB 1.1 Controller
|
||||
"""
|
||||
if self.native_os() is True:
|
||||
return {}
|
||||
|
||||
return {
|
||||
**self._base_patches(),
|
||||
**self._extended_patches(),
|
||||
}
|
||||
@@ -0,0 +1,149 @@
|
||||
"""
|
||||
legacy_wireless.py: Legacy Wireless detection
|
||||
"""
|
||||
|
||||
import packaging.version
|
||||
|
||||
from ..base import BaseHardware, HardwareVariant
|
||||
|
||||
from ...base import PatchType
|
||||
|
||||
from .....constants import Constants
|
||||
from .....detections import device_probe
|
||||
|
||||
from .....datasets.os_data import os_data
|
||||
|
||||
|
||||
class LegacyWireless(BaseHardware):
|
||||
|
||||
def __init__(self, xnu_major, xnu_minor, os_build, global_constants: Constants) -> None:
|
||||
super().__init__(xnu_major, xnu_minor, os_build, global_constants)
|
||||
|
||||
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Display name for end users
|
||||
"""
|
||||
return f"{self.hardware_variant()}: Legacy Wireless"
|
||||
|
||||
|
||||
def present(self) -> bool:
|
||||
"""
|
||||
Targeting Legacy Wireless
|
||||
"""
|
||||
if (
|
||||
isinstance(self._computer.wifi, device_probe.Broadcom)
|
||||
and self._computer.wifi.chipset in [device_probe.Broadcom.Chipsets.AirPortBrcm4331, device_probe.Broadcom.Chipsets.AirPortBrcm43224]
|
||||
):
|
||||
return True
|
||||
|
||||
if (
|
||||
isinstance(self._computer.wifi, device_probe.Atheros)
|
||||
and self._computer.wifi.chipset == device_probe.Atheros.Chipsets.AirPortAtheros40
|
||||
):
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
|
||||
def native_os(self) -> bool:
|
||||
"""
|
||||
Dropped support with macOS 12, Monterey
|
||||
"""
|
||||
return self._xnu_major < os_data.monterey.value
|
||||
|
||||
|
||||
def hardware_variant(self) -> HardwareVariant:
|
||||
"""
|
||||
Type of hardware variant
|
||||
"""
|
||||
return HardwareVariant.NETWORKING
|
||||
|
||||
|
||||
def _affected_by_cve_2024_23227(self) -> bool:
|
||||
"""
|
||||
CVE-2024-23227 broke our airportd patches for 12.7.4, 13.6.5 and 14.4
|
||||
|
||||
Note that since the XNU version's security patch level is not increment
|
||||
"""
|
||||
|
||||
if self._xnu_major > os_data.sonoma:
|
||||
return True
|
||||
|
||||
marketing_version = self._constants.detected_os_version
|
||||
parsed_version = packaging.version.parse(marketing_version)
|
||||
|
||||
if marketing_version.startswith("12"):
|
||||
return parsed_version >= packaging.version.parse("12.7.4")
|
||||
if marketing_version.startswith("13"):
|
||||
return parsed_version >= packaging.version.parse("13.6.5")
|
||||
if marketing_version.startswith("14"):
|
||||
return parsed_version >= packaging.version.parse("14.4")
|
||||
|
||||
return False
|
||||
|
||||
|
||||
def _base_patch(self) -> dict:
|
||||
"""
|
||||
Base patches for Legacy Wireless
|
||||
"""
|
||||
return {
|
||||
"Legacy Wireless": {
|
||||
PatchType.OVERWRITE_SYSTEM_VOLUME: {
|
||||
"/usr/libexec": {
|
||||
"airportd": "11.7.10" if self._affected_by_cve_2024_23227 is False else "11.7.10-Sandbox",
|
||||
},
|
||||
"/System/Library/CoreServices": {
|
||||
"WiFiAgent.app": "11.7.10",
|
||||
},
|
||||
},
|
||||
PatchType.OVERWRITE_DATA_VOLUME: {
|
||||
"/Library/Application Support/SkyLightPlugins": {
|
||||
**({ "CoreWLAN.dylib": "SkyLightPlugins" } if self._xnu_major == os_data.monterey else {}),
|
||||
**({ "CoreWLAN.txt": "SkyLightPlugins" } if self._xnu_major == os_data.monterey else {}),
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
def _extended_patch(self) -> dict:
|
||||
"""
|
||||
Extended patches for Legacy Wireless
|
||||
"""
|
||||
if self._xnu_major < os_data.ventura:
|
||||
return {}
|
||||
|
||||
return {
|
||||
"Legacy Wireless Extended": {
|
||||
PatchType.OVERWRITE_SYSTEM_VOLUME: {
|
||||
"/usr/libexec": {
|
||||
"wps": "12.7.2",
|
||||
"wifip2pd": "12.7.2",
|
||||
},
|
||||
},
|
||||
PatchType.MERGE_SYSTEM_VOLUME: {
|
||||
"/System/Library/Frameworks": {
|
||||
"CoreWLAN.framework": "12.7.2",
|
||||
},
|
||||
"/System/Library/PrivateFrameworks": {
|
||||
"CoreWiFi.framework": "12.7.2",
|
||||
"IO80211.framework": "12.7.2",
|
||||
"WiFiPeerToPeer.framework": "12.7.2",
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
def patches(self) -> dict:
|
||||
"""
|
||||
Patches for Legacy Wireless
|
||||
"""
|
||||
if self.native_os() is True:
|
||||
return {}
|
||||
|
||||
return {
|
||||
**self._base_patch(),
|
||||
**self._extended_patch(),
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
"""
|
||||
modern_wireless.py: Modern Wireless detection
|
||||
"""
|
||||
|
||||
from ..base import BaseHardware, HardwareVariant
|
||||
|
||||
from ...base import PatchType
|
||||
|
||||
from .....constants import Constants
|
||||
from .....detections import device_probe
|
||||
|
||||
from .....datasets.os_data import os_data
|
||||
|
||||
|
||||
class ModernWireless(BaseHardware):
|
||||
|
||||
def __init__(self, xnu_major, xnu_minor, os_build, global_constants: Constants) -> None:
|
||||
super().__init__(xnu_major, xnu_minor, os_build, global_constants)
|
||||
|
||||
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Display name for end users
|
||||
"""
|
||||
return f"{self.hardware_variant()}: Modern Wireless"
|
||||
|
||||
|
||||
def present(self) -> bool:
|
||||
"""
|
||||
Targeting Modern Wireless
|
||||
"""
|
||||
return isinstance(self._computer.wifi, device_probe.Broadcom) and (
|
||||
self._computer.wifi.chipset in [
|
||||
device_probe.Broadcom.Chipsets.AirPortBrcm4360,
|
||||
device_probe.Broadcom.Chipsets.AirportBrcmNIC,
|
||||
# We don't officially support this chipset, however we'll throw a bone to hackintosh users
|
||||
device_probe.Broadcom.Chipsets.AirPortBrcmNICThirdParty,
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
def native_os(self) -> bool:
|
||||
"""
|
||||
Dropped support with macOS 14, Sonoma
|
||||
"""
|
||||
return self._xnu_major < os_data.sonoma.value
|
||||
|
||||
|
||||
def hardware_variant(self) -> HardwareVariant:
|
||||
"""
|
||||
Type of hardware variant
|
||||
"""
|
||||
return HardwareVariant.NETWORKING
|
||||
|
||||
|
||||
def patches(self) -> dict:
|
||||
"""
|
||||
Patches for Modern Wireless
|
||||
"""
|
||||
if self.native_os() is True:
|
||||
return {}
|
||||
|
||||
return {
|
||||
"Modern Wireless": {
|
||||
PatchType.OVERWRITE_SYSTEM_VOLUME: {
|
||||
"/usr/libexec": {
|
||||
"airportd": "13.6.5",
|
||||
"wifip2pd": "13.6.5",
|
||||
},
|
||||
"/System/Library/CoreServices": {
|
||||
**({ "WiFiAgent.app": "14.5" } if self._xnu_major >= os_data.sequoia else {}),
|
||||
},
|
||||
},
|
||||
PatchType.MERGE_SYSTEM_VOLUME: {
|
||||
"/System/Library/Frameworks": {
|
||||
"CoreWLAN.framework": f"13.6.5-{self._xnu_major}",
|
||||
},
|
||||
"/System/Library/PrivateFrameworks": {
|
||||
"CoreWiFi.framework": f"13.6.5-{self._xnu_major}",
|
||||
"IO80211.framework": f"13.6.5-{self._xnu_major}",
|
||||
"WiFiPeerToPeer.framework": f"13.6.5-{self._xnu_major}",
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||