Compare commits

...

283 Commits
0.6.2 ... 0.6.6

Author SHA1 Message Date
Mykola Grymalyuk
a5319bf432 Merge branch 'main' of https://github.com/dortania/OpenCore-Legacy-Patcher 2023-05-22 14:10:25 -06:00
Mykola Grymalyuk
3c5d93f79e GUI: Hide self before prompting 2023-05-22 14:10:17 -06:00
Dhinak G
2ca2bc451a Docs: Update SOURCE.md 2023-05-22 16:06:17 -04:00
Mykola Grymalyuk
ab9208da58 GUI Update: Add alternative pulse for non-Metal 2023-05-22 13:46:15 -06:00
Mykola Grymalyuk
3132b0dcb7 Merge pull request #1066 from ParaDoX1994/new-gui-docs
GUI documentation refresh for 0.6.6
2023-05-22 12:15:10 -07:00
Mykola Grymalyuk
b22c28e07b Merge pull request #1068 from Jazzzny/among-us
Enhancement - Restore Photo Booth App on Non-Metal Macs running macOS Monterey and newer
2023-05-22 12:13:18 -07:00
Mykola Grymalyuk
aa81b0ba49 Merge branch 'main' into among-us 2023-05-22 12:10:14 -07:00
Mykola Grymalyuk
ba5dd16201 Sync PatcherSupportPkg 2023-05-22 13:09:40 -06:00
Mykola Grymalyuk
5f30adab73 logging_handler.py: Add CLI check 2023-05-22 12:38:39 -06:00
Mykola Grymalyuk
4c9c7965b6 GUI: Add conditional to Graphics override 2023-05-22 12:31:33 -06:00
Mykola Grymalyuk
1e86681d3c Validation: Support root patch validation on GA 2023-05-22 12:23:07 -06:00
Mykola Grymalyuk
79cf5cb86f GUI: Add Cursor checkbox 2023-05-22 12:22:24 -06:00
Jazzzny
e6a3536e31 Update CHANGELOG 2023-05-22 14:05:01 -04:00
Jazzzny
af733dc08c Merge branch 'dortania:main' into among-us 2023-05-22 13:48:26 -04:00
Jazzzny
1d564ed653 Push 2023-05-22 13:40:45 -04:00
Mykola Grymalyuk
f20c9e3a09 GUI: Add “Beta Menu Bar” configuration 2023-05-22 11:29:22 -06:00
Mykola Grymalyuk
422eee04b7 logging_handler: Resolve exception logging 2023-05-22 10:58:49 -06:00
Mykola Grymalyuk
1f23ceef7f sys_patch_helpers.py: Publish signed binaries 2023-05-22 09:44:25 -06:00
Mykola Grymalyuk
5c402e1820 GUI: Fix formatting on patch errors 2023-05-21 19:58:00 -06:00
Mykola Grymalyuk
a92cbe94a1 sys_patch.py: Add error handling for non-str entries 2023-05-21 19:52:50 -06:00
educovas
89ef9fb904 Sync PatcherSupportPkg 2023-05-21 22:14:59 -03:00
Mykola Grymalyuk
bfe8776a1a GUI: Add comment on stripping 2023-05-21 18:42:26 -06:00
Mykola Grymalyuk
52e31d0b1d GUI: Add additional handling 2023-05-21 15:12:30 -06:00
Mykola Grymalyuk
5a7308fa2a GUI: Don’t super on relaunch 2023-05-21 14:44:37 -06:00
Mykola Grymalyuk
b0617887dd GUI: Check before closing 2023-05-21 13:34:59 -06:00
Mykola Grymalyuk
5b4464a1f2 GUI: Fix argument overloading 2023-05-21 13:13:41 -06:00
Mykola Grymalyuk
d4f004c558 GUI: Recommend Monterey for USB1.1 units 2023-05-21 09:57:56 -06:00
Mykola Grymalyuk
df5e7525c2 GUI: Better match format 2023-05-20 16:43:29 -06:00
Mykola Grymalyuk
b56ec7c679 GUI: Allow users to view repo on updates 2023-05-20 13:50:37 -06:00
Mykola Grymalyuk
cd9ce32c04 GUI: Don’t prompt to root patch if no new patches 2023-05-20 13:18:11 -06:00
Mykola Grymalyuk
a65ceaa376 GUI: Add menubar item 2023-05-20 13:03:06 -06:00
Mykola Grymalyuk
2788dfc78e Merge pull request #1067 from dortania/gui-main-demo
Implement new main menu UI
2023-05-20 11:28:56 -07:00
Mykola Grymalyuk
888387dfa2 GUI: Adjust relaunch size 2023-05-20 12:27:14 -06:00
Mykola Grymalyuk
9c41fff3d4 GUI: Add error handling when parent is not provided 2023-05-20 12:19:19 -06:00
Mykola Grymalyuk
3acc4dc9d9 GUI: Set Choice size and avoid ComboBox usage 2023-05-20 10:33:06 -06:00
neon ball
99f6d8f060 Add new main menu image 2023-05-20 19:16:41 +03:00
neon ball
efdcbd24c1 Merge branch 'dortania:main' into new-gui-docs 2023-05-20 19:16:24 +03:00
Mykola Grymalyuk
fa322d73c5 Merge remote-tracking branch 'origin/main' into gui-main-demo 2023-05-20 09:55:19 -06:00
Mykola Grymalyuk
cb6f294d35 GUI: Adjust ComboBox width 2023-05-20 09:52:46 -06:00
Mykola Grymalyuk
4ac46d4b54 GUI: Change settings gear placement 2023-05-20 09:47:37 -06:00
Mykola Grymalyuk
48dd47aed3 PKG: Fix alias creation 2023-05-19 22:37:16 -06:00
Mykola Grymalyuk
58b3748034 GUI: Test new main menu 2023-05-19 22:06:14 -06:00
Mykola Grymalyuk
fefd651157 Sync CHANGELOG 2023-05-19 16:30:42 -06:00
Mykola Grymalyuk
2b1d598bf3 GUI: Fix ComboBox not updating variable 2023-05-19 16:23:48 -06:00
neon ball
a863e55a01 Delete MacPro3,1 Ethernet note
Fixed in 0.6.6
2023-05-19 23:49:25 +03:00
neon ball
b297692b77 Merge branch 'dortania:main' into new-gui-docs 2023-05-19 23:47:42 +03:00
neon ball
a17b43525a Jazzny's change
Refer to https://discord.com/channels/417165963327176704/835350746971111484/1109208345849634906
2023-05-19 22:59:57 +03:00
Mykola Grymalyuk
fd9cd85254 install.py: Fix function declaration 2023-05-19 11:18:43 -06:00
Mykola Grymalyuk
aa196b6c0d Merge pull request #1064 from dortania/gui-refactor
GUI Refactor: Implement modularized wxPython system
2023-05-18 20:48:07 -07:00
Mykola Grymalyuk
cb38ee9477 GUI: Add model check 2023-05-18 21:43:58 -06:00
Mykola Grymalyuk
6faff5d52a GUI: Misc adjustments 2023-05-18 20:48:49 -06:00
Dhinak G
cabcdcd381 Fix app name 2023-05-18 20:51:51 -04:00
Mykola Grymalyuk
e36e9b35e9 GUI: Set about and quit items 2023-05-18 18:36:39 -06:00
neon ball
566df783c8 Fix wording 2023-05-19 03:15:25 +03:00
neon ball
edbd96a7e9 3rd time's the charm 2023-05-19 03:00:52 +03:00
neon ball
72f7d20ce5 Fix link again 2023-05-19 03:00:21 +03:00
neon ball
39147e95be Fix link 2023-05-19 02:58:32 +03:00
neon ball
7d1d3dd9f6 Include note about TeraScale 1 Ventura fix 2023-05-19 02:58:04 +03:00
neon ball
6146aa48c6 Fix linking 2023-05-19 02:18:59 +03:00
neon ball
266261484f Remove mention of verbose
It is disabled by default, hence redundant
2023-05-19 02:18:25 +03:00
neon ball
231e545ca4 Change wording 2023-05-19 02:15:57 +03:00
neon ball
f18184bded Documentation image refresh for 0.6.6 2023-05-19 02:13:40 +03:00
neon ball
7171de0679 Docs update for 0.6.6 2023-05-19 02:12:37 +03:00
Mykola Grymalyuk
d360a8ee8b GUI: Unify Centre() calls 2023-05-18 16:09:26 -06:00
Mykola Grymalyuk
5505737b37 gui_sys_patch.py: Disable return during patch 2023-05-18 16:06:48 -06:00
Mykola Grymalyuk
11bc64f8e6 GUI: Unify Yield() calls 2023-05-18 16:06:33 -06:00
Mykola Grymalyuk
300726ea96 sys_patch.py: Remove input() calls 2023-05-18 15:47:34 -06:00
Mykola Grymalyuk
186669b9cd install.py: Clean functions 2023-05-18 15:44:55 -06:00
Mykola Grymalyuk
b4afa8bc28 Merge branch 'main' into gui-refactor 2023-05-18 14:41:48 -07:00
Mykola Grymalyuk
04441590f0 CI: Add support for validation on non-dortania repos 2023-05-18 14:58:56 -06:00
Mykola Grymalyuk
f5d9ecfc25 Merge pull request #1065 from Jazzzny/betterthanzoe-keyboardfix
Enhancement - Implement injector kext to fix Function Keys on legacy units
2023-05-18 13:56:16 -07:00
Jazzzny
f6f4131b53 Fix issue 2023-05-18 16:55:47 -04:00
Mykola Grymalyuk
47458daae2 Settings: Default to binary source 2023-05-18 14:18:14 -06:00
Mykola Grymalyuk
0507654d09 install.py: Fix regression 2023-05-18 13:52:45 -06:00
Mykola Grymalyuk
0ed1cbde2f Merge branch 'main' into gui-refactor 2023-05-18 12:11:02 -07:00
Mykola Grymalyuk
c80c46288c Sync Lilu 2023-05-18 13:00:42 -06:00
Mykola Grymalyuk
0cd1509a38 GUI: Adjust hyperlink spacing 2023-05-18 11:15:41 -06:00
Mykola Grymalyuk
06b8b08d4b GUI: Simplify cleaning 2023-05-18 10:34:46 -06:00
Mykola Grymalyuk
6fc895a45b GUI: Add proper break on cleaning 2023-05-18 10:31:37 -06:00
Mykola Grymalyuk
98bbddc03d Settings: Add additional safe guards 2023-05-18 10:28:18 -06:00
Mykola Grymalyuk
46d2a86e2f GUI Settings: Fix formatting on pre-Big Sur UI 2023-05-18 09:44:46 -06:00
Mykola Grymalyuk
5a6407ab14 GUI Patch: Use anchors for patch labels 2023-05-18 09:43:18 -06:00
Jazzzny
8b38939759 Relocate 2023-05-18 10:05:24 -04:00
Jazzzny
4b6587dc3b Cosmetic fix 2023-05-18 10:04:21 -04:00
Jazzzny
8adbc3b5d2 REvert 2023-05-18 09:53:46 -04:00
Jazzzny
62e565b8c0 Revert 2023-05-18 09:53:30 -04:00
Jazzzny
749a0be86e update CHANGELOG 2023-05-18 09:42:00 -04:00
Jazzzny
a1de379c5f Include MacBookPro4,1 with keyboard injector 2023-05-18 09:41:39 -04:00
Jazzzny
bf00c013c8 Update docs, changelog, and a shameless plug 2023-05-18 09:32:59 -04:00
Jazzzny
8c848f9317 Resstore Fn keys on MacBook5,2 and 4,1 2023-05-18 09:29:09 -04:00
Mykola Grymalyuk
fa711c18cc GUI: Revert helper usage 2023-05-17 19:34:52 -06:00
Mykola Grymalyuk
2d5ea95ee0 Revert previous commit 2023-05-17 19:30:23 -06:00
Mykola Grymalyuk
0cc8b7b705 utilities.py: Use geteuid() for elevated 2023-05-17 19:26:42 -06:00
Mykola Grymalyuk
fecd71ef46 GUI: Reset update stage on main menu 2023-05-17 16:07:14 -06:00
Mykola Grymalyuk
451262d50b GUI: Avoid building if host is unsupported 2023-05-17 15:11:01 -06:00
Mykola Grymalyuk
88f895b61e Fix main thread crash from wx invocation in thread 2023-05-17 14:35:07 -06:00
Mykola Grymalyuk
28f10824fd GUI: Adjust AppleScript prompt 2023-05-17 13:54:12 -06:00
Mykola Grymalyuk
2f6666edfb main.py: Fix conversion 2023-05-17 13:32:43 -06:00
Mykola Grymalyuk
831fbc3319 GUI: Convert more osascript calls 2023-05-17 13:12:35 -06:00
Mykola Grymalyuk
7417fc4180 Swtich to py-applescript library 2023-05-17 12:45:24 -06:00
Mykola Grymalyuk
96fcba8391 Utlize LSUIElement for Helper binary 2023-05-17 12:36:27 -06:00
Mykola Grymalyuk
d576752744 Merge branch 'main' into gui-refactor 2023-05-17 10:07:06 -07:00
Mykola Grymalyuk
034a30a283 Sync PatcherSupportPkg 2023-05-17 11:03:15 -06:00
educovas
adcacc478d Syn changelog 2023-05-17 12:36:26 -03:00
Mykola Grymalyuk
e853be2e84 Merge branch 'main' into gui-refactor 2023-05-16 14:01:35 -07:00
Mykola Grymalyuk
c414c9cde7 firmware.py: Resolve low power mode on MacPro6,1 2023-05-16 14:34:20 -06:00
Mykola Grymalyuk
87f9f39179 GUI Update: Break on error 2023-05-16 12:35:47 -06:00
Mykola Grymalyuk
0a18db3142 GUI Flash: Use CallAfter() for byte info 2023-05-16 12:29:38 -06:00
Mykola Grymalyuk
63ba8d4a16 GUI: Default to no for formatting 2023-05-16 12:24:14 -06:00
Mykola Grymalyuk
017d59f57d gui_support: Resolve gauge sizing error 2023-05-16 12:23:52 -06:00
Mykola Grymalyuk
0f55b074af GUI: Add branch selection 2023-05-16 11:35:54 -06:00
Mykola Grymalyuk
652e8659e4 GUI: Use settings format panel 2023-05-16 10:58:32 -06:00
Mykola Grymalyuk
f7d5b9345f GUI: Remove extra loop
Should only need to unzip twice, if more than there’s a serious problem
2023-05-16 10:30:53 -06:00
Mykola Grymalyuk
54480c3776 GUI: Use range for extraction loop 2023-05-16 10:29:26 -06:00
Mykola Grymalyuk
36c39a7e71 Merge branch 'main' into gui-refactor 2023-05-16 09:14:55 -07:00
Mykola Grymalyuk
a837a27dc0 Sync OpenCorePkg 2023-05-16 08:42:14 -06:00
Mykola Grymalyuk
8dcec0dfa8 validation.py: Clean up after root patch validation 2023-05-16 08:32:41 -06:00
Mykola Grymalyuk
85b90b13e4 Sync kexts 2023-05-16 08:28:23 -06:00
Mykola Grymalyuk
79c173aaff Set icon for Helper 2023-05-15 15:05:55 -06:00
Mykola Grymalyuk
f69d393acd GUI: Centre on updates 2023-05-15 11:33:52 -06:00
Mykola Grymalyuk
bebb71b1de GUI: Remove old libraries 2023-05-15 11:11:41 -06:00
Mykola Grymalyuk
2f12236ac8 GUI: Implement update flow 2023-05-15 11:10:12 -06:00
Mykola Grymalyuk
a7bfef5ed7 GUI: Sync changelog 2023-05-14 23:48:02 -06:00
Mykola Grymalyuk
4ad65f00b5 GUI: Remove unused import 2023-05-14 23:47:50 -06:00
Mykola Grymalyuk
9993436029 GUI: Fix launch errors when run from update directory 2023-05-14 23:06:18 -06:00
Mykola Grymalyuk
1f156170cf GUI: Publish custom serials if already in-use 2023-05-14 22:44:17 -06:00
Mykola Grymalyuk
81247d8cf4 GUI: Rename OCLP-Helper
Supports displaying icon as well as more familiar naming on prompt
2023-05-14 20:55:49 -06:00
Mykola Grymalyuk
5929e81337 GUI: Implement update.plist creation on update 2023-05-14 20:46:52 -06:00
Mykola Grymalyuk
d8267838ae GUI: Merge non-Metal and root patch menu 2023-05-14 10:20:55 -06:00
Mykola Grymalyuk
8f450b525b GUI: Reset version 2023-05-13 22:17:27 -06:00
Mykola Grymalyuk
681441df7e GUI: Add host check to native models 2023-05-13 21:57:57 -06:00
Mykola Grymalyuk
e02c26e703 GUI: Report unsupported installers 2023-05-13 21:51:41 -06:00
Mykola Grymalyuk
1b9e45b5f9 GUI: Adjust spacing 2023-05-13 19:38:25 -06:00
Mykola Grymalyuk
6a0090987c GUI: Fix path checking 2023-05-13 19:00:11 -06:00
Mykola Grymalyuk
02d3f6cc64 Constants: Set app version for demo 2023-05-13 18:20:22 -06:00
Mykola Grymalyuk
2e964ba9c2 GUI: Add app update checks 2023-05-13 18:19:57 -06:00
Mykola Grymalyuk
a2c0994bde GUI: Publish title for ComboBox entries 2023-05-13 13:05:52 -06:00
Mykola Grymalyuk
d0e257a364 GUI: Fix mis-selection 2023-05-13 12:43:09 -06:00
Mykola Grymalyuk
8c5165a06c GUI: Add MXM model and FU configuration 2023-05-13 12:31:41 -06:00
Mykola Grymalyuk
422283a3ac GUI: Add extra padding for pre-Big Sur UI 2023-05-13 09:52:28 -06:00
Mykola Grymalyuk
24225a3748 GUI: Adjust window height 2023-05-13 09:20:39 -06:00
Mykola Grymalyuk
0b59384130 GUI: Fix index 2023-05-13 00:44:23 -06:00
Mykola Grymalyuk
d04822b770 GUI: Add non-Metal settings 2023-05-13 00:31:20 -06:00
Mykola Grymalyuk
84648c67cf GUI: Set default to no 2023-05-13 00:06:33 -06:00
Mykola Grymalyuk
42112fcca9 GUI: Add serial spoofing 2023-05-13 00:02:01 -06:00
Mykola Grymalyuk
2bbb7153e7 GUI: Add stats 2023-05-12 23:08:09 -06:00
Mykola Grymalyuk
dc0c75964d GUI: Add SIP configuration 2023-05-12 22:01:42 -06:00
Mykola Grymalyuk
c7c6569c4b GUI: Add basic settings 2023-05-12 13:45:46 -06:00
Mykola Grymalyuk
28d3e981c5 GUI: Implement Pulse() work-around for non-Metal
ASB I beg of you, please fix this. This hack is so painful…
2023-05-12 09:44:44 -06:00
Mykola Grymalyuk
3bd9d85ae2 GUI: Fix model selection 2023-05-09 12:56:07 -06:00
Mykola Grymalyuk
b43c66c0bb GUI: Add basic settings 2023-05-09 12:39:33 -06:00
Mykola Grymalyuk
2a002d8e82 GUI: Fix sys_patch spacing 2023-05-08 17:52:08 -06:00
Mykola Grymalyuk
324d7362c7 GUI: Fix spacing 2023-05-08 16:58:12 -06:00
Mykola Grymalyuk
3dc4b60af1 GUI: Add default selections 2023-05-08 15:51:47 -06:00
Mykola Grymalyuk
33a885a309 GUI: Add download stopping 2023-05-08 15:16:32 -06:00
Mykola Grymalyuk
4f1cb8abcc GUI: Add installer flashing 2023-05-08 15:16:10 -06:00
Mykola Grymalyuk
21e7a75cc9 GUI: Add additional error handling 2023-05-07 19:02:00 -06:00
Mykola Grymalyuk
3ef6e4a853 GUI: Implement download GUI class
Unifies all download UIs
2023-05-07 17:41:46 -06:00
Mykola Grymalyuk
bd70c4a24a GUI: Add error handling for object deletion 2023-05-07 13:29:13 -06:00
Mykola Grymalyuk
aaf7519e94 GUI: Remove unused RedirectText class 2023-05-07 12:50:37 -06:00
Mykola Grymalyuk
28cdc3f61b GUI: Add help menu 2023-05-07 12:44:30 -06:00
Mykola Grymalyuk
4068bc1661 GUI: Wait for payloads.dmg mount 2023-05-07 12:23:57 -06:00
Mykola Grymalyuk
1204daa330 GUI: Add root patching support 2023-05-07 12:05:58 -06:00
Mykola Grymalyuk
f8b2b5a759 Implement callback 2023-05-06 21:10:53 -06:00
Mykola Grymalyuk
f3e2dfc4de Push experimental build 2023-05-06 19:49:29 -06:00
Mykola Grymalyuk
a6e0c142ca kdk_handler.py: Fix matching 2023-05-04 17:38:24 -06:00
Mykola Grymalyuk
d9e9fea2f7 Sync changelog 2023-05-04 16:16:26 -06:00
Mykola Grymalyuk
978a16f397 Merge pull request #1063 from dortania/dmg-rework
Implement DMG-based PatcherSupportPkg system
2023-05-04 15:15:38 -07:00
Mykola Grymalyuk
d21b984918 Implement DMG-based PatcherSupportPkg 2023-05-04 15:02:41 -06:00
Mykola Grymalyuk
c308bcb993 payloads: USe variable name for mounting 2023-05-04 12:43:06 -06:00
Mykola Grymalyuk
15103007a5 CI: Comment out cert 2023-05-04 11:51:10 -06:00
Mykola Grymalyuk
a932b5a483 CI: Enclose paramter 2023-05-04 11:49:09 -06:00
Mykola Grymalyuk
9b96514b91 CI: Fix ID detection 2023-05-04 11:45:19 -06:00
Mykola Grymalyuk
a33142e29e CI: Use v2 for cert import 2023-05-04 11:19:12 -06:00
Mykola Grymalyuk
ef9df5265b Build: Rename payloads.dmg volume
Avoids confusion when users see “payloads” mounted in disk utility with no extra info
2023-05-04 11:18:39 -06:00
Mykola Grymalyuk
bc8a2727c3 CI: Fix syntax 2023-05-04 10:42:18 -06:00
Mykola Grymalyuk
17a1b823fc Merge branch 'main' of https://github.com/dortania/OpenCore-Legacy-Patcher 2023-05-04 10:39:48 -06:00
Mykola Grymalyuk
993f0c22d5 CI: Implement cert check
Allows for easier swapping between self-hosted and Github-provided runners
2023-05-04 10:39:39 -06:00
Mykola Grymalyuk
bd42aad340 Merge pull request #1059 from Jazzzny/colorsync-downgrade-toggle
Enhancement - Add a ColorSync downgrade toggle
2023-05-04 08:41:56 -07:00
Mykola Grymalyuk
fcd3afe29d Merge branch 'main' into colorsync-downgrade-toggle 2023-05-04 08:05:06 -07:00
Mykola Grymalyuk
ed62fe91a2 Increment build 2023-05-04 08:47:03 -06:00
Mykola Grymalyuk
3040c621a7 Sync PatcherSupportPkg 2023-05-03 19:43:26 -06:00
Mykola Grymalyuk
2f49a36ccc macos_installer_handler.py: Fix default OS 2023-05-03 15:40:32 -06:00
Mykola Grymalyuk
d551df34ed sys_patch_auto.py: Add RSR work around 2023-05-03 15:39:16 -06:00
Mykola Grymalyuk
2fadae2e3d utilities.py: Add Preboot UUID parsing 2023-05-03 14:51:59 -06:00
Mykola Grymalyuk
2e3ae755ea gui_main.py: Fix spacing 2023-05-03 14:51:27 -06:00
Mykola Grymalyuk
067206b536 macos_installer_handler.py: Add wider OS support for SUCatalog parsing
Preperationg for macOS 14 SUCatalog
2023-05-03 14:47:43 -06:00
Jazzzny
aae6cc705f Fix, thanks Slav 2023-04-28 18:17:23 -04:00
Mykola Grymalyuk
96b126588d macos_installer_handler.py: Export min_required as int 2023-04-28 14:52:52 -06:00
Mykola Grymalyuk
a70039abb5 os_data.py: Add docstring 2023-04-28 14:51:09 -06:00
Mykola Grymalyuk
6fca3339fc macos_installer_handler.py: Add min OS check
Ventura’s installer requires an El Cap host to run
2023-04-28 14:50:59 -06:00
Mykola Grymalyuk
c668ac0004 gui_main.py: Fix smbios_data parsing 2023-04-27 07:28:36 -06:00
Mykola Grymalyuk
88d6fc29f0 Sync CHANGELOG 2023-04-25 15:48:29 -06:00
Mykola Grymalyuk
e556b0227a Merge pull request #1061 from dortania/ci-upgrade
CI Upgrade: Convert to Monterey host
2023-04-25 15:46:12 -06:00
Mykola Grymalyuk
d7b8f91223 CI: Switch to upgraded server 2023-04-25 15:31:19 -06:00
Mykola Grymalyuk
f2cddcae7c CI: Don’t hold for submission status 2023-04-22 17:40:24 -06:00
Mykola Grymalyuk
c9304bdbba CI: Add Team ID argument 2023-04-22 17:05:04 -06:00
Mykola Grymalyuk
117e7fa6ff CI: Comment out cert handling
Action can only be used once on self-hosted runners
2023-04-22 16:40:43 -06:00
Mykola Grymalyuk
6bec4ca2d2 CI: Switch to notarytool 2023-04-22 16:34:30 -06:00
Mykola Grymalyuk
1b8dcd1c1b CI: adjust formatting 2023-04-22 16:27:10 -06:00
Mykola Grymalyuk
f2f81f5239 CI: Import cert 2023-04-22 16:09:41 -06:00
Mykola Grymalyuk
7d7c94cd91 Spin up test runner 2023-04-22 08:17:57 -06:00
Jazzzny
eeb2e6cb1a Add changelog 2023-04-20 20:01:05 -04:00
Jazzzny
6ac18b251c Clean up 2023-04-20 19:58:20 -04:00
Jazzzny
11a9ab7b96 Add support for disabling ColorSync patch 2023-04-20 19:58:20 -04:00
Jazzzny
b87737f55e Create modified build without ColorSync downgrade 2023-04-20 19:58:20 -04:00
Dhinak G
dde6a3d805 Merge pull request #1058 from TechEnthusiasm/main 2023-04-20 17:39:36 -04:00
TechEnthusiasm
71dbb512a6 Update UPDATE.md 2023-04-20 15:36:13 +01:00
Mykola Grymalyuk
b7ddeb3b50 Merge pull request #1057 from IronApple0915/main
IronApple's doc updates to PATCHEXPLAIN.md
2023-04-19 20:19:04 -06:00
Alex
175cb3d3f4 Update PATCHEXPLAIN.md 2023-04-19 21:41:36 -04:00
neon ball
73508835c8 Fix typo second try 2023-04-20 03:26:45 +03:00
neon ball
336c6b43fb Fix typo 2023-04-20 03:26:15 +03:00
Alex
bfed55318c Update PATCHEXPLAIN.md 2023-04-19 19:51:36 -04:00
Alex
a3e80a6378 Update PATCHEXPLAIN.md 2023-04-19 19:46:39 -04:00
Alex
92b78a893d Update PATCHEXPLAIN.md 2023-04-19 19:45:33 -04:00
Alex
758fdb9854 Update PATCHEXPLAIN.md 2023-04-19 19:16:41 -04:00
educovas
44f8f64935 Merge pull request #1056 from educovas/main
Fix non-Metal Safari 16.4 canvas rendering
2023-04-18 19:51:14 -03:00
educovas
8f0a74df6b Fix non-Metal Safari 16.4 canvas rendering 2023-04-18 19:37:53 -03:00
Mykola Grymalyuk
0efe4c4365 Merge pull request #1055 from Jazzzny/enable-xhci
Enhancement - Enable USB 3 expansion card support on Legacy USB 1.1 machines
2023-04-18 15:26:03 -06:00
Jazzzny
04337059e4 Remove commented code 2023-04-18 17:24:45 -04:00
Jazzzny
af0663317b Enable USB 3 support on USB 1.1 machines 2023-04-18 16:39:27 -04:00
Mykola Grymalyuk
e4d0e471d9 sys_patch_dict.py: Treat mid cycle as float
Adds more legibility to patchset
2023-04-18 09:23:46 -06:00
Mykola Grymalyuk
cb45138c5f Sync changelog 2023-04-17 18:37:19 -06:00
Mykola Grymalyuk
917631181a Merge pull request #1053 from Jazzzny/webdriver-opencl
Enhancement - Enable OpenCL on NVIDIA WebDriver cards
2023-04-17 18:28:59 -06:00
Jazzzny
9ac58e605d Fix interpretation 2023-04-17 19:41:52 -04:00
Jazzzny
6d21b1a8fe Clarify 2023-04-17 18:37:44 -04:00
Jazzzny
ae7fa3bbb9 Add OpenCL support for WebDriver cards 2023-04-17 18:37:44 -04:00
Dhinak G
2895136eab Merge pull request #1052 from sladwig/patch-1 2023-04-17 16:17:07 -04:00
Mykola Grymalyuk
7b83c8d2cc Sync PatcherSupportPkg 2023-04-17 10:37:36 -06:00
Mykola Grymalyuk
43cc83edf4 Increment build 2023-04-16 19:36:44 -06:00
Stefan Ladwig
a33af67494 docs: fix typo 2023-04-16 09:50:32 +02:00
Mykola Grymalyuk
eec8f3e797 Resolve F16C reporting errors 2023-04-13 11:16:53 -06:00
Mykola Grymalyuk
5011b2c3f1 Avoid 3.10 type hinting 2023-04-13 07:54:44 -06:00
Mykola Grymalyuk
980142c6ad Merge branch 'main' of https://github.com/dortania/OpenCore-Legacy-Patcher 2023-04-13 07:25:54 -06:00
Mykola Grymalyuk
1fe710f4a3 device_probe.py: Extra error handling 2023-04-13 07:25:45 -06:00
Mykola Grymalyuk
472c494fd4 Merge pull request #1047 from dortania/post-analytics
Implement back-end for Crash and Analytics Reporting
2023-04-12 16:43:27 -06:00
Mykola Grymalyuk
ccbb5dafe5 Add PRIVACY.md 2023-04-12 16:31:04 -06:00
Mykola Grymalyuk
939d3a36a4 Adjust wording 2023-04-11 19:58:25 -06:00
Mykola Grymalyuk
4c19f51a04 Analytics: allow opt-out 2023-04-11 19:08:52 -06:00
Mykola Grymalyuk
b34eaccd35 main.py: move threading 2023-04-11 13:54:45 -06:00
Mykola Grymalyuk
52211def51 Test build of analytics 2023-04-11 13:28:33 -06:00
Mykola Grymalyuk
62f619da99 network_handler.py: Add post wrapping 2023-04-11 08:42:21 -06:00
Mykola Grymalyuk
2496fa9245 Increment build 2023-04-11 08:40:19 -06:00
Mykola Grymalyuk
7a07a16be8 defaults.py Don’t set new menubar as default 2023-04-10 21:50:28 -06:00
Mykola Grymalyuk
2e4517a3c0 sys_patch_helpers.py: Fix src pathing 2023-04-07 13:33:02 -06:00
Mykola Grymalyuk
1ce6f79240 sys_patch_helpers.py: Add Metal libary patching
Resolves many 3rd party apps crashing on 13.3 when trying to invoke Metal directly
2023-04-07 12:59:18 -06:00
Mykola Grymalyuk
96e96464f2 sys_patch.py: Add docstrings and typing suggestions 2023-04-07 12:57:05 -06:00
Mykola Grymalyuk
fcd0c7cd21 build: Add additional Navi patches 2023-04-06 11:58:35 -06:00
Mykola Grymalyuk
a93fbf7122 misc.py: Rework RE arg handling 2023-04-03 14:57:59 -06:00
Mykola Grymalyuk
c0825ed24e misc.py: Set f16c argument 2023-04-03 13:51:00 -06:00
Mykola Grymalyuk
0f95d6a1bb defaults.py: Don’t grab RE’s CPU name 2023-04-03 13:48:16 -06:00
Mykola Grymalyuk
9439c39437 Sync binaries 2023-04-03 11:06:13 -06:00
Mykola Grymalyuk
38025d7f2a Remove unneeded init.py 2023-04-03 10:48:24 -06:00
Mykola Grymalyuk
23f2291bfa integrity_verification.py: rework into OOP 2023-04-02 11:39:55 -06:00
Mykola Grymalyuk
b0c05b914b sys_patch: Modularize patch set generation
Move generate_patchset() to dedicated module
2023-04-02 10:22:27 -06:00
Mykola Grymalyuk
b83cd8191b network_handler.py: Implement get() wrapper 2023-03-31 21:22:13 -06:00
Mykola Grymalyuk
8512aad33d Merge pull request #1043 from dortania/rework-build-libary
build module: Enhance readability
2023-03-31 20:53:52 -06:00
Mykola Grymalyuk
c04c313b2c misc.py: Removed unneeded rmtree invocation 2023-03-30 12:10:34 -06:00
Mykola Grymalyuk
841bcb72c3 build: Add docstrings for classes 2023-03-30 11:46:44 -06:00
Mykola Grymalyuk
6aba47bcfb Resolve Docs building 2023-03-30 11:24:08 -06:00
Mykola Grymalyuk
81495ee192 Merge pull request #1030 from ThatStella7922/main
README grammar and wording tweaks, add hw donation
2023-03-30 08:01:56 -06:00
Mykola Grymalyuk
1bf3e0e2a4 Merge branch 'main' into rework-build-libary 2023-03-29 15:46:47 -06:00
Mykola Grymalyuk
bb6ef48e95 misc.py: Fix CPUFriend handling 2023-03-28 21:03:42 -06:00
Mykola Grymalyuk
06350355ff build: Add docstrings to functions 2023-03-28 20:57:17 -06:00
Mykola Grymalyuk
9677c52c1c Sync CHANGELOG 2023-03-28 20:15:07 -06:00
Mykola Grymalyuk
bc4cc33f2f Merge pull request #1042 from Jazzzny/main
Enhancement - Replace hardcoded WxPython GUI font with .AppleSystemUIFont
2023-03-28 20:04:53 -06:00
Jazzzny
b2f1a6375a Update gui_main.py 2023-03-28 21:11:42 -04:00
Jazzzny
3c7f496bc8 Update gui_help.py 2023-03-28 21:11:06 -04:00
Mykola Grymalyuk
9b984e68af build: Implement pythonic formatting 2023-03-28 16:34:51 -06:00
Mykola Grymalyuk
54c661751a Sync changelog 2023-03-28 14:18:33 -06:00
Mykola Grymalyuk
2c0d67ce61 kdk_handler.py: Remove redundant str comparison 2023-03-28 14:17:19 -06:00
Mykola Grymalyuk
d153747b58 Merge pull request #1035 from Ausdauersportler/main
iMac9,1 MXM3 AMD GCN support
2023-03-28 14:16:37 -06:00
Mykola Grymalyuk
74fc3a7890 Merge branch 'main' into main 2023-03-28 14:15:56 -06:00
Mykola Grymalyuk
c6ce71d589 defaults: enable beta menubar 2023-03-28 09:33:08 -06:00
Mykola Grymalyuk
513f20bbb1 kdk_handler.py: Fix cleanup logic 2023-03-28 09:25:52 -06:00
Mykola Grymalyuk
afae4f8eda Sync PatcherSupportPkg 2023-03-28 09:06:40 -06:00
Mykola Grymalyuk
af4d063f6e Increment Build 2023-03-27 12:19:34 -06:00
ThatStella7922
f0ebd235a9 Update documentation
Based off DhinakG's suggestions
2023-03-15 11:09:51 -06:00
ThatStella7922
93c1d3c4aa Updated Windows.md by Jazzny 2023-03-15 10:59:19 -06:00
Ausdauersportler
8661fa339c iMac9,1 MXM3 AMD GCN support 2023-03-15 00:42:20 +01:00
ThatStella7922
8db8e0b5da docs grammar/wording pass, update WINDOWS.md by @Jazzzny 2023-02-26 14:20:47 -07:00
ThatStella7922
954d3b9166 SOURCE grammar and wording tweaks 2023-02-26 12:53:11 -07:00
ThatStella7922
672129dbfc README grammar and wording tweaks, add hw donation 2023-02-26 12:32:59 -07:00
141 changed files with 7760 additions and 5476 deletions

View File

@@ -9,24 +9,49 @@ on:
jobs: jobs:
build: build:
name: Build wxPython name: Build wxPython
runs-on: x86_64_mojave runs-on: x86_64_monterey
if: github.repository_owner == 'dortania' if: github.repository_owner == 'dortania'
env: env:
branch: ${{ github.ref }} branch: ${{ github.ref }}
commiturl: ${{ github.event.head_commit.url }}${{ github.event.release.html_url }} commiturl: ${{ github.event.head_commit.url }}${{ github.event.release.html_url }}
commitdate: ${{ github.event.head_commit.timestamp }}${{ github.event.release.published_at }} commitdate: ${{ github.event.head_commit.timestamp }}${{ github.event.release.published_at }}
MAC_CODESIGN_IDENTITY: ${{ secrets.MAC_CODESIGN_IDENTITY }}
MAC_CODESIGN_CERT: ${{ secrets.MAC_CODESIGN_CERT }}
MAC_NOTARIZATION_USERNAME: ${{ secrets.MAC_NOTARIZATION_USERNAME }} MAC_NOTARIZATION_USERNAME: ${{ secrets.MAC_NOTARIZATION_USERNAME }}
MAC_NOTARIZATION_PASSWORD: ${{ secrets.MAC_NOTARIZATION_PASSWORD }} MAC_NOTARIZATION_PASSWORD: ${{ secrets.MAC_NOTARIZATION_PASSWORD }}
MAC_NOTARIZATION_TEAM_ID: ${{ secrets.MAC_NOTARIZATION_TEAM_ID }}
ANALYTICS_KEY: ${{ secrets.ANALYTICS_KEY }}
ANALYTICS_SITE: ${{ secrets.ANALYTICS_SITE }}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- run: /Library/Frameworks/Python.framework/Versions/3.10/bin/python3 Build-Binary.command --reset_binaries --branch "${{ env.branch }}" --commit "${{ env.commiturl }}" --commit_date "${{ env.commitdate }}"
- run: 'codesign -s "Developer ID Application: Mykola Grymalyuk (S74BDJXQMD)" -v --force --deep --timestamp --entitlements ./payloads/entitlements.plist -o runtime "dist/OpenCore-Patcher.app"' - name: Build Binary
- run: cd dist; ditto -c -k --sequesterRsrc --keepParent OpenCore-Patcher.app ../OpenCore-Patcher-wxPython.app.zip run: /Library/Frameworks/Python.framework/Versions/3.10/bin/python3 Build-Binary.command --reset_binaries --branch "${{ env.branch }}" --commit "${{ env.commiturl }}" --commit_date "${{ env.commitdate }}" --key "${{ env.ANALYTICS_KEY }}" --site "${{ env.ANALYTICS_SITE }}"
- run: xcrun altool --notarize-app --primary-bundle-id "com.dortania.opencore-legacy-patcher" --username "${{ env.MAC_NOTARIZATION_USERNAME }}" --password "${{ env.MAC_NOTARIZATION_PASSWORD }}" --file OpenCore-Patcher-wxPython.app.zip
- run: packagesbuild ./payloads/InstallPackage/AutoPkg-Assets-Setup.pkgproj # - name: Import Certificate
- run: mv ./OpenCore-Patcher-wxPython.app.zip ./OpenCore-Patcher-GUI.app.zip # if: (!security find-certificate -c "${{ env.MAC_CODESIGN_IDENTITY }}")
# uses: apple-actions/import-codesign-certs@v2
# with:
# p12-file-base64: ${{ secrets.MAC_CODESIGN_CERT }}
# p12-password: ${{ secrets.MAC_NOTARIZATION_PASSWORD }}
- name: Codesign Binary
run: 'codesign -s "${{ env.MAC_CODESIGN_IDENTITY }}" -v --force --deep --timestamp --entitlements ./payloads/entitlements.plist -o runtime "dist/OpenCore-Patcher.app"'
- name: Package Binary
run: cd dist; ditto -c -k --sequesterRsrc --keepParent OpenCore-Patcher.app ../OpenCore-Patcher-wxPython.app.zip
- name: Notarize Binary
run: xcrun notarytool submit OpenCore-Patcher-wxPython.app.zip --apple-id "${{ env.MAC_NOTARIZATION_USERNAME }}" --password "${{ env.MAC_NOTARIZATION_PASSWORD }}" --team-id "${{ env.MAC_NOTARIZATION_TEAM_ID }}"
- name: Generate support package
run: packagesbuild ./payloads/InstallPackage/AutoPkg-Assets-Setup.pkgproj
- name: Prepare App for Upload
run: mv ./OpenCore-Patcher-wxPython.app.zip ./OpenCore-Patcher-GUI.app.zip
- name: Upload App to Artifacts - name: Upload App to Artifacts
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:

23
.github/workflows/validate-external.yml vendored Normal file
View File

@@ -0,0 +1,23 @@
name: CI - Validation (External)
on:
push:
workflow_dispatch:
release:
types: [published]
jobs:
build:
name: Validate
runs-on: macos-latest
if: github.repository_owner != 'dortania'
steps:
- uses: actions/checkout@v3
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install Dependencies
run: python3 -m pip install -r requirements.txt
- name: Validate
run: python3 OpenCore-Patcher-GUI.command --validate

View File

@@ -9,12 +9,9 @@ on:
jobs: jobs:
build: build:
name: Validate name: Validate
runs-on: x86_64_mojave runs-on: x86_64_monterey
if: github.repository_owner == 'dortania' if: github.repository_owner == 'dortania'
env:
branch: ${{ github.ref }}
commiturl: ${{ github.event.head_commit.url }}${{ github.event.release.html_url }}
commitdate: ${{ github.event.head_commit.timestamp }}${{ github.event.release.published_at }}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- run: /Library/Frameworks/Python.framework/Versions/3.10/bin/python3 OpenCore-Patcher-GUI.command --validate - name: Validate
run: /Library/Frameworks/Python.framework/Versions/3.10/bin/python3 OpenCore-Patcher-GUI.command --validate

4
.gitignore vendored
View File

@@ -33,3 +33,7 @@ __pycache__/
/payloads/OpenCore-Legacy-Patcher-*.plist /payloads/OpenCore-Legacy-Patcher-*.plist
/payloads/KDK.dmg /payloads/KDK.dmg
*.log *.log
/Universal-Binaries.dmg
/payloads/KDKInfo.plist
/payloads/update.sh
/payloads/OpenCore-Patcher.app

View File

@@ -61,6 +61,8 @@ class CreateBinary:
parser.add_argument('--commit', type=str, help='Git commit URL') parser.add_argument('--commit', type=str, help='Git commit URL')
parser.add_argument('--commit_date', type=str, help='Git commit date') parser.add_argument('--commit_date', type=str, help='Git commit date')
parser.add_argument('--reset_binaries', action='store_true', help='Force redownload and imaging of payloads') parser.add_argument('--reset_binaries', action='store_true', help='Force redownload and imaging of payloads')
parser.add_argument('--key', type=str, help='Developer key for signing')
parser.add_argument('--site', type=str, help='Path to server')
args = parser.parse_args() args = parser.parse_args()
return args return args
@@ -132,16 +134,92 @@ class CreateBinary:
print(rm_output.stderr.decode('utf-8')) print(rm_output.stderr.decode('utf-8'))
raise Exception("Remove failed") raise Exception("Remove failed")
self._embed_key()
print("- Building GUI binary...") print("- Building GUI binary...")
build_args = [self.pyinstaller_path, "./OpenCore-Patcher-GUI.spec", "--noconfirm"] build_args = [self.pyinstaller_path, "./OpenCore-Patcher-GUI.spec", "--noconfirm"]
build_result = subprocess.run(build_args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) build_result = subprocess.run(build_args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
self._strip_key()
if build_result.returncode != 0: if build_result.returncode != 0:
print("- Build failed") print("- Build failed")
print(build_result.stderr.decode('utf-8')) print(build_result.stderr.decode('utf-8'))
raise Exception("Build failed") raise Exception("Build failed")
# Next embed support icns into ./Resources
print("- Embedding icns...")
for file in Path("payloads/Icon/AppIcons").glob("*.icns"):
subprocess.run(
["cp", str(file), "./dist/OpenCore-Patcher.app/Contents/Resources/"],
stdout=subprocess.PIPE, stderr=subprocess.PIPE
)
def _embed_key(self):
"""
Embed developer key into binary
"""
if not self.args.key:
print("- No developer key provided, skipping...")
return
if not self.args.site:
print("- No site provided, skipping...")
return
print("- Embedding developer key...")
if not Path("./resources/analytics_handler.py").exists():
print("- analytics_handler.py not found")
return
lines = []
with open("./resources/analytics_handler.py", "r") as f:
lines = f.readlines()
for i, line in enumerate(lines):
if line.startswith("SITE_KEY: str = "):
lines[i] = f"SITE_KEY: str = \"{self.args.key}\"\n"
elif line.startswith("ANALYTICS_SERVER: str = "):
lines[i] = f"ANALYTICS_SERVER: str = \"{self.args.site}\"\n"
with open("./resources/analytics_handler.py", "w") as f:
f.writelines(lines)
def _strip_key(self):
"""
Strip developer key from binary
"""
if not self.args.key:
print("- No developer key provided, skipping...")
return
if not self.args.site:
print("- No site provided, skipping...")
return
print("- Stripping developer key...")
if not Path("./resources/analytics_handler.py").exists():
print("- analytics_handler.py not found")
return
lines = []
with open("./resources/analytics_handler.py", "r") as f:
lines = f.readlines()
for i, line in enumerate(lines):
if line.startswith("SITE_KEY: str = "):
lines[i] = f"SITE_KEY: str = \"\"\n"
elif line.startswith("ANALYTICS_SERVER: str = "):
lines[i] = f"ANALYTICS_SERVER: str = \"\"\n"
with open("./resources/analytics_handler.py", "w") as f:
f.writelines(lines)
def _delete_extra_binaries(self): def _delete_extra_binaries(self):
""" """
@@ -161,11 +239,11 @@ class CreateBinary:
whitelist_files = [ whitelist_files = [
"com.dortania.opencore-legacy-patcher.auto-patch.plist", "com.dortania.opencore-legacy-patcher.auto-patch.plist",
"com.dortania.opencore-legacy-patcher.rsr-monitor.plist",
"entitlements.plist", "entitlements.plist",
"launcher.sh", "launcher.sh",
"OC-Patcher-TUI.icns", "OC-Patcher-TUI.icns",
"OC-Patcher.icns", "OC-Patcher.icns",
"Universal-Binaries.zip",
] ]
@@ -190,16 +268,16 @@ class CreateBinary:
patcher_support_pkg_version = constants.Constants().patcher_support_pkg_version patcher_support_pkg_version = constants.Constants().patcher_support_pkg_version
required_resources = [ required_resources = [
"Universal-Binaries.zip" "Universal-Binaries.dmg"
] ]
print("- Downloading required resources...") print("- Downloading required resources...")
for resource in required_resources: for resource in required_resources:
if Path(f"./payloads/{resource}").exists(): if Path(f"./{resource}").exists():
if self.args.reset_binaries: if self.args.reset_binaries:
print(f" - Removing old {resource}") print(f" - Removing old {resource}")
rm_output = subprocess.run( rm_output = subprocess.run(
["rm", "-rf", f"./payloads/{resource}"], ["rm", "-rf", f"./{resource}"],
stdout=subprocess.PIPE, stderr=subprocess.PIPE stdout=subprocess.PIPE, stderr=subprocess.PIPE
) )
if rm_output.returncode != 0: if rm_output.returncode != 0:
@@ -227,13 +305,6 @@ class CreateBinary:
print(f" - {resource} not found") print(f" - {resource} not found")
raise Exception(f"{resource} not found") raise Exception(f"{resource} not found")
print(" - Moving into payloads")
mv_output = subprocess.run(["mv", resource, "./payloads/"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
if mv_output.returncode != 0:
print(" - Move failed")
print(mv_output.stderr.decode('utf-8'))
raise Exception("Move failed")
def _generate_payloads_dmg(self): def _generate_payloads_dmg(self):
""" """
@@ -260,9 +331,9 @@ class CreateBinary:
print(" - Generating DMG...") print(" - Generating DMG...")
dmg_output = subprocess.run([ dmg_output = subprocess.run([
'hdiutil', 'create', './payloads.dmg', 'hdiutil', 'create', './payloads.dmg',
'-megabytes', '32000', '-megabytes', '32000', # Overlays can only be as large as the disk image allows
'-format', 'UDZO', '-ov', '-format', 'UDZO', '-ov',
'-volname', 'payloads', '-volname', 'OpenCore Patcher Resources (Base)',
'-fs', 'HFS+', '-fs', 'HFS+',
'-srcfolder', './payloads', '-srcfolder', './payloads',
'-passphrase', 'password', '-encryption' '-passphrase', 'password', '-encryption'

View File

@@ -1,5 +1,136 @@
# OpenCore Legacy Patcher changelog # OpenCore Legacy Patcher changelog
## 0.6.6
- Implement option to disable ColorSync downgrade on HD 3000 Macs
- Allows for Display Profiles support on some units
- Note: black box rendering issues will likely appear
- Thanks [@jazzzny](https://github.com/Jazzzny)
- Rename payloads.dmg volume name to "OpenCore Patcher Resources (Base)"
- Allows for better identification when mounted (ex. Disk Utility while app is running)
- Implement DMG-based PatcherSupportPkg system
- Reduces both app size and root patching time
- Resolve incorrect remote KDK matching for macOS betas
- ex. Beta 4 KDK being recommended for Beta 3 install
- Resolve low power mode on MacPro6,1
- Credit to CaseyJ's [PCI Bus Enumeration Patch](https://github.com/AMD-OSX/AMD_Vanilla/pull/196)
- Resolve PCI eject menu appearing on unsupported hardware
- Resolve kernel panic on wake for AMD TeraScale 1 and Nvidia Tesla 8000 series GPUs
- Resolve loss of Ethernet after wake on MacPro3,1 in Ventura
- Resolve graphics corruption on wake for TeraScale 1
- Patch currently limited to Ventura and newer
- Restore Function Keys on MacBook5,2 and MacBook4,1
- Implementation by [@jazzzny](https://github.com/Jazzzny)
- Update non-Metal Binaries:
- Resolves cryptexd and sshd crashes
- Resolves screen recording regression
- Resolves Photo Booth on macOS Monterey and later
- May require tccplus for permissions
- Resolve Application alias not being created with AutoPatcher
- Backend changes:
- Rename OCLP-Helper to OpenCore-Patcher
- Allows for better identification when displaying prompts
- Reimplement wxPython GUI into modularized system:
- Allows for easier maintenance and future expansion
- Changes include:
- Reworked settings UI
- Unified download UI with time remaining
- Implement in-app update system
- Guides users to update OpenCore and Root Patches once update's installed
- Expand app update checks to include nightly users
- ex. 0.6.6 nightly -> 0.6.6 release
- Implement macOS installer verification after flashing
- Implement proper UI call backs on long processes
- ex. Root patching
- Implement default selections for disks and installers
- Set about and quit items
- Utilize `py-applescript` for authorization prompts
- Avoids displaying prompts with `osascript` in the title
- Due to limitations, only used for installer creation and OpenCore installation
- Resolve exception handler not logging to file
- Display raised exceptions from main thread to users
- Increment Binaries:
- PatcherSupportPkg 1.1.0 - release
- OpenCorePkg 0.9.2 - release
- Lilu 1.6.6 - rolling (d8f3782)
- RestrictEvents 1.1.1 - release
- FeatureUnlock 1.1.4 - release
- BlueToolFixup 2.6.6 - release
## 0.6.5
- Update 3802 Patchset Binaries:
- Resolves additional 3rd party app crashes on Metal with macOS 13.3+
- ex: PowerPoint's "Presentation Mode"
- Update non-Metal Binaries:
- Resolves Safari 16.4 frozen canvas rendering
- ex: Google Docs
- Allow for coexistence of USB 3.0 controllers and USB 1.1 patches on macOS 13+
- Restores USB 3.0 expansion card support on USB 1.1 machines such as MacPro5,1
- Resolve OpenCL rendering on Nvidia Web Drivers
- thanks [@jazzzny](https://github.com/Jazzzny)
- Resolve UI unable to download macOS installers on unknown models
- ex. M2 Macs and Hackintoshes
- Implement minimum OS check for installer creation
- Prevents vague errors when creating Ventura installers on Yosemite
- Resolve WindowServer crashing with Rapid Security Response (RSR) installation
- Primarily applicable for Haswell iGPUs on 13.3.1 (a)
- Update legacy Wireless binaries
- Resolve wifi crashing on 13.4 with BCM94322, BCM943224 and Atheros chipsets
- Backend changes:
- macos_installer_handler.py:
- Expand OS support for IA parsing in SUCatalog
- gui_main.py:
- Fix spacing regression introduced with `.AppleSystemUIFont` implementation
- Increment Binaries:
- PatcherSupportPkg 0.9.7 - release
- Build Server Changes:
- Upgrade CI Host to macOS Monterey
- Upgrade Xcode to 14.2
- Switch from `altool` to `notarytool` for notarization
## 0.6.4
- Backend changes:
- Implement new analytics_handler.py module
- Adds support for anonymous analytics including host info (and crash reports in the future)
- Can be disabled via GUI or `defaults write com.dortania.opencore-legacy-patcher DisableCrashAndAnalyticsReporting -bool true`
- Resolve Safari rendering error on Ivy Bridge in macOS 13.3+
- Increment Binaries:
- RestrictEvents 1.1.1 - rolling (495f4d5)
## 0.6.3
- Update non-Metal Binaries:
- Resolves Safari 16.4 rendering issue
- Resolves left side menubar selections
- Implements automatic menubar text color
- New experimental Menubar implementation can be enabled via `defaults write -g Amy.MenuBar2Beta -bool true`
- Note: If you experience issues with the new implementation, you can revert back to the old implementation by running `defaults delete -g Amy.MenuBar2Beta`
- Implement full IOUSBHostFamily downgrade for UHCI/OHCI
- Resolves panics on certain iMac models
- Resolve unused KDKs not being properly cleaned up
- Implement MXM graphics handling for iMac9,1
- Credit to [@Ausdauersportler](https://github.com/Ausdauersportler) for implementation
- Resolve CoreGraphics.framework crashing on Ivy Bridge CPUs in macOS 13.3+
- Disables f16c sysctl reporting
- Resolve accidental CPU renaming with RestrictEvents
- Resolve backlight and internal display support for AMD Navi MXM GPUs
- Credit to [@Ausdauersportler](https://github.com/Ausdauersportler) for bug fix
- Resolve 3rd Party Apps erroring on Metal with macOS 13.3
- Applicable Software: Applications directly using Metal (ex. Blender, Parallels Desktop)
- Applicable Hardware: 3802-based GPUs (ie. Intel Ivy Bridge and Haswell iGPUs, Nvidia Kepler dGPUs)
- Backend changes:
- Use `.AppleSystemUIFont` for wxPython text rendering (thanks [@jazzzny](https://github.com/Jazzzny))
- Add extra error handling for network errors:
- Handles `RemoteDisconnected('Remote end closed connection without response')` exceptions
- Move root volume patch set generation to dedicated sys_patch_generate.py module
- Refactored integrity_verification.py:
- Implemented Object-Oriented design
- Reduced disk I/O and main thread monopolization
- Increment Binaries:
- PatcherSupportPkg 0.9.3 - release
- OpenCorePkg 0.9.1 - release
- AirPortBrcmFixup 2.1.7 - release
- RestrictEvents 1.1.0 - release
- BrcmPatchRAM 2.6.5 - release
## 0.6.2 ## 0.6.2
- Work around Black Box rendering issues on certain Display Color Profiles - Work around Black Box rendering issues on certain Display Color Profiles
- Limited to Ventura currently due to limitations with other color profiles - Limited to Ventura currently due to limitations with other color profiles

View File

@@ -9,7 +9,7 @@ block_cipher = None
a = Analysis(['OpenCore-Patcher-GUI.command'], a = Analysis(['OpenCore-Patcher-GUI.command'],
pathex=[], pathex=[],
binaries=[], binaries=[],
datas=[('payloads.dmg', '.')], datas=[('payloads.dmg', '.'), ('Universal-Binaries.dmg', '.')],
hiddenimports=[], hiddenimports=[],
hookspath=[], hookspath=[],
hooksconfig={}, hooksconfig={},
@@ -49,6 +49,7 @@ app = BUNDLE(coll,
icon="payloads/OC-Patcher.icns", icon="payloads/OC-Patcher.icns",
bundle_identifier="com.dortania.opencore-legacy-patcher", bundle_identifier="com.dortania.opencore-legacy-patcher",
info_plist={ info_plist={
"CFBundleName": "OpenCore Legacy Patcher",
"CFBundleShortVersionString": constants.Constants().patcher_version, "CFBundleShortVersionString": constants.Constants().patcher_version,
"NSHumanReadableCopyright": constants.Constants().copyright_date, "NSHumanReadableCopyright": constants.Constants().copyright_date,
"LSMinimumSystemVersion": "10.10.0", "LSMinimumSystemVersion": "10.10.0",

25
PRIVACY.md Normal file
View File

@@ -0,0 +1,25 @@
# Privacy Policy
OpenCore Legacy Patcher may collect pseudo-anonymized data about the host system and the OpenCore Legacy Patcher application. This data is used to improve the project and to help diagnose issues. The data collected is as follows:
* System's UUID as a SHA1 hash
* This is used to identify the system and to prevent duplicate reports
* Cannot be used to identify the system without the user providing the UUID
* Application name and version
* System's OS version
* System's model name, GPUs present and firmware vendor
* May include more hardware information in the future (ex. CPU, WiFi, etc)
* General country code of system's reported region
* ex. `US`, `CA`, etc
Identifiable data such as IP addresses, MAC addresses, serial numbers, etc. are not collected.
In the future, crash logs may also be collected to help with diagnosing issues.
----------
Users who wish to opt-out can do so either via the application's preferences or via the following command:
```
defaults write com.dortania.opencore-legacy-patcher DisableCrashAndAnalyticsReporting -bool true
```
To have your data removed, please contact us via our [Discord server](https://discord.gg/rqdPgH8xSN) and provide the UUID of your system.

View File

@@ -5,7 +5,7 @@
A Python-based project revolving around [Acidanthera's OpenCorePkg](https://github.com/acidanthera/OpenCorePkg) and [Lilu](https://github.com/acidanthera/Lilu) for both running and unlocking features in macOS on supported and unsupported Macs. A Python-based project revolving around [Acidanthera's OpenCorePkg](https://github.com/acidanthera/OpenCorePkg) and [Lilu](https://github.com/acidanthera/Lilu) for both running and unlocking features in macOS on supported and unsupported Macs.
Our project's main goal is to breath new life to Macs no longer supported by Apple, allowing for the installation and usage of macOS Big Sur and newer on machines as old as 2007. Our project's main goal is to breathe new life into Macs no longer supported by Apple, allowing for the installation and usage of macOS Big Sur and newer on machines as old as 2007.
---------- ----------
@@ -18,21 +18,21 @@ Noteworthy features of OpenCore Legacy Patcher:
* Support for macOS Big Sur, Monterey and Ventura * Support for macOS Big Sur, Monterey and Ventura
* Native Over the Air (OTA) System Updates * Native Over the Air (OTA) System Updates
* Supports Penryn and newer Macs * Supports Penryn and newer Macs
* Full support for WPA Wifi and Personal Hotspot on BCM943224 and newer chipsets * Full support for WPA Wi-Fi and Personal Hotspot on BCM943224 and newer wireless chipsets
* System Integrity Protection, FileVault 2, .im4m Secure Boot and Vaulting * System Integrity Protection, FileVault 2, .im4m Secure Boot and Vaulting
* Recovery OS, Safe Mode and Single-user Mode booting on non-native OSes * Recovery OS, Safe Mode and Single-user Mode booting on non-native OSes
* Unlocks features such as Sidecar and AirPlay to Mac even on native Macs * Unlocks features such as Sidecar and AirPlay to Mac even on native Macs
* Enable enhanced SATA and NVMe power management on non-stock hardware * Enables enhanced SATA and NVMe power management on non-Apple storage devices
* Zero firmware patching required (ie. APFS ROM patching) * Zero firmware patching required (ie. APFS ROM patching)
* Graphics acceleration for both Metal and non-Metal GPUs * Graphics acceleration for both Metal and non-Metal GPUs
---------- ----------
Note: Only clean-installs and upgrades are supported, macOS Big Sur installs already patched with other patchers, such as [Patched Sur](https://github.com/BenSova/Patched-Sur) or [bigmac](https://github.com/StarPlayrX/bigmac), cannot be used due to broken file integrity with APFS snapshots and SIP. Note: Only clean-installs and upgrades are supported. macOS Big Sur installs already patched with other patchers, such as [Patched Sur](https://github.com/BenSova/Patched-Sur) or [bigmac](https://github.com/StarPlayrX/bigmac), cannot be used due to broken file integrity with APFS snapshots and SIP.
* You can however reinstall macOS with this patcher and retain your original data * You can, however, reinstall macOS with this patcher and retain your original data
Note 2: Currently OpenCore Legacy Patcher officially supports patching to run macOS Big Sur through Ventura installs. For older OSes, OpenCore may function however support is currently not provided from Dortania. Note 2: Currently, OpenCore Legacy Patcher officially supports patching to run macOS Big Sur through Ventura installs. For older OSes, OpenCore may function; however, support is currently not provided from Dortania.
* For macOS Mojave and Catalina support, we recommend the use of [dosdude1's patchers](http://dosdude1.com) * For macOS Mojave and Catalina support, we recommend the use of [dosdude1's patchers](http://dosdude1.com)
@@ -47,7 +47,7 @@ To start using the project, please see our in-depth guide:
This project is offered on an AS-IS basis, we do not guarantee support for any issues that may arise. However, there is a community server with other passionate users and developers that can aid you: This project is offered on an AS-IS basis, we do not guarantee support for any issues that may arise. However, there is a community server with other passionate users and developers that can aid you:
* [OpenCore Patcher Paradise Discord Server](https://discord.gg/rqdPgH8xSN) * [OpenCore Patcher Paradise Discord Server](https://discord.gg/rqdPgH8xSN)
* Keep in mind that the Discord is maintained by the community, so we ask everyone to be respectful. * Keep in mind that the Discord server is maintained by the community, so we ask everyone to be respectful.
* Please review our docs on [how to debug with OpenCore](https://dortania.github.io/OpenCore-Legacy-Patcher/DEBUG.html) to gather important information to help others with troubleshooting. * Please review our docs on [how to debug with OpenCore](https://dortania.github.io/OpenCore-Legacy-Patcher/DEBUG.html) to gather important information to help others with troubleshooting.
## Running from source ## Running from source
@@ -57,14 +57,14 @@ To run the project from source, see here: [Build and run from source](./SOURCE.m
## Credits ## Credits
* [Acidanthera](https://github.com/Acidanthera) * [Acidanthera](https://github.com/Acidanthera)
* OpenCorePkg as well as many of the core kexts and tools * OpenCorePkg, as well as many of the core kexts and tools
* [DhinakG](https://github.com/DhinakG) * [DhinakG](https://github.com/DhinakG)
* Main co-author * Main co-author
* [Khronokernel](https://github.com/Khronokernel) * [Khronokernel](https://github.com/Khronokernel)
* Main co-author * Main co-author
* [Ausdauersportler](https://github.com/Ausdauersportler) * [Ausdauersportler](https://github.com/Ausdauersportler)
* iMacs Metal GPUs Upgrade Patch set and documentation * iMacs Metal GPUs Upgrade Patch set and documentation
* Great amounts of help debugging and code suggestions * Great amounts of help with debugging, and code suggestions
* [vit9696](https://github.com/vit9696) * [vit9696](https://github.com/vit9696)
* Endless amount of help troubleshooting, determining fixes and writing patches * Endless amount of help troubleshooting, determining fixes and writing patches
* [ASentientBot](https://github.com/ASentientBot), [EduCovas](https://github.com/educovas) and [ASentientHedgehog](https://github.com/moosethegoose2213) * [ASentientBot](https://github.com/ASentientBot), [EduCovas](https://github.com/educovas) and [ASentientHedgehog](https://github.com/moosethegoose2213)
@@ -75,7 +75,7 @@ To run the project from source, see here: [Build and run from source](./SOURCE.m
* [Syncretic](https://forums.macrumors.com/members/syncretic.1173816/) * [Syncretic](https://forums.macrumors.com/members/syncretic.1173816/)
* [AAAMouSSE](https://forums.macrumors.com/threads/mp3-1-others-sse-4-2-emulation-to-enable-amd-metal-driver.2206682/), [telemetrap](https://forums.macrumors.com/threads/mp3-1-others-sse-4-2-emulation-to-enable-amd-metal-driver.2206682/post-28447707) and [SurPlus](https://github.com/reenigneorcim/SurPlus) * [AAAMouSSE](https://forums.macrumors.com/threads/mp3-1-others-sse-4-2-emulation-to-enable-amd-metal-driver.2206682/), [telemetrap](https://forums.macrumors.com/threads/mp3-1-others-sse-4-2-emulation-to-enable-amd-metal-driver.2206682/post-28447707) and [SurPlus](https://github.com/reenigneorcim/SurPlus)
* [dosdude1](https://github.com/dosdude1) * [dosdude1](https://github.com/dosdude1)
* Main author of [original GUI](https://github.com/dortania/OCLP-GUI) * Main author of the [original GUI](https://github.com/dortania/OCLP-GUI)
* Development of previous patchers, laying out much of what needs to be patched * Development of previous patchers, laying out much of what needs to be patched
* [parrotgeek1](https://github.com/parrotgeek1) * [parrotgeek1](https://github.com/parrotgeek1)
* [VMM Patch Set](https://github.com/dortania/OpenCore-Legacy-Patcher/blob/4a8f61a01da72b38a4b2250386cc4b497a31a839/payloads/Config/config.plist#L1222-L1281) * [VMM Patch Set](https://github.com/dortania/OpenCore-Legacy-Patcher/blob/4a8f61a01da72b38a4b2250386cc4b497a31a839/payloads/Config/config.plist#L1222-L1281)
@@ -91,15 +91,18 @@ To run the project from source, see here: [Build and run from source](./SOURCE.m
* Aid with Nvidia Web Driver research and development * Aid with Nvidia Web Driver research and development
* [joevt](https://github.com/joevt) * [joevt](https://github.com/joevt)
* [FixPCIeLinkrate](https://github.com/joevt/joevtApps) * [FixPCIeLinkrate](https://github.com/joevt/joevtApps)
* [Jazzzny](https://github.com/Jazzzny)
* Research and various contributions to the project
* Amazing users who've graciously donate hardware: * Amazing users who've graciously donate hardware:
* [JohnD](https://forums.macrumors.com/members/johnd.53633/) - 2013 Mac Pro * [JohnD](https://forums.macrumors.com/members/johnd.53633/) - 2013 Mac Pro
* [SpiGAndromeda](https://github.com/SpiGAndromeda) - AMD Vega 64 * [SpiGAndromeda](https://github.com/SpiGAndromeda) - AMD Vega 64
* [turbomacs](https://github.com/turbomacs) - 2014 5k iMac * [turbomacs](https://github.com/turbomacs) - 2014 5k iMac
* [vinaypundith](https://forums.macrumors.com/members/vinaypundith.1212357/) - MacBook7,1 * [vinaypundith](https://forums.macrumors.com/members/vinaypundith.1212357/) - MacBook7,1
* [ThatStella7922](https://github.com/ThatStella7922) - 2017 13" MacBook Pro (A1708)
* zephar - 2008 Mac Pro * zephar - 2008 Mac Pro
* jazo97 - 2011 15" MacBook Pro * jazo97 - 2011 15" MacBook Pro
* And others (reach out if we forgot you!) * And others (reach out if we forgot you!)
* MacRumors and Unsupported Mac Communities * MacRumors and Unsupported Mac Communities
* Endless testing, reporting issues * Endless testing and reporting issues
* Apple * Apple
* for macOS and many of the kexts, frameworks and other binaries we reimplemented into newer OSes * for macOS and many of the kexts, frameworks and other binaries we reimplemented into newer OSes

View File

@@ -1,20 +1,20 @@
# Build and run from source # Build and run from source
OpenCore Legacy Patcher at its core is a python-based GUI/CLI based application. This means that to run the project from source, you simply need to invoke the OpenCore-Patcher-GUI.command file via Python. OpenCore Legacy Patcher at its core is a Python-based GUI/CLI-based application. In turn, to run the project from source, you simply need to invoke the OpenCore-Patcher-GUI.command file via Python.
For developers wishing to validate mainline changes, you may use these nightly links: For developers wishing to validate mainline changes, you may use this link: [GUI (Graphical Based App)](https://nightly.link/dortania/OpenCore-Legacy-Patcher/workflows/build-app-wxpython/main/OpenCore-Patcher.app%20%28GUI%29.zip)
* [GUI (Graphical Based App)](https://nightly.link/dortania/OpenCore-Legacy-Patcher/workflows/build-app-wxpython/main/OpenCore-Patcher.app%20%28GUI%29.zip) * **Warning**: Nightly builds (untagged builds built from the latest commit) are actively developed OpenCore Legacy Patcher builds. These builds have not been tested, are not guaranteed to work, and are not guaranteed to be safe. Do not use nightlies without a good reason to do so, and do not use them on your main machine. Additionally, these binaries should not be used without first consulting the [CHANGELOG](./CHANGELOG.md).
**Warning**: These binaries should not be used without first consulting the [CHANGELOG](./CHANGELOG.md). Do not distribute these links in forums, instead direct to this file. **Do not share _any_ links to these binaries** in forums; please link to **this document only**.
* Additionally, do not reupload these binaries or download binaries from other sites. Using binaries from untrusted sources is a security issue, as they may have been tampered with.
* Users running new builds of the project without understanding what has changed are at higher of bricking their installation as they do not read any warnings provided in the CHANGELOG. We wish to minimize these situations as much as possible. * Users running new builds of the project without understanding what has changed and the implications of installing software under active development are at a higher risk of bricking their installation as they do not read any warnings provided in the CHANGELOG. We wish to minimize these situations as much as possible.
## Getting Started ## Getting Started
To start, ensure you have python 3.6 or newer installed. Additionally ensure that they were downloaded from the Official source, [python.org](https://www.python.org/downloads/macos/). To start, ensure you have Python 3.6 or newer installed. Additionally, ensure that it was downloaded from the official source, [python.org](https://www.python.org/downloads/macos/).
* Python installations either preinstalled or provided with Xcode/Xcode Tools are unsupported due to reliablility issues * Python installations either preinstalled or provided with Xcode or the Xcode Command Line Tools are unsupported due to reliability issues.
Once Python is installed, open Terminal and run the following: Once Python is installed, open Terminal and run the following:
@@ -29,10 +29,10 @@ cd ./OpenCore-Legacy-Patcher
pip3 install -r requirements.txt pip3 install -r requirements.txt
``` ```
If you have installation error, see following troubleshooting options: If you have any installation errors, see the following troubleshooting options:
* Use Python 3.10 * Use Python 3.10
* Currently our build server uses py3.10 for generating binaries used in releases * Our build server currently uses Python 3.10 for generating binaries used in releases
* Use .whl snapshots for installing additional dependencies * Use .whl snapshots for installing additional dependencies
## Running OpenCore Legacy Patcher ## Running OpenCore Legacy Patcher
@@ -51,15 +51,11 @@ Note that the OpenCore-Patcher-GUI.command file can be run as both a GUI and a C
python3 OpenCore-Patcher-GUI.command --build --model iMac12,2 --verbose python3 OpenCore-Patcher-GUI.command --build --model iMac12,2 --verbose
``` ```
See `-h`/`--help` for more information on supported CLI arguments. Pass `-h` or `--help` for more information on supported CLI arguments.
## Generating prebuilt binaries ## Generating prebuilt binaries
The main goal of generating prebuilt binaries is to strip the requirement of a local python installation for users. For developers, there's very little benefit besides enabling dark mode support in the GUI. For development, simply use the OpenCore-Patcher-GUI.command file with a python3 installation. The main goal of generating prebuilt binaries is to strip the requirement of a local Python installation for users. For developers, there's very little benefit besides enabling dark mode support in the GUI. For development, simply use the OpenCore-Patcher-GUI.command file with a Python 3 installation.
* Note that due to PyInstaller's linking mechanism, binaries generated on Catalina and newer are not compatible with High Sierra and older
* To ensure the largest compatibility, generate binaries on macOS Mojave. These binaries will be compatible with macOS 10.9 to macOS 12.
* Currently our build system is a [Macmini8,1 provided by MacStadium](https://www.macstadium.com/opensource) running macOS Mojave (10.14.6).
```sh ```sh
# Install PyInstaller # Install PyInstaller

View File

@@ -28,22 +28,51 @@ class os_data(enum.IntEnum):
class os_conversion: class os_conversion:
def os_to_kernel(os): def os_to_kernel(os: str) -> int:
# Convert OS version to major XNU version """
Convert OS version to major XNU version
Parameters:
os (str): OS version
Returns:
int: Major XNU version
"""
if os.startswith("10."): if os.startswith("10."):
return (int(os.split(".")[1]) + 4) return (int(os.split(".")[1]) + 4)
else: else:
return (int(os.split(".")[0]) + 9) return (int(os.split(".")[0]) + 9)
def kernel_to_os(kernel):
# Convert major XNU version to OS version def kernel_to_os(kernel: int) -> str:
"""
Convert major XNU version to OS version
Parameters:
kernel (int): Major XNU version
Returns:
str: OS version
"""
if kernel >= os_data.big_sur: if kernel >= os_data.big_sur:
return str((kernel - 9)) return str((kernel - 9))
else: else:
return str((f"10.{kernel - 4}")) return str((f"10.{kernel - 4}"))
def is_os_newer(source_major, source_minor, target_major, target_minor):
# Check if OS version 1 is newer than OS version 2 def is_os_newer(source_major: int, source_minor: int, target_major: int, target_minor: int) -> bool:
"""
Check if OS version 1 is newer than OS version 2
Parameters:
source_major (int): Major XNU version of OS version 1
source_minor (int): Minor XNU version of OS version 1
target_major (int): Major XNU version of OS version 2
target_minor (int): Minor XNU version of OS version 2
Returns:
bool: True if OS version 1 is newer than OS version 2
"""
if source_major < target_major: if source_major < target_major:
return True return True
elif source_major == target_major: elif source_major == target_major:
@@ -52,8 +81,17 @@ class os_conversion:
else: else:
return False return False
def convert_kernel_to_marketing_name(kernel):
# Convert major XNU version to Marketing Name def convert_kernel_to_marketing_name(kernel: int) -> str:
"""
Convert major XNU version to Marketing name
Parameters:
kernel (int): Major XNU version
Returns:
str: Marketing name of OS
"""
try: try:
# Find os_data enum name # Find os_data enum name
os_name = os_data(kernel).name os_name = os_data(kernel).name
@@ -70,8 +108,17 @@ class os_conversion:
return os_name return os_name
def convert_marketing_name_to_kernel(marketing_name):
# Convert Marketing Name to major XNU version def convert_marketing_name_to_kernel(marketing_name: str) -> int:
"""
Convert Marketing Name to major XNU version
Parameters:
marketing_name (str): Marketing Name of OS
Returns:
int: Major XNU version
"""
try: try:
# Find os_data enum value # Find os_data enum value
os_kernel = os_data[marketing_name.lower().replace(" ", "_")] os_kernel = os_data[marketing_name.lower().replace(" ", "_")]
@@ -81,16 +128,18 @@ class os_conversion:
return int(os_kernel) return int(os_kernel)
def find_largest_build(build_array): def find_largest_build(build_array: list) -> str:
# Find the newest version within an array of versions """
# These builds will have both numbers and letters in the version Find the newest version within an array of versions
# ex: These builds will have both numbers and letters in the version
# [ ex:
# "22A5295i", [
# "22A5266r", "22A5295i",
# "22A5286j", "22A5266r",
# "22A5295h", "22A5286j",
# ] "22A5295h",
]
"""
max_length = 0 # Length of the longest build max_length = 0 # Length of the longest build
build_array_split = [] # 'build_array', converted into individual array of elements build_array_split = [] # 'build_array', converted into individual array of elements

View File

@@ -1872,8 +1872,10 @@ smbios_dictionary = {
"Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2046, "Bluetooth Model": bluetooth_data.bluetooth_data.BRCM2046,
"Ethernet Chipset": "Nvidia", "Ethernet Chipset": "Nvidia",
"nForce Chipset": True, "nForce Chipset": True,
"Socketed GPUs": "MXM",
"Stock GPUs": [ "Stock GPUs": [
device_probe.NVIDIA.Archs.Tesla, device_probe.NVIDIA.Archs.Tesla,
device_probe.AMD.Archs.TeraScale_1,
], ],
"Stock Storage": [ "Stock Storage": [
"SATA 3.5", "SATA 3.5",
@@ -1943,7 +1945,7 @@ smbios_dictionary = {
"nForce Chipset": True, "nForce Chipset": True,
"Socketed GPUs": "MXM", "Socketed GPUs": "MXM",
"Stock GPUs": [ "Stock GPUs": [
device_probe.NVIDIA.Archs.Tesla, device_probe.AMD.Archs.TeraScale_1,
], ],
"Stock Storage": [ "Stock Storage": [
"SATA 3.5", "SATA 3.5",
@@ -1961,7 +1963,7 @@ smbios_dictionary = {
"nForce Chipset": True, "nForce Chipset": True,
"Socketed GPUs": "MXM", "Socketed GPUs": "MXM",
"Stock GPUs": [ "Stock GPUs": [
device_probe.NVIDIA.Archs.Tesla, device_probe.AMD.Archs.TeraScale_1,
], ],
"Stock Storage": [ "Stock Storage": [
"SATA 3.5", "SATA 3.5",
@@ -1979,7 +1981,7 @@ smbios_dictionary = {
"nForce Chipset": True, "nForce Chipset": True,
"Socketed GPUs": "MXM", "Socketed GPUs": "MXM",
"Stock GPUs": [ "Stock GPUs": [
device_probe.NVIDIA.Archs.Tesla, device_probe.AMD.Archs.TeraScale_1,
], ],
"Stock Storage": [ "Stock Storage": [
"SATA 3.5", "SATA 3.5",

View File

@@ -58,9 +58,15 @@ class SystemPatchDictionary():
self.os_major: int = os_major self.os_major: int = os_major
self.os_minor: int = os_minor self.os_minor: int = os_minor
self.os_float: float = float(f"{self.os_major}.{self.os_minor}")
self.non_metal_os_support: list = non_metal_os_support self.non_metal_os_support: list = non_metal_os_support
self.patchset_dict: dict = {} self.patchset_dict: dict = {}
# 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._generate_sys_patch_dict() self._generate_sys_patch_dict()
@@ -97,6 +103,9 @@ class SystemPatchDictionary():
"GPUSupport.framework": "10.14.3", "GPUSupport.framework": "10.14.3",
"SkyLight.framework": f"10.14.6-{self.os_major}", "SkyLight.framework": f"10.14.6-{self.os_major}",
}, },
"/System/Applications": {
**({ "Photo Booth.app": "11.7.6"} if self.os_major >= os_data.os_data.monterey else {}),
},
}, },
"Remove": { "Remove": {
"/System/Library/Extensions": [ "/System/Library/Extensions": [
@@ -135,8 +144,9 @@ class SystemPatchDictionary():
}, },
"Processes": { "Processes": {
# 'When Space Allows' option introduced in 12.4 (XNU 21.5) # 'When Space Allows' option introduced in 12.4 (XNU 21.5)
**({"defaults write /Library/Preferences/.GlobalPreferences.plist ShowDate -int 1": True } if os_data.os_conversion.is_os_newer(os_data.os_data.monterey, 4, self.os_major, self.os_minor) else {}), **({"defaults write /Library/Preferences/.GlobalPreferences.plist ShowDate -int 1": True } if self.os_float >= self.macOS_12_4 else {}),
"defaults write /Library/Preferences/.GlobalPreferences.plist InternalDebugUseGPUProcessForCanvasRenderingEnabled -bool false": True, "defaults write /Library/Preferences/.GlobalPreferences.plist InternalDebugUseGPUProcessForCanvasRenderingEnabled -bool false": True,
"defaults write /Library/Preferences/.GlobalPreferences.plist WebKitExperimentalUseGPUProcessForCanvasRenderingEnabled -bool false": True,
}, },
}, },
"Non-Metal IOAccelerator Common": { "Non-Metal IOAccelerator Common": {
@@ -538,7 +548,7 @@ class SystemPatchDictionary():
"NVDANV50HalTesla.kext": "10.13.6", "NVDANV50HalTesla.kext": "10.13.6",
"NVDAResmanTesla.kext": "10.13.6", "NVDAResmanTesla.kext": "10.13.6",
# Apple dropped NVDAStartup in 12.0 Beta 7 (XNU 21.1) # Apple dropped NVDAStartup in 12.0 Beta 7 (XNU 21.1)
**({ "NVDAStartup.kext": "12.0 Beta 6" } if os_data.os_conversion.is_os_newer(os_data.os_data.monterey, 0, self.os_major, self.os_minor) else {}) **({ "NVDAStartup.kext": "12.0 Beta 6" } if self.os_float >= self.macOS_12_0_B7 else {})
}, },
}, },
}, },
@@ -569,7 +579,7 @@ class SystemPatchDictionary():
}, },
"/System/Library/Frameworks": { "/System/Library/Frameworks": {
# XNU 21.6 (macOS 12.5) # XNU 21.6 (macOS 12.5)
**({ "Metal.framework": "12.5 Beta 2"} if (os_data.os_conversion.is_os_newer(os_data.os_data.monterey, 5, self.os_major, self.os_minor) and self.os_major < os_data.os_data.ventura) else {}), **({ "Metal.framework": "12.5 Beta 2"} if (self.os_float >= self.macOS_12_5 and self.os_major < os_data.os_data.ventura) else {}),
}, },
"/System/Library/PrivateFrameworks": { "/System/Library/PrivateFrameworks": {
"GPUCompiler.framework": "11.6", "GPUCompiler.framework": "11.6",
@@ -600,6 +610,10 @@ class SystemPatchDictionary():
"GeForceTeslaGLDriverWeb.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", "GeForceTeslaVADriverWeb.bundle": "WebDriver-387.10.10.10.40.140",
}, },
"/System/Library/PrivateFrameworks": {
# Restore OpenCL by adding missing compiler files
**({ "GPUCompiler.framework": "11.6"} if self.os_major >= os_data.os_data.monterey else {}),
},
}, },
"Install Non-Root": { "Install Non-Root": {
"/Library/Extensions": { "/Library/Extensions": {
@@ -688,7 +702,7 @@ class SystemPatchDictionary():
"AMD3800Controller.kext": "10.13.6", "AMD3800Controller.kext": "10.13.6",
"AMD4600Controller.kext": "10.13.6", "AMD4600Controller.kext": "10.13.6",
"AMD4800Controller.kext": "10.13.6", "AMD4800Controller.kext": "10.13.6",
"ATIRadeonX2000.kext": "10.13.6", "ATIRadeonX2000.kext": "10.13.6" if self.os_major < os_data.os_data.ventura else "10.13.6 TS1",
"ATIRadeonX2000GA.plugin": "10.13.6", "ATIRadeonX2000GA.plugin": "10.13.6",
"ATIRadeonX2000GLDriver.bundle": "10.13.6", "ATIRadeonX2000GLDriver.bundle": "10.13.6",
"ATIRadeonX2000VADriver.bundle": "10.13.6", "ATIRadeonX2000VADriver.bundle": "10.13.6",
@@ -1168,12 +1182,8 @@ class SystemPatchDictionary():
}, },
}, },
"Install": { "Install": {
"/System/Library/Extensions/IOUSBHostFamily.kext/Contents/MacOS": { "/System/Library/Extensions": {
"IOUSBHostFamily": "12.6.2", "IOUSBHostFamily.kext": "12.6.2",
},
"/System/Library/Extensions/IOUSBHostFamily.kext/Contents/PlugIns": {
"AppleUSBEHCI.kext": "12.6.2",
"AppleUSBHub.kext": "12.6.2",
}, },
}, },
} }

View File

@@ -7,7 +7,7 @@
* [Keyboard Backlight broken](#keyboard-backlight-broken) * [Keyboard Backlight broken](#keyboard-backlight-broken)
* [Photos and Maps Apps Heavily Distorted](#photos-and-maps-apps-heavily-distorted) * [Photos and Maps Apps Heavily Distorted](#photos-and-maps-apps-heavily-distorted)
* [Cannot press "Done" when editing a Sidebar Widget](#cannot-press-done-when-editing-a-sidebar-widget) * [Cannot press "Done" when editing a Sidebar Widget](#cannot-press-done-when-editing-a-sidebar-widget)
* [Wake from sleep heavily distorted on AMD/ATI in macOS 11.3 and newer](#wake-from-sleep-heavily-distorted-on-amd-ati-in-macos-11-3-and-newer) * [Wake from sleep heavily distorted on AMD/ATI from macOS 11.3 to Monterey](#wake-from-sleep-heavily-distorted-on-amd-ati-from-macos-11-3-to-monterey)
* [Unable to switch GPUs on 2011 15" and 17" MacBook Pros](#unable-to-switch-gpus-on-2011-15-and-17-macbook-pros) * [Unable to switch GPUs on 2011 15" and 17" MacBook Pros](#unable-to-switch-gpus-on-2011-15-and-17-macbook-pros)
* [Erratic Colours on ATI TeraScale 2 GPUs (HD5000/HD6000)](#erratic-colours-on-ati-terascale-2-gpus-hd5000-hd6000) * [Erratic Colours on ATI TeraScale 2 GPUs (HD5000/HD6000)](#erratic-colours-on-ati-terascale-2-gpus-hd5000-hd6000)
* [Unable to allow Safari Extensions](#unable-to-allow-Safari-Extensions) * [Unable to allow Safari Extensions](#unable-to-allow-Safari-Extensions)
@@ -104,9 +104,11 @@ Due to the Metal Backend, the enhanced color output of these apps seems to heavi
Workaround: Press some combination of Tab, or Tab and then Shift-Tab, or just Shift-Tab until the "Done" button is highlighted. Then press spacebar to activate the button, the same as in any other dialog with a highlighted button halo. Workaround: Press some combination of Tab, or Tab and then Shift-Tab, or just Shift-Tab until the "Done" button is highlighted. Then press spacebar to activate the button, the same as in any other dialog with a highlighted button halo.
## Wake from sleep heavily distorted on AMD/ATI in macOS 11.3 and newer ## Wake from sleep heavily distorted on AMD/ATI from macOS 11.3 to Monterey
Unfortunately a very well known issue that the community is investigating. A currently known solution is to downgrade to macOS 11.2.3 or older until a proper fix can be found. Additionally logging out and logging in can resolve the issue without requiring a reboot. **Fixed for macOS Ventura starting from 0.6.6. Big Sur and Monterey will continue to exhibit the issue.**
For older versions, only known solution is to downgrade to macOS 11.2.3 or older. Additionally, logging out and logging back in can resolve the issue without requiring a reboot.
* Note, this issue should be exclusive to TeraScale 1 GPUs (ie. HD2000-4000). TeraScale 2 GPUs should not exhibit this issue. * Note, this issue should be exclusive to TeraScale 1 GPUs (ie. HD2000-4000). TeraScale 2 GPUs should not exhibit this issue.
@@ -116,9 +118,9 @@ In the event Apple removes 11.2.3 from their catalogue, we've provided a mirror
## Unable to switch GPUs on 2011 15" and 17" MacBook Pros ## Unable to switch GPUs on 2011 15" and 17" MacBook Pros
Currently OpenCore Legacy Patcher, GPU switching between the iGPU and dGPU is broken. The simplest way to set a specific GPU is to disable the dGPU when you wish to remain on the more power efficient iGPU. Currently, with OpenCore Legacy Patcher, GPU switching between the iGPU and dGPU is broken. The simplest way to set a specific GPU is to disable the dGPU when you wish to remain on the more power efficient iGPU.
The best way to achieve this is to boot Recovery (or Single User Mode if the dGPU refuses to function at all) and run the following command: The best way to achieve this is to boot to Recovery (or Single User Mode if the dGPU refuses to function at all) and run the following command:
```sh ```sh
nvram FA4CE28D-B62F-4C99-9CC3-6815686E30F9:gpu-power-prefs=%01%00%00%00 nvram FA4CE28D-B62F-4C99-9CC3-6815686E30F9:gpu-power-prefs=%01%00%00%00
@@ -157,14 +159,13 @@ The following tool can be used to work-around this issue:
By default, OpenCore Legacy Patcher will assume MacBookPro8,2/3 have a faulty dGPU and disable acceleration. This is the safest option for most users as enabling dGPU acceleration on faulty Macs will result in failed booting. By default, OpenCore Legacy Patcher will assume MacBookPro8,2/3 have a faulty dGPU and disable acceleration. This is the safest option for most users as enabling dGPU acceleration on faulty Macs will result in failed booting.
However if your machine does not have the dGPU disabled via NVRAM, you'll experience a login loop. To work around this is quite simple: However, if your machine does not have the dGPU disabled via NVRAM, you'll experience a login loop. To work around this is quite simple:
1. Boot macOS in Single User Mode 1. Boot macOS in Single User Mode
* Press Cmd+S in OpenCore's menu when you turn the Mac on * Press Cmd+S in OpenCore's menu when you turn the Mac on
2. When command line prompt appears, enter the dGPU disabler argument (at the bottom) 2. When the command line prompt appears, enter the dGPU disabler argument (at the bottom)
3. Reboot and patched macOS should work normally 3. Reboot and patched macOS should work normally
4. If you still want to use the dGPU, run OpenCore Legacy Patcher and enable TS2 Acceleration from settings. Then root patch your Mac again 4. If you still want to use the dGPU, run OpenCore Legacy Patcher and enable TS2 Acceleration from settings. Go to `Patcher Settings -> Developer Settings -> Set TeraScale 2 Accel`, then root patch again.
`Patcher Settings -> Developer Settings -> Set TeraScale 2 Accel`
5. Either Reset NVRAM or set `gpu-power-prefs` to zeros to re-enable the dGPU 5. Either Reset NVRAM or set `gpu-power-prefs` to zeros to re-enable the dGPU
```sh ```sh

View File

@@ -2,7 +2,7 @@
Now we finally get to boot OpenCore! Now we finally get to boot OpenCore!
Reboot machine while holding `Option` to select the EFI Boot entry with the OpenCore icon (holding the `Control` key will make this the default boot entry): Reboot the machine while holding `Option` to select the EFI Boot entry with the OpenCore icon (holding the `Control` key will make this the default boot entry):
* This will be the Mac Boot Picker * This will be the Mac Boot Picker
@@ -18,7 +18,7 @@ Firstly, open the Terminal and run the following command:
```sh ```sh
sudo nvram "recovery-boot-mode=unused" && sudo reboot recovery sudo nvram "recovery-boot-mode=unused" && sudo reboot recovery
``` ```
This will make your machine reboot into the Recovery Environment. Alternatively, holding Command + R when your machine is starting up will also let you enter the Recovery. This will make your machine reboot into the Recovery Environment. Alternatively, holding `Command` + `R` when your machine is starting up will also let you enter the Recovery.
Secondly, open the Recovery Environment's Terminal (Menu bar > Utilities > Terminal). Secondly, open the Recovery Environment's Terminal (Menu bar > Utilities > Terminal).
@@ -31,7 +31,7 @@ The command should produce a list of drives installed in your system:
Keep track of the drive with the OCLP install. You will need the drive identifer for later. Keep track of the drive with the OCLP install. You will need the drive identifer for later.
Now you'll want to mount the EFI partition (where OCLP is installed, though may differ if you've installed OCLP to a FAT-32 volume). Now you'll want to mount the EFI partition (where OCLP is installed, though it may differ if you've installed OCLP to a FAT-32 volume).
Run the following command (Replace X with the drive number): Run the following command (Replace X with the drive number):
```sh ```sh
@@ -40,7 +40,7 @@ diskutil mount diskXs1
![](../images/Unflashed-Boot-2.png) ![](../images/Unflashed-Boot-2.png)
If everything is correct, the EFI partion should be mounted. 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: Now you'll want to use the `bless` command to set the default boot device:
```sh ```sh
bless --mount /Volumes/EFI --setBoot --file /Volumes/EFI/System/Library/CoreServices/boot.efi bless --mount /Volumes/EFI --setBoot --file /Volumes/EFI/System/Library/CoreServices/boot.efi
``` ```
@@ -52,24 +52,24 @@ If the command produces an output, ensure that you've typed it in correctly.
Now you can reboot your machine. OCLP is now the default boot option! Now you can reboot your machine. OCLP is now the default boot option!
::: :::
Now that you've loaded OpenCore, now select Install macOS: Now that you've loaded OpenCore, "select Install macOS":
* This will be the OpenCore Picker * This will be the OpenCore Picker
![](../images/oc-boot.png) ![](../images/oc-boot.png)
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: 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) * [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, 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.
![](../images/oclp-stuck-firstreboot.png) ![](../images/oclp-stuck-firstreboot.png)
::: warning ::: warning
**MacBookPro11,3 Note**: When booting macOS Monterey, you'll need to boot into safe mode if acceleration patches are not installed yet. [Otherwise you'll hit a black screen due to missing NVIDIA drivers.](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/522) Safe Mode can be entered by holding Shift+Enter when selecting macOS Monterey in OCLP's Boot Menu. **MacBookPro11,3 Note**: When booting macOS Monterey, you'll need to boot into safe mode if acceleration patches are not installed yet. [Otherwise, you'll hit a black screen due to missing NVIDIA drivers.](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/522) Safe Mode can be entered by holding `Shift + Enter` when selecting macOS Monterey in OCLP's Boot Menu.
::: :::

View File

@@ -1,6 +1,6 @@
# Building and installing OpenCore # Building and installing OpenCore
Now that we have a macOS installer, lets now build our OpenCore configuration! Now that we have a macOS installer, let's now build our OpenCore configuration!
If you haven't downloaded OpenCore Patcher yet, do so now: If you haven't downloaded OpenCore Patcher yet, do so now:

View File

@@ -1,6 +1,6 @@
# How to debug with OpenCore # How to debug with OpenCore
For those who've hit an odd bug and unsure if it's user error or within the patcher, we recommend asking on the [OpenCore Patcher Paradise Discord Server](https://discord.gg/rqdPgH8xSN) for help. For those who've hit an odd bug and are unsure if it's user error or within the patcher, we recommend asking on the [OpenCore Patcher Paradise Discord Server](https://discord.gg/rqdPgH8xSN) for help.
## Debugging yourself ## Debugging yourself
@@ -14,7 +14,7 @@ When you've enabled these 3 options, rebuild OpenCore and install to your drive.
## Obtaining OpenCore logs from disk ## Obtaining OpenCore logs from disk
With "Enable OpenCore DEBUG" set, every boot there will be a .txt file generated in your disk. To grab these logs, [download and run MountEFI](https://github.com/corpnewt/MountEFI): 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):
![](../images/mountefi.png) ![](../images/mountefi.png)
@@ -40,11 +40,11 @@ Currently issues have been disabled due to [current events](ISSUES-HOLD.md). You
Now that you have proper logs, you can now [file issues with us](https://github.com/dortania/OpenCore-Legacy-Patcher/issues). This is a reminder to include the following info: Now that you have proper logs, you can now [file issues with us](https://github.com/dortania/OpenCore-Legacy-Patcher/issues). This is a reminder to include the following info:
* Model patching for (ie. MacBookPro10,1) * Model that you're patching for (ie. MacBookPro10,1)
* Target OS (ie. macOS 11.2.3) * Target OS (ie. macOS 11.2.3)
* Host OS (ie. macOS 10.15.7) * Host OS (ie. macOS 10.15.7)
* Upload of your OpenCore Build Folder * Upload of your OpenCore Build Folder
* Upload of your OpenCore log (if applicable) * Upload of your OpenCore log (if applicable)
* Upload of your Kernel log (if applicable) * Upload of your Kernel log (if applicable)
Additionally, please search whether the issue has been reported before. This avoids having duplicate issues. Additionally, please search to see if the issue has been reported before. This avoids having duplicate issues.

View File

@@ -1,6 +1,6 @@
# Supporting the patcher # Supporting the patcher
OpenCore Legacy Patcher is a hobby project for us developers, and while we love helping out the community it's very difficult for us to troubleshoot issues remotely. The best way for us to get to work on the patcher, fix issues and add enhancements is having the hardware in-hand. As a hobby project, neither of the main developers can afford to buy every legacy Mac to test on. OpenCore Legacy Patcher is a hobby project for us developers, and while we love helping out the community, it's very difficult for us to troubleshoot issues remotely. The best way for us to get to work on the patcher, fix issues and add enhancements is having the hardware in-hand. As a hobby project, neither of the main developers can afford to buy every legacy Mac to test on.
The best way to support us in all honesty is to donate any old hardware you no longer need, as this allows us to have machines to test locally and push fixes much faster. While we appreciate cash donations, this makes it much more difficult for us to handle as an organization. The best way to support us in all honesty is to donate any old hardware you no longer need, as this allows us to have machines to test locally and push fixes much faster. While we appreciate cash donations, this makes it much more difficult for us to handle as an organization.
@@ -15,7 +15,7 @@ Additionally, hardware info dumps are greatly beneficial for us to determine wha
* `File -> SaveAs` and open an issue on Github * `File -> SaveAs` and open an issue on Github
* Note: We want IOReg dumps of hardware not running on OpenCore, instead running a clean, officially supported OS by the machine * Note: We want IOReg dumps of hardware not running on OpenCore, instead running a clean, officially supported OS by the machine
If you have any legacy hardware you're willing to donate or what to buy us something, please contact us at the following email: If you have any legacy hardware you're willing to donate or want to buy us hardware, please contact us at the following email:
* khronokernel@icloud.com * khronokernel@icloud.com

View File

@@ -1,9 +1,9 @@
# Boot Process with OpenCore Legacy Patcher # Boot Process with OpenCore Legacy Patcher
OpenCore Legacy Patcher itself is actually quite a "dumb" program, and essentially edits a config.plist file and moves files around, it actually has little logic regarding the boot process. The real magic of OCLP is [OpenCorePkg](https://github.com/acidanthera/OpenCorePkg), our back-end and what makes this patcher so powerful. OpenCore Legacy Patcher itself is actually quite a "dumb" program. It essentially edits a config.plist file and moves files around, actually having little logic regarding the boot process. The real magic of OCLP is [OpenCorePkg](https://github.com/acidanthera/OpenCorePkg), our back-end, and what makes this patcher so powerful.
## Boot Process with OpenCore ## Boot Process with OpenCore
To understand a bit more of how OpenCore is able revive older Macs in such a native-like way, we need to go over *how* OpenCore works with your Mac: To understand a bit more of how OpenCore is able to revive older Macs in such a native-like way, we need to go over *how* OpenCore works with your Mac:
![](../images/oc-explained.png) ![](../images/oc-explained.png)

View File

@@ -1,6 +1,6 @@
# Creating custom icons for OpenCore and Mac Boot Picker # Creating custom icons for OpenCore and Mac Boot Picker
For users who want to customize your setup to be more personal, OpenCore does allow for custom icons and images in the boot picker. For users who want to customize their setup to be more personal, OpenCore does allow for custom icons and images in the boot picker.
* [Custom OpenCore icons](#custom-opencore-icons) * [Custom OpenCore icons](#custom-opencore-icons)
* [Custom Mac Boot Picker icons](#custom-mac-boot-picker-icons) * [Custom Mac Boot Picker icons](#custom-mac-boot-picker-icons)
@@ -34,7 +34,7 @@ Once you have a custom image you want to use(for example, as a background), down
![](../images/icnspack-folder.png) ![](../images/icnspack-folder.png)
Now `cd` this folder in terminal and run the following: Now `cd` to this folder in terminal and run the following:
```sh ```sh
./icnspack Background.icns <insert_x1_image> <insert_x2_image> ./icnspack Background.icns <insert_x1_image> <insert_x2_image>
@@ -46,13 +46,13 @@ Once done, you'll see your custom icon generated in `icnspack`'s folder:
# Custom Mac Boot Picker icons # Custom Mac Boot Picker icons
Custom boot picker icons is much more complicated on Legacy Macs, on late 2013+ Macs the [Custom OpenCore icons](#custom-opencore-icons) method will work just fine. However on many 2012 and older Macs, the icons generated will be incompatible with the firmware. Custom boot picker icons are much more complicated on Legacy Macs. On late 2013+ Macs, the [Custom OpenCore icons](#custom-opencore-icons) method will work just fine. However, on many 2012 and older Macs, the icons generated will be incompatible with the firmware.
To generate legacy icons, you'll need the following: To generate legacy icons, you'll need the following:
* A machine running macOS 10.4 through 10.11 * A machine running macOS 10.4 through 10.11
* Icon Composer.app (Requires Apple Developer Account for official download) * Icon Composer.app (Requires Apple Developer Account for official download)
* Users without the developer account can find a mirrors here: * Users without a developer account can find mirrors here:
* [Icon Composer 10.6](https://github.com/dortania/OpenCore-Legacy-Patcher/blob/main/docs/Icon-Composer-10.6.zip) * [Icon Composer 10.6](https://github.com/dortania/OpenCore-Legacy-Patcher/blob/main/docs/Icon-Composer-10.6.zip)
* [Icon Composer 10.11](https://github.com/dortania/OpenCore-Legacy-Patcher/blob/main/docs/Icon-Composer-10.11.zip) * [Icon Composer 10.11](https://github.com/dortania/OpenCore-Legacy-Patcher/blob/main/docs/Icon-Composer-10.11.zip)
* PNG Image you wish to convert * PNG Image you wish to convert
@@ -69,15 +69,15 @@ Now run the app and simply drag the images to each section as so:
![](../images/icon-SL.png) ![](../images/icon-SL.png)
Now save and export the new icns Now save and export the new icns file.
# Installing updated icons # Installing updated icons
To install, please ensure that Vault is disabled when you built OpenCore. If you're unsure, simply rebuild OpenCore with the Patcher setting "Vault" set to false. To install, please ensure that Vault was disabled when you built OpenCore. If you're unsure, simply rebuild OpenCore with the Patcher setting "Vault" set to false.
* <span style="color:red"> Warning</span>: Editing your OpenCore EFI incorrectly can result in a bricked install. Please ensure you have a natively supported version of macOS installed to boot into in case of issues. * <span style="color:red"> Warning</span>: Editing your OpenCore EFI incorrectly can result in a bricked install. Please ensure you have a natively supported version of macOS installed to boot into in case of issues.
Now that you've verified you can edit OpenCore safely, you'll need to mount the drive that OpenCore is stored on. To do this, download [MountEFI](https://github.com/corpnewt/MountEFI) and run it: Now that you've verified that you can edit OpenCore safely, you'll need to mount the drive that OpenCore is stored on. To do this, download [MountEFI](https://github.com/corpnewt/MountEFI) and run it:
![](../images/mountefi.png) ![](../images/mountefi.png)
@@ -96,7 +96,7 @@ Now reboot and you should see your updated icon(s)!
### Updating Mac Boot Picker icons ### Updating Mac Boot Picker icons
To update the Mac Boot Picker icons is actually quite simple, on the root of your drive simply drop the icon onto the root of the drive with the name `.VolumeIcon.icns` Updating the Mac Boot Picker icons is actually quite simple. On the root of your drive, simply drop the icon into the root of the drive with the name `.VolumeIcon.icns`
![](../images/mac-icns-drive.png) ![](../images/mac-icns-drive.png)

View File

@@ -1,8 +1,8 @@
# Download and build macOS Installers # Download and build macOS Installers
This doc is centered around downloading and writing the macOS installer to a USB. If you're already familiar with how to do this, you can skip. 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 will be required for the installer * Note: 16GB+ USB drive will be required for the installer
## Creating the installer ## Creating the installer
@@ -12,11 +12,11 @@ With OpenCore Legacy Patcher, our new GUI includes a download menu for macOS ins
For this guide, we'll be using the standard OpenCore-Patcher (GUI). For this guide, we'll be using the standard OpenCore-Patcher (GUI).
Once downloaded, open the app and you should be greeted with this menu: Once downloaded, open the app and you should be greeted by this menu:
![OCLP GUI Main Menu](../images/OCLP-GUI-Main-Menu.png) ![OCLP GUI Main Menu](../images/OCLP-GUI-Main-Menu.png)
First we'll want to select the "Create macOS Installer" button. This will present you with 2 options: First, we'll want to select the "Create macOS Installer" button. This will present you with 2 options:
![](../images/OCLP-GUI-Create-Installer-Menu.png) ![](../images/OCLP-GUI-Create-Installer-Menu.png)

View File

@@ -18,13 +18,13 @@ The below table will list all supported and unsupported functions of the patcher
Regarding OS support, see below: Regarding OS support, see below:
* Machines listing `YES - Ventura and older` means they cannot run macOS Ventura at this time. Machines with only `YES` can run all of the supported macOS versions offered by OpenCore Legacy Patcher.
| Support Entry | Supported OSes | Description | Comment | | Support Entry | Supported OSes | Description | Comment |
| :--- | :--- | :--- | :--- | | :--- | :--- | :--- | :--- |
| HostOS | macOS 10.9 - macOS 13 | Refers to OSes where running OpenCore-Patcher.app are supported | Supports 10.7+ if [Python 3.9 or higher](https://www.python.org/downloads/) is manually installed, simply run the `OpenCore-Patcher-GUI.command` located in the repo | | HostOS | macOS 10.10 - macOS 13 | Refers to OSes where running OpenCore-Patcher.app are supported | Supports 10.7+ if [Python 3.9 or higher](https://www.python.org/downloads/) is manually installed, simply run the `OpenCore-Patcher-GUI.command` located in the repo |
| TargetOS | macOS 11 - macOS 13 | Refers to OSes that can be patched to run with OpenCore | May support 10.4 and newer (in a potentially broken state). No support provided. | | TargetOS | macOS 11 - macOS 13 | Refers to OSes that can be patched to run with OpenCore | May support 10.4 and newer (in a potentially broken state). No support provided. |
* macOS Ventura installer creation requires 10.11 or later
### MacBook ### MacBook
| SMBIOS | Year | Supported | Comment | | SMBIOS | Year | Supported | Comment |
@@ -145,8 +145,8 @@ Regarding OS support, see below:
| :--- | :--- | :--- | :--- | | :--- | :--- | :--- | :--- |
| MacPro1,1 | Mid-2006 | <span style="color:red"> NO </span> | 32-Bit Firmware limitation | | MacPro1,1 | Mid-2006 | <span style="color:red"> NO </span> | 32-Bit Firmware limitation |
| MacPro2,1 | Mid-2007 | ^^ | ^^ | | MacPro2,1 | Mid-2007 | ^^ | ^^ |
| MacPro3,1 | Early 2008 | <span style="color:#30BCD5"> YES </span> | - UHCI/OHCI support in Public Beta, see current issues ([#1021](https://github.com/dortania/OpenCore-Legacy-Patcher/issesues/1021)) <br/>- Potential boot issues with stock Bluetooth card, recommend removing to avoid kernel panics | | MacPro3,1 | Early 2008 | <span style="color:#30BCD5"> YES </span> | - UHCI/OHCI support in Public Beta, see current issues ([#1021](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1021)) <br/>- Potential boot issues with stock Bluetooth card, recommend removing to avoid kernel panics |
| MacPro4,1 | Early 2009 | ^^ | - Everything is supported as long as GPU is Metal capable <br/> - UHCI/OHCI support in Public Beta, see current issues ([#1021](https://github.com/dortania/OpenCore-Legacy-Patcher/issesues/1021))| | MacPro4,1 | Early 2009 | ^^ | - Everything is supported as long as GPU is Metal capable <br/> - UHCI/OHCI support in Public Beta, see current issues ([#1021](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/1021))|
| MacPro5,1 | Mid-2010, Mid-2012 | ^^ | ^^ | | MacPro5,1 | Mid-2010, Mid-2012 | ^^ | ^^ |
| MacPro6,1 | Late 2013 | ^^ | - CPU Power Management currently unsupported<br/> - No DRM support | | MacPro6,1 | Late 2013 | ^^ | - CPU Power Management currently unsupported<br/> - No DRM support |

View File

@@ -1,6 +1,6 @@
# Explaining the patches in OpenCore Legacy Patcher # Explaining the patches in OpenCore Legacy Patcher
In our patcher, there are numerous patches used to ensure a stable system. Here we're going to go over what patches are used and why we recommend or even require them. In our patcher, there are numerous patches used to ensure a stable system. Here, we're going to go over what patches are used and why we recommend or even require them.
* [OpenCore Settings](#opencore-settings) * [OpenCore Settings](#opencore-settings)
* [Injected Kexts](#injected-kexts) * [Injected Kexts](#injected-kexts)
@@ -8,7 +8,7 @@ In our patcher, there are numerous patches used to ensure a stable system. Here
## OpenCore Settings ## OpenCore Settings
Below is a run down of the main logic OpenCore Legacy Patcher uses to gain native support in macOS. Note that OpenCore's configuration is documented within [OpenCorePkg](https://github.com/acidanthera/OpenCorePkg) as well as on an online version provided by us: Below is a rundown of the main logic that OpenCore Legacy Patcher uses to gain native support in macOS. Note that OpenCore's configuration is documented within [OpenCorePkg](https://github.com/acidanthera/OpenCorePkg) as well as on an online version provided by us:
* [OpenCorePkg Online Docs](https://dortania.github.io/docs/latest/Configuration.html) * [OpenCorePkg Online Docs](https://dortania.github.io/docs/latest/Configuration.html)
@@ -139,6 +139,10 @@ Below is a run down of the main logic OpenCore Legacy Patcher uses to gain nativ
* Reason: Enables Content Caching when using VMM spoofing * Reason: Enables Content Caching when using VMM spoofing
* Logic: Adds args to NVRAM * Logic: Adds args to NVRAM
* Models: Any model using VMM spoofing * Models: Any model using VMM spoofing
* `amfi=0x80`
* Reason: Disables Apple Mobile File Integrity to allow for root patches
* Logic: Adds args to NVRAM
* Models: Any model that requires unsigned root patches
### UEFI -> ProtocolOverrides ### UEFI -> ProtocolOverrides
@@ -184,6 +188,16 @@ Below is an explanation of what Kexts OpenCore Legacy Patcher will inject into m
* RestrictEvents * RestrictEvents
* Reason: Disables memory errors on MacPro7,1 * Reason: Disables memory errors on MacPro7,1
* Models: Mac Pros and Xserves * Models: Mac Pros and Xserves
* CryptexFixup
* Reason: Installs non AVX2.0 Cryptex on non AVX2.0 CPUs
* Models: All CPUs Ivy Bridge and older
* AutoPkgInstaller
* Reason: Allows for automatic root patching
* NVMeFix
* Reason: Fixes 3rd party NVMe support
* RSRHelper
* Reason: Fixes Rapid Security Response Support on root patched installs
*
### Ethernet ### Ethernet
@@ -197,6 +211,23 @@ Below is an explanation of what Kexts OpenCore Legacy Patcher will inject into m
* Reason: Inject old Broadcom Ethernet kext to resolve networking in Big Sur * Reason: Inject old Broadcom Ethernet kext to resolve networking in Big Sur
* Logic: Patch out conflicting symbols to not collide existing BCM5701Ethernet * Logic: Patch out conflicting symbols to not collide existing BCM5701Ethernet
* Models: 2011 and older Broadcom Ethernet require * Models: 2011 and older Broadcom Ethernet require
* Intel82574L
* Reason: Resolves Ethernet Support on MacPros
* Models: MacPro3,1 - 5,1
* CatalinaIntelI210Ethernet
* Reason: Fixes Intel i210/i225 NIC support on pre-Ivy Macs
* AppleIntel8254XEthernet
* Reason: Resolves Ethernet Support on MacPros
* Models: MacPro3,1 - 5,1
### Firewire
* IOFireWireFamily
* Reason: Allows for FireWire Boot Support
* IOFireWireSBP2
* Reason: Allows for FireWire Boot Support
* IOFireWireSerialBusProtoColTransport
* Reason: Allows for FireWire Boot Support
### Maps ### Maps
@@ -215,14 +246,12 @@ Below is an explanation of what Kexts OpenCore Legacy Patcher will inject into m
### Wifi ### Wifi
* IO80211HighSierra * IO80211ElCap
* Reason: Re-inject Atheros wifi drivers from High Sierra * Reason: Re-inject WiFi drivers from El Capitan
* Logic: Patch out conflicting symbols to not collide existing IO80211Family * Models: BCM94328, BCM94322 and Atheros chipsets
* Models: Atheros cards * corecaptureElCap.kext
* IO80211Mojave * Reason: Re-inject WiFi drivers from El Capitan
* Reason: Re-inject Broadcom wifi drivers from Mojave * Models: BCM94328, BCM94322 and Atheros chipsets
* Logic: Patch out conflicting symbols to not collide existing IO80211Family
* Models: BCM94322
### Misc ### Misc
@@ -238,6 +267,41 @@ Below is an explanation of what Kexts OpenCore Legacy Patcher will inject into m
* SMC-Spoof * SMC-Spoof
* Reason: Spoofs SMC version to 9.9999 * Reason: Spoofs SMC version to 9.9999
* Models: All models require when spoofing minimal or higher * Models: All models require when spoofing minimal or higher
* AppleRAIDCard
* Adds AppleRaidCard Support for Xserves
* AMDGPUWakeHandler
* Reason: Adds Software Based Demux for 2011 15/17 Macbook Pros
* AppleIntelCPUPowerManagement and AppleIntelCPUPowerManagementClient
* Reason: Restores Ivy Bridge and older CPU Power Management
* AppleUSBTopCase
* Reason: Restore USB Keyboard support on Mac OS Ventura
* AppleUSBMultitouch and AppleUSBTrackpad
* Reason: Restore USB Trackpad support on Mac OS Ventura
* ASPP-Override
* Reason: Forces ACPI_SMC_PlatformPlugin to outmatch X86PlatformPlugin and disable firmware throttling
* BacklightInjector
* Reason: Fixes Brightness in iMacs with upgraded GPUs
* BigSurSDXC
* Reason: Restores SDXC Support in Pre Ivy-Bridge Macs
* Bluetooth-spoof
* Reason: Spoofs legacy Bluetooth to work on Monterey and newer
* Innie
* Reason: Makes all PCIe drives appear internal
* Models: MacPro3,1 and newer & Xserve3,1 and newer
* KDKlessWorkaround
* Reason: Helps with Mac os updates on KDKless patched systems
* LegacyUSBVieoSupport
* Reason: Fixes Legacy USB iSight support
* MonteAHCIPort
* Reason: Fixes SSD support for stock SSD found in MacBookAir6,x
* NoAVXFSCompressionTypeZlib
* Reason: Prevents AVXFSCompressionTypeZlib crash on pre AVX1.0 systems in 12.4+
* SimpleMSR
* Reason: Disables BD PROCHOT to prevent firmware throttling on Nehalem+ MacBooks
* LegacyKeyboardInjector
* Reason: Fixes function keys on MacBook4,1/MacBook5,2
::: :::
## On-Disk Patches ## On-Disk Patches
@@ -286,6 +350,15 @@ Applicable for BCM94328, BCM94322 and Atheros Wifi cards
* OpenCL (libCLVMNVPTXPlugin.dylib, NVPTX.dylib) * OpenCL (libCLVMNVPTXPlugin.dylib, NVPTX.dylib)
* Reason: Re-add Kepler hardware acceleration support * Reason: Re-add Kepler hardware acceleration support
* Metal
* Reason: 3802 based GPU's broken by 13.3, requiring a Metal downgrade to 13.2.1
### PrivateFrameworks
* MTLCompiler
* Reason: 3802 based GPU's broken by 13.3, requiring a MTLCompiler downgrade to 13.2.1
* GPUCompiler
* Reason: 3802 based GPU's broken by 13.3, requiring a GPUCompiler downgrade to 13.2.1
::: :::
@@ -306,6 +379,10 @@ Applicable for BCM94328, BCM94322 and Atheros Wifi cards
* AppleGVA/AppleGVACore * AppleGVA/AppleGVACore
* Reason: Enable DRM support * Reason: Enable DRM support
* MTLCompiler
* Reason: 3802 based GPU's broken by 13.3, requiring a MTLCompiler downgrade to 13.2.1
* GPUCompiler
* Reason: 3802 based GPU's broken by 13.3, requiring a GPUCompiler downgrade to 13.2.1
### Frameworks ### Frameworks
@@ -313,12 +390,117 @@ Applicable for BCM94328, BCM94322 and Atheros Wifi cards
* Reason: Re-add Ivy Bridge hardware acceleration support * Reason: Re-add Ivy Bridge hardware acceleration support
* WebKit (com.apple.WebProcess.sb) * WebKit (com.apple.WebProcess.sb)
* Reason: Re-add Ivy Bridge Safari rendering support * Reason: Re-add Ivy Bridge Safari rendering support
* Metal
* Reason: 3802 based GPU's broken by 13.3, requiring a Metal downgrade to 13.2.1
::: :::
::: details non-Metal Graphics Acceleration Patches (11.0+) ::: details Intel Haswell Graphics Acceleration Patches (13.0+)
### Extensions ### Extensions
* AppleIntelFramebufferAzul.kext
* AppleIntelHD5000Graphics.kext
* AppleIntelHD5000GraphicsGLDriver.bundle
* AppleIntelHD5000GraphicsMTLDriver.bundle
* AppleIntelHD5000GraphicsVADriver.bundle
* AppleIntelHSWVA.bundle
* AppleIntelGraphicsShared.bundle
### Frameworks
* Metal
* Reason: 3802 based GPU's broken by 13.3, requiring a Metal downgrade to 13.2.1
### PrivateFrameworks
* MTLCompiler
* Reason: 3802 based GPU's broken by 13.3, requiring a MTLCompiler downgrade to 13.2.1
* GPUCompiler
* Reason: 3802 based GPU's broken by 13.3, requiring a GPUCompiler downgrade to 13.2.1
:::
::: details Intel Broadwell Graphics Acceleration Patches (13.0+)
### Extensions
* AppleIntelBDWGraphics.kext
* AppleIntelBDWGraphicsFramebuffer.kext
* AppleIntelBDWGraphicsGLDriver.bundle
* AppleIntelBDWGraphicsMTLDriver.bundle
* AppleIntelBDWGraphicsVADriver.bundle
* AppleIntelBDWGraphicsVAME.bundle
* AppleIntelGraphicsShared.bundle
:::
::: details Intel Skylake Graphics Acceleration Patches (13.0+)
### Extensions
* AppleIntelSKLGraphics.kext
* AppleIntelSKLGraphicsFramebuffer.kext
* AppleIntelSKLGraphicsGLDriver.bundle
* AppleIntelSKLGraphicsMTLDriver.bundle
* AppleIntelSKLGraphicsVADriver.bundle
* AppleIntelSKLGraphicsVAME.bundle
* AppleIntelGraphicsShared.bundle
:::
::: details AMD Legacy Vega Graphics Acceleration Patches (13.0+)
### Extensions
* AMDRadeonX5000.kext
* AMDRadeonVADriver2.bundle
* AMDRadeonX5000GLDriver.bundle
* AMDRadeonX5000MTLDriver.bundle
* AMDRadeonX5000Shared.bundle
* AMDShared.bundle
:::
::: details AMD Legacy Polaris Graphics Acceleration Patches (13.0+)
### Extensions
* AMDRadeonX4000.kext
* AMDRadeonX4000HWServices.kext
* AMDRadeonVADriver2.bundle
* AMDRadeonX4000GLDriver.bundle
* AMDMTLBronzeDriver.bundle
* AMDShared.bundle
:::
::: details AMD Legacy GCN Graphics Acceleration Patches
### Extensions
* AMD7000Controller.kext
* AMD8000Controller.kext
* AMD9000Controller.kext
* AMD9500Controller.kext
* AMD10000Controller.kext
* AMDRadeonX4000.kext
* AMDRadeonX4000HWServices.kext
* AMDFramebuffer.kext
* AMDSupport.kext
* AMDRadeonVADriver.bundle
* AMDRadeonVADriver2.bundle
* AMDRadeonX4000GLDriver.bundle
* AMDMTLBronzeDriver.bundle
* AMDShared.bundle
::: details non-Metal Graphics Acceleration Patches (11.0+)
#### General Patches #### General Patches
* IOSurface.kext * IOSurface.kext
@@ -343,6 +525,19 @@ Applicable for BCM94328, BCM94322 and Atheros Wifi cards
* 0x1ea59a - 0x1ea5b3: nop * 0x1ea59a - 0x1ea5b3: nop
* Replace VSLGestalt to IOLockLock or any other known symbol of the same length. * Replace VSLGestalt to IOLockLock or any other known symbol of the same length.
* NVIDIA Web Drivers Binaries
* GeForceWeb.kext
* NVDAGF100HalWeb.kext
* NVDAGK100HalWeb.kext
* NVDAGM100HalWeb.kext
* NVDAGP100HalWeb.kext
* NVDAResmanWeb.kext
* NVDAStartupWeb.kext
* GeForceTeslaWeb.kext
* NVDANV50HalTeslaWeb.kext
* NVDAResmanTeslaWeb.kext
* Reason: Allows for non-Metal Acceleration for NVIDIA Maxwell and Pascal GPUs
* AMD/ATI Binaries * AMD/ATI Binaries
* AMD2400Controller.kext * AMD2400Controller.kext
* AMD2600Controller.kext * AMD2600Controller.kext

View File

@@ -1,7 +1,7 @@
# Post-Installation # Post-Installation
* [Booting without USB drive](#booting-without-usb-drive) * [Booting without USB drive](#booting-without-usb-drive)
* [Booting seamlessly without Verbose or OpenCore Picker](#booting-seamlessly-without-verbose-or-opencore-picker) * [Booting seamlessly without Boot Picker](#booting-seamlessly-without-boot-picker)
* [Applying Post Install Volume Patches](#applying-post-install-volume-patches) * [Applying Post Install Volume Patches](#applying-post-install-volume-patches)
## Booting without USB drive ## Booting without USB drive
@@ -16,23 +16,21 @@ Once you've installed macOS through OpenCore, you can boot up and go through the
And voila! No more USB drive required. And voila! No more USB drive required.
## Booting seamlessly without Verbose or OpenCore Picker ## Booting seamlessly without Boot Picker
To do this, run the OpenCore Patcher and head to Patcher Settings: To do this, run the OpenCore Patcher and head to Patcher Settings, then uncheck "Show OpenCore Bootpicker" on the Build tab:
![](../images/OCLP-GUI-Settings-ShowPicker.png) ![](../images/OCLP-GUI-Settings-ShowPicker.png)
Here you can change different patcher settings, however the main interest is: 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.
* Show Boot Picker
Once you've toggled them both 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.
## Enabling SIP ## Enabling SIP
For many users, SIP will be lowered by default on build. For Intel HD 4000 users, you may have noticed that SIP is partially disabled. This is to ensure full compatibility with macOS Monterey and allow seamless booting between it and older OSes. However for users who do not plan to boot Monterey, you can re-enable under Patcher Settings. For many users, SIP will be lowered by default on build. For Intel HD 4000 users, you may have noticed that SIP is partially disabled. This is to ensure full compatibility with macOS Monterey and allow seamless booting between it and older OSes. However for users who do not plan to boot Monterey, you can re-enable under Patcher Settings.
Note: Machines running macOS Ventura or systems with non-Metal GPUs cannot enable SIP outright, due to having a patched root volume. Enabling will brick the installation. Note: Machines running macOS Ventura or systems with non-Metal GPUs cannot enable SIP outright, due to having a patched root volume. Enabling it will brick the installation.
Going forward with 0.6.6, SIP settings can be accessed from the Security tab shown in the images.
| SIP Enabled | SIP Lowered (Root Patching) | SIP Disabled | | SIP Enabled | SIP Lowered (Root Patching) | SIP Disabled |
| :--- | :--- | :--- | | :--- | :--- | :--- |
@@ -48,22 +46,16 @@ If you're unsure whether you should enable SIP, leave it as-is. Systems where yo
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. 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 v0.4.4 and higher include an autopatcher, which will automatically root patch your system but **only if the USB install media was created within OCLP.** 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 with OCLP v0.4.4 or higher 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 |
In OCLP v0.4.5 a new indicator was added to help users to see if, when and on what version the system was root patched. Note that the "Available patches" section above this does not track the status and will always show the patches that are available, whether they're installed or not.
| Automatic install prompt in 0.4.4+ | Last patched status in 0.4.5+ |
| :--- | :--- | | :--- | :--- |
| ![](../images/OCLP-GUI-root-patch-update.png) | ![](../images/OCLP-GUI-Root-Patch-Status.png) | | ![](../images/OCLP-GUI-root-patch-update.png) | ![](../images/OCLP-GUI-Root-Patch-Status.png) |
### Running Post Install patches manually ### Running Post Install patches manually
If you're using OCLP v0.4.3 or earlier, or need to run the patcher manually, you can do so with the app. There is no harm in trying to run the Patcher, as without compatible hardware, nothing will be done. You can see below on whether your hardware needs root volume patching or not. If you're using OCLP v0.4.3 or earlier, or need to run the patcher manually, you can do so with the app. There is no harm in trying to run the Patcher, as without compatible hardware, nothing will be done. You can see below on whether your hardware needs root volume patching or not.
@@ -79,7 +71,7 @@ With macOS Ventura and Macs with AMD Legacy GCN GPUs (ie. Metal), Root Patching
* [Apple's Developer Download Page](https://developer.apple.com/download/all/?q=Kernel%20Debug%20Kit) * [Apple's Developer Download Page](https://developer.apple.com/download/all/?q=Kernel%20Debug%20Kit)
Grab the closet Kernel Debug Kit to the OS you installed, and install it to the machine running Ventura. Grab the Kernel Debug Kit whose version is closest to the OS you installed, and install it to the machine running Ventura.
Machines that require this are those with AMD Metal dGPUs: Machines that require this are those with AMD Metal dGPUs:
* 2008 - 2013 Mac Pros (MacPro3,1 - 6,1) * 2008 - 2013 Mac Pros (MacPro3,1 - 6,1)
@@ -88,7 +80,7 @@ Machines that require this are those with AMD Metal dGPUs:
::: :::
Below entires represent GPUs no longer natively supported, ie. requiring root volume patch with OpenCore Legacy Patcher: 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 macOS Big Sur

View File

@@ -6,7 +6,7 @@ With OpenCore Legacy Patcher, we use a lot of different terms to refer to hardwa
Term | Description Term | Description
--- | --- --- | ---
**macOS** | Apple's own UNIX based OS used for Mac machines and "What makes a Mac a Mac". **macOS** | Apple's own UNIX based OS used for Mac machines and is "What makes a Mac a Mac".
**Windows** | Microsoft's proprietary OS that is used and supported on a wide range of devices **Windows** | Microsoft's proprietary OS that is used and supported on a wide range of devices
**Linux** | Family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged in a Linux distribution. Note that while macOS and Linux may be UNIX-based, they're vastly different. **Linux** | Family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged in a Linux distribution. Note that while macOS and Linux may be UNIX-based, they're vastly different.
**Bootloader** | Piece of software that loads an OS, usually made by the OS creators. OpenCore is technically not a bootloader per se (see boot manager explanation down below). Apple's Boot.efi would be the actual boot loader in a Mac. **Bootloader** | Piece of software that loads an OS, usually made by the OS creators. OpenCore is technically not a bootloader per se (see boot manager explanation down below). Apple's Boot.efi would be the actual boot loader in a Mac.
@@ -31,9 +31,9 @@ Term | Description
Term | Description Term | Description
--- | --- --- | ---
**EFI** | It can denote two things: <br/>- Mac's firmware, which is the same as UEFI, but pretty modified for Macs only, so not so "Universal" <br/>- The partition on your hard drive that stores software read by the UEFI to load OSes (like the Windows bootloader) or UEFI Applications (like OpenCore), it's FAT32 formatted and has an ID type of EF00 (in hex). It can be named ESP or SYSTEM, and it's usually from 100MB to 400MB in size but the size doesn't reflect upon anything. **EFI** | It can denote two things: <br/>- Mac's firmware, which is the same as UEFI, but pretty modified for Macs only, so not so "Universal" <br/>- The partition on your hard drive that stores software read by the UEFI to load OSes (like the Windows bootloader) or UEFI Applications (like OpenCore), it's FAT32 formatted and has an ID type of EF00 (in hex). It can be named ESP or SYSTEM, and it's usually from 100MB to 400MB in size but the size doesn't reflect upon anything.
**HFS+** | Also known as MacOS Journaled, this was the default macOS drive format up until macOS 10.13, format was designed around spinning disks **HFS+** | Also known as Mac OS Extended (Journaled), this was the default macOS drive format up until macOS 10.13. It was designed around spinning disks.
**APFS** | This was the default macOS drive from macOS 10.13 and onwards for SSDs, and standard for all drives in Mojave. Format was designed around SSDs primarily. **APFS** | This is the default macOS drive format from macOS 10.13 and onwards for SSDs, and standard for all drives in Mojave. This format was designed primarily around SSDs.
**32 and 64-Bit CPU** | The bit number of a CPU determines how much data a CPU can address. <br/>- 32-Bit CPUs were only supported up-to Mac OS X 10.6, Snow Leopard. **32 and 64-Bit CPU** | The bit number of a CPU determines how much data a CPU can address. <br/>- 32-Bit CPUs were only supported up-to Mac OS X 10.6, Snow Leopard.
**32-Bit Firmware** | The bit number of a Firmware determines how much data the firmware can address. In some older Macs, it's common to have a 64-Bit CPU can have a 32-Bit firmware<br/>- 32-Bit Firmwares were only supported up-to Mac OS X 10.7, Lion. **32-Bit Firmware** | The bit number of a Firmware determines how much data the firmware can address. In some older Macs, it's common to have a 64-Bit CPU with a 32-Bit firmware<br/>- 32-Bit Firmwares were only supported up-to Mac OS X 10.7, Lion.
**SSE Instructions** | Also known as **S**IMD **S**ingle-Precision Floating-Point **I**nstructions, these are defined as instruction sets supported by your CPU. In macOS, there are a certain number of instruction sets required for normal operation: <br/>- SSE3: Required for all Intel CPUs since Mac OS X 10.4, Tiger <br/>- SSSE3: Required for all Intel 64-Bit CPUs since Mac OS X 10.6, Snow Leopard <br/>- SSE4.1: Required for all Intel CPUs since macOS 10.12, Sierra **SSE Instructions** | Also known as **S**IMD **S**ingle-Precision Floating-Point **I**nstructions, these are defined as instruction sets supported by your CPU. In macOS, there are a certain number of instruction sets required for normal operation: <br/>- SSE3: Required for all Intel CPUs since Mac OS X 10.4, Tiger <br/>- SSSE3: Required for all Intel 64-Bit CPUs since Mac OS X 10.6, Snow Leopard <br/>- SSE4.1: Required for all Intel CPUs since macOS 10.12, Sierra
--- ---

View File

@@ -6,7 +6,7 @@ To aid users in troubleshooting, we've compiled a list of users who've reported
| SMBIOS | Tested | Tester | Model | Version | Comment | | SMBIOS | Tested | Tester | Model | Version | Comment |
| :--- | :--- | :--- | :--- | :--- | :--- | | :--- | :--- | :--- | :--- | :--- | :--- |
| MacBook4,1 | <span style="color:#30BCD5"> YES </span> | Mami | Stock | Unknown | Couldn't install due to broke USB support | | MacBook4,1 | <span style="color:#30BCD5"> YES </span> | Mami | Stock | Unknown | Couldn't install due to broken USB support |
| MacBook5,1 | ^^ | air.man | ^^ | 0.0.19 | N/A | | MacBook5,1 | ^^ | air.man | ^^ | 0.0.19 | N/A |
| MacBook5,2 | ^^ | Finder352 | ^^ | ^^ | ^^ | | MacBook5,2 | ^^ | Finder352 | ^^ | ^^ | ^^ |
| MacBook6,1 | ^^ | Finder352 | ^^ | ^^ | ^^ | | MacBook6,1 | ^^ | Finder352 | ^^ | ^^ | ^^ |

View File

@@ -1,6 +1,6 @@
# Troubleshooting # Troubleshooting
Here are some common errors users may experience while using this patcher: Here are some common errors that users may experience while using this patcher:
* [OpenCore Legacy Patcher not launching](#opencore-legacy-patcher-not-launching) * [OpenCore Legacy Patcher not launching](#opencore-legacy-patcher-not-launching)
* [Stuck on `This version of Mac OS X is not supported on this platform`](#stuck-on-this-version-of-mac-os-x-is-not-supported-on-this-platform) * [Stuck on `This version of Mac OS X is not supported on this platform`](#stuck-on-this-version-of-mac-os-x-is-not-supported-on-this-platform)
@@ -46,7 +46,7 @@ Reminder that once this is done, you'll need to select OpenCore in the boot pick
With OpenCore Legacy Patcher, we rely on Apple Secure Boot to ensure OS updates work correctly and reliably with Big Sur. However this installs NVRAM variables that will confuse your Mac if not running with OpenCore. To resolve this, simply uninstall OpenCore and [reset NVRAM](https://support.apple.com/en-mide/HT201255). With OpenCore Legacy Patcher, we rely on Apple Secure Boot to ensure OS updates work correctly and reliably with Big Sur. However this installs NVRAM variables that will confuse your Mac if not running with OpenCore. To resolve this, simply uninstall OpenCore and [reset NVRAM](https://support.apple.com/en-mide/HT201255).
* Note: Machines with modded root volumes will also result in an infinite recovery loop until integrity is restored. * Note: Machines with modified root volumes will also result in an infinite recovery loop until integrity is restored.
## Reboot when entering Hibernation (`Sleep Wake Failure`) ## Reboot when entering Hibernation (`Sleep Wake Failure`)
@@ -92,11 +92,11 @@ As a work-around, we recommend users try out the below app:
With OCLP v0.2.5, we've added support for legacy Wi-Fi on Monterey. However, some users may have noticed that they can't connect to wireless networks. With OCLP v0.2.5, we've added support for legacy Wi-Fi on Monterey. However, some users may have noticed that they can't connect to wireless networks.
To work-around this, we recommend that users manually connect using the "other" option in the Wi-Fi menu bar or manually adding the network in the "Network" preference pane. To work-around this, we recommend that users manually connect using the "Other" option in the Wi-Fi menu bar or manually adding the network in the "Network" preference pane.
## No Graphics Acceleration ## No Graphics Acceleration
In macOS, GPU drivers are often dropped from the OS with each major release of it. With macOS Big Sur, currently all non-Metal GPUs require additional patches to gain acceleration. In addition, macOS Monterey removed Graphics Drivers for both Intel Ivy Bridge and NVIDIA Kepler graphics processors. In macOS, GPU drivers are often dropped from the OS with each major release of it. With macOS Big Sur, currently, all non-Metal GPUs require additional patches to gain acceleration. In addition, macOS Monterey removed Graphics Drivers for both Intel Ivy Bridge and NVIDIA Kepler graphics processors.
If you're using OCLP v0.4.4, you should have been prompted to install Root Volume patches after the first boot from installation of macOS. If you need to do this manually, you can do so within the patcher app. Once rebooted, acceleration will be re-enabled as well as brightness control for laptops. If you're using OCLP v0.4.4, you should have been prompted to install Root Volume patches after the first boot from installation of macOS. If you need to do this manually, you can do so within the patcher app. Once rebooted, acceleration will be re-enabled as well as brightness control for laptops.
@@ -151,7 +151,7 @@ Because of this, we recommend placing a USB 2.0/3.0 hub between your devices and
A common area for systems to get "stuck", namely for units that are missing the `AES` CPU instruction/older mobile hardware. During this stage, a lot of heavy cryptography is performed, which can make systems appear to be stuck. In reality they are working quite hard to finish up the installation. A common area for systems to get "stuck", namely for units that are missing the `AES` CPU instruction/older mobile hardware. During this stage, a lot of heavy cryptography is performed, which can make systems appear to be stuck. In reality they are working quite hard to finish up the installation.
Because this step can take a few hours or more depending on drive speeds, be patient at this stage and do not manually power off or reboot your machine as this will break the installation and require you to reinstall. If you think your system has stalled, press the Caps Lock key. If the light turns on, your system is busy. Because this step can take a few hours or more depending on drive speeds, be patient at this stage and do not manually power off or reboot your machine as this will break the installation and require you to reinstall. If you think your system has stalled, press the Caps Lock key. If the light turns on, your system is busy and not actually frozen.
## No acceleration after a Metal GPU swap on Mac Pro ## No acceleration after a Metal GPU swap on Mac Pro

View File

@@ -7,7 +7,7 @@ To remove OpenCore:
* You'll need to mount the drive's EFI partition, and delete the `EFI/OC` and `System` folders * You'll need to mount the drive's EFI partition, and delete the `EFI/OC` and `System` folders
* Note: **Do not** delete the entire EFI folder, this will likely break any existing Windows and Linux installations. * Note: **Do not** delete the entire EFI folder, this will likely break any existing Windows and Linux installations.
* [See here for an example on how to mount](https://dortania.github.io/OpenCore-Post-Install/universal/oc2hdd.html) * [See here for an example on how to mount](https://dortania.github.io/OpenCore-Post-Install/universal/oc2hdd.html)
* For 5k iMac users, you will also need to delete `boot.efi` on the root of the EFI partition. * For 5K iMac users, you will also need to delete `boot.efi` on the root of the EFI partition.
2. [Reset NVRAM](https://support.apple.com/HT204063) 2. [Reset NVRAM](https://support.apple.com/HT204063)

View File

@@ -29,7 +29,7 @@ Technical requirements:
* iPadOS 15.4 or newer (if applicable) * iPadOS 15.4 or newer (if applicable)
* OpenCore Legacy Patcher 0.4.3 or newer * OpenCore Legacy Patcher 0.4.3 or newer
Check the [table of models](#table-of-models) below to see whether you need to upgrade hardware and exactly what hardware is required to be changed based on the offending Macs listed. For help on how to upgrade the Wi-Fi card in older 2008-2011 models, refer to the Discord channel [#hardware](https://discord.gg/rqdPgH8xSN) if required. Check the [table of models](#table-of-models) below to see whether you need to upgrade hardware and exactly what hardware is required to be changed based on the offending Macs listed. For help on how to upgrade the Wi-Fi card in older 2008-2011 models, refer to the `#hardware` channel in the [Discord server](https://discord.gg/rqdPgH8xSN) if required.
@@ -209,7 +209,7 @@ Ventura has dropped more models which includes all of the blacklisted Macs in qu
Firstly run the GUI version of OpenCore Legacy Patcher. Firstly run the GUI version of OpenCore Legacy Patcher.
Then go to **Settings**, go to **SMBIOS Settings**, set SMBIOS Spoof Level to **Moderate**. Set SMBIOS Spoof Model **one listed next to your native model in the table for spoofed models below.** 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 Ventura and enabling them will cause boot issues. 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 Ventura and enabling them will cause boot issues.
@@ -239,21 +239,23 @@ Spoofing to any model with native Ventura support should work, but these are the
::: details macOS Monterey ::: details macOS Monterey
Firstly, run the GUI version of OpenCore Legacy Patcher. Secondly, go to **Settings** and tick **Allow native models**. Firstly, run the GUI version of OpenCore Legacy Patcher. Secondly, go to **Settings** then the **App** tab and tick **Allow native models**.
Then, go to **SMBIOS Settings**, tick **Allow Native Spoofs**, set SMBIOS Spoof Level to **Moderate**. Set SMBIOS Spoof Model to **one listed next to your native model in the table for spoofed models below.** [](../images/OCLP-App-Allow-Native-Models.png)
Then, go to **SMBIOS** tab, tick **Allow spoofing native Macs**, set SMBIOS Spoof Level to **Moderate**. Set SMBIOS Spoof Model to **one listed next to your native model in the table for spoofed models below.**
| Main Settings view | SMBIOS settings | | Main Settings view | SMBIOS settings |
| :--- | :--- | | :--- | :--- |
| ![](../images/OCLP-allow-native-models.png) | ![](../images/OCLP-smbios-settings.png) | | ![](../images/OCLP-SMBIOS-Allow-Native-Spoof.png) | ![](../images/OCLP-smbios-settings.png) |
::: details Table for spoofed models (click to expand) ::: details Table for spoofed models (click to expand)
Any model after the list of officially blacklisted Macs should be supported, but these are the earliest Macs with Universal Control support, and thus chosen for the sake of simplicity. Any model after the list of officially blacklisted Macs should be supported, but these are the earliest Macs with Universal Control support, 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 Monterey as long as the other requirements are met, since they aren't blacklisted. **Reminder:** Macs that are not listed on this table work without spoofing, including systems that do not natively support Monterey, as long as the other requirements are met, since they aren't blacklisted.
| Mac by name | Native SMBIOS | Spoof SMBIOS | Tested | Tested by | | Mac by name | Native SMBIOS | Spoof SMBIOS | Tested | Tested by |

View File

@@ -19,4 +19,4 @@ nvram 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:OCLP-Version
![](../images/oclp-version.png) ![](../images/oclp-version.png)
From this, we can see that we're running a RELEASE version of OpenCore 0.6.8 built on March 27th, 2021 with Patcher Version 0.0.20! 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!

View File

@@ -39,11 +39,11 @@ The team is doing their best to investigate and fix the aforementioned issues, h
### AMD Polaris, Vega and Navi support on pre-2019 Mac Pros and pre-2012 iMacs ### AMD Polaris, Vega and Navi support on pre-2019 Mac Pros and pre-2012 iMacs
For users with 2008 to 2013 Mac Pros (MacPro3,1-6,1) and 2009 to 2011 iMacs (iMac9,1-12,2), keep in mind macOS Ventura now requires [AVX2.0 support in the CPU](https://en.wikipedia.org/wiki/Advanced_Vector_Extensions#Advanced_Vector_Extensions_2) for native graphics acceleration. Thus while your GPU may be natively supported, you cannot run Ventura officially with these GPUs. For users with 2008 to 2013 Mac Pros (MacPro3,1-6,1) and 2009 to 2011 iMacs (iMac9,1-12,2), keep in mind that macOS Ventura now requires [AVX2.0 support in the CPU](https://en.wikipedia.org/wiki/Advanced_Vector_Extensions#Advanced_Vector_Extensions_2) for native graphics acceleration. Thus while your GPU may be natively supported, you cannot run Ventura officially with these GPUs.
* CPUs supporting AVX2.0 are Haswell or newer, which no pre-2019 Mac Pros can be upgraded with. * CPUs supporting AVX2.0 are Haswell or newer, which no pre-2019 Mac Pros can be upgraded with.
Currently at this time, OpenCore Legacy Patcher only supports patching the AMD Polaris and Vega Graphics stack to no longer require AVX2.0. We're recently received an AMD RX 6600 donation, so hopefully in the future the project can support AMD Navi with pre-Haswell Macs. However no time estimates can be given. Currently at this time, OpenCore Legacy Patcher only supports patching the AMD Polaris and Vega Graphics stack to no longer require AVX2.0. We're recently received an AMD RX 6600 donation, so hopefully in the future the project can support AMD Navi with pre-Haswell Macs. However, no time estimates can be given.
Following GPUs are applicable: Following GPUs are applicable:
@@ -78,11 +78,6 @@ With OpenCore Legacy Patcher v0.6.0, basic support has been implemented via Root
::: :::
### Ethernet issue with Early 2008 Mac Pro
MacPro3,1 suffers from Ethernet driver dying after returning from sleep, current workaround is to use a USB Ethernet adapter or disable sleep.
::: details Legacy Wireless Support (Resolved in v0.6.0 and newer) ::: details Legacy Wireless Support (Resolved in v0.6.0 and newer)

View File

@@ -1,102 +1,199 @@
# Installing UEFI Windows 10 # Installing Windows in UEFI Mode
* Guide based off of [cdf's Mac Pro Thread](https://forums.macrumors.com/threads/opencore-on-the-mac-pro.2207814/) 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.
To install a UEFI copy of Windows is actually super simple! All it requires is to boot Windows' Installer through OpenCore to force a UEFI setup. Here we'll be going step by step in the process, including partitioning and such. ## Minimum Requirements
* Note: UEFI Windows is generally quite usable for Arrandale and newer models, however machines with Penryn CPUs may experience issues This guide will focus on the installation of Windows 10 without using Boot Camp Assistant. Windows 11 should also work, but its quirks will not be covered.
* Recommended Models:
* MacBookAir4,x - 5,x
* MacBookPro8,x - 10,x
* Macmini5,x - 6,x
* iMac11,x - 13,x
Once you know if your model is supported, you're good to go with the rest of this guide. * Due to hardware and firmware limitations, UEFI Windows installations are only recommended on the following machines:
* Newer models than listed here will already natively support UEFI Windows through Boot Camp. * 2015 MacBook or newer (MacBook8,x+)
* 2011 MacBook Air or newer (MacBookAir4,x+)
* 2011 MacBook Pro or newer (MacBookPro8,x+)
* 2011 Mac mini or newer (Macmini5,x+)
* 2009[^1] Mac Pro or newer (MacPro4,1+), upgraded GPU is preferred
* 2010 iMac or newer (iMac11,x+), upgraded GPU is preferred
* 2009[^2] Xserve (Xserve3,1), upgraded GPU is preferred
For MacPro4,1/5,1 and Xserve3,1 users, please be aware that Windows has troubles with automatic installation, so please refer to cdf's guide on manual installation:
* [cdf's Mac Pro Thread](https://forums.macrumors.com/threads/opencore-on-the-mac-pro.2207814/) [^1]: MacPro4,1 and MacPro5,1 systems experience issues with the Windows installer, follow the DISM installation section for instructions.
[^2]: Theoretically supported, not tested. Follow DISM installation section
## Disk Formatting If your machine is not listed, UEFI Windows will likely still install, but you may face stability/driver issues.
To start off, we'll need the following: ## Disk Partitioning and Formatting
* An 8GB USB drive for the Windows Installer The following is required for installation:
* A minimum of 30GB of free space on whichever drive you want to install Windows to * 8GB+ USB Drive for the Windows installer
* 30GB+ Free Space on an existing drive / empty drive for the Windows installation
First, let's format our drives with the following steps: ### Formatting the USB Drive
### USB Drive Formatting
Open Disk Utility in macOS and format the USB Drive as ExFat with the Master Boot Record scheme: Open Disk Utility in macOS and format the USB Drive as ExFat with the Master Boot Record scheme:
![](../images/windows-mbr-format.png) ![](../images/windows-mbr-format.png)
### Disk Formatting ### Formatting the Target Drive
Next, grab the drive you wish to install Windows on and partition it as ExFat (If formatting the entire drive, ensure it's using the GUID Partition Table scheme): Next, select the drive you wish to install Windows in Disk Utility on and partition it as ExFat (If formatting the entire drive, ensure it's using the GUID Partition Table scheme):
![](../images/windows-partition-1.png) ![](../images/windows-partition-1.png)
:::warning
Incorrectly erasing your drive can lead to data loss! Please verify that you are erasing the correct drive/partition.
:::
If you plan to use the same hard drive for macOS and Windows, we recommend creating a dedicated partition just for OpenCore. This lets Windows have the ESP to itself and OpenCore can stay within it's own bubble. If you plan to use the same hard drive for macOS and Windows, we recommend creating a dedicated partition just for OpenCore. This lets Windows have the ESP to itself and OpenCore can stay within it's own bubble.
Recommended size is 200MB and the partition format **must** be FAT32 for OpenCore to operate correctly. You will next want to install OpenCore onto the new partition, either moving from the ESP with [MountEFI](https://github.com/corpnewt/MountEFI) or rerunning the OpenCore-Patcher.app Recommended size is 200MB and the partition format **must** be FAT32 for OpenCore to operate correctly. You will next want to install OpenCore onto the new partition, either moving from the ESP with [MountEFI](https://github.com/corpnewt/MountEFI) or rerunning the OpenCore-Patcher.app
* Note 1: For machines with dedicated drives for Windows, having different partitions for OpenCore is not required. * Note 1: For machines with dedicated drives for Windows, having different partitions for OpenCore is not required.
* Note 2: We recommend uninstalling OpenCore from the ESP/EFI Partition when you create this new OpenCore partition to avoid confusion when selecting OpenCore builds in the Mac's boot picker. * Note 2: Having different partitions for OpenCore is not required if the Windows boot files detected by the stock Bootpicker are removed. See "Removing the Windows option from the stock bootpicker" for further information.
* Note 3: We recommend uninstalling OpenCore from the ESP/EFI Partition when you create this new OpenCore partition to avoid confusion when selecting OpenCore builds in the Mac's boot picker.
![](../images/windows-partition-2.png) ![](../images/windows-partition-2.png)
## Creating the Installer ## Creating the Windows Installer
First up, lets grab Windows's Installer at the below link: The latest Windows installation images can be downloaded from Microsoft using the following links:
* [Download Windows 10 Disc Image (ISO File)](https://www.microsoft.com/en-ca/software-download/windows10ISO) * [Download Windows 10 Disc Image (ISO File)](https://www.microsoft.com/en-ca/software-download/windows10ISO)
Next, mount the Windows 10 ISO: * [Download Windows 11 Disc Image (ISO File)](https://www.microsoft.com/en-ca/software-download/windows11)
Once the file is downloaded, mount the .iso image:
![](../images/windows-iso.png) ![](../images/windows-iso.png)
Then open terminal and run `rsync` on the USB drive (replace CCCOMA_X64 with the mounted ISO's name, as well as replacing W10USB with your USB drive's name): Then open terminal and use the `rsync` command with the disk image set as the source and your USB drive set as the target. (Replace "CCCOMA_X64" with the mounted image's partition name, and replace "InstallWin10" with your USB Drive's name).
``` ```
rsync -r -P /Volumes/CCCOMA_X64/ /Volumes/W10USB rsync -r -P /Volumes/CCCOMA_X64/ /Volumes/InstallWin10
``` ```
::: details If you get an error about install.wim
One of the files, `install.wim`, may be too big for the FAT32 file system to hold. If this is the case, you should enter the commands below rather than the one above. This assumes you have `wimlib` installed, if not you can install it with [Homebrew](https://brew.sh):
```
# Copy everything but the install.wim file
rsync -vha -P --exclude=sources/install.wim /Volumes/CCCOMA_X64/ /Volumes/W10USB
# Use wimlib to split the install.wim file into a size that fits
wimlib-imagex split /Volumes/CCCOMA_X64/sources/install.wim /Volumes/W10USB/sources/install.swm 4000
```
Once that's completed, you can continue.
:::
![](../images/rsync-progess.png) ![](../images/rsync-progess.png)
Command will take some time, so sit back and get some coffee. Once finished, the root of the USB drive should look as follows: The `rsync` command will take some time, so get some coffee and sit back. Once finished, the root of the USB drive should look as follows:
* Ensure that these folders and files are in the root of the USB drive, otherwise the USB will not boot.
![](../images/windows-rsync-done.png) ![](../images/windows-rsync-done.png)
Once done, lets reboot into OpenCore's Menu and you'll see a new Windows' entry: * Ensure that these folders and files are in the root of the USB drive, otherwise the USB will not boot.
* Note: Do not boot the installer outside of OpenCore as this will default back to the old MBR BIOS setup. Booting through OpenCore ensures Windows uses UEFI.
![](../images/oc-windows.png) ## Installation Process
From there, install Windows as normal and you'll get a new BootCamp entry in OpenCore's picker when done! Don't forget to run BootCamp's utilities installer as well to ensure Wi-Fi and other important features are functioning correctly. This can be downloaded from the BootCamp Assistant app in macOS, or with [brigadier](https://github.com/timsutton/brigadier) in Windows. Once you reboot your machine, you should see a new boot option in the OCLP Bootpicker labelled as "EFI Boot". It may or may not have the Boot Camp icon.
![](../images/oc-windows-done.png) :::warning
If you aren't booted into OCLP, you may see two boot options labelled "Windows" and "EFI Boot". Do not choose either of the options and boot into OCLP to continue.
:::
### Installation: Microsoft Method
Once booted into the Windows installer, proceed as you normally would on any Windows computer. If you see an error message containing “Windows could not prepare the computer to boot into the next phase of installation”, please follow the next portion of this guide (DISM Installation).
### Installation: DISM Deployment Method
Once booted into the Windows installer, proceed as you normally would until you reach the "Where do you want to install Windows" disk formatting section.
When you are prompted to select a drive, select your desired partition and delete it using "Delete". If you want to install Windows to an empty drive, erase every partition currently on the desired drive.
After your drive/partition is erased, press "New" to create the Windows system partitions.
![](../images/DISM-1.png)
You will be prompted to confirm the creation of the system partitions, press "OK".
![](../images/DISM-2.png)
Once the partitions are created, select the main (largest) partition and press "Format". This will format the partition using the NFTS file system.
![](../images/DISM-3.png)
After the installer formats the partition, open up the Command Prompt by pressing SHIFT + F10. Then run the `diskpart` command, and `list vol`. This will produce a list of volumes in your system, make sure to keep track of the drive letters of the main Windows partition (largest, NTFS), the EFI partition (100MB, FAT32), and the Windows installer (Usually Drive D). Run `exit` to close diskpart
![](../images/DISM-4.png)
Now, get a list of available Windows editions by running `dism /Get-WimInfo /WimFile:D:\Sources\install.wim` (substituting D with the Installer Drive Letter). This guide will use Option 6 for Windows 10 Pro.
![](../images/DISM-5.png)
You can now start the deployment process. Run `dism /Apply-Image /ImageFile:D:\Sources\install.wim /index:6 /ApplyDir:E:`, replacing "D" with the Installer Drive Letter, "6" with the Windows edition option, and "E" with the Windows Partition Drive Letter.
![](../images/DISM-6.png)
Once `dism` finishes its thing, run `bcdboot E:\Windows`, substituting "E" for the drive letter of the main Windows partition to create the boot files.
![](../images/DISM-7.png)
Windows is now installed. It should be recognized as "EFI Boot" with a Boot Camp icon in the OCLP Bootpicker.
:::warning
After the boot files are created, **DO NOT** reboot if you are using a MacPro4,1, MacPro5,1, or Xserve3,1 system! A bug in the Windows bootloader exists that will completely brick the system if it is loaded through the stock bootpicker. See the "Installation: Removing the Windows option from the stock bootpicker" section for a workaround.
:::
### Installation: Removing the Windows option from the stock bootpicker
Removing the Windows boot option from the stock bootpicker is **HIGHLY RECOMMENDED** on MacPro4,1, MacPro5,1, and Xserve3,1 systems in order to prevent Secure Boot NVRAM corruption and bricking.
Start up a command prompt window in the Windows Setup environment by running `cmd`.
Next, enter the EFI Folder by running `C:`, substituting "C" for the EFI Partition Drive Letter. Then run `cd EFI` to enter the EFI Partition. Then, run `rmdir Boot /S /Q` to remove the boot files that can be detected by the stock Bootpicker. The OCLP Picker will still be able to detect and boot Windows.
![](../images/DISM-8.png)
You can verify that the `Boot` folder is removed by running the `dir` command:
![](../images/DISM-9.png)
If, for whatever reason, you are not able to remove the boot files from the Windows setup, shut down your system, boot into macOS, mount your EFI partition with [MountEFI](https://github.com/corpnewt/MountEFI), and remove the `Boot` folder (it should have a recent file modification date, and contain `Bootx64.efi`).
## Post-Installation
### Installing Boot Camp Software
To get started, download the Brigadier utility from the following link:
* [Download Brigadier](https://github.com/timsutton/brigadier/releases/download/0.2.4/brigadier.exe)
Once Brigadier is downloaded, move it to your desktop for easy access.
Open up a command prompt window as a standard user and run `cd desktop`.
![](../images/BOOTCAMP-1.png)
Then run `.\brigadier.exe --model=MODEL1,1`, replacing "MODEL1,1" with your machine's SMBIOS model.
![](../images/BOOTCAMP-2.png)
Once the Boot Camp software is downloaded, you can install it by executing `Setup.exe` or `\Drivers\Apple\BootCamp.msi` (`BootCamp64.msi` if present).
### Installing Boot Camp 6 softare on unsupported machines
To get started, download the Brigadier utility from the following link:
* [Download Brigadier](https://github.com/timsutton/brigadier/releases/download/0.2.4/brigadier.exe)
Once Brigadier is downloaded, move it to your desktop for easy access.
Open up a command prompt window as a standard user and run `cd desktop`.
![](../images/BOOTCAMP-1.png)
Then run `.\brigadier.exe --model=MacPro7,1`. This will download the latest BootCamp 6 package.
![](../images/BOOTCAMP-2.png)
Once the Boot Camp software is downloaded, you can install Boot Camp 6 by executing `\Drivers\Apple\BootCamp.msi` in an administrator command prompt window.
## Troubleshooting ## Troubleshooting

BIN
images/BOOTCAMP-1.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
images/BOOTCAMP-2.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

BIN
images/DISM-1.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

BIN
images/DISM-2.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

BIN
images/DISM-3.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

BIN
images/DISM-4.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

BIN
images/DISM-5.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

BIN
images/DISM-6.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

BIN
images/DISM-7.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
images/DISM-8.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
images/DISM-9.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 542 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 210 KiB

After

Width:  |  Height:  |  Size: 390 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 201 KiB

After

Width:  |  Height:  |  Size: 251 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 252 KiB

After

Width:  |  Height:  |  Size: 452 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 238 KiB

After

Width:  |  Height:  |  Size: 450 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 506 KiB

After

Width:  |  Height:  |  Size: 526 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 496 KiB

After

Width:  |  Height:  |  Size: 530 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 499 KiB

After

Width:  |  Height:  |  Size: 533 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 286 KiB

After

Width:  |  Height:  |  Size: 530 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 451 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 KiB

After

Width:  |  Height:  |  Size: 451 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 405 KiB

After

Width:  |  Height:  |  Size: 445 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 330 KiB

After

Width:  |  Height:  |  Size: 446 KiB

View File

@@ -1383,6 +1383,24 @@
<key>PlistPath</key> <key>PlistPath</key>
<string>Contents/Info.plist</string> <string>Contents/Info.plist</string>
</dict> </dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>BundlePath</key>
<string>LegacyKeyboardInjector.kext</string>
<key>Comment</key>
<string>Legacy Keyboard support for macOS 11+</string>
<key>Enabled</key>
<false/>
<key>ExecutablePath</key>
<string></string>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string>17.0.0</string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict> <dict>
<key>Arch</key> <key>Arch</key>
<string>x86_64</string> <string>x86_64</string>
@@ -1943,6 +1961,36 @@
<key>Skip</key> <key>Skip</key>
<integer>0</integer> <integer>0</integer>
</dict> </dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Base</key>
<string>__ZN17IOPCIConfigurator18IOPCIIsHotplugPortEP16IOPCIConfigEntry</string>
<key>Comment</key>
<string>CaseySJ - Fix PCI bus enumeration</string>
<key>Count</key>
<integer>1</integer>
<key>Enabled</key>
<false/>
<key>Find</key>
<data>hNt1S0GLVzg=</data>
<key>Identifier</key>
<string>com.apple.iokit.IOPCIFamily</string>
<key>Limit</key>
<integer>0</integer>
<key>Mask</key>
<data></data>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string>22.0.0</string>
<key>Replace</key>
<data>hNvrS0GLVzg=</data>
<key>ReplaceMask</key>
<data></data>
<key>Skip</key>
<integer>0</integer>
</dict>
</array> </array>
<key>Quirks</key> <key>Quirks</key>
<dict> <dict>
@@ -1960,6 +2008,8 @@
<false/> <false/>
<key>DisableIoMapper</key> <key>DisableIoMapper</key>
<false/> <false/>
<key>DisableIoMapperMapping</key>
<false/>
<key>DisableLinkeditJettison</key> <key>DisableLinkeditJettison</key>
<false/> <false/>
<key>DisableRtcChecksum</key> <key>DisableRtcChecksum</key>
@@ -2611,10 +2661,14 @@
<false/> <false/>
<key>ForceResolution</key> <key>ForceResolution</key>
<false/> <false/>
<key>GopBurstMode</key>
<false/>
<key>GopPassThrough</key> <key>GopPassThrough</key>
<string>Disabled</string> <string>Disabled</string>
<key>IgnoreTextInGraphics</key> <key>IgnoreTextInGraphics</key>
<false/> <false/>
<key>InitialMode</key>
<string>Auto</string>
<key>ProvideConsoleGop</key> <key>ProvideConsoleGop</key>
<true/> <true/>
<key>ReconnectGraphicsOnConnect</key> <key>ReconnectGraphicsOnConnect</key>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,4 +1,11 @@
#!/bin/sh #!/bin/sh
# Create alias for OpenCore-Patcher.app
if [ ! -d "/Applications/OpenCore-Patcher.app" ]; then
ln -s "/Library/Application Support/Dortania/OpenCore-Patcher.app" "/Applications/OpenCore-Patcher.app"
fi
# Start root patching
app_path="/Library/Application Support/Dortania/OpenCore-Patcher.app/Contents/MacOS/OpenCore-Patcher" app_path="/Library/Application Support/Dortania/OpenCore-Patcher.app/Contents/MacOS/OpenCore-Patcher"
args="--patch_sys_vol" args="--patch_sys_vol"
"$app_path" "$args" &> "/Users/Shared/.OCLP-AutoPatcher-Log-$(date +"%Y_%m_%d_%I_%M_%p").txt" "$app_path" "$args" &> "/Users/Shared/.OCLP-AutoPatcher-Log-$(date +"%Y_%m_%d_%I_%M_%p").txt"

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -23,7 +23,7 @@ KEXT_DICTIONARY = {
# }, # },
"BlueToolFixup": { "BlueToolFixup": {
"Repository": "https://github.com/acidanthera/BrcmPatchRAM", "Repository": "https://github.com/acidanthera/BrcmPatchRAM",
"Constants Variable": "self.bluetoolfixup_version", "Constants Variable": "self.bluetool_version",
"Override": "BrcmPatchRAM", "Override": "BrcmPatchRAM",
}, },
"CPUFriend": { "CPUFriend": {
@@ -152,6 +152,26 @@ class GenerateKexts:
self._get_latest_release(kext_folder, kext_name) self._get_latest_release(kext_folder, kext_name)
def _is_build_nightly(self, kext: str, version: str) -> bool:
# Load CHANGELOG.md
changelog_path = Path(f"../../CHANGELOG.md").absolute()
with open(changelog_path, "r") as changelog_file:
changelog = changelog_file.read()
# Check if kext is in changelog
if kext not in changelog:
return False
# Check if kext is 'rolling' or 'nightly'
for line in changelog.split("\n"):
if kext in line and version in line:
if ("rolling" in line or "nightly" in line):
return True
break
return False
def _get_latest_release(self, kext_folder, kext_name, override_kext_zip_name=None): def _get_latest_release(self, kext_folder, kext_name, override_kext_zip_name=None):
# Get latest release from GitHub API # Get latest release from GitHub API
repo_url = KEXT_DICTIONARY[kext_folder][kext_name]["Repository"].replace("https://github.com", "https://api.github.com/repos") repo_url = KEXT_DICTIONARY[kext_folder][kext_name]["Repository"].replace("https://github.com", "https://api.github.com/repos")
@@ -178,6 +198,11 @@ class GenerateKexts:
if packaging.version.parse(remote_version) <= packaging.version.parse(local_version): if packaging.version.parse(remote_version) <= packaging.version.parse(local_version):
print(f" {kext_name} {variant} is up to date: v{local_version}") print(f" {kext_name} {variant} is up to date: v{local_version}")
if remote_version == local_version:
if self._is_build_nightly(kext_name, local_version) is False:
continue
print(f" {kext_name} {variant} is a nightly build, updating...")
else:
continue continue
for asset in latest_release["assets"]: for asset in latest_release["assets"]:
@@ -186,9 +211,9 @@ class GenerateKexts:
print(f" Downloading {kext_name} {variant}: v{remote_version}...") print(f" Downloading {kext_name} {variant}: v{remote_version}...")
zip_name = f"{override_kext_zip_name}-v{remote_version}-{variant}.zip" if override_kext_zip_name else f"{kext_name}-v{remote_version}-{variant}.zip" zip_name = f"{override_kext_zip_name}-v{remote_version}-{variant}.zip" if override_kext_zip_name else f"{kext_name}-v{remote_version}-{variant}.zip"
self._download_file(asset["browser_download_url"], f"./{kext_folder}/{zip_name}", f"{kext_name}.kext") if Path(f"./{kext_folder}/{zip_name.replace(f'v{remote_version}', f'v{local_version}')}").exists():
if Path(f"./{kext_folder}/{zip_name}").exists():
subprocess.run(["rm", "-rf", f"./{kext_folder}/{zip_name.replace(f'v{remote_version}', f'v{local_version}')}"]) subprocess.run(["rm", "-rf", f"./{kext_folder}/{zip_name.replace(f'v{remote_version}', f'v{local_version}')}"])
self._download_file(asset["browser_download_url"], f"./{kext_folder}/{zip_name}", f"{kext_name}.kext")
self._update_constants_file(KEXT_DICTIONARY[kext_folder][kext_name]["Constants Variable"], local_version, remote_version) self._update_constants_file(KEXT_DICTIONARY[kext_folder][kext_name]["Constants Variable"], local_version, remote_version)
if override_kext_zip_name: if override_kext_zip_name:

Binary file not shown.

View File

@@ -62,6 +62,7 @@ UNUSED_TOOLS = [
"RtcRw.efi", "RtcRw.efi",
"CsrUtil.efi", "CsrUtil.efi",
"TpmInfo.efi", "TpmInfo.efi",
"ListPartitions.efi",
] ]
IMPORTANT_UTILITIES = [ IMPORTANT_UTILITIES = [

Binary file not shown.

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDisplayName</key>
<string>OpenCore-Patcher</string>
<key>CFBundleExecutable</key>
<string>OpenCore-Patcher</string>
<key>CFBundleIconFile</key>
<string>OC-Patcher.icns</string>
<key>CFBundleIdentifier</key>
<string>com.dortania.opencore-legacy-patcher-helper</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>OpenCore-Patcher</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>LSMinimumSystemVersion</key>
<string>10.10.0</string>
<key>NSHighResolutionCapable</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2020-2023 Dortania</string>
<key>LSUIElement</key>
<true/>
</dict>
</plist>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AssociatedBundleIdentifiers</key>
<string>com.dortania.opencore-legacy-patcher</string>
<key>Label</key>
<string>com.dortania.opencore-legacy-patcher.rsr-monitor</string>
<key>ProgramArguments</key>
<array>
<string>rm</string>
<string>-rf</string>
<string>/Library/Extensions/example.kext</string> <!-- Update kext to correct name -->
</array>
<key>WatchPaths</key>
<array>
<string>/System/Volumes/Preboot/UUID/cryptex1/OS.dmg</string> <!-- Update UUID to host's booted Preboot folder -->
</array>
</dict>
</plist>

View File

@@ -4,3 +4,4 @@ wxpython
pyinstaller pyinstaller
packaging packaging
py_sip_xnu py_sip_xnu
py-applescript

View File

@@ -1,5 +0,0 @@
# Credit: CorpNewt
from os.path import dirname, basename, isfile
import glob
modules = glob.glob(dirname(__file__)+"/*.py")
__all__ = [ basename(f)[:-3] for f in modules if isfile(f) and not f.endswith('__init__.py')]

View File

@@ -0,0 +1,97 @@
import datetime
import plistlib
from pathlib import Path
import json
from resources import network_handler, constants, global_settings
DATE_FORMAT: str = "%Y-%m-%d %H-%M-%S"
ANALYTICS_SERVER: str = ""
SITE_KEY: str = ""
VALID_ENTRIES: dict = {
'KEY': str, # Prevent abuse (embedded at compile time)
'UNIQUE_IDENTITY': str, # Host's UUID as SHA1 hash
'APPLICATION_NAME': str, # ex. OpenCore Legacy Patcher
'APPLICATION_VERSION': str, # ex. 0.2.0
'OS_VERSION': str, # ex. 10.15.7
'MODEL': str, # ex. MacBookPro11,5
'GPUS': list, # ex. ['Intel Iris Pro', 'AMD Radeon R9 M370X']
'FIRMWARE': str, # ex. APPLE
'LOCATION': str, # ex. 'US' (just broad region, don't need to be specific)
'TIMESTAMP': datetime.datetime, # ex. 2021-09-01-12-00-00
}
class Analytics:
def __init__(self, global_constants: constants.Constants) -> None:
self.constants: constants.Constants = global_constants
if global_settings.GlobalEnviromentSettings().read_property("DisableCrashAndAnalyticsReporting") is True:
return
self._generate_base_data()
self._post_data()
def _get_country(self) -> str:
# Get approximate country from .GlobalPreferences.plist
path = "/Library/Preferences/.GlobalPreferences.plist"
if not Path(path).exists():
return "US"
try:
result = plistlib.load(Path(path).open("rb"))
except:
return "US"
if "Country" not in result:
return "US"
return result["Country"]
def _generate_base_data(self) -> None:
self.unique_identity = str(self.constants.computer.uuid_sha1)
self.application = str("OpenCore Legacy Patcher")
self.version = str(self.constants.patcher_version)
self.os = str( self.constants.detected_os_version)
self.model = str(self.constants.computer.real_model)
self.gpus = []
self.firmware = str(self.constants.computer.firmware_vendor)
self.location = str(self._get_country())
for gpu in self.constants.computer.gpus:
self.gpus.append(str(gpu.arch))
self.data = {
'KEY': SITE_KEY,
'UNIQUE_IDENTITY': self.unique_identity,
'APPLICATION_NAME': self.application,
'APPLICATION_VERSION': self.version,
'OS_VERSION': self.os,
'MODEL': self.model,
'GPUS': self.gpus,
'FIRMWARE': self.firmware,
'LOCATION': self.location,
'TIMESTAMP': str(datetime.datetime.now().strftime(DATE_FORMAT)),
}
# convert to JSON:
self.data = json.dumps(self.data)
def _post_data(self) -> None:
# Post data to analytics server
if ANALYTICS_SERVER == "":
return
if SITE_KEY == "":
return
network_handler.NetworkUtilities().post(ANALYTICS_SERVER, json = self.data)

View File

@@ -183,4 +183,4 @@ If you plan to create the USB for another machine, please select the "Change Mod
self.constants.allow_oc_everywhere = True self.constants.allow_oc_everywhere = True
self.constants.serial_settings = "None" self.constants.serial_settings = "None"
build.build_opencore(self.constants.custom_model or self.constants.computer.real_model, self.constants).build_opencore() build.BuildOpenCore(self.constants.custom_model or self.constants.computer.real_model, self.constants)

View File

@@ -1,34 +1,49 @@
# Class for handling Bluetooth Patches, invocation from build.py # Class for handling Bluetooth Patches, invocation from build.py
# Copyright (C) 2020-2022, Dhinak G, Mykola Grymalyuk # Copyright (C) 2020-2023, Dhinak G, Mykola Grymalyuk
import logging
from resources import constants, device_probe from resources import constants, device_probe
from resources.build import support from resources.build import support
from data import smbios_data, bluetooth_data from data import smbios_data, bluetooth_data
import logging
class build_bluetooth: class BuildBluetooth:
"""
Build Library for Bluetooth Support
def __init__(self, model, versions, config): Invoke from build.py
self.model = model """
self.constants: constants.Constants = versions
self.config = config def __init__(self, model: str, global_constants: constants.Constants, config: dict) -> None:
self.computer = self.constants.computer self.model: str = model
self.config: dict = config
self.constants: constants.Constants = global_constants
self.computer: device_probe.Computer = self.constants.computer
self._build()
def build(self): def _build(self) -> None:
# Bluetooth patches """
Kick off Bluetooth Build Process
"""
if not self.constants.custom_model and self.computer.bluetooth_chipset: if not self.constants.custom_model and self.computer.bluetooth_chipset:
self.on_model() self._on_model()
else: else:
self.prebuilt_assumption() self._prebuilt_assumption()
def on_model(self): def _on_model(self) -> None:
"""
On-Model Hardware Detection Handling
"""
if self.computer.bluetooth_chipset in ["BRCM2070 Hub", "BRCM2046 Hub"]: if self.computer.bluetooth_chipset in ["BRCM2070 Hub", "BRCM2046 Hub"]:
logging.info("- Fixing Legacy Bluetooth for macOS Monterey") logging.info("- Fixing Legacy Bluetooth for macOS Monterey")
support.build_support(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("BlueToolFixup.kext", self.constants.bluetool_version, self.constants.bluetool_path)
support.build_support(self.model, self.constants, self.config).enable_kext("Bluetooth-Spoof.kext", self.constants.btspoof_version, self.constants.btspoof_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"]["boot-args"] += " -btlfxallowanyaddr"
elif self.computer.bluetooth_chipset == "BRCM20702 Hub": elif self.computer.bluetooth_chipset == "BRCM20702 Hub":
# BCM94331 can include either BCM2070 or BRCM20702 v1 Bluetooth chipsets # BCM94331 can include either BCM2070 or BRCM20702 v1 Bluetooth chipsets
@@ -37,15 +52,19 @@ class build_bluetooth:
if self.computer.wifi: if self.computer.wifi:
if self.computer.wifi.chipset == device_probe.Broadcom.Chipsets.AirPortBrcm4360: if self.computer.wifi.chipset == device_probe.Broadcom.Chipsets.AirPortBrcm4360:
logging.info("- Fixing Legacy Bluetooth for macOS Monterey") logging.info("- Fixing Legacy Bluetooth for macOS Monterey")
support.build_support(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("BlueToolFixup.kext", self.constants.bluetool_version, self.constants.bluetool_path)
elif self.computer.bluetooth_chipset == "3rd Party Bluetooth 4.0 Hub": elif self.computer.bluetooth_chipset == "3rd Party Bluetooth 4.0 Hub":
logging.info("- Detected 3rd Party Bluetooth Chipset") logging.info("- Detected 3rd Party Bluetooth Chipset")
support.build_support(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("BlueToolFixup.kext", self.constants.bluetool_version, self.constants.bluetool_path)
logging.info("- Enabling Bluetooth FeatureFlags") logging.info("- Enabling Bluetooth FeatureFlags")
self.config["Kernel"]["Quirks"]["ExtendBTFeatureFlags"] = True self.config["Kernel"]["Quirks"]["ExtendBTFeatureFlags"] = True
def prebuilt_assumption(self): def _prebuilt_assumption(self) -> None:
"""
Fall back to pre-built assumptions
"""
if not self.model in smbios_data.smbios_dictionary: if not self.model in smbios_data.smbios_dictionary:
return return
if not "Bluetooth Model" in smbios_data.smbios_dictionary[self.model]: if not "Bluetooth Model" in smbios_data.smbios_dictionary[self.model]:
@@ -53,7 +72,7 @@ class build_bluetooth:
if smbios_data.smbios_dictionary[self.model]["Bluetooth Model"] <= bluetooth_data.bluetooth_data.BRCM20702_v1.value: if smbios_data.smbios_dictionary[self.model]["Bluetooth Model"] <= bluetooth_data.bluetooth_data.BRCM20702_v1.value:
logging.info("- Fixing Legacy Bluetooth for macOS Monterey") logging.info("- Fixing Legacy Bluetooth for macOS Monterey")
support.build_support(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("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: 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"]["boot-args"] += " -btlfxallowanyaddr"
support.build_support(self.model, self.constants, self.config).enable_kext("Bluetooth-Spoof.kext", self.constants.btspoof_version, self.constants.btspoof_path) support.BuildSupport(self.model, self.constants, self.config).enable_kext("Bluetooth-Spoof.kext", self.constants.btspoof_version, self.constants.btspoof_path)

View File

@@ -1,57 +1,69 @@
# Class for generating OpenCore Configurations tailored for Macs # Class for generating OpenCore Configurations tailored for Macs
# Copyright (C) 2020-2022, Dhinak G, Mykola Grymalyuk # Copyright (C) 2020-2023, Dhinak G, Mykola Grymalyuk
import copy import copy
import pickle import pickle
import plistlib import plistlib
import shutil import shutil
import zipfile import zipfile
import logging
from pathlib import Path from pathlib import Path
from datetime import date from datetime import date
import logging
from resources import constants, utilities from resources import constants, utilities
from resources.build import bluetooth, firmware, graphics_audio, support, storage, smbios, security, misc from resources.build import bluetooth, firmware, graphics_audio, support, storage, smbios, security, misc
from resources.build.networking import wired, wireless from resources.build.networking import wired, wireless
def rmtree_handler(func, path, exc_info): def rmtree_handler(func, path, exc_info) -> None:
if exc_info[0] == FileNotFoundError: if exc_info[0] == FileNotFoundError:
return return
raise # pylint: disable=misplaced-bare-raise raise # pylint: disable=misplaced-bare-raise
class build_opencore: class BuildOpenCore:
def __init__(self, model, versions): """
self.model = model Core Build Library for generating and validating OpenCore EFI Configurations
self.config = None compatible with genuine Macs
self.constants: constants.Constants = versions """
def __init__(self, model: str, global_constants: constants.Constants) -> None:
self.model: str = model
self.config: dict = None
self.constants: constants.Constants = global_constants
self._build_opencore()
def build_efi(self): def _build_efi(self) -> None:
"""
Build EFI folder
"""
utilities.cls() utilities.cls()
if not self.constants.custom_model: logging.info(f"Building Configuration {'for external' if self.constants.custom_model else 'on model'}: {self.model}")
logging.info(f"Building Configuration on model: {self.model}")
else:
logging.info(f"Building Configuration for external model: {self.model}")
self.generate_base() self._generate_base()
self.set_revision() self._set_revision()
# Set Lilu and co. # Set Lilu and co.
support.build_support(self.model, self.constants, self.config).enable_kext("Lilu.kext", self.constants.lilu_version, self.constants.lilu_path) 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 self.config["Kernel"]["Quirks"]["DisableLinkeditJettison"] = True
# Call support functions # Call support functions
firmware.build_firmware(self.model, self.constants, self.config).build() for function in [
wired.build_wired(self.model, self.constants, self.config).build() firmware.BuildFirmware,
wireless.build_wireless(self.model, self.constants, self.config).build() wired.BuildWiredNetworking,
graphics_audio.build_graphics_audio(self.model, self.constants, self.config).build() wireless.BuildWirelessNetworking,
bluetooth.build_bluetooth(self.model, self.constants, self.config).build() graphics_audio.BuildGraphicsAudio,
storage.build_storage(self.model, self.constants, self.config).build() bluetooth.BuildBluetooth,
smbios.build_smbios(self.model, self.constants, self.config).build() storage.BuildStorage,
security.build_security(self.model, self.constants, self.config).build() smbios.BuildSMBIOS,
misc.build_misc(self.model, self.constants, self.config).build() security.BuildSecurity,
misc.BuildMiscellaneous
]:
function(self.model, self.constants, self.config)
# Work-around ocvalidate # Work-around ocvalidate
if self.constants.validate is False: if self.constants.validate is False:
@@ -59,8 +71,11 @@ class build_opencore:
self.config["Misc"]["BlessOverride"] += ["\\EFI\\Microsoft\\Boot\\bootmgfw.efi"] self.config["Misc"]["BlessOverride"] += ["\\EFI\\Microsoft\\Boot\\bootmgfw.efi"]
def generate_base(self): def _generate_base(self) -> None:
# Generate OpenCore base folder and config """
Generate OpenCore base folder and config
"""
if not Path(self.constants.build_path).exists(): if not Path(self.constants.build_path).exists():
logging.info("Creating build folder") logging.info("Creating build folder")
Path(self.constants.build_path).mkdir() Path(self.constants.build_path).mkdir()
@@ -85,8 +100,11 @@ class build_opencore:
self.config = plistlib.load(Path(self.constants.plist_path).open("rb")) self.config = plistlib.load(Path(self.constants.plist_path).open("rb"))
def set_revision(self): def _set_revision(self) -> None:
# Set revision in config """
Set revision information in config.plist
"""
self.config["#Revision"]["Build-Version"] = f"{self.constants.patcher_version} - {date.today()}" self.config["#Revision"]["Build-Version"] = f"{self.constants.patcher_version} - {date.today()}"
if not self.constants.custom_model: if not self.constants.custom_model:
self.config["#Revision"]["Build-Type"] = "OpenCore Built on Target Machine" self.config["#Revision"]["Build-Type"] = "OpenCore Built on Target Machine"
@@ -95,31 +113,43 @@ class build_opencore:
self.config["#Revision"]["Hardware-Probe"] = pickle.dumps(computer_copy) self.config["#Revision"]["Hardware-Probe"] = pickle.dumps(computer_copy)
else: else:
self.config["#Revision"]["Build-Type"] = "OpenCore Built for External Machine" self.config["#Revision"]["Build-Type"] = "OpenCore Built for External Machine"
self.config["#Revision"]["OpenCore-Version"] = f"{self.constants.opencore_version} - {self.constants.opencore_build} - {self.constants.opencore_commit}" self.config["#Revision"]["OpenCore-Version"] = f"{self.constants.opencore_version} - {self.constants.opencore_build}"
self.config["#Revision"]["Original-Model"] = self.model self.config["#Revision"]["Original-Model"] = self.model
self.config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["OCLP-Version"] = f"{self.constants.patcher_version}" self.config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["OCLP-Version"] = f"{self.constants.patcher_version}"
self.config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["OCLP-Model"] = self.model self.config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["OCLP-Model"] = self.model
def save_config(self): def _save_config(self) -> None:
"""
Save config.plist to disk
"""
plistlib.dump(self.config, Path(self.constants.plist_path).open("wb"), sort_keys=True) plistlib.dump(self.config, Path(self.constants.plist_path).open("wb"), sort_keys=True)
def build_opencore(self): def _build_opencore(self) -> None:
"""
Kick off the build process
This is the main function:
- Generates the OpenCore configuration
- Cleans working directory
- Signs files
- Validates generated EFI
"""
# Generate OpenCore Configuration # Generate OpenCore Configuration
self.build_efi() self._build_efi()
if self.constants.allow_oc_everywhere is False or self.constants.allow_native_spoofs is True or (self.constants.custom_serial_number != "" and self.constants.custom_board_serial_number != ""): if self.constants.allow_oc_everywhere is False or self.constants.allow_native_spoofs is True or (self.constants.custom_serial_number != "" and self.constants.custom_board_serial_number != ""):
smbios.build_smbios(self.model, self.constants, self.config).set_smbios() smbios.BuildSMBIOS(self.model, self.constants, self.config).set_smbios()
support.build_support(self.model, self.constants, self.config).cleanup() support.BuildSupport(self.model, self.constants, self.config).cleanup()
self.save_config() self._save_config()
# Post-build handling # Post-build handling
support.build_support(self.model, self.constants, self.config).sign_files() support.BuildSupport(self.model, self.constants, self.config).sign_files()
support.build_support(self.model, self.constants, self.config).validate_pathing() support.BuildSupport(self.model, self.constants, self.config).validate_pathing()
logging.info("") logging.info("")
logging.info(f"Your OpenCore EFI for {self.model} has been built at:") logging.info(f"Your OpenCore EFI for {self.model} has been built at:")
logging.info(f" {self.constants.opencore_release_folder}") logging.info(f" {self.constants.opencore_release_folder}")
logging.info("") logging.info("")
if self.constants.gui_mode is False:
input("Press [Enter] to continue\n")

View File

@@ -1,31 +1,50 @@
# Class for handling CPU and Firmware Patches, invocation from build.py # Class for handling CPU and Firmware Patches, invocation from build.py
# Copyright (C) 2020-2022, Dhinak G, Mykola Grymalyuk # Copyright (C) 2020-2023, Dhinak G, Mykola Grymalyuk
from resources import constants, generate_smbios import shutil
import logging
import binascii
from pathlib import Path
from resources import constants, generate_smbios, device_probe
from resources.build import support from resources.build import support
from data import smbios_data, cpu_data from data import smbios_data, cpu_data
import binascii, shutil, logging
from pathlib import Path
class build_firmware: class BuildFirmware:
"""
Build Library for CPU and Firmware Support
def __init__(self, model, versions, config): Invoke from build.py
self.model = model """
self.constants: constants.Constants = versions
self.config = config def __init__(self, model: str, global_constants: constants.Constants, config: dict) -> None:
self.computer = self.constants.computer self.model: str = model
self.config: dict = config
self.constants: constants.Constants = global_constants
self.computer: device_probe.Computer = self.constants.computer
self._build()
def build(self): def _build(self) -> None:
self.cpu_compatibility_handling() """
self.power_management_handling() Kick off CPU and Firmware Build Process
self.acpi_handling() """
self.firmware_driver_handling()
self.firmware_compatibility_handling() self._cpu_compatibility_handling()
self._power_management_handling()
self._acpi_handling()
self._firmware_driver_handling()
self._firmware_compatibility_handling()
def power_management_handling(self): def _power_management_handling(self) -> None:
"""
Power Management Handling
"""
if not self.model in smbios_data.smbios_dictionary: if not self.model in smbios_data.smbios_dictionary:
return return
if not "CPU Generation" in smbios_data.smbios_dictionary[self.model]: if not "CPU Generation" in smbios_data.smbios_dictionary[self.model]:
@@ -51,28 +70,32 @@ class build_firmware:
# #
# To resolve, we patched AICPUPM to attach regardless of the value of 'intel_cpupm_matching' # To resolve, we patched AICPUPM to attach regardless of the value of 'intel_cpupm_matching'
logging.info("- Enabling legacy power management support") logging.info("- Enabling legacy power management support")
support.build_support(self.model, self.constants, self.config).enable_kext("AppleIntelCPUPowerManagement.kext", self.constants.aicpupm_version, self.constants.aicpupm_path) support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleIntelCPUPowerManagement.kext", self.constants.aicpupm_version, self.constants.aicpupm_path)
support.build_support(self.model, self.constants, self.config).enable_kext("AppleIntelCPUPowerManagementClient.kext", self.constants.aicpupm_version, self.constants.aicpupm_client_path) support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleIntelCPUPowerManagementClient.kext", self.constants.aicpupm_version, self.constants.aicpupm_client_path)
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.sandy_bridge.value or self.constants.disable_xcpm is True: if smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.sandy_bridge.value or self.constants.disable_fw_throttle is True:
# With macOS 12.3 Beta 1, Apple dropped the 'plugin-type' check within X86PlatformPlugin # With macOS 12.3 Beta 1, Apple dropped the 'plugin-type' check within X86PlatformPlugin
# Because of this, X86PP will match onto the CPU instead of ACPI_SMC_PlatformPlugin # Because of this, X86PP will match onto the CPU instead of ACPI_SMC_PlatformPlugin
# This causes power management to break on pre-Ivy Bridge CPUs as they don't have correct # This causes power management to break on pre-Ivy Bridge CPUs as they don't have correct
# power management tables provided. # power management tables provided.
# This patch will simply increase ASPP's 'IOProbeScore' to outmatch X86PP # This patch will simply increase ASPP's 'IOProbeScore' to outmatch X86PP
logging.info("- Overriding ACPI SMC matching") logging.info("- Overriding ACPI SMC matching")
support.build_support(self.model, self.constants, self.config).enable_kext("ASPP-Override.kext", self.constants.aspp_override_version, self.constants.aspp_override_path) support.BuildSupport(self.model, self.constants, self.config).enable_kext("ASPP-Override.kext", self.constants.aspp_override_version, self.constants.aspp_override_path)
if self.constants.disable_xcpm is True: if self.constants.disable_fw_throttle is True:
# Only inject on older OSes if user requests # Only inject on older OSes if user requests
support.build_support(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Add"], "BundlePath", "ASPP-Override.kext")["MinKernel"] = "" support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Add"], "BundlePath", "ASPP-Override.kext")["MinKernel"] = ""
if self.constants.disable_msr_power_ctl is True and smbios_data.smbios_dictionary[self.model]["CPU Generation"] >= cpu_data.cpu_data.nehalem.value: if self.constants.disable_fw_throttle is True and smbios_data.smbios_dictionary[self.model]["CPU Generation"] >= cpu_data.cpu_data.nehalem.value:
logging.info("- Disabling Firmware Throttling") logging.info("- Disabling Firmware Throttling")
# Nehalem and newer systems force firmware throttling via MSR_POWER_CTL # Nehalem and newer systems force firmware throttling via MSR_POWER_CTL
support.build_support(self.model, self.constants, self.config).enable_kext("SimpleMSR.kext", self.constants.simplemsr_version, self.constants.simplemsr_path) support.BuildSupport(self.model, self.constants, self.config).enable_kext("SimpleMSR.kext", self.constants.simplemsr_version, self.constants.simplemsr_path)
def acpi_handling(self): def _acpi_handling(self) -> None:
"""
ACPI Table Handling
"""
if not self.model in smbios_data.smbios_dictionary: if not self.model in smbios_data.smbios_dictionary:
return return
if not "CPU Generation" in smbios_data.smbios_dictionary[self.model]: if not "CPU Generation" in smbios_data.smbios_dictionary[self.model]:
@@ -83,19 +106,23 @@ class build_firmware:
# IOPCIFamily will error when enumerating this device, thus we'll power it off via _STA (has no effect in older OSes) # IOPCIFamily will error when enumerating this device, thus we'll power it off via _STA (has no effect in older OSes)
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] == cpu_data.cpu_data.nehalem.value and not (self.model.startswith("MacPro") or self.model.startswith("Xserve")): if smbios_data.smbios_dictionary[self.model]["CPU Generation"] == cpu_data.cpu_data.nehalem.value and not (self.model.startswith("MacPro") or self.model.startswith("Xserve")):
logging.info("- Adding SSDT-CPBG.aml") logging.info("- Adding SSDT-CPBG.aml")
support.build_support(self.model, self.constants, self.config).get_item_by_kv(self.config["ACPI"]["Add"], "Path", "SSDT-CPBG.aml")["Enabled"] = True support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["ACPI"]["Add"], "Path", "SSDT-CPBG.aml")["Enabled"] = True
shutil.copy(self.constants.pci_ssdt_path, self.constants.acpi_path) shutil.copy(self.constants.pci_ssdt_path, self.constants.acpi_path)
if cpu_data.cpu_data.sandy_bridge <= smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.ivy_bridge.value and self.model != "MacPro6,1": if cpu_data.cpu_data.sandy_bridge <= smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.ivy_bridge.value and self.model != "MacPro6,1":
# Based on: https://egpu.io/forums/pc-setup/fix-dsdt-override-to-correct-error-12/ # Based on: https://egpu.io/forums/pc-setup/fix-dsdt-override-to-correct-error-12/
# Applicable for Sandy and Ivy Bridge Macs # Applicable for Sandy and Ivy Bridge Macs
logging.info("- Enabling Windows 10 UEFI Audio support") logging.info("- Enabling Windows 10 UEFI Audio support")
support.build_support(self.model, self.constants, self.config).get_item_by_kv(self.config["ACPI"]["Add"], "Path", "SSDT-PCI.aml")["Enabled"] = True support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["ACPI"]["Add"], "Path", "SSDT-PCI.aml")["Enabled"] = True
support.build_support(self.model, self.constants, self.config).get_item_by_kv(self.config["ACPI"]["Patch"], "Comment", "BUF0 to BUF1")["Enabled"] = True support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["ACPI"]["Patch"], "Comment", "BUF0 to BUF1")["Enabled"] = True
shutil.copy(self.constants.windows_ssdt_path, self.constants.acpi_path) shutil.copy(self.constants.windows_ssdt_path, self.constants.acpi_path)
def cpu_compatibility_handling(self): def _cpu_compatibility_handling(self) -> None:
"""
CPU Compatibility Handling
"""
if not self.model in smbios_data.smbios_dictionary: if not self.model in smbios_data.smbios_dictionary:
return return
if not "CPU Generation" in smbios_data.smbios_dictionary[self.model]: if not "CPU Generation" in smbios_data.smbios_dictionary[self.model]:
@@ -104,14 +131,14 @@ class build_firmware:
# SSE4,1 support (ie. Penryn) # SSE4,1 support (ie. Penryn)
# Required for macOS Mojave and newer # Required for macOS Mojave and newer
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.penryn.value: if smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.penryn.value:
support.build_support(self.model, self.constants, self.config).enable_kext("AAAMouSSE.kext", self.constants.mousse_version, self.constants.mousse_path) support.BuildSupport(self.model, self.constants, self.config).enable_kext("AAAMouSSE.kext", self.constants.mousse_version, self.constants.mousse_path)
support.build_support(self.model, self.constants, self.config).enable_kext("telemetrap.kext", self.constants.telemetrap_version, self.constants.telemetrap_path) support.BuildSupport(self.model, self.constants, self.config).enable_kext("telemetrap.kext", self.constants.telemetrap_version, self.constants.telemetrap_path)
# Force Rosetta Cryptex installation in macOS Ventura # Force Rosetta Cryptex installation in macOS Ventura
# Restores support for CPUs lacking AVX2.0 support # Restores support for CPUs lacking AVX2.0 support
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.ivy_bridge.value: if smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.ivy_bridge.value:
logging.info("- Enabling Rosetta Cryptex support in Ventura") logging.info("- Enabling Rosetta Cryptex support in Ventura")
support.build_support(self.model, self.constants, self.config).enable_kext("CryptexFixup.kext", self.constants.cryptexfixup_version, self.constants.cryptexfixup_path) support.BuildSupport(self.model, self.constants, self.config).enable_kext("CryptexFixup.kext", self.constants.cryptexfixup_version, self.constants.cryptexfixup_path)
# i3 Ivy Bridge iMacs don't support RDRAND # i3 Ivy Bridge iMacs don't support RDRAND
# However for prebuilt, assume they do # However for prebuilt, assume they do
@@ -120,14 +147,14 @@ class build_firmware:
# Ref: https://github.com/reenigneorcim/SurPlus # Ref: https://github.com/reenigneorcim/SurPlus
# Enable for all systems missing RDRAND support # Enable for all systems missing RDRAND support
logging.info("- Adding SurPlus Patch for Race Condition") logging.info("- Adding SurPlus Patch for Race Condition")
support.build_support(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Patch"], "Comment", "SurPlus v1 - PART 1 of 2 - Patch read_erandom (inlined in _early_random)")["Enabled"] = True support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Patch"], "Comment", "SurPlus v1 - PART 1 of 2 - Patch read_erandom (inlined in _early_random)")["Enabled"] = True
support.build_support(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Patch"], "Comment", "SurPlus v1 - PART 2 of 2 - Patch register_and_init_prng")["Enabled"] = True support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Patch"], "Comment", "SurPlus v1 - PART 2 of 2 - Patch register_and_init_prng")["Enabled"] = True
if self.constants.force_surplus is True: if self.constants.force_surplus is True:
# Syncretic forces SurPlus to only run on Beta 7 and older by default for saftey reasons # Syncretic forces SurPlus to only run on Beta 7 and older by default for saftey reasons
# If users desires, allow forcing in newer OSes # If users desires, allow forcing in newer OSes
logging.info("- Allowing SurPlus on all newer OSes") logging.info("- Allowing SurPlus on all newer OSes")
support.build_support(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Patch"], "Comment", "SurPlus v1 - PART 1 of 2 - Patch read_erandom (inlined in _early_random)")["MaxKernel"] = "" support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Patch"], "Comment", "SurPlus v1 - PART 1 of 2 - Patch read_erandom (inlined in _early_random)")["MaxKernel"] = ""
support.build_support(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Patch"], "Comment", "SurPlus v1 - PART 2 of 2 - Patch register_and_init_prng")["MaxKernel"] = "" support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Patch"], "Comment", "SurPlus v1 - PART 2 of 2 - Patch register_and_init_prng")["MaxKernel"] = ""
# In macOS 12.4 and 12.5 Beta 1, Apple added AVX1.0 usage in AppleFSCompressionTypeZlib # In macOS 12.4 and 12.5 Beta 1, Apple added AVX1.0 usage in AppleFSCompressionTypeZlib
# Pre-Sandy Bridge CPUs don't support AVX1.0, thus we'll downgrade the kext to 12.3.1's # Pre-Sandy Bridge CPUs don't support AVX1.0, thus we'll downgrade the kext to 12.3.1's
@@ -138,17 +165,20 @@ class build_firmware:
# To verify the non-AVX kext is used, check IOService for 'com_apple_AppleFSCompression_NoAVXCompressionTypeZlib' # To verify the non-AVX kext is used, check IOService for 'com_apple_AppleFSCompression_NoAVXCompressionTypeZlib'
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] < cpu_data.cpu_data.sandy_bridge.value: if smbios_data.smbios_dictionary[self.model]["CPU Generation"] < cpu_data.cpu_data.sandy_bridge.value:
support.build_support(self.model, self.constants, self.config).enable_kext("NoAVXFSCompressionTypeZlib.kext", self.constants.apfs_zlib_version, self.constants.apfs_zlib_path) support.BuildSupport(self.model, self.constants, self.config).enable_kext("NoAVXFSCompressionTypeZlib.kext", self.constants.apfs_zlib_version, self.constants.apfs_zlib_path)
support.build_support(self.model, self.constants, self.config).enable_kext("NoAVXFSCompressionTypeZlib-AVXpel.kext", self.constants.apfs_zlib_v2_version, self.constants.apfs_zlib_v2_path) support.BuildSupport(self.model, self.constants, self.config).enable_kext("NoAVXFSCompressionTypeZlib-AVXpel.kext", self.constants.apfs_zlib_v2_version, self.constants.apfs_zlib_v2_path)
# HID patches # HID patches
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.penryn.value: if smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.penryn.value:
logging.info("- Adding IOHIDFamily patch") logging.info("- Adding IOHIDFamily patch")
support.build_support(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Patch"], "Identifier", "com.apple.iokit.IOHIDFamily")["Enabled"] = True support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Patch"], "Identifier", "com.apple.iokit.IOHIDFamily")["Enabled"] = True
def firmware_driver_handling(self): def _firmware_driver_handling(self) -> None:
# Firmware Drivers (Drivers/*.efi) """
Firmware Driver Handling (Drivers/*.efi)
"""
if not self.model in smbios_data.smbios_dictionary: if not self.model in smbios_data.smbios_dictionary:
return return
if not "CPU Generation" in smbios_data.smbios_dictionary[self.model]: if not "CPU Generation" in smbios_data.smbios_dictionary[self.model]:
@@ -159,13 +189,13 @@ class build_firmware:
# Sandy Bridge and newer Macs natively support ExFat # Sandy Bridge and newer Macs natively support ExFat
logging.info("- Adding ExFatDxeLegacy.efi") logging.info("- Adding ExFatDxeLegacy.efi")
shutil.copy(self.constants.exfat_legacy_driver_path, self.constants.drivers_path) shutil.copy(self.constants.exfat_legacy_driver_path, self.constants.drivers_path)
support.build_support(self.model, self.constants, self.config).get_efi_binary_by_path("ExFatDxeLegacy.efi", "UEFI", "Drivers")["Enabled"] = True support.BuildSupport(self.model, self.constants, self.config).get_efi_binary_by_path("ExFatDxeLegacy.efi", "UEFI", "Drivers")["Enabled"] = True
# NVMe check # NVMe check
if self.constants.nvme_boot is True: if self.constants.nvme_boot is True:
logging.info("- Enabling NVMe boot support") logging.info("- Enabling NVMe boot support")
shutil.copy(self.constants.nvme_driver_path, self.constants.drivers_path) shutil.copy(self.constants.nvme_driver_path, self.constants.drivers_path)
support.build_support(self.model, self.constants, self.config).get_efi_binary_by_path("NvmExpressDxe.efi", "UEFI", "Drivers")["Enabled"] = True support.BuildSupport(self.model, self.constants, self.config).get_efi_binary_by_path("NvmExpressDxe.efi", "UEFI", "Drivers")["Enabled"] = True
# USB check # USB check
if self.constants.xhci_boot is True: if self.constants.xhci_boot is True:
@@ -173,30 +203,45 @@ class build_firmware:
logging.info("- Adding XhciDxe.efi and UsbBusDxe.efi") logging.info("- Adding XhciDxe.efi and UsbBusDxe.efi")
shutil.copy(self.constants.xhci_driver_path, self.constants.drivers_path) shutil.copy(self.constants.xhci_driver_path, self.constants.drivers_path)
shutil.copy(self.constants.usb_bus_driver_path, self.constants.drivers_path) shutil.copy(self.constants.usb_bus_driver_path, self.constants.drivers_path)
support.build_support(self.model, self.constants, self.config).get_efi_binary_by_path("XhciDxe.efi", "UEFI", "Drivers")["Enabled"] = True support.BuildSupport(self.model, self.constants, self.config).get_efi_binary_by_path("XhciDxe.efi", "UEFI", "Drivers")["Enabled"] = True
support.build_support(self.model, self.constants, self.config).get_efi_binary_by_path("UsbBusDxe.efi", "UEFI", "Drivers")["Enabled"] = True support.BuildSupport(self.model, self.constants, self.config).get_efi_binary_by_path("UsbBusDxe.efi", "UEFI", "Drivers")["Enabled"] = True
# PCIe Link Rate check # PCIe Link Rate check
if self.model == "MacPro3,1": if self.model == "MacPro3,1":
logging.info("- Adding PCIe Link Rate Patch") logging.info("- Adding PCIe Link Rate Patch")
shutil.copy(self.constants.link_rate_driver_path, self.constants.drivers_path) shutil.copy(self.constants.link_rate_driver_path, self.constants.drivers_path)
support.build_support(self.model, self.constants, self.config).get_efi_binary_by_path("FixPCIeLinkRate.efi", "UEFI", "Drivers")["Enabled"] = True support.BuildSupport(self.model, self.constants, self.config).get_efi_binary_by_path("FixPCIeLinkRate.efi", "UEFI", "Drivers")["Enabled"] = True
def firmware_compatibility_handling(self): def _firmware_compatibility_handling(self) -> None:
self.dual_dp_handling() """
Firmware Compatibility Handling (Firmware and Kernel)
"""
# Force VMM as a temporary solution to getting the MacPro6,1 booting in Ventura self._dual_dp_handling()
# With macOS Ventura, Apple removed AppleIntelCPUPowerManagement.kext and assumed XCPM support across all Macs
# This change resulted in broken OS booting as the machine had no power management support # Patches IOPCIConfigurator.cpp's IOPCIIsHotplugPort to skip configRead16/32 calls
# Currently the AICPUPM fix is not fully functional, thus forcing VMM is a temporary solution # Credit to CaseySJ for original discovery:
# Waiting for XNU source to be released to fix this properly # - Patch: https://github.com/AMD-OSX/AMD_Vanilla/pull/196
# Ref: https://forums.macrumors.com/threads/opencore-on-the-mac-pro.2207814/ # - Source: https://github.com/apple-oss-distributions/IOPCIFamily/blob/main/IOPCIConfigurator.cpp#L968-L1022
if self.model in ["MacPro6,1", "iMac7,1", "iMac8,1", "MacBookPro4,1"] or self.constants.set_vmm_cpuid is True: #
# Currently all pre-Sandy Bridge Macs lacking an iGPU benefit from this patch as well as MacPro6,1
# Otherwise some graphics hardware will fail to wake, macOS will misreport hardware as ExpressCard-based,
# prevents MacPro6,1 from both booting unaccelerated and breaks low power states.
if (
self.model in ["MacPro6,1", "MacBookPro4,1"] or
(
smbios_data.smbios_dictionary[self.model]["CPU Generation"] < cpu_data.cpu_data.sandy_bridge.value and \
not self.model.startswith("MacBook")
)
):
logging.info("- Adding PCI Bus Enumeration Patch")
support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Patch"], "Comment", "CaseySJ - Fix PCI bus enumeration")["Enabled"] = True
if self.constants.set_vmm_cpuid is True:
logging.info("- Enabling VMM patch") logging.info("- Enabling VMM patch")
self.config["Kernel"]["Emulate"]["Cpuid1Data"] = binascii.unhexlify("00000000000000000000008000000000") self.config["Kernel"]["Emulate"]["Cpuid1Data"] = binascii.unhexlify("00000000000000000000008000000000")
self.config["Kernel"]["Emulate"]["Cpuid1Mask"] = binascii.unhexlify("00000000000000000000008000000000") self.config["Kernel"]["Emulate"]["Cpuid1Mask"] = binascii.unhexlify("00000000000000000000008000000000")
self.config["Kernel"]["Emulate"]["MinKernel"] = "22.0.0"
if ( if (
self.model.startswith("MacBook") self.model.startswith("MacBook")
@@ -228,21 +273,24 @@ class build_firmware:
if self.model not in affected_smbios: if self.model not in affected_smbios:
# If MacPro6,1 host spoofs, we can safely enable it # If MacPro6,1 host spoofs, we can safely enable it
if self.constants.override_smbios in affected_smbios or generate_smbios.set_smbios_model_spoof(self.model) in affected_smbios: if self.constants.override_smbios in affected_smbios or generate_smbios.set_smbios_model_spoof(self.model) in affected_smbios:
support.build_support(self.model, self.constants, self.config).enable_kext("AppleMCEReporterDisabler.kext", self.constants.mce_version, self.constants.mce_path) support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleMCEReporterDisabler.kext", self.constants.mce_version, self.constants.mce_path)
def dual_dp_handling(self): def _dual_dp_handling(self) -> None:
# Check if model has 5K display """
# Apple has 2 modes for display handling on 5K iMacs and iMac Pro Dual DisplayPort Stream Handler (ex. 5k iMac)
# If at any point in the boot chain an "unsupported" entry is loaded, the firmware will tell the
# Display Controller to enter a 4K compatible mode that only uses a single DisplayPort 1.2 stream internally.
# This is to prevent situations where the system would boot into an enviroment that cannot handle the custom
# dual DisplayPort 1.2 streams the 5k Display uses
# To work around this issue, we trick the firmware into loading OpenCore through Apple's Hardware Diagnostic Tests Apple has 2 modes for display handling on 5K iMacs and iMac Pro
# Specifically hiding as Product.efi under '/System/Library/CoreServices/.diagnostics/Drivers/HardwareDrivers/Product.efi' If at any point in the boot chain an "unsupported" entry is loaded, the firmware will tell the
# The reason chainloading via ./Drivers/HardwareDrivers is possible is thanks to it being loaded via an encrypted file buffer Display Controller to enter a 4K compatible mode that only uses a single DisplayPort 1.2 stream internally.
# whereas other drivers like ./qa_logger.efi is invoked via Device Path. This is to prevent situations where the system would boot into an enviroment that cannot handle the custom
dual DisplayPort 1.2 streams the 5k Display uses
To work around this issue, we trick the firmware into loading OpenCore through Apple's Hardware Diagnostic Tests
Specifically hiding as Product.efi under '/System/Library/CoreServices/.diagnostics/Drivers/HardwareDrivers/Product.efi'
The reason chainloading via ./Drivers/HardwareDrivers is possible is thanks to it being loaded via an encrypted file buffer
whereas other drivers like ./qa_logger.efi is invoked via Device Path.
"""
if "5K Display" not in smbios_data.smbios_dictionary[self.model]: if "5K Display" not in smbios_data.smbios_dictionary[self.model]:
return return

View File

@@ -1,7 +1,9 @@
# Class for handling Graphics and Audio Patches, invocation from build.py # Class for handling Graphics and Audio Patches, invocation from build.py
# Copyright (C) 2020-2022, Dhinak G, Mykola Grymalyuk # Copyright (C) 2020-2023, Dhinak G, Mykola Grymalyuk
import shutil, binascii, logging import shutil
import logging
import binascii
from pathlib import Path from pathlib import Path
@@ -10,30 +12,47 @@ from resources.build import support
from data import smbios_data, model_array, os_data, cpu_data, video_bios_data from data import smbios_data, model_array, os_data, cpu_data, video_bios_data
class build_graphics_audio: class BuildGraphicsAudio:
"""
Build Library for Graphics and Audio Support
def __init__(self, model, versions, config): Invoke from build.py
self.model = model """
self.constants: constants.Constants = versions
self.config = config def __init__(self, model: str, global_constants: constants.Constants, config: dict) -> None:
self.computer = self.constants.computer self.model: str = model
self.config: dict = config
self.constants: constants.Constants = global_constants
self.computer: device_probe.Computer = self.constants.computer
self.gfx0_path = None self.gfx0_path = None
self._build()
def build(self):
self.imac_mxm_patching()
self.graphics_handling()
self.audio_handling()
self.firmware_handling()
self.spoof_handling()
self.ioaccel_workaround()
def graphics_handling(self): def _build(self) -> None:
"""
Kick off Graphics and Audio Build Process
"""
self._imac_mxm_patching()
self._graphics_handling()
self._audio_handling()
self._firmware_handling()
self._spoof_handling()
self._ioaccel_workaround()
def _graphics_handling(self) -> None:
"""
Graphics Handling
Primarily for Mac Pros and systems with Nvidia Maxwell/Pascal GPUs
"""
if self.constants.allow_oc_everywhere is False and self.constants.serial_settings != "None": if self.constants.allow_oc_everywhere is False and self.constants.serial_settings != "None":
if not support.build_support(self.model, self.constants, self.config).get_kext_by_bundle_path("WhateverGreen.kext")["Enabled"] is True: if not support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("WhateverGreen.kext")["Enabled"] is True:
support.build_support(self.model, self.constants, self.config).enable_kext("WhateverGreen.kext", self.constants.whatevergreen_version, self.constants.whatevergreen_path) support.BuildSupport(self.model, self.constants, self.config).enable_kext("WhateverGreen.kext", self.constants.whatevergreen_version, self.constants.whatevergreen_path)
# Mac Pro handling # Mac Pro handling
if self.model in model_array.MacPro: if self.model in model_array.MacPro:
@@ -77,8 +96,8 @@ class build_graphics_audio:
logging.info("- Adding Mac Pro, Xserve DRM patches") logging.info("- Adding Mac Pro, Xserve DRM patches")
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " shikigva=128 unfairgva=1 -wegtree" self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " shikigva=128 unfairgva=1 -wegtree"
if not support.build_support(self.model, self.constants, self.config).get_kext_by_bundle_path("WhateverGreen.kext")["Enabled"] is True: if not support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("WhateverGreen.kext")["Enabled"] is True:
support.build_support(self.model, self.constants, self.config).enable_kext("WhateverGreen.kext", self.constants.whatevergreen_version, self.constants.whatevergreen_path) support.BuildSupport(self.model, self.constants, self.config).enable_kext("WhateverGreen.kext", self.constants.whatevergreen_version, self.constants.whatevergreen_path)
# Web Driver specific # Web Driver specific
if not self.constants.custom_model: if not self.constants.custom_model:
@@ -94,23 +113,23 @@ class build_graphics_audio:
self.config["DeviceProperties"]["Add"][device.pci_path].update({"disable-metal": 1, "force-compat": 1}) self.config["DeviceProperties"]["Add"][device.pci_path].update({"disable-metal": 1, "force-compat": 1})
else: else:
self.config["DeviceProperties"]["Add"][device.pci_path] = {"disable-metal": 1, "force-compat": 1} self.config["DeviceProperties"]["Add"][device.pci_path] = {"disable-metal": 1, "force-compat": 1}
support.build_support(self.model, self.constants, self.config).enable_kext("WhateverGreen.kext", self.constants.whatevergreen_version, self.constants.whatevergreen_path) support.BuildSupport(self.model, self.constants, self.config).enable_kext("WhateverGreen.kext", self.constants.whatevergreen_version, self.constants.whatevergreen_path)
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"].update({"nvda_drv": binascii.unhexlify("31")}) self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"].update({"nvda_drv": binascii.unhexlify("31")})
if "nvda_drv" not in self.config["NVRAM"]["Delete"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]: if "nvda_drv" not in self.config["NVRAM"]["Delete"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]:
self.config["NVRAM"]["Delete"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"] += ["nvda_drv"] self.config["NVRAM"]["Delete"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"] += ["nvda_drv"]
else: else:
if "ngfxgl=1 ngfxcompat=1" not in self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"]: if "ngfxgl=1 ngfxcompat=1" not in self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"]:
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " ngfxgl=1 ngfxcompat=1" self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " ngfxgl=1 ngfxcompat=1"
support.build_support(self.model, self.constants, self.config).enable_kext("WhateverGreen.kext", self.constants.whatevergreen_version, self.constants.whatevergreen_path) support.BuildSupport(self.model, self.constants, self.config).enable_kext("WhateverGreen.kext", self.constants.whatevergreen_version, self.constants.whatevergreen_path)
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"].update({"nvda_drv": binascii.unhexlify("31")}) self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"].update({"nvda_drv": binascii.unhexlify("31")})
if "nvda_drv" not in self.config["NVRAM"]["Delete"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]: if "nvda_drv" not in self.config["NVRAM"]["Delete"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]:
self.config["NVRAM"]["Delete"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"] += ["nvda_drv"] self.config["NVRAM"]["Delete"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"] += ["nvda_drv"]
def backlight_path_detection(self): def _backlight_path_detection(self) -> None:
"""
iMac MXM dGPU Backlight DevicePath Detection
"""
# self.constants.custom_model: iMac has been modded with new dGPU
# self.computer.dgpu: dGPU has been found using the GFX0 path
# self.computer.dgpu.pci_path:
if not self.constants.custom_model and self.computer.dgpu and self.computer.dgpu.pci_path: if not self.constants.custom_model and self.computer.dgpu and self.computer.dgpu.pci_path:
for i, device in enumerate(self.computer.gpus): for i, device in enumerate(self.computer.gpus):
logging.info(f"- Found dGPU ({i + 1}): {utilities.friendly_hex(device.vendor_id)}:{utilities.friendly_hex(device.device_id)}") logging.info(f"- Found dGPU ({i + 1}): {utilities.friendly_hex(device.vendor_id)}:{utilities.friendly_hex(device.device_id)}")
@@ -138,16 +157,20 @@ class build_graphics_audio:
logging.info("- Failed to find GFX0 Device path, falling back on known logic") logging.info("- Failed to find GFX0 Device path, falling back on known logic")
if self.model in ["iMac11,1", "iMac11,3"]: if self.model in ["iMac11,1", "iMac11,3"]:
self.gfx0_path = "PciRoot(0x0)/Pci(0x3,0x0)/Pci(0x0,0x0)" self.gfx0_path = "PciRoot(0x0)/Pci(0x3,0x0)/Pci(0x0,0x0)"
elif self.model == "iMac10,1": elif self.model in ["iMac9,1", "iMac10,1"]:
self.gfx0_path = "PciRoot(0x0)/Pci(0xc,0x0)/Pci(0x0,0x0)" self.gfx0_path = "PciRoot(0x0)/Pci(0xc,0x0)/Pci(0x0,0x0)"
else: else:
self.gfx0_path = "PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)" self.gfx0_path = "PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)"
def nvidia_mxm_patch(self, backlight_path): def _nvidia_mxm_patch(self, backlight_path) -> None:
if not support.build_support(self.model, self.constants, self.config).get_kext_by_bundle_path("WhateverGreen.kext")["Enabled"] is True: """
iMac Nvidia Kepler MXM Handler
"""
if not support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("WhateverGreen.kext")["Enabled"] is True:
# Ensure WEG is enabled as we need if for Backlight patching # Ensure WEG is enabled as we need if for Backlight patching
support.build_support(self.model, self.constants, self.config).enable_kext("WhateverGreen.kext", self.constants.whatevergreen_navi_version, self.constants.whatevergreen_navi_path) support.BuildSupport(self.model, self.constants, self.config).enable_kext("WhateverGreen.kext", self.constants.whatevergreen_navi_version, self.constants.whatevergreen_navi_path)
if self.model in ["iMac11,1", "iMac11,2", "iMac11,3", "iMac10,1"]: if self.model in ["iMac11,1", "iMac11,2", "iMac11,3", "iMac10,1"]:
logging.info("- Adding Nvidia Brightness Control and DRM patches") logging.info("- Adding Nvidia Brightness Control and DRM patches")
self.config["DeviceProperties"]["Add"][backlight_path] = { self.config["DeviceProperties"]["Add"][backlight_path] = {
@@ -182,16 +205,24 @@ class build_graphics_audio:
"class-code": binascii.unhexlify("FFFFFFFF"), "class-code": binascii.unhexlify("FFFFFFFF"),
} }
shutil.copy(self.constants.backlight_injector_path, self.constants.kexts_path) shutil.copy(self.constants.backlight_injector_path, self.constants.kexts_path)
support.build_support(self.model, self.constants, self.config).get_kext_by_bundle_path("BacklightInjector.kext")["Enabled"] = True support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("BacklightInjector.kext")["Enabled"] = True
self.config["UEFI"]["Quirks"]["ForgeUefiSupport"] = True self.config["UEFI"]["Quirks"]["ForgeUefiSupport"] = True
self.config["UEFI"]["Quirks"]["ReloadOptionRoms"] = True self.config["UEFI"]["Quirks"]["ReloadOptionRoms"] = True
def amd_mxm_patch(self, backlight_path): def _amd_mxm_patch(self, backlight_path) -> None:
"""
iMac AMD GCN and Navi MXM Handler
"""
logging.info("- Adding AMD DRM patches") logging.info("- Adding AMD DRM patches")
if not support.build_support(self.model, self.constants, self.config).get_kext_by_bundle_path("WhateverGreen.kext")["Enabled"] is True: if not support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("WhateverGreen.kext")["Enabled"] is True:
# Ensure WEG is enabled as we need if for Backlight patching # Ensure WEG is enabled as we need if for Backlight patching
support.build_support(self.model, self.constants, self.config).enable_kext("WhateverGreen.kext", self.constants.whatevergreen_navi_version, self.constants.whatevergreen_navi_path) support.BuildSupport(self.model, self.constants, self.config).enable_kext("WhateverGreen.kext", self.constants.whatevergreen_navi_version, self.constants.whatevergreen_navi_path)
if self.model == "iMac9,1":
logging.info("- Adding iMac9,1 Brightness Control and DRM patches")
support.BuildSupport(self.model, self.constants, self.config).enable_kext("BacklightInjector.kext", self.constants.backlight_injectorA_version, self.constants.backlight_injectorA_path)
if not self.constants.custom_model: if not self.constants.custom_model:
if self.computer.dgpu.device_id == 0x7340: if self.computer.dgpu.device_id == 0x7340:
@@ -217,8 +248,8 @@ class build_graphics_audio:
"name": binascii.unhexlify("23646973706C6179"), "name": binascii.unhexlify("23646973706C6179"),
"class-code": binascii.unhexlify("FFFFFFFF"), "class-code": binascii.unhexlify("FFFFFFFF"),
} }
elif self.model == "iMac10,1": elif self.model in ["iMac9,1", "iMac10,1"]:
support.build_support(self.model, self.constants, self.config).enable_kext("AAAMouSSE.kext", self.constants.mousse_version, self.constants.mousse_path) support.BuildSupport(self.model, self.constants, self.config).enable_kext("AAAMouSSE.kext", self.constants.mousse_version, self.constants.mousse_path)
if self.computer and self.computer.dgpu: if self.computer and self.computer.dgpu:
if self.computer.dgpu.arch == device_probe.AMD.Archs.Legacy_GCN_7000: if self.computer.dgpu.arch == device_probe.AMD.Archs.Legacy_GCN_7000:
logging.info("- Adding Legacy GCN Power Gate Patches") logging.info("- Adding Legacy GCN Power Gate Patches")
@@ -228,7 +259,7 @@ class build_graphics_audio:
"CAIL,CAIL_DisableUVDPowerGating": 1, "CAIL,CAIL_DisableUVDPowerGating": 1,
"CAIL,CAIL_DisableVCEPowerGating": 1, "CAIL,CAIL_DisableVCEPowerGating": 1,
}) })
if self.constants.imac_model == "Legacy GCN": if self.constants.imac_model == "GCN":
logging.info("- Adding Legacy GCN Power Gate Patches") logging.info("- Adding Legacy GCN Power Gate Patches")
self.config["DeviceProperties"]["Add"][backlight_path].update({ self.config["DeviceProperties"]["Add"][backlight_path].update({
"CAIL,CAIL_DisableDrmdmaPowerGating": 1, "CAIL,CAIL_DisableDrmdmaPowerGating": 1,
@@ -243,7 +274,7 @@ class build_graphics_audio:
"CAIL,CAIL_DisableUVDPowerGating": 1, "CAIL,CAIL_DisableUVDPowerGating": 1,
"CAIL,CAIL_DisableVCEPowerGating": 1, "CAIL,CAIL_DisableVCEPowerGating": 1,
}) })
elif self.constants.imac_model == "AMD Lexa": elif self.constants.imac_model == "Lexa":
logging.info("- Adding Lexa Spoofing Patches") logging.info("- Adding Lexa Spoofing Patches")
self.config["DeviceProperties"]["Add"][backlight_path].update({ self.config["DeviceProperties"]["Add"][backlight_path].update({
"model": "AMD Radeon Pro WX 3200", "model": "AMD Radeon Pro WX 3200",
@@ -254,7 +285,7 @@ class build_graphics_audio:
"model": "AMD Radeon Pro WX 3200", "model": "AMD Radeon Pro WX 3200",
"device-id": binascii.unhexlify("FF67"), "device-id": binascii.unhexlify("FF67"),
}) })
elif self.constants.imac_model == "AMD Navi": elif self.constants.imac_model == "Navi":
logging.info("- Adding Navi Spoofing Patches") logging.info("- Adding Navi Spoofing Patches")
navi_backlight_path = backlight_path+"/Pci(0x0,0x0)/Pci(0x0,0x0)" navi_backlight_path = backlight_path+"/Pci(0x0,0x0)/Pci(0x0,0x0)"
self.config["DeviceProperties"]["Add"][navi_backlight_path] = { self.config["DeviceProperties"]["Add"][navi_backlight_path] = {
@@ -264,10 +295,17 @@ class build_graphics_audio:
"rebuild-device-tree": 1, "rebuild-device-tree": 1,
"enable-gva-support": 1 "enable-gva-support": 1
} }
logging.info(f"- Adding AMD RX5500XT boot-args")
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " agdpmod=pikera applbkl=3"
def _audio_handling(self) -> None:
"""
Audio Handler
"""
def audio_handling(self):
if (self.model in model_array.LegacyAudio or self.model in model_array.MacPro) and self.constants.set_alc_usage is True: if (self.model in model_array.LegacyAudio or self.model in model_array.MacPro) and self.constants.set_alc_usage is True:
support.build_support(self.model, self.constants, self.config).enable_kext("AppleALC.kext", self.constants.applealc_version, self.constants.applealc_path) support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleALC.kext", self.constants.applealc_version, self.constants.applealc_path)
# Audio Patch # Audio Patch
if self.constants.set_alc_usage is True: if self.constants.set_alc_usage is True:
@@ -293,16 +331,21 @@ class build_graphics_audio:
"use-apple-layout-id": 1, "use-apple-layout-id": 1,
"use-layout-id": 1, "use-layout-id": 1,
} }
support.build_support(self.model, self.constants, self.config).enable_kext("AppleALC.kext", self.constants.applealc_version, self.constants.applealc_path) support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleALC.kext", self.constants.applealc_version, self.constants.applealc_path)
elif (self.model.startswith("MacPro") and self.model != "MacPro6,1") or self.model.startswith("Xserve"): elif (self.model.startswith("MacPro") and self.model != "MacPro6,1") or self.model.startswith("Xserve"):
# Used to enable Audio support for non-standard dGPUs # Used to enable Audio support for non-standard dGPUs
support.build_support(self.model, self.constants, self.config).enable_kext("AppleALC.kext", self.constants.applealc_version, self.constants.applealc_path) support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleALC.kext", self.constants.applealc_version, self.constants.applealc_path)
# Due to regression in AppleALC 1.6.4+, temporarily use 1.6.3 and set override # Due to regression in AppleALC 1.6.4+, temporarily use 1.6.3 and set override
if support.build_support(self.model, self.constants, self.config).get_kext_by_bundle_path("AppleALC.kext")["Enabled"] is True: 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" self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " -lilubetaall"
def firmware_handling(self):
def _firmware_handling(self) -> None:
"""
Firmware Handler
"""
# Add UGA to GOP layer # Add UGA to GOP layer
if "UGA Graphics" in smbios_data.smbios_dictionary[self.model]: if "UGA Graphics" in smbios_data.smbios_dictionary[self.model]:
logging.info("- Adding UGA to GOP Patch") logging.info("- Adding UGA to GOP Patch")
@@ -312,8 +355,8 @@ class build_graphics_audio:
if self.constants.software_demux is True and self.model in ["MacBookPro8,2", "MacBookPro8,3"]: if self.constants.software_demux is True and self.model in ["MacBookPro8,2", "MacBookPro8,3"]:
logging.info("- Enabling software demux") logging.info("- Enabling software demux")
# Add ACPI patches # Add ACPI patches
support.build_support(self.model, self.constants, self.config).get_item_by_kv(self.config["ACPI"]["Add"], "Path", "SSDT-DGPU.aml")["Enabled"] = True support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["ACPI"]["Add"], "Path", "SSDT-DGPU.aml")["Enabled"] = True
support.build_support(self.model, self.constants, self.config).get_item_by_kv(self.config["ACPI"]["Patch"], "Comment", "_INI to XINI")["Enabled"] = True support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["ACPI"]["Patch"], "Comment", "_INI to XINI")["Enabled"] = True
shutil.copy(self.constants.demux_ssdt_path, self.constants.acpi_path) shutil.copy(self.constants.demux_ssdt_path, self.constants.acpi_path)
# Disable dGPU # Disable dGPU
# IOACPIPlane:/_SB/PCI0@0/P0P2@10000/GFX0@0 # IOACPIPlane:/_SB/PCI0@0/P0P2@10000/GFX0@0
@@ -325,7 +368,7 @@ class build_graphics_audio:
} }
self.config["DeviceProperties"]["Delete"]["PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)"] = ["class-code", "device-id", "IOName", "name"] self.config["DeviceProperties"]["Delete"]["PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)"] = ["class-code", "device-id", "IOName", "name"]
# Add AMDGPUWakeHandler # Add AMDGPUWakeHandler
support.build_support(self.model, self.constants, self.config).enable_kext("AMDGPUWakeHandler.kext", self.constants.gpu_wake_version, self.constants.gpu_wake_path) support.BuildSupport(self.model, self.constants, self.config).enable_kext("AMDGPUWakeHandler.kext", self.constants.gpu_wake_version, self.constants.gpu_wake_path)
if self.constants.dGPU_switch is True and "Switchable GPUs" in smbios_data.smbios_dictionary[self.model]: if self.constants.dGPU_switch is True and "Switchable GPUs" in smbios_data.smbios_dictionary[self.model]:
logging.info("- Allowing GMUX switching in Windows") logging.info("- Allowing GMUX switching in Windows")
@@ -341,16 +384,20 @@ class build_graphics_audio:
if self.constants.amd_gop_injection is True: if self.constants.amd_gop_injection is True:
logging.info("- Adding AMDGOP.efi") logging.info("- Adding AMDGOP.efi")
shutil.copy(self.constants.amd_gop_driver_path, self.constants.drivers_path) shutil.copy(self.constants.amd_gop_driver_path, self.constants.drivers_path)
support.build_support(self.model, self.constants, self.config).get_efi_binary_by_path("AMDGOP.efi", "UEFI", "Drivers")["Enabled"] = True support.BuildSupport(self.model, self.constants, self.config).get_efi_binary_by_path("AMDGOP.efi", "UEFI", "Drivers")["Enabled"] = True
# Nvidia Kepler GOP VBIOS injection # Nvidia Kepler GOP VBIOS injection
if self.constants.nvidia_kepler_gop_injection is True: if self.constants.nvidia_kepler_gop_injection is True:
logging.info("- Adding NVGOP_GK.efi") logging.info("- Adding NVGOP_GK.efi")
shutil.copy(self.constants.nvidia_kepler_gop_driver_path, self.constants.drivers_path) shutil.copy(self.constants.nvidia_kepler_gop_driver_path, self.constants.drivers_path)
support.build_support(self.model, self.constants, self.config).get_efi_binary_by_path("NVGOP_GK.efi", "UEFI", "Drivers")["Enabled"] = True support.BuildSupport(self.model, self.constants, self.config).get_efi_binary_by_path("NVGOP_GK.efi", "UEFI", "Drivers")["Enabled"] = True
def spoof_handling(self): def _spoof_handling(self) -> None:
"""
SMBIOS Spoofing Handler
"""
if self.constants.serial_settings == "None": if self.constants.serial_settings == "None":
return return
@@ -362,7 +409,7 @@ class build_graphics_audio:
Path(self.constants.amc_kext_folder).mkdir() Path(self.constants.amc_kext_folder).mkdir()
Path(self.constants.amc_contents_folder).mkdir() Path(self.constants.amc_contents_folder).mkdir()
shutil.copy(amc_map_path, self.constants.amc_contents_folder) shutil.copy(amc_map_path, self.constants.amc_contents_folder)
support.build_support(self.model, self.constants, self.config).get_kext_by_bundle_path("AMC-Override.kext")["Enabled"] = True support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("AMC-Override.kext")["Enabled"] = True
if self.model not in model_array.NoAGPMSupport: if self.model not in model_array.NoAGPMSupport:
logging.info("- Adding AppleGraphicsPowerManagement Override") logging.info("- Adding AppleGraphicsPowerManagement Override")
@@ -370,7 +417,7 @@ class build_graphics_audio:
Path(self.constants.agpm_kext_folder).mkdir() Path(self.constants.agpm_kext_folder).mkdir()
Path(self.constants.agpm_contents_folder).mkdir() Path(self.constants.agpm_contents_folder).mkdir()
shutil.copy(agpm_map_path, self.constants.agpm_contents_folder) shutil.copy(agpm_map_path, self.constants.agpm_contents_folder)
support.build_support(self.model, self.constants, self.config).get_kext_by_bundle_path("AGPM-Override.kext")["Enabled"] = True support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("AGPM-Override.kext")["Enabled"] = True
if self.model in model_array.AGDPSupport: if self.model in model_array.AGDPSupport:
logging.info("- Adding AppleGraphicsDevicePolicy Override") logging.info("- Adding AppleGraphicsDevicePolicy Override")
@@ -378,7 +425,7 @@ class build_graphics_audio:
Path(self.constants.agdp_kext_folder).mkdir() Path(self.constants.agdp_kext_folder).mkdir()
Path(self.constants.agdp_contents_folder).mkdir() Path(self.constants.agdp_contents_folder).mkdir()
shutil.copy(agdp_map_path, self.constants.agdp_contents_folder) shutil.copy(agdp_map_path, self.constants.agdp_contents_folder)
support.build_support(self.model, self.constants, self.config).get_kext_by_bundle_path("AGDP-Override.kext")["Enabled"] = True support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("AGDP-Override.kext")["Enabled"] = True
# AGPM Patch # AGPM Patch
if self.model in model_array.DualGPUPatch: if self.model in model_array.DualGPUPatch:
@@ -408,15 +455,19 @@ class build_graphics_audio:
self.config["DeviceProperties"]["Add"]["PciRoot(0x0)/Pci(0x2,0x0)"] = {"agdpmod": "vit9696"} self.config["DeviceProperties"]["Add"]["PciRoot(0x0)/Pci(0x2,0x0)"] = {"agdpmod": "vit9696"}
def imac_mxm_patching(self): def _imac_mxm_patching(self) -> None:
self.backlight_path_detection() """
General iMac MXM Handler
"""
self._backlight_path_detection()
# Check GPU Vendor # Check GPU Vendor
if self.constants.metal_build is True: if self.constants.metal_build is True:
logging.info("- Adding Metal GPU patches on request") logging.info("- Adding Metal GPU patches on request")
if self.constants.imac_vendor == "AMD": if self.constants.imac_vendor == "AMD":
self.amd_mxm_patch(self.gfx0_path) self._amd_mxm_patch(self.gfx0_path)
elif self.constants.imac_vendor == "Nvidia": elif self.constants.imac_vendor == "Nvidia":
self.nvidia_mxm_patch(self.gfx0_path) self._nvidia_mxm_patch(self.gfx0_path)
else: else:
logging.info("- Failed to find vendor") logging.info("- Failed to find vendor")
elif not self.constants.custom_model and self.model in model_array.LegacyGPU and self.computer.dgpu: elif not self.constants.custom_model and self.model in model_array.LegacyGPU and self.computer.dgpu:
@@ -430,15 +481,18 @@ class build_graphics_audio:
device_probe.AMD.Archs.Vega, device_probe.AMD.Archs.Vega,
device_probe.AMD.Archs.Navi, device_probe.AMD.Archs.Navi,
]: ]:
self.amd_mxm_patch(self.gfx0_path) self._amd_mxm_patch(self.gfx0_path)
elif self.computer.dgpu.arch == device_probe.NVIDIA.Archs.Kepler: elif self.computer.dgpu.arch == device_probe.NVIDIA.Archs.Kepler:
self.nvidia_mxm_patch(self.gfx0_path) self._nvidia_mxm_patch(self.gfx0_path)
def ioaccel_workaround(self): def _ioaccel_workaround(self) -> None:
# Handle misc IOAccelerator issues """
Miscellaneous IOAccelerator Handler
When MTL bundles are missing from disk, WindowServer will repeatedly crash
This primarily occurs when installing an RSR update, where root is cleaned but AuxKC is not
"""
# When MTL bundles are missing from disk, WindowServer will repeatedly crash
# This primarily occurs when installing an RSR update, where root is cleaned but AuxKC is not
gpu_dict = [] gpu_dict = []
if not self.constants.custom_model: if not self.constants.custom_model:
gpu_dict = self.constants.computer.gpus gpu_dict = self.constants.computer.gpus
@@ -499,7 +553,7 @@ class build_graphics_audio:
if has_kdkless_gpu is True and has_kdk_gpu is False: if has_kdkless_gpu is True and has_kdk_gpu is False:
# KDKlessWorkaround is required for KDKless GPUs # KDKlessWorkaround is required for KDKless GPUs
support.build_support(self.model, self.constants, self.config).enable_kext("KDKlessWorkaround.kext", self.constants.kdkless_version, self.constants.kdkless_path) support.BuildSupport(self.model, self.constants, self.config).enable_kext("KDKlessWorkaround.kext", self.constants.kdkless_version, self.constants.kdkless_path)
return return
# KDKlessWorkaround supports disabling native AMD stack on Ventura for pre-AVX2.0 CPUs # KDKlessWorkaround supports disabling native AMD stack on Ventura for pre-AVX2.0 CPUs
@@ -515,5 +569,5 @@ class build_graphics_audio:
device_probe.AMD.Archs.Vega, device_probe.AMD.Archs.Vega,
device_probe.AMD.Archs.Navi, device_probe.AMD.Archs.Navi,
]: ]:
support.build_support(self.model, self.constants, self.config).enable_kext("KDKlessWorkaround.kext", self.constants.kdkless_version, self.constants.kdkless_path) support.BuildSupport(self.model, self.constants, self.config).enable_kext("KDKlessWorkaround.kext", self.constants.kdkless_version, self.constants.kdkless_path)
return return

View File

@@ -1,62 +1,116 @@
# Class for handling Misc Patches, invocation from build.py # Class for handling Misc Patches, invocation from build.py
# Copyright (C) 2020-2022, Dhinak G, Mykola Grymalyuk # Copyright (C) 2020-2023, Dhinak G, Mykola Grymalyuk
import shutil
import logging
import binascii
from pathlib import Path
from resources import constants, device_probe, generate_smbios, utilities from resources import constants, device_probe, generate_smbios, utilities
from resources.build import support from resources.build import support
from data import model_array, smbios_data, cpu_data from data import model_array, smbios_data, cpu_data
import binascii, shutil, logging
from pathlib import Path class BuildMiscellaneous:
"""
Build Library for Miscellaneous Hardware and Software Support
Invoke from build.py
"""
def __init__(self, model: str, global_constants: constants.Constants, config: dict) -> None:
self.model: str = model
self.config: dict = config
self.constants: constants.Constants = global_constants
self.computer: device_probe.Computer = self.constants.computer
self._build()
class build_misc: def _build(self) -> None:
"""
Kick off Misc Build Process
"""
def __init__(self, model, versions, config): self._feature_unlock_handling()
self.model = model self._restrict_events_handling()
self.constants: constants.Constants = versions self._firewire_handling()
self.config = config self._trackpad_handling()
self.computer = self.constants.computer self._thunderbolt_handling()
self._webcam_handling()
self._usb_handling()
self._debug_handling()
self._cpu_friend_handling()
self._general_oc_handling()
def rmtree_handler(func, path, exc_info):
if exc_info[0] == FileNotFoundError: def _feature_unlock_handling(self) -> None:
"""
FeatureUnlock Handler
"""
if self.constants.fu_status is False:
return return
raise # pylint: disable=misplaced-bare-raise
def build(self): support.BuildSupport(self.model, self.constants, self.config).enable_kext("FeatureUnlock.kext", self.constants.featureunlock_version, self.constants.featureunlock_path)
self.feature_unlock_handling()
self.restrict_events_handling()
self.firewire_handling()
self.trackpad_handling()
self.thunderbolt_handling()
self.webcam_handling()
self.usb_handling()
self.debug_handling()
self.cpu_friend_handling()
self.general_oc_handling()
def feature_unlock_handling(self):
if self.constants.fu_status is True:
support.build_support(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:
logging.info(f"- Adding additional FeatureUnlock args: {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 self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += self.constants.fu_arguments
def restrict_events_handling(self):
# RestrictEvents handling def _restrict_events_handling(self) -> None:
# - revpatch: Process patching """
# - revblock: Process blocking RestrictEvents Handler
block_args = "" """
block_args = ",".join(self._re_generate_block_arguments())
patch_args = ",".join(self._re_generate_patch_arguments())
if block_args != "":
logging.info(f"- Setting RestrictEvents block arguments: {block_args}")
support.BuildSupport(self.model, self.constants, self.config).enable_kext("RestrictEvents.kext", self.constants.restrictevents_version, self.constants.restrictevents_path)
self.config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["revblock"] = block_args
if block_args != "" and patch_args == "":
# Disable unneeded Userspace patching (cs_validate_page is quite expensive)
patch_args = "none"
if patch_args != "":
logging.info(f"- Setting RestrictEvents patch arguments: {patch_args}")
support.BuildSupport(self.model, self.constants, self.config).enable_kext("RestrictEvents.kext", self.constants.restrictevents_version, self.constants.restrictevents_path)
self.config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["revpatch"] = patch_args
if support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("RestrictEvents.kext")["Enabled"] is False:
# Ensure this is done at the end so all previous RestrictEvents patches are applied
# RestrictEvents and EFICheckDisabler will conflict if both are injected
support.BuildSupport(self.model, self.constants, self.config).enable_kext("EFICheckDisabler.kext", "", self.constants.efi_disabler_path)
def _re_generate_block_arguments(self) -> list:
"""
Generate RestrictEvents block arguments
Returns:
list: RestrictEvents block arguments
"""
re_block_args = []
# Resolve GMUX switching in Big Sur+
if self.model in ["MacBookPro6,1", "MacBookPro6,2", "MacBookPro9,1", "MacBookPro10,1"]: if self.model in ["MacBookPro6,1", "MacBookPro6,2", "MacBookPro9,1", "MacBookPro10,1"]:
block_args += "gmux," re_block_args.append("gmux")
# Resolve memory error reporting on MacPro7,1 SMBIOS
if self.model in model_array.MacPro: if self.model in model_array.MacPro:
logging.info("- Disabling memory error reporting") logging.info("- Disabling memory error reporting")
block_args += "pcie," re_block_args.append("pcie")
gpu_dict = []
if not self.constants.custom_model: # Resolve mediaanalysisd crashing on 3802 GPUs
gpu_dict = self.constants.computer.gpus gpu_dict = [] if self.constants.custom_model else self.constants.computer.gpus
else: if gpu_dict == []:
if self.model in smbios_data.smbios_dictionary: gpu_dict = smbios_data.smbios_dictionary[self.model]["Stock GPUs"] if self.model in smbios_data.smbios_dictionary else []
gpu_dict = smbios_data.smbios_dictionary[self.model]["Stock GPUs"]
for gpu in gpu_dict: for gpu in gpu_dict:
if not self.constants.custom_model: if not self.constants.custom_model:
gpu = gpu.arch gpu = gpu.arch
@@ -66,51 +120,43 @@ class build_misc:
device_probe.NVIDIA.Archs.Kepler, device_probe.NVIDIA.Archs.Kepler,
]: ]:
logging.info("- Disabling mediaanalysisd") logging.info("- Disabling mediaanalysisd")
block_args += "media," re_block_args.append("media")
break break
if block_args.endswith(","):
block_args = block_args[:-1]
if block_args != "": return re_block_args
logging.info(f"- Setting RestrictEvents block arguments: {block_args}")
support.build_support(self.model, self.constants, self.config).enable_kext("RestrictEvents.kext", self.constants.restrictevents_version, self.constants.restrictevents_path)
self.config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["revblock"] = block_args
patch_args = ""
if support.build_support(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Patch"], "Comment", "Reroute kern.hv_vmm_present patch (1)")["Enabled"] is True and self.constants.set_content_caching is True: def _re_generate_patch_arguments(self) -> list:
"""
Generate RestrictEvents patch arguments
Returns:
list: Patch arguments
"""
re_patch_args = []
# Resolve content caching when kern.hv_vmm_present is set
if support.BuildSupport(self.model, self.constants, self.config).get_item_by_kv(self.config["Kernel"]["Patch"], "Comment", "Reroute kern.hv_vmm_present patch (1)")["Enabled"] is True and self.constants.set_content_caching is True:
logging.info("- Fixing Content Caching support") logging.info("- Fixing Content Caching support")
patch_args += "asset," re_patch_args.append("asset")
if patch_args.endswith(","): # Resolve CoreGraphics.framework crashing on Ivy Bridge in macOS 13.3+
patch_args = patch_args[:-1] # Ref: https://github.com/acidanthera/RestrictEvents/pull/12
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] == cpu_data.cpu_data.ivy_bridge.value:
logging.info("- Fixing CoreGraphics support on Ivy Bridge")
re_patch_args.append("f16c")
if block_args != "" and patch_args == "": return re_patch_args
# Disable unneeded Userspace patching (cs_validate_page is quite expensive)
patch_args = "none"
if patch_args != "":
logging.info(f"- Setting RestrictEvents patch arguments: {patch_args}")
support.build_support(self.model, self.constants, self.config).enable_kext("RestrictEvents.kext", self.constants.restrictevents_version, self.constants.restrictevents_path)
self.config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["revpatch"] = patch_args
if self.constants.custom_cpu_model == 0 or self.constants.custom_cpu_model == 1:
self.config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["revcpu"] = self.constants.custom_cpu_model
if self.constants.custom_cpu_model_value != "":
logging.info(f"- Adding custom CPU Name: {self.constants.custom_cpu_model_value}")
self.config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["revcpuname"] = self.constants.custom_cpu_model_value
else:
logging.info("- Adding CPU Name Patch")
support.build_support(self.model, self.constants, self.config).enable_kext("RestrictEvents.kext", self.constants.restrictevents_version, self.constants.restrictevents_path)
if support.build_support(self.model, self.constants, self.config).get_kext_by_bundle_path("RestrictEvents.kext")["Enabled"] is False:
# Ensure this is done at the end so all previous RestrictEvents patches are applied
# RestrictEvents and EFICheckDisabler will conflict if both are injected
support.build_support(self.model, self.constants, self.config).enable_kext("EFICheckDisabler.kext", "", self.constants.efi_disabler_path)
def cpu_friend_handling(self): def _cpu_friend_handling(self) -> None:
if self.model not in ["iMac7,1", "Xserve2,1", "Dortania1,1"] and self.constants.disallow_cpufriend is False and self.constants.serial_settings != "None": """
support.build_support(self.model, self.constants, self.config).enable_kext("CPUFriend.kext", self.constants.cpufriend_version, self.constants.cpufriend_path) CPUFriend Handler
"""
if self.constants.allow_oc_everywhere is False and self.model not in ["iMac7,1", "Xserve2,1", "Dortania1,1"] and self.constants.disallow_cpufriend is False and self.constants.serial_settings != "None":
support.BuildSupport(self.model, self.constants, self.config).enable_kext("CPUFriend.kext", self.constants.cpufriend_version, self.constants.cpufriend_path)
# CPUFriendDataProvider handling # CPUFriendDataProvider handling
pp_map_path = Path(self.constants.platform_plugin_plist_path) / Path(f"{self.model}/Info.plist") pp_map_path = Path(self.constants.platform_plugin_plist_path) / Path(f"{self.model}/Info.plist")
@@ -119,34 +165,54 @@ class build_misc:
Path(self.constants.pp_kext_folder).mkdir() Path(self.constants.pp_kext_folder).mkdir()
Path(self.constants.pp_contents_folder).mkdir() Path(self.constants.pp_contents_folder).mkdir()
shutil.copy(pp_map_path, self.constants.pp_contents_folder) shutil.copy(pp_map_path, self.constants.pp_contents_folder)
support.build_support(self.model, self.constants, self.config).get_kext_by_bundle_path("CPUFriendDataProvider.kext")["Enabled"] = True support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("CPUFriendDataProvider.kext")["Enabled"] = True
def _firewire_handling(self) -> None:
"""
FireWire Handler
"""
if self.constants.firewire_boot is False:
return
if generate_smbios.check_firewire(self.model) is False:
return
def firewire_handling(self):
if self.constants.firewire_boot is True and generate_smbios.check_firewire(self.model) is True:
# Enable FireWire Boot Support # Enable FireWire Boot Support
# Applicable for both native FireWire and Thunderbolt to FireWire adapters # Applicable for both native FireWire and Thunderbolt to FireWire adapters
logging.info("- Enabling FireWire Boot Support") logging.info("- Enabling FireWire Boot Support")
support.build_support(self.model, self.constants, self.config).enable_kext("IOFireWireFamily.kext", self.constants.fw_kext, self.constants.fw_family_path) support.BuildSupport(self.model, self.constants, self.config).enable_kext("IOFireWireFamily.kext", self.constants.fw_kext, self.constants.fw_family_path)
support.build_support(self.model, self.constants, self.config).enable_kext("IOFireWireSBP2.kext", self.constants.fw_kext, self.constants.fw_sbp2_path) support.BuildSupport(self.model, self.constants, self.config).enable_kext("IOFireWireSBP2.kext", self.constants.fw_kext, self.constants.fw_sbp2_path)
support.build_support(self.model, self.constants, self.config).enable_kext("IOFireWireSerialBusProtocolTransport.kext", self.constants.fw_kext, self.constants.fw_bus_path) support.BuildSupport(self.model, self.constants, self.config).enable_kext("IOFireWireSerialBusProtocolTransport.kext", self.constants.fw_kext, self.constants.fw_bus_path)
support.build_support(self.model, self.constants, self.config).get_kext_by_bundle_path("IOFireWireFamily.kext/Contents/PlugIns/AppleFWOHCI.kext")["Enabled"] = True support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("IOFireWireFamily.kext/Contents/PlugIns/AppleFWOHCI.kext")["Enabled"] = True
def trackpad_handling(self):
# Pre-Force Touch trackpad support for macOS Ventura def _trackpad_handling(self) -> None:
"""
Trackpad Handler
"""
# Pre-Force Touch trackpad & keyboard support for macOS Ventura
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] < cpu_data.cpu_data.skylake.value: if smbios_data.smbios_dictionary[self.model]["CPU Generation"] < cpu_data.cpu_data.skylake.value:
if self.model.startswith("MacBook"): if self.model.startswith("MacBook"):
# These units got force touch early, so ignore them # These units got force touch & the new keyboard mapping early, so ignore them
if self.model not in ["MacBookPro11,4", "MacBookPro11,5", "MacBookPro12,1", "MacBook8,1"]: if self.model not in ["MacBookPro11,4", "MacBookPro11,5", "MacBookPro12,1", "MacBook8,1"]:
support.build_support(self.model, self.constants, self.config).enable_kext("AppleUSBTopCase.kext", self.constants.topcase_version, self.constants.top_case_path) support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleUSBTopCase.kext", self.constants.topcase_version, self.constants.top_case_path)
support.build_support(self.model, self.constants, self.config).get_kext_by_bundle_path("AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCButtons.kext")["Enabled"] = True support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCButtons.kext")["Enabled"] = True
support.build_support(self.model, self.constants, self.config).get_kext_by_bundle_path("AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyboard.kext")["Enabled"] = True support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyboard.kext")["Enabled"] = True
support.build_support(self.model, self.constants, self.config).get_kext_by_bundle_path("AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyEventDriver.kext")["Enabled"] = True support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyEventDriver.kext")["Enabled"] = True
support.build_support(self.model, self.constants, self.config).enable_kext("AppleUSBMultitouch.kext", self.constants.multitouch_version, self.constants.multitouch_path) support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleUSBMultitouch.kext", self.constants.multitouch_version, self.constants.multitouch_path)
# Legacy Trackpad support # Legacy Trackpad & Keyboard support
if self.model in ["MacBook4,1", "MacBook5,2"]: if self.model in ["MacBook4,1", "MacBook5,2"]:
support.build_support(self.model, self.constants, self.config).enable_kext("AppleUSBTrackpad.kext", self.constants.apple_trackpad, self.constants.apple_trackpad_path) support.BuildSupport(self.model, self.constants, self.config).enable_kext("AppleUSBTrackpad.kext", self.constants.apple_trackpad, self.constants.apple_trackpad_path)
support.BuildSupport(self.model, self.constants, self.config).enable_kext("LegacyKeyboardInjector.kext", self.constants.legacy_keyboard, self.constants.legacy_keyboard_path) # Inject legacy personalities into AppleUSBTCKeyboard and AppleUSBTCKeyEventDriver
def _thunderbolt_handling(self) -> None:
"""
Thunderbolt Handler
"""
def thunderbolt_handling(self):
if self.constants.disable_tb is True and self.model in ["MacBookPro11,1", "MacBookPro11,2", "MacBookPro11,3", "MacBookPro11,4", "MacBookPro11,5"]: if self.constants.disable_tb is True and self.model in ["MacBookPro11,1", "MacBookPro11,2", "MacBookPro11,3", "MacBookPro11,4", "MacBookPro11,5"]:
logging.info("- Disabling 2013-2014 laptop Thunderbolt Controller") logging.info("- Disabling 2013-2014 laptop Thunderbolt Controller")
if self.model in ["MacBookPro11,3", "MacBookPro11,5"]: if self.model in ["MacBookPro11,3", "MacBookPro11,5"]:
@@ -158,13 +224,22 @@ class build_misc:
self.config["DeviceProperties"]["Add"][tb_device_path] = {"class-code": binascii.unhexlify("FFFFFFFF"), "device-id": binascii.unhexlify("FFFF0000")} self.config["DeviceProperties"]["Add"][tb_device_path] = {"class-code": binascii.unhexlify("FFFFFFFF"), "device-id": binascii.unhexlify("FFFF0000")}
def webcam_handling(self):
# Legacy iSight patches def _webcam_handling(self) -> None:
"""
iSight Handler
"""
if "Legacy iSight" in smbios_data.smbios_dictionary[self.model]: if "Legacy iSight" in smbios_data.smbios_dictionary[self.model]:
if smbios_data.smbios_dictionary[self.model]["Legacy iSight"] is True: if smbios_data.smbios_dictionary[self.model]["Legacy iSight"] is True:
support.build_support(self.model, self.constants, self.config).enable_kext("LegacyUSBVideoSupport.kext", self.constants.apple_isight_version, self.constants.apple_isight_path) support.BuildSupport(self.model, self.constants, self.config).enable_kext("LegacyUSBVideoSupport.kext", self.constants.apple_isight_version, self.constants.apple_isight_path)
def _usb_handling(self) -> None:
"""
USB Handler
"""
def usb_handling(self):
# USB Map # USB Map
usb_map_path = Path(self.constants.plist_folder_path) / Path("AppleUSBMaps/Info.plist") usb_map_path = Path(self.constants.plist_folder_path) / Path("AppleUSBMaps/Info.plist")
if ( if (
@@ -179,32 +254,32 @@ class build_misc:
Path(self.constants.map_kext_folder).mkdir() Path(self.constants.map_kext_folder).mkdir()
Path(self.constants.map_contents_folder).mkdir() Path(self.constants.map_contents_folder).mkdir()
shutil.copy(usb_map_path, self.constants.map_contents_folder) shutil.copy(usb_map_path, self.constants.map_contents_folder)
support.build_support(self.model, self.constants, self.config).get_kext_by_bundle_path("USB-Map.kext")["Enabled"] = True support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("USB-Map.kext")["Enabled"] = True
if self.model in model_array.Missing_USB_Map_Ventura and self.constants.serial_settings not in ["Moderate", "Advanced"]: if self.model in model_array.Missing_USB_Map_Ventura and self.constants.serial_settings not in ["Moderate", "Advanced"]:
support.build_support(self.model, self.constants, self.config).get_kext_by_bundle_path("USB-Map.kext")["MinKernel"] = "22.0.0" support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("USB-Map.kext")["MinKernel"] = "22.0.0"
# Add UHCI/OHCI drivers # Add UHCI/OHCI drivers
# All Penryn Macs lack an internal USB hub to route USB 1.1 devices to the EHCI controller # All Penryn Macs lack an internal USB hub to route USB 1.1 devices to the EHCI controller
# And MacPro4,1 and MacPro5,1 are the only post-Penryn Macs that lack an internal USB hub # And MacPro4,1 and MacPro5,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 # - Ref: https://techcommunity.microsoft.com/t5/microsoft-usb-blog/reasons-to-avoid-companion-controllers/ba-p/270710
# #
# Required downgrades: # To be paired for sys_patch_dict.py's 'Legacy USB 1.1' patchset
# - IOUSBHostFamily.kext (only kext itself, not plugins)
# - AppleUSBHub.kext
# - AppleUSBEHCI.kext
if ( if (
smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.penryn.value or \ smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.penryn.value or \
self.model in ["MacPro4,1", "MacPro5,1"] self.model in ["MacPro4,1", "MacPro5,1"]
): ):
logging.info("- Adding UHCI/OHCI USB support") logging.info("- Adding UHCI/OHCI USB support")
shutil.copy(self.constants.apple_usb_11_injector_path, self.constants.kexts_path) shutil.copy(self.constants.apple_usb_11_injector_path, self.constants.kexts_path)
support.build_support(self.model, self.constants, self.config).get_kext_by_bundle_path("USB1.1-Injector.kext/Contents/PlugIns/AppleUSBOHCI.kext")["Enabled"] = True support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("USB1.1-Injector.kext/Contents/PlugIns/AppleUSBOHCI.kext")["Enabled"] = True
support.build_support(self.model, self.constants, self.config).get_kext_by_bundle_path("USB1.1-Injector.kext/Contents/PlugIns/AppleUSBOHCIPCI.kext")["Enabled"] = True support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("USB1.1-Injector.kext/Contents/PlugIns/AppleUSBOHCIPCI.kext")["Enabled"] = True
support.build_support(self.model, self.constants, self.config).get_kext_by_bundle_path("USB1.1-Injector.kext/Contents/PlugIns/AppleUSBUHCI.kext")["Enabled"] = True support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("USB1.1-Injector.kext/Contents/PlugIns/AppleUSBUHCI.kext")["Enabled"] = True
support.build_support(self.model, self.constants, self.config).get_kext_by_bundle_path("USB1.1-Injector.kext/Contents/PlugIns/AppleUSBUHCIPCI.kext")["Enabled"] = True support.BuildSupport(self.model, self.constants, self.config).get_kext_by_bundle_path("USB1.1-Injector.kext/Contents/PlugIns/AppleUSBUHCIPCI.kext")["Enabled"] = True
def debug_handling(self):
# DEBUG Settings (OpenCorePkg and Kernel Space) def _debug_handling(self) -> None:
"""
Debug Handler for OpenCorePkg and Kernel Space
"""
if self.constants.verbose_debug is True: if self.constants.verbose_debug is True:
logging.info("- Enabling Verbose boot") logging.info("- Enabling Verbose boot")
@@ -216,24 +291,25 @@ class build_misc:
# Disabled due to macOS Monterey crashing shortly after kernel init # Disabled due to macOS Monterey crashing shortly after kernel init
# Use DebugEnhancer.kext instead # Use DebugEnhancer.kext instead
# self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " msgbuf=1048576" # self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " msgbuf=1048576"
support.build_support(self.model, self.constants, self.config).enable_kext("DebugEnhancer.kext", self.constants.debugenhancer_version, self.constants.debugenhancer_path) support.BuildSupport(self.model, self.constants, self.config).enable_kext("DebugEnhancer.kext", self.constants.debugenhancer_version, self.constants.debugenhancer_path)
if self.constants.opencore_debug is True: if self.constants.opencore_debug is True:
logging.info("- Enabling DEBUG OpenCore") logging.info("- Enabling DEBUG OpenCore")
self.config["Misc"]["Debug"]["Target"] = 0x43 self.config["Misc"]["Debug"]["Target"] = 0x43
self.config["Misc"]["Debug"]["DisplayLevel"] = 0x80000042 self.config["Misc"]["Debug"]["DisplayLevel"] = 0x80000042
def general_oc_handling(self):
# OpenCorePkg Settings
# OpenCanopy Settings (GUI) def _general_oc_handling(self) -> None:
"""
General OpenCorePkg Handler
"""
logging.info("- Adding OpenCanopy GUI") logging.info("- Adding OpenCanopy GUI")
shutil.rmtree(self.constants.resources_path, onerror=self.rmtree_handler)
shutil.copy(self.constants.gui_path, self.constants.oc_folder) shutil.copy(self.constants.gui_path, self.constants.oc_folder)
support.build_support(self.model, self.constants, self.config).get_efi_binary_by_path("OpenCanopy.efi", "UEFI", "Drivers")["Enabled"] = True support.BuildSupport(self.model, self.constants, self.config).get_efi_binary_by_path("OpenCanopy.efi", "UEFI", "Drivers")["Enabled"] = True
support.build_support(self.model, self.constants, self.config).get_efi_binary_by_path("OpenRuntime.efi", "UEFI", "Drivers")["Enabled"] = True support.BuildSupport(self.model, self.constants, self.config).get_efi_binary_by_path("OpenRuntime.efi", "UEFI", "Drivers")["Enabled"] = True
support.build_support(self.model, self.constants, self.config).get_efi_binary_by_path("OpenLinuxBoot.efi", "UEFI", "Drivers")["Enabled"] = True support.BuildSupport(self.model, self.constants, self.config).get_efi_binary_by_path("OpenLinuxBoot.efi", "UEFI", "Drivers")["Enabled"] = True
support.build_support(self.model, self.constants, self.config).get_efi_binary_by_path("ResetNvramEntry.efi", "UEFI", "Drivers")["Enabled"] = True support.BuildSupport(self.model, self.constants, self.config).get_efi_binary_by_path("ResetNvramEntry.efi", "UEFI", "Drivers")["Enabled"] = True
if self.constants.showpicker is False: if self.constants.showpicker is False:
logging.info("- Hiding OpenCore picker") logging.info("- Hiding OpenCore picker")
@@ -246,4 +322,4 @@ class build_misc:
if self.constants.vault is True and utilities.check_command_line_tools() is True: if self.constants.vault is True and utilities.check_command_line_tools() is True:
logging.info("- Setting Vault configuration") logging.info("- Setting Vault configuration")
self.config["Misc"]["Security"]["Vault"] = "Secure" self.config["Misc"]["Security"]["Vault"] = "Secure"
support.build_support(self.model, self.constants, self.config).get_efi_binary_by_path("OpenShell.efi", "Misc", "Tools")["Enabled"] = False support.BuildSupport(self.model, self.constants, self.config).get_efi_binary_by_path("OpenShell.efi", "Misc", "Tools")["Enabled"] = False

Some files were not shown because too many files have changed in this diff Show More