Compare commits
910 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e31519ac96 | ||
|
|
49fa20ecc3 | ||
|
|
3364ed702a | ||
|
|
32a0289af3 | ||
|
|
a3208acbfe | ||
|
|
983a7bf8d3 | ||
|
|
5d85a98637 | ||
|
|
ba2149407d | ||
|
|
458a2a406a | ||
|
|
374263f926 | ||
|
|
1b5fb1cef6 | ||
|
|
e7897ae857 | ||
|
|
b34239fb8e | ||
|
|
53ea72ed93 | ||
|
|
462e268d0d | ||
|
|
df709afa8d | ||
|
|
7b332e87c4 | ||
|
|
1b2eea6b50 | ||
|
|
0077d6267c | ||
|
|
b18236b237 | ||
|
|
c748b03544 | ||
|
|
81369d1bab | ||
|
|
bf3cc2c9d1 | ||
|
|
159f624060 | ||
|
|
8234738403 | ||
|
|
bf19adef35 | ||
|
|
6c2ed9ad5a | ||
|
|
ac4b796c95 | ||
|
|
afdf49a074 | ||
|
|
48c838d92b | ||
|
|
3e453f4789 | ||
|
|
c7b282b53c | ||
|
|
8c6c723e13 | ||
|
|
9dfe616af8 | ||
|
|
fb9634d29b | ||
|
|
4edbf9df60 | ||
|
|
cd45f7b04c | ||
|
|
6a5ac03c72 | ||
|
|
81ecf14bab | ||
|
|
d84990e91d | ||
|
|
d1726f95fc | ||
|
|
45332d2cf9 | ||
|
|
9e7ad38020 | ||
|
|
18805c8e78 | ||
|
|
98b7824619 | ||
|
|
438ae23ee7 | ||
|
|
0e22a9fb00 | ||
|
|
f78e8edf4e | ||
|
|
986878055f | ||
|
|
1da93b1ca0 | ||
|
|
950f645f02 | ||
|
|
f0c73164d9 | ||
|
|
5b3425d0c4 | ||
|
|
0e1aaf0bbd | ||
|
|
ff685e3504 | ||
|
|
bae1a19cfe | ||
|
|
76aa3bb80f | ||
|
|
ab4089c37b | ||
|
|
a907e05bca | ||
|
|
8944c789b0 | ||
|
|
600e71581c | ||
|
|
15e4650785 | ||
|
|
201bc141bb | ||
|
|
3c69cb6c65 | ||
|
|
9955b76c1e | ||
|
|
d77680f25c | ||
|
|
10354d717e | ||
|
|
0b51a7e9c8 | ||
|
|
372ad31d83 | ||
|
|
d4836514fd | ||
|
|
077af5afb3 | ||
|
|
6ca3e3524e | ||
|
|
8c646b7897 | ||
|
|
90a9ff8bb2 | ||
|
|
1198a37969 | ||
|
|
296978676a | ||
|
|
29fa274096 | ||
|
|
dfdf4529d2 | ||
|
|
28746bbe2b | ||
|
|
60c8cd12cd | ||
|
|
71a045fb13 | ||
|
|
10d11c3b1b | ||
|
|
f0c282cbbc | ||
|
|
7b0b9ea18b | ||
|
|
3f6d8c2283 | ||
|
|
ff5a7f3a35 | ||
|
|
515bd5950f | ||
|
|
b1d5851131 | ||
|
|
3298625351 | ||
|
|
ff4a19b268 | ||
|
|
9b4a1e992b | ||
|
|
fc59cfffa1 | ||
|
|
cf884532d7 | ||
|
|
0b1092d4b9 | ||
|
|
cddd7af701 | ||
|
|
6cb2141654 | ||
|
|
a5fcc35d3c | ||
|
|
8cc22fd88a | ||
|
|
66435c7c08 | ||
|
|
3569a265e6 | ||
|
|
3515d81c26 | ||
|
|
3416a4bbdd | ||
|
|
6a5787abae | ||
|
|
a104316037 | ||
|
|
cabdfe9a27 | ||
|
|
c535609a32 | ||
|
|
a095edc380 | ||
|
|
f1ac88d23b | ||
|
|
4a1918238e | ||
|
|
33653a7108 | ||
|
|
03f65d1766 | ||
|
|
cb7d62f2ee | ||
|
|
4139e555cc | ||
|
|
244d7cfbf9 | ||
|
|
d9dcfc6125 | ||
|
|
c41ffaafc2 | ||
|
|
741eda5fd8 | ||
|
|
1678005ceb | ||
|
|
df029110c7 | ||
|
|
59f43e0ea0 | ||
|
|
9bdc5148c4 | ||
|
|
3283cf514b | ||
|
|
991e449d26 | ||
|
|
f880751539 | ||
|
|
8eade66017 | ||
|
|
bb09b0432f | ||
|
|
eca98c65d3 | ||
|
|
3af8687f42 | ||
|
|
0af93e7936 | ||
|
|
b8904387f3 | ||
|
|
91b2a8b673 | ||
|
|
96748952d3 | ||
|
|
5eddcadaac | ||
|
|
43131150a4 | ||
|
|
5fefc7185e | ||
|
|
ff00e2683e | ||
|
|
e94264f039 | ||
|
|
7fc36ac098 | ||
|
|
8711b4069a | ||
|
|
70cb12413a | ||
|
|
a6dc58a81d | ||
|
|
f8da16bf0a | ||
|
|
e43fecb4bc | ||
|
|
d6ed03eb8a | ||
|
|
49e1fb1ad2 | ||
|
|
ab1dab7fe5 | ||
|
|
6c44472e00 | ||
|
|
d1f545e356 | ||
|
|
e61544dcb9 | ||
|
|
889293ca8a | ||
|
|
a280e22cdb | ||
|
|
bb26a5a5d8 | ||
|
|
ba543ca5cf | ||
|
|
592b0a707f | ||
|
|
8da87aea28 | ||
|
|
4842028516 | ||
|
|
8b6bcd47d2 | ||
|
|
081bb56dd0 | ||
|
|
418de07f84 | ||
|
|
18e3fa37ff | ||
|
|
c36296f2a0 | ||
|
|
8159761833 | ||
|
|
87526226cd | ||
|
|
1cf1e3491d | ||
|
|
9cf19319c5 | ||
|
|
8b47c4fe7b | ||
|
|
3b3f5b3290 | ||
|
|
637981b405 | ||
|
|
20b40f33ce | ||
|
|
9a388009cd | ||
|
|
a4bcefd748 | ||
|
|
7885673363 | ||
|
|
d7aa3889f9 | ||
|
|
4dc76e26fc | ||
|
|
648bb67b73 | ||
|
|
686698272b | ||
|
|
6349b64faf | ||
|
|
09b9194b91 | ||
|
|
827aa96168 | ||
|
|
02ae3c8393 | ||
|
|
8f6bd87721 | ||
|
|
cef684beb9 | ||
|
|
6c7c60fb62 | ||
|
|
1b786e57c3 | ||
|
|
35e6104786 | ||
|
|
ed7c0c6760 | ||
|
|
25522069dc | ||
|
|
cbbbe16031 | ||
|
|
8ed540c7b4 | ||
|
|
467016521f | ||
|
|
33d166a4f8 | ||
|
|
a03623e678 | ||
|
|
bb424e8ab9 | ||
|
|
9e98121e45 | ||
|
|
f7d842a7f4 | ||
|
|
a1981ab56d | ||
|
|
e820a9ecc8 | ||
|
|
b13d47df08 | ||
|
|
e6adcdabac | ||
|
|
3c4795fb47 | ||
|
|
aaf74b2b6a | ||
|
|
2c4b29400e | ||
|
|
98da3a16a8 | ||
|
|
b24ee0e38c | ||
|
|
f557b10c3c | ||
|
|
b876eda144 | ||
|
|
4c8e256e7e | ||
|
|
447afac6eb | ||
|
|
657fc97f4f | ||
|
|
1d8f87fb78 | ||
|
|
c6a34ddeb8 | ||
|
|
694d0397ea | ||
|
|
9cbc243581 | ||
|
|
04a83462c3 | ||
|
|
2e3152f23b | ||
|
|
ba1ac0501b | ||
|
|
3ce8b18ecb | ||
|
|
baaa897d10 | ||
|
|
86ffb83c86 | ||
|
|
db708022e9 | ||
|
|
cc2eebfd42 | ||
|
|
8490893960 | ||
|
|
15a5e54cbb | ||
|
|
1bc9f3d396 | ||
|
|
ca22da4ebb | ||
|
|
e609866c5e | ||
|
|
bb5673e770 | ||
|
|
024d41c946 | ||
|
|
44c4a488f4 | ||
|
|
5c09c10301 | ||
|
|
4f74629e3f | ||
|
|
56194be716 | ||
|
|
8cfa90f352 | ||
|
|
1064be45df | ||
|
|
0428244e60 | ||
|
|
135125bae6 | ||
|
|
120f893d1f | ||
|
|
a33c19448f | ||
|
|
b8e29eca28 | ||
|
|
d4873f8070 | ||
|
|
c42ec31415 | ||
|
|
8f251c1214 | ||
|
|
40aea143cf | ||
|
|
e6fc4f4a6e | ||
|
|
b5ebc7ffd7 | ||
|
|
21482eda88 | ||
|
|
e91148e534 | ||
|
|
c2c2ffc00b | ||
|
|
100c54a82c | ||
|
|
2b81e38ea8 | ||
|
|
db2721354c | ||
|
|
f21856a65b | ||
|
|
c7cd22bf65 | ||
|
|
3d8c523b7a | ||
|
|
11df8195ce | ||
|
|
cdc80ef550 | ||
|
|
85559d4d9e | ||
|
|
88ecd19369 | ||
|
|
22822be944 | ||
|
|
55607c5437 | ||
|
|
0459c0a5dc | ||
|
|
2626f9733d | ||
|
|
128e68d735 | ||
|
|
abc1ca5ec9 | ||
|
|
ed6fee1f94 | ||
|
|
edad35e1f5 | ||
|
|
f8615a8852 | ||
|
|
dec0873a41 | ||
|
|
16e29d3a1e | ||
|
|
fa7e51252d | ||
|
|
84abbb7c11 | ||
|
|
292e09a0d7 | ||
|
|
c5fd4036a7 | ||
|
|
4843ed92c9 | ||
|
|
f75fac14e6 | ||
|
|
ac055a633c | ||
|
|
0dc40318d0 | ||
|
|
84d0272eda | ||
|
|
4b35681b5f | ||
|
|
bbb5c06ddc | ||
|
|
df0c196a94 | ||
|
|
12f9482d3d | ||
|
|
5f7b836330 | ||
|
|
94af2350f4 | ||
|
|
7b758fcf15 | ||
|
|
fecf9502d0 | ||
|
|
4747c2619f | ||
|
|
4b187a045a | ||
|
|
eb9a24eee7 | ||
|
|
b3d2ac190c | ||
|
|
ce6805507d | ||
|
|
ad7d06d4b2 | ||
|
|
04dee1fcff | ||
|
|
3af65423c6 | ||
|
|
af6c98b54d | ||
|
|
eb9b137323 | ||
|
|
178c604507 | ||
|
|
88b660ecf8 | ||
|
|
3feb5a61f6 | ||
|
|
b8708ff193 | ||
|
|
8da945833c | ||
|
|
ee10c104b7 | ||
|
|
803a699658 | ||
|
|
88ee0e813e | ||
|
|
cc44024a8c | ||
|
|
880432970b | ||
|
|
5d6587100e | ||
|
|
df8d95b815 | ||
|
|
f1a868199e | ||
|
|
d0e77cca52 | ||
|
|
eaadaa2d45 | ||
|
|
4a5e3c89b6 | ||
|
|
a0eca53c58 | ||
|
|
8c092494a8 | ||
|
|
5f69a1c917 | ||
|
|
856ac19314 | ||
|
|
6c5aa244af | ||
|
|
f42bdcee03 | ||
|
|
b49db7e739 | ||
|
|
ec20d7b581 | ||
|
|
1c75353f27 | ||
|
|
b14ca8689a | ||
|
|
bd20cf6a1f | ||
|
|
b23e9c2eaa | ||
|
|
e625d9803b | ||
|
|
ae8bba5582 | ||
|
|
f19f08fc06 | ||
|
|
5fd17cc5e8 | ||
|
|
3c6d0de2e3 | ||
|
|
d3de15b594 | ||
|
|
b0db4739ad | ||
|
|
2584c16d41 | ||
|
|
b4caffe0d4 | ||
|
|
46734a7c5a | ||
|
|
484f434a67 | ||
|
|
033b577552 | ||
|
|
f1e2a320dc | ||
|
|
3885bf894a | ||
|
|
04ca447eb7 | ||
|
|
41486c0215 | ||
|
|
69035db2d7 | ||
|
|
c98021b14c | ||
|
|
b576e5a511 | ||
|
|
9b69700733 | ||
|
|
9d731c065e | ||
|
|
93aa69b0b0 | ||
|
|
3679324371 | ||
|
|
ebc6611f5c | ||
|
|
16ac5a6093 | ||
|
|
b1479fbc14 | ||
|
|
375b7c2fd2 | ||
|
|
95afb7d109 | ||
|
|
3956908482 | ||
|
|
e0eda1fa0c | ||
|
|
dc6b14f962 | ||
|
|
dd798c02d1 | ||
|
|
4fc0f4dee7 | ||
|
|
81379dc857 | ||
|
|
1d7eea068a | ||
|
|
0978bcbb87 | ||
|
|
2da88a22d7 | ||
|
|
ccb9aea1e6 | ||
|
|
6b8d1743b3 | ||
|
|
cf0f613a5f | ||
|
|
ba49f45c4c | ||
|
|
3e5ade8047 | ||
|
|
3e47853e75 | ||
|
|
d19f5ba72f | ||
|
|
4918873ad9 | ||
|
|
6ecb8e26c9 | ||
|
|
52ad1f7399 | ||
|
|
f6ee429c8e | ||
|
|
4de79ce633 | ||
|
|
d7c2904868 | ||
|
|
24eec279d8 | ||
|
|
d49575b22b | ||
|
|
3271bcf92f | ||
|
|
41514a35f5 | ||
|
|
8e1809cf3d | ||
|
|
98bc71e46a | ||
|
|
d1dd8a0e2e | ||
|
|
d20d9975c1 | ||
|
|
ecca9f2c72 | ||
|
|
88724c4950 | ||
|
|
fd48419cb2 | ||
|
|
ff5543f9dc | ||
|
|
0130fce0c6 | ||
|
|
d8258a73fd | ||
|
|
939e942f50 | ||
|
|
603aedb6ae | ||
|
|
05a51bf32e | ||
|
|
792a99ce04 | ||
|
|
a6fbbc0c44 | ||
|
|
9b7497946a | ||
|
|
9a68ce67eb | ||
|
|
a6ccd28671 | ||
|
|
f7f66cd732 | ||
|
|
9b316bbbca | ||
|
|
db39757655 | ||
|
|
88903e8edf | ||
|
|
dd968a3244 | ||
|
|
a42811b907 | ||
|
|
15aacddd23 | ||
|
|
f4d3154fd1 | ||
|
|
93e9a8f381 | ||
|
|
69ab0fd17b | ||
|
|
504cdc6214 | ||
|
|
d3b9b6e87a | ||
|
|
0a04c5c156 | ||
|
|
1799625f99 | ||
|
|
8f13906d2c | ||
|
|
771186e6cf | ||
|
|
da32e9d4e3 | ||
|
|
935b3819f0 | ||
|
|
1abe08bcac | ||
|
|
09779f62b3 | ||
|
|
abe865f999 | ||
|
|
f3734f9daa | ||
|
|
7bc993ccc9 | ||
|
|
ab3762e42e | ||
|
|
58ed1634db | ||
|
|
7d579a0942 | ||
|
|
4daa5c4755 | ||
|
|
00c89089c3 | ||
|
|
68f82e1993 | ||
|
|
356646725e | ||
|
|
608decc9de | ||
|
|
9eecbae6da | ||
|
|
3197510b72 | ||
|
|
4830d462aa | ||
|
|
fc1cb53c1d | ||
|
|
7446da8e1f | ||
|
|
04019798e9 | ||
|
|
20a900f052 | ||
|
|
df469be05f | ||
|
|
d42d2d09e9 | ||
|
|
f8c39e957e | ||
|
|
78760b8a08 | ||
|
|
276883059f | ||
|
|
cabb5da981 | ||
|
|
f8afde61fe | ||
|
|
95a802a402 | ||
|
|
e5fd984daf | ||
|
|
0a0a59feea | ||
|
|
75200e9c8d | ||
|
|
83d4cc5a16 | ||
|
|
faecdc3b0c | ||
|
|
0fe230e56b | ||
|
|
6f13247151 | ||
|
|
24a8249a60 | ||
|
|
7df345d286 | ||
|
|
7c0088e0ff | ||
|
|
204cf5beea | ||
|
|
04b69f4288 | ||
|
|
b4ef000fc0 | ||
|
|
78038b9607 | ||
|
|
a458b68f2b | ||
|
|
1509dffa1c | ||
|
|
e274137503 | ||
|
|
97bfb9f730 | ||
|
|
b1f8b80e83 | ||
|
|
f0a339b0f7 | ||
|
|
6bb5c2e74e | ||
|
|
5f1b732e12 | ||
|
|
2a9f94ac99 | ||
|
|
9b89b62219 | ||
|
|
315be87f31 | ||
|
|
0613ad9bc3 | ||
|
|
0ff6977bb7 | ||
|
|
025d03e7e8 | ||
|
|
a4efb1ecd5 | ||
|
|
7340539742 | ||
|
|
377fdc8de1 | ||
|
|
36a68ca147 | ||
|
|
922f207da7 | ||
|
|
ec4d1d4471 | ||
|
|
057b8739d3 | ||
|
|
332376030e | ||
|
|
302cfb3bef | ||
|
|
0cb70d896d | ||
|
|
f5c511366e | ||
|
|
79a2f49739 | ||
|
|
d6b5b65183 | ||
|
|
89444bc4bc | ||
|
|
2435a7e651 | ||
|
|
1957e70cfd | ||
|
|
aba21bca43 | ||
|
|
ccc9549fc4 | ||
|
|
07bd8fa33f | ||
|
|
85e0761460 | ||
|
|
5bca1a0ad6 | ||
|
|
ca4051b10d | ||
|
|
ece4065de3 | ||
|
|
e5aea82b6f | ||
|
|
85fc1d6627 | ||
|
|
a0e9de2cb8 | ||
|
|
c39b719093 | ||
|
|
dd7cc97645 | ||
|
|
76f104ddab | ||
|
|
6f1ed43f4e | ||
|
|
7209aa98d0 | ||
|
|
0ac33532f2 | ||
|
|
d40e9c869d | ||
|
|
d5ff1edc44 | ||
|
|
c3d8d77b07 | ||
|
|
9ae7be59b5 | ||
|
|
e1be0d32ab | ||
|
|
a675771bc6 | ||
|
|
c0a15477c9 | ||
|
|
c2291ab590 | ||
|
|
be9cc0d41b | ||
|
|
01e0f3061c | ||
|
|
8cd7b0b43b | ||
|
|
ef11715e79 | ||
|
|
7a7ff557ea | ||
|
|
cb307d852a | ||
|
|
e943c69c82 | ||
|
|
fa8d3a800e | ||
|
|
f592524054 | ||
|
|
aaa114e753 | ||
|
|
0625bdb3d1 | ||
|
|
7e918c86e2 | ||
|
|
2216bc0212 | ||
|
|
e76ceb7cf4 | ||
|
|
22b9853452 | ||
|
|
8c7e991779 | ||
|
|
b2fcb77c24 | ||
|
|
2ac80fda32 | ||
|
|
31e48c7d96 | ||
|
|
18bbe60088 | ||
|
|
5a0ad4379e | ||
|
|
8971a3c4a9 | ||
|
|
37cd66265b | ||
|
|
faad02a7fa | ||
|
|
06d4c86ad8 | ||
|
|
a5998cb226 | ||
|
|
e86b48e0fc | ||
|
|
53a59c0ce3 | ||
|
|
fe5045edbe | ||
|
|
6a357d8cdf | ||
|
|
5005d1f1eb | ||
|
|
b801afcff0 | ||
|
|
758c1d9649 | ||
|
|
9e6d742c6d | ||
|
|
de1b893049 | ||
|
|
0483b5651a | ||
|
|
7680c20221 | ||
|
|
349bdb2936 | ||
|
|
60dc7c4490 | ||
|
|
7aaaa79571 | ||
|
|
b83495702b | ||
|
|
d482443f0e | ||
|
|
d4b55ad0e4 | ||
|
|
77cff8a6f3 | ||
|
|
2e62f1f65c | ||
|
|
87359ee642 | ||
|
|
0b8c4b20b6 | ||
|
|
3049d1adef | ||
|
|
e3e9be01a2 | ||
|
|
f178b22423 | ||
|
|
797b56b9f9 | ||
|
|
d08807e301 | ||
|
|
c78f7d0bdb | ||
|
|
bd4564f98e | ||
|
|
25a5a3d168 | ||
|
|
4b54711434 | ||
|
|
6eec2e95b8 | ||
|
|
03ed8ed1f0 | ||
|
|
9720d90493 | ||
|
|
d0eada1d85 | ||
|
|
06b3cf2e90 | ||
|
|
bbd379a584 | ||
|
|
2b04a06adc | ||
|
|
703e926b96 | ||
|
|
3d10404da5 | ||
|
|
41a189444b | ||
|
|
6ae572f74f | ||
|
|
fa045e96e7 | ||
|
|
2a12e861ac | ||
|
|
31c0845667 | ||
|
|
a97c6c9baa | ||
|
|
e4c433730f | ||
|
|
30be583a3d | ||
|
|
bbed0b4921 | ||
|
|
3e784c0ae5 | ||
|
|
182b6c4291 | ||
|
|
b1f16fca1d | ||
|
|
9787645542 | ||
|
|
af3d4c4af5 | ||
|
|
bdc8c2a4fc | ||
|
|
be89e2ae11 | ||
|
|
55f3905dd4 | ||
|
|
6f0048814f | ||
|
|
7895413ce2 | ||
|
|
9254e67fc9 | ||
|
|
d815ece3c4 | ||
|
|
14bad15df4 | ||
|
|
d830e72b62 | ||
|
|
70b5399126 | ||
|
|
1d8d3ef757 | ||
|
|
9f3ee178a5 | ||
|
|
91335ab271 | ||
|
|
8320355925 | ||
|
|
0b225fbbbd | ||
|
|
6a18334663 | ||
|
|
af940152a1 | ||
|
|
66f5e8d969 | ||
|
|
b3b7508237 | ||
|
|
361f9767dd | ||
|
|
f20c9808ed | ||
|
|
b6ac9f3a6f | ||
|
|
8365144834 | ||
|
|
85b422b0fb | ||
|
|
6ebc9a08ae | ||
|
|
b04e396351 | ||
|
|
1ec23e9ebb | ||
|
|
44637967bc | ||
|
|
7d93c96343 | ||
|
|
58a9f4dd0e | ||
|
|
d2c673d9e1 | ||
|
|
0048559acb | ||
|
|
88d7bf373b | ||
|
|
28861ca1a8 | ||
|
|
86ae43dc1c | ||
|
|
24d96c1d37 | ||
|
|
f62e9f5d21 | ||
|
|
d23965f1c0 | ||
|
|
e9397b0237 | ||
|
|
8bf7c25f69 | ||
|
|
0a693806d4 | ||
|
|
12e8b8e0a9 | ||
|
|
33d95fc237 | ||
|
|
b0ff0204bd | ||
|
|
7704488e24 | ||
|
|
bf2bd694bc | ||
|
|
200f6d17f9 | ||
|
|
580f35bfce | ||
|
|
a6eda09158 | ||
|
|
a93da6cf9e | ||
|
|
e715970b63 | ||
|
|
1b6d29d19b | ||
|
|
e219ff809e | ||
|
|
a521667e54 | ||
|
|
7a41b0c4a5 | ||
|
|
cc5d522cb9 | ||
|
|
57713ab195 | ||
|
|
548dad7743 | ||
|
|
a5989e88a3 | ||
|
|
f91e7dc10d | ||
|
|
c889f97a6c | ||
|
|
ff8b2eff2c | ||
|
|
23acd5b6cd | ||
|
|
50256b92c8 | ||
|
|
4731c2c346 | ||
|
|
122aec5ec3 | ||
|
|
e62ca075e8 | ||
|
|
e4d5c62ada | ||
|
|
9db76b5cca | ||
|
|
df4f165122 | ||
|
|
8331c23045 | ||
|
|
bb1132301a | ||
|
|
f6dcc35b48 | ||
|
|
9f583eb590 | ||
|
|
5a700c729e | ||
|
|
4e40da79bb | ||
|
|
53582efd02 | ||
|
|
9b4c66f3d3 | ||
|
|
5c6dcc3485 | ||
|
|
898b10f932 | ||
|
|
5bcc6d58c3 | ||
|
|
eb907d17a0 | ||
|
|
5e3f476884 | ||
|
|
21cc355b03 | ||
|
|
a22531e1d9 | ||
|
|
324188c039 | ||
|
|
ef06f096d0 | ||
|
|
afeff753ef | ||
|
|
bf8892878d | ||
|
|
1f6dfbfd30 | ||
|
|
eeeb222896 | ||
|
|
41733124db | ||
|
|
c9d7267280 | ||
|
|
bb3a7eccc7 | ||
|
|
a73d5c70d4 | ||
|
|
c48711c4c3 | ||
|
|
eebb098aed | ||
|
|
06ae5350cb | ||
|
|
69a41b2951 | ||
|
|
19e43d2850 | ||
|
|
c32a3d89e9 | ||
|
|
b227480e6c | ||
|
|
fbae80ec26 | ||
|
|
299bb0be73 | ||
|
|
7e22a0fe46 | ||
|
|
f1d5adff7a | ||
|
|
9b4fbdfb9a | ||
|
|
e1a8cdc1d5 | ||
|
|
d13f96a454 | ||
|
|
b6599a1357 | ||
|
|
ce09ccf115 | ||
|
|
04a039caf3 | ||
|
|
f006ee4569 | ||
|
|
c1b7e62a02 | ||
|
|
cf11a9e7a9 | ||
|
|
ed14fbfff0 | ||
|
|
ebc39a58eb | ||
|
|
6475b3f055 | ||
|
|
bd86a8cc04 | ||
|
|
de2166915a | ||
|
|
bab6faac97 | ||
|
|
16b9cb44c2 | ||
|
|
3d9f3a1147 | ||
|
|
0b5c244a2e | ||
|
|
c94aebc369 | ||
|
|
8fc015a108 | ||
|
|
f5ba7816d9 | ||
|
|
37c0bf1e22 | ||
|
|
e699b6f2cb | ||
|
|
2904ca702c | ||
|
|
8f10f1938e | ||
|
|
b7f7489c5d | ||
|
|
691c462bba | ||
|
|
e51ec8eb8e | ||
|
|
ee7bf05780 | ||
|
|
3223854cdd | ||
|
|
a35384e0b1 | ||
|
|
faa0456ff7 | ||
|
|
5d0d1968f5 | ||
|
|
21277e5738 | ||
|
|
4f8748932d | ||
|
|
1b1ca79374 | ||
|
|
97ae6b587c | ||
|
|
d22588b3cd | ||
|
|
8041dca103 | ||
|
|
6c304402dd | ||
|
|
ec3ecdca38 | ||
|
|
0fe707637a | ||
|
|
77b19688ae | ||
|
|
0d6e159b72 | ||
|
|
1afb953f05 | ||
|
|
ee07dc9936 | ||
|
|
254267f1be | ||
|
|
b78247f9e8 | ||
|
|
5bfee53d99 | ||
|
|
5154492c97 | ||
|
|
5c97527038 | ||
|
|
3fd08803d6 | ||
|
|
de5cf6f93d | ||
|
|
60b9d9d811 | ||
|
|
8405a8162f | ||
|
|
95558ab31e | ||
|
|
256bd8dd71 | ||
|
|
c960153442 | ||
|
|
c712f33cf3 | ||
|
|
4e659ebdbb | ||
|
|
ed55cc3bbd | ||
|
|
df61370b7c | ||
|
|
79ab028b0a | ||
|
|
444819b6a0 | ||
|
|
079a1ac2ff | ||
|
|
9113dab049 | ||
|
|
377b29f317 | ||
|
|
be9bb8bef1 | ||
|
|
51c3921cf8 | ||
|
|
6f5d5922dc | ||
|
|
fa5266b069 | ||
|
|
d619f15d36 | ||
|
|
3e9ec51ef5 | ||
|
|
0ac54c7ec4 | ||
|
|
6220d21a7b | ||
|
|
7661b52a0a | ||
|
|
8c9b47b4d5 | ||
|
|
92c02996ae | ||
|
|
92d7349ec0 | ||
|
|
1e8c00071d | ||
|
|
1bf4cf7dce | ||
|
|
79559943ad | ||
|
|
f5dc3d7939 | ||
|
|
4ed36074e6 | ||
|
|
608053b8e1 | ||
|
|
928d7ed759 | ||
|
|
f68cfbcb69 | ||
|
|
0ad2fb53d2 | ||
|
|
13d1110b7a | ||
|
|
629a1469cb | ||
|
|
231d478ff3 | ||
|
|
b0d1e019f8 | ||
|
|
1b6b6d75c6 | ||
|
|
112e4221b3 | ||
|
|
c18f2b6649 | ||
|
|
f3ed9f4077 | ||
|
|
8e22fc890b | ||
|
|
951c2b3a2a | ||
|
|
d605e33a72 | ||
|
|
0359141f26 | ||
|
|
fef47af891 | ||
|
|
062c93e77b | ||
|
|
8b012bd940 | ||
|
|
7db3508387 | ||
|
|
a2c603d874 | ||
|
|
41091a3967 | ||
|
|
b84f701ff4 | ||
|
|
1563a57c33 | ||
|
|
61e815565a | ||
|
|
04c88ab7af | ||
|
|
fe107d271c | ||
|
|
90274eef33 | ||
|
|
65cb3cf7f0 | ||
|
|
bcf86801db | ||
|
|
8d6ba46c6f | ||
|
|
c556d4dd15 | ||
|
|
90b7ae4898 | ||
|
|
0a8f018332 | ||
|
|
43b55435ba | ||
|
|
690ff19b47 | ||
|
|
00a1e232b4 | ||
|
|
a7ebf72d1b | ||
|
|
1af5182560 | ||
|
|
eb70e4611f | ||
|
|
c1a6a6b156 | ||
|
|
c90fdca19d | ||
|
|
3dcc0d0b0b | ||
|
|
5cff0a8c6c | ||
|
|
b2de538e29 | ||
|
|
6451876f18 | ||
|
|
31d31e1f3e | ||
|
|
7c3557ec46 | ||
|
|
d78e5eaa90 | ||
|
|
66fdbe00b0 | ||
|
|
37c1c30a2a | ||
|
|
2fd02f6794 | ||
|
|
756d9cf248 | ||
|
|
52a323b269 | ||
|
|
7ef1688195 | ||
|
|
4632371437 | ||
|
|
b21b10d00b | ||
|
|
f93b62160a | ||
|
|
bde44fc830 | ||
|
|
08731521ad | ||
|
|
6c74bfd862 | ||
|
|
6750bdf9f1 | ||
|
|
f0d8399610 | ||
|
|
8271db0d26 | ||
|
|
de77968cdb | ||
|
|
7b0321be65 | ||
|
|
39a9c80108 | ||
|
|
b8381a8a30 | ||
|
|
c47e21d02f | ||
|
|
83df3e3e12 | ||
|
|
9ce2e2add1 | ||
|
|
565589ae50 | ||
|
|
e8c397b2a5 | ||
|
|
831878494d | ||
|
|
0cb98121e4 | ||
|
|
5495c480d7 | ||
|
|
2dda8e9167 | ||
|
|
b7f895e940 | ||
|
|
655eac32b1 | ||
|
|
83c678322f | ||
|
|
1fc478feb2 | ||
|
|
5c01aface2 | ||
|
|
a261ae4c83 | ||
|
|
8fe2963e2e | ||
|
|
6b6de4c559 | ||
|
|
9d151921cc | ||
|
|
04905c6f1d | ||
|
|
8bbb24cece | ||
|
|
37a15e2e64 | ||
|
|
7bf36a9689 | ||
|
|
88b80e6354 | ||
|
|
036282a7e9 | ||
|
|
015701d80f | ||
|
|
ae363102d7 | ||
|
|
8917368988 | ||
|
|
ca18f4fa9d | ||
|
|
ec0ecd5567 | ||
|
|
90cd402c76 | ||
|
|
b49ac3ee39 | ||
|
|
0e9d00caf9 | ||
|
|
079d4e0564 | ||
|
|
39e2a16f8f | ||
|
|
75587ab345 | ||
|
|
7d74495435 | ||
|
|
a78b201235 | ||
|
|
74c0e9e717 | ||
|
|
8ed5fd8397 | ||
|
|
5bfa2afc38 | ||
|
|
c9fea1fe6f | ||
|
|
e2d93744f7 | ||
|
|
1e17eb88ed | ||
|
|
328527a663 | ||
|
|
4dcebb4906 | ||
|
|
a7e043bf4f | ||
|
|
e94f68d6e3 | ||
|
|
c655c4a910 | ||
|
|
50e3e08ff0 | ||
|
|
3674ca47fa | ||
|
|
0e7ecc58f8 | ||
|
|
84d5b99b4a | ||
|
|
1c70521fa1 | ||
|
|
9faa8f82e8 | ||
|
|
647cc0a83a | ||
|
|
12347f866a | ||
|
|
c6f84cc036 | ||
|
|
0c8bda59a1 | ||
|
|
9caa39c50d | ||
|
|
48d714db61 | ||
|
|
59ac0c3fec | ||
|
|
dc7560b142 | ||
|
|
0f0ca7d4ec |
4
.flake8
Normal file
@@ -0,0 +1,4 @@
|
||||
[flake8]
|
||||
extend-ignore = E501, E203
|
||||
per-file-ignores =
|
||||
Resources/Constants.py:E704
|
||||
143
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
@@ -0,0 +1,143 @@
|
||||
name: Bug Report
|
||||
description: File a bug report
|
||||
title: "[Bug]: "
|
||||
labels: [bug]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to fill out this bug report!
|
||||
- type: dropdown
|
||||
id: machine
|
||||
attributes:
|
||||
label: Machine Model
|
||||
description: What model was being patched?
|
||||
options:
|
||||
- MacBook4,1
|
||||
- MacBook5,1
|
||||
- MacBook5,2
|
||||
- MacBook6,1
|
||||
- MacBook7,1
|
||||
- MacBook8,1
|
||||
- MacBookAir2,1
|
||||
- MacBookAir3,1
|
||||
- MacBookAir3,2
|
||||
- MacBookAir4,1
|
||||
- MacBookAir4,2
|
||||
- MacBookAir5,1
|
||||
- MacBookAir5,2
|
||||
- MacBookAir6,1
|
||||
- MacBookAir6,2
|
||||
- MacBookPro4,1
|
||||
- MacBookPro5,1
|
||||
- MacBookPro5,2
|
||||
- MacBookPro5,3
|
||||
- MacBookPro5,4
|
||||
- MacBookPro5,5
|
||||
- MacBookPro6,1
|
||||
- MacBookPro6,2
|
||||
- MacBookPro7,1
|
||||
- MacBookPro8,1
|
||||
- MacBookPro8,2
|
||||
- MacBookPro8,3
|
||||
- MacBookPro9,1
|
||||
- MacBookPro9,2
|
||||
- MacBookPro10,1
|
||||
- MacBookPro10,2
|
||||
- MacBookPro11,1
|
||||
- MacBookPro11,2
|
||||
- MacBookPro11,3
|
||||
- Macmini3,1
|
||||
- Macmini4,1
|
||||
- Macmini5,1
|
||||
- Macmini5,2
|
||||
- Macmini5,3
|
||||
- Macmini6,1
|
||||
- Macmini6,2
|
||||
- iMac7,1
|
||||
- iMac8,1
|
||||
- iMac9,1
|
||||
- iMac10,1
|
||||
- iMac11,1
|
||||
- iMac11,2
|
||||
- iMac11,3
|
||||
- iMac12,1
|
||||
- iMac12,2
|
||||
- iMac13,1
|
||||
- iMac13,2
|
||||
- iMac13,3
|
||||
- iMac14,1
|
||||
- iMac14,2
|
||||
- iMac14,3
|
||||
- iMac14,4
|
||||
- iMac15,1
|
||||
- MacPro3,1
|
||||
- MacPro4,1
|
||||
- MacPro5,1
|
||||
- Xserve2,1
|
||||
- Xserve3,1
|
||||
- Other/Non-Applicable
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: version
|
||||
attributes:
|
||||
label: Application Version
|
||||
description: What build version of our software are you running?
|
||||
options:
|
||||
- Latest Build (nightly)
|
||||
- Latest Release
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: variant
|
||||
attributes:
|
||||
label: Application Variant
|
||||
description: What variant of our software are you running?
|
||||
options:
|
||||
- GUI (Graphical User Interface)
|
||||
- TUI (Text User Interface)
|
||||
- CLI (Command Line Interface)
|
||||
- Other/Non-Applicable
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: os-version
|
||||
attributes:
|
||||
label: What versions of macOS are you seeing the problem on?
|
||||
multiple: true
|
||||
options:
|
||||
- macOS 12, Monterey
|
||||
- macOS 11, Big Sur
|
||||
- macOS 10.15, Catalina
|
||||
- macOS 10.14, Mojave
|
||||
- macOS 10.13, High Sierra
|
||||
- macOS 10.12, Sierra
|
||||
- macOS 10.11, El Capitan
|
||||
- Other/Non-Applicable
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: where-issue
|
||||
attributes:
|
||||
label: Where does this issue happen?
|
||||
multiple: true
|
||||
options:
|
||||
- Between booting macOS and Login Screen
|
||||
- Within macOS (Before Logging in)
|
||||
- Within macOS (After Logging in)
|
||||
- Other/Non-Applicable
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: what-happened
|
||||
attributes:
|
||||
label: What is the Isssue?
|
||||
description: Additionally, explain what you expected to happen?
|
||||
value: "Please clearly explain the issue"
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: extra-info
|
||||
attributes:
|
||||
label: Any Additional Information
|
||||
1
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
blank_issues_enabled: false
|
||||
33
.github/workflows/build-app-offline.yml
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
name: CI - Build Offline TUI
|
||||
|
||||
on:
|
||||
push:
|
||||
workflow_dispatch:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build Offline TUI
|
||||
runs-on: x86_64_mojave
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: python3 create-offline-build.py
|
||||
- run: /Library/Frameworks/Python.framework/Versions/3.9/bin/pyinstaller OpenCore-Patcher.spec
|
||||
- run: ./after_pyinstaller.sh
|
||||
- run: 'codesign -s "Developer ID Application: Mykola Grymalyuk (S74BDJXQMD)" -v --force --deep --timestamp --entitlements entitlements.plist -o runtime "dist/OpenCore-Patcher.app"'
|
||||
- run: cd dist; zip -r ../OpenCore-Patcher-TUI-Offline.app.zip OpenCore-Patcher.app
|
||||
- name: Upload App to Artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: OpenCore-Patcher-TUI-Offline.app
|
||||
path: OpenCore-Patcher-TUI-Offline.app.zip
|
||||
|
||||
- name: Upload to Release
|
||||
if: github.event_name == 'release'
|
||||
uses: svenstaro/upload-release-action@e74ff71f7d8a4c4745b560a485cc5fdb9b5b999d
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: OpenCore-Patcher-TUI.app.zip
|
||||
tag: ${{ github.ref }}
|
||||
file_glob: true
|
||||
34
.github/workflows/build-app.yml
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
name: CI - Build TUI
|
||||
|
||||
on:
|
||||
push:
|
||||
workflow_dispatch:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build TUI
|
||||
runs-on: x86_64_mojave
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- run: /Library/Frameworks/Python.framework/Versions/3.9/bin/pyinstaller OpenCore-Patcher.spec
|
||||
- run: ./after_pyinstaller.sh
|
||||
- run: 'codesign -s "Developer ID Application: Mykola Grymalyuk (S74BDJXQMD)" -v --force --deep --timestamp --entitlements entitlements.plist -o runtime "dist/OpenCore-Patcher.app"'
|
||||
- run: cd dist; zip -r ../OpenCore-Patcher-TUI.app.zip OpenCore-Patcher.app
|
||||
- run: ./../sign-tui.sh
|
||||
- name: Upload App to Artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: OpenCore-Patcher-TUI.app
|
||||
path: OpenCore-Patcher-TUI.app.zip
|
||||
|
||||
- name: Upload to Release
|
||||
if: github.event_name == 'release'
|
||||
uses: svenstaro/upload-release-action@e74ff71f7d8a4c4745b560a485cc5fdb9b5b999d
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: OpenCore-Patcher-TUI.app.zip
|
||||
tag: ${{ github.ref }}
|
||||
file_glob: true
|
||||
50
.github/workflows/build-gui.yml
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
name: CI - Build GUI
|
||||
|
||||
on:
|
||||
push:
|
||||
workflow_dispatch:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build GUI
|
||||
runs-on: x86_64_mojave
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- run: /Library/Frameworks/Python.framework/Versions/3.9/bin/pyinstaller OCLP-CLI.spec
|
||||
- run: cd dist; cp OCLP-CLI ../; cd ..
|
||||
- run: zip OCLP-CLI.zip OCLP-CLI
|
||||
- name: Download latest nightly OCLP-GUI
|
||||
run: curl -S -L https://nightly.link/dortania/OCLP-GUI/workflows/build-app/master/OpenCore-Patcher-GUI.app.zip --output ./OpenCore-Patcher-GUI.app.zip
|
||||
- run: unzip -o OpenCore-Patcher-GUI.app.zip
|
||||
- run: unzip OpenCore-Patcher-GUI.app.zip; rm OpenCore-Patcher-GUI.app.zip
|
||||
- name: Merge new GUI
|
||||
run: cp OCLP-CLI OpenCore\ Patcher.app/Contents/Resources/
|
||||
- run: python3 merge_gui.py
|
||||
- run: 'codesign -s "Developer ID Application: Mykola Grymalyuk (S74BDJXQMD)" -v --force --deep --timestamp --entitlements entitlements.plist -o runtime "OpenCore Patcher.app/Contents/Resources/OCLP-CLI"'
|
||||
- run: 'codesign -s "Developer ID Application: Mykola Grymalyuk (S74BDJXQMD)" -v --force --deep --timestamp --entitlements entitlements.plist -o runtime "OpenCore Patcher.app/Contents/Resources/oclpd"'
|
||||
- run: 'codesign -s "Developer ID Application: Mykola Grymalyuk (S74BDJXQMD)" -v --force --deep --timestamp --entitlements entitlements.plist -o runtime "OpenCore Patcher.app"'
|
||||
- run: ditto -c -k --sequesterRsrc --keepParent OpenCore\ Patcher.app OpenCore-Patcher-GUI.app.zip
|
||||
- run: ./../sign-gui.sh
|
||||
- name: Upload GUI to Artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: OpenCore-Patcher-GUI.app
|
||||
path: OpenCore-Patcher-GUI.app.zip
|
||||
- name: Upload CLI to Artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: OCLP-CLI
|
||||
path: OCLP-CLI.zip
|
||||
- name: Upload to Release
|
||||
if: github.event_name == 'release'
|
||||
uses: svenstaro/upload-release-action@e74ff71f7d8a4c4745b560a485cc5fdb9b5b999d
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: OpenCore-Patcher-GUI.app.zip
|
||||
tag: ${{ github.ref }}
|
||||
file_glob: true
|
||||
- name: Validate OpenCore
|
||||
run: ./OCLP-CLI --validate
|
||||
35
.github/workflows/build-site.yml
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
name: CI - Build Site
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- gh-pages
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
jobs:
|
||||
build:
|
||||
name: Build Site and Deploy
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/setup-node@v2-beta
|
||||
with:
|
||||
node-version: '12'
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: '0'
|
||||
persist-credentials: false
|
||||
submodules: 'recursive'
|
||||
- name: Install
|
||||
run: npm install
|
||||
working-directory: 'docs'
|
||||
- name: Build
|
||||
run: npm run build
|
||||
working-directory: 'docs'
|
||||
- name: Deploy
|
||||
uses: JamesIves/github-pages-deploy-action@3.7.1
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main'}}
|
||||
with:
|
||||
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
||||
BRANCH: gh-pages
|
||||
FOLDER: docs/.vuepress/dist/
|
||||
CLEAN: true
|
||||
14
.gitignore
vendored
@@ -1,7 +1,19 @@
|
||||
.DS_Store
|
||||
OCLP-GUI.command
|
||||
/payloads/Apple
|
||||
/payloads/*.zip
|
||||
/payloads/__MACOSX
|
||||
/App
|
||||
/Build-Folder
|
||||
/build
|
||||
/dist
|
||||
/.vscode
|
||||
__pycache__/
|
||||
*.kext
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
*$py.class
|
||||
/docs/.vuepress/dist
|
||||
/docs/.vuepress/.config.js.swp
|
||||
/docs/yarn.lock
|
||||
/docs/yarn-error.log
|
||||
/docs/node_modules/
|
||||
13
.pylintrc
Normal file
@@ -0,0 +1,13 @@
|
||||
[MASTER]
|
||||
|
||||
init-hook="from pylint.config import find_pylintrc; import os, sys; sys.path.append(os.path.dirname(find_pylintrc()))"
|
||||
|
||||
[MESSAGES CONTROL]
|
||||
|
||||
disable=unused-import,
|
||||
subprocess-run-check,
|
||||
line-too-long,
|
||||
too-few-public-methods,
|
||||
missing-module-docstring,
|
||||
missing-class-docstring,
|
||||
missing-function-docstring
|
||||
@@ -1,52 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
from __future__ import print_function
|
||||
|
||||
from shutil import copy
|
||||
from shutil import rmtree
|
||||
from distutils.dir_util import copy_tree
|
||||
|
||||
import os
|
||||
import json
|
||||
import subprocess
|
||||
import sys
|
||||
import zipfile
|
||||
|
||||
os.chdir(os.path.dirname(os.path.realpath(__file__)))
|
||||
current_path = os.getcwd()
|
||||
|
||||
print(current_path)
|
||||
|
||||
# File location
|
||||
command_path = os.path.join(current_path, "OpenCore-Patcher.command")
|
||||
resources_path = os.path.join(current_path, "Resources/")
|
||||
payloads_path = os.path.join(current_path, "payloads/")
|
||||
icns_path = os.path.join(current_path, "OC-Patcher.icns")
|
||||
plist_path = os.path.join(current_path, "Info.plist")
|
||||
|
||||
app_path = os.path.join(current_path, "App/")
|
||||
app_app_path = os.path.join(current_path, "App/OpenCore-Patcher.app/")
|
||||
contents_path = os.path.join(current_path, "App/OpenCore-Patcher.app/Contents/")
|
||||
app_macos_path = os.path.join(current_path, "App/OpenCore-Patcher.app/Contents/MacOS/")
|
||||
app_macos_payload_path = os.path.join(current_path, "App/OpenCore-Patcher.app/Contents/MacOS/payloads")
|
||||
app_macos_resources_path = os.path.join(current_path, "App/OpenCore-Patcher.app/Contents/MacOS/Resources")
|
||||
app_resources_path = os.path.join(current_path, "App/OpenCore-Patcher.app/Contents/Resources/")
|
||||
|
||||
|
||||
if os.path.exists(app_path):
|
||||
print("Cleaning App folder")
|
||||
rmtree(app_path)
|
||||
|
||||
print("Creating new App folder")
|
||||
os.mkdir(app_path)
|
||||
os.mkdir(app_app_path)
|
||||
os.mkdir(contents_path)
|
||||
os.mkdir(app_macos_path)
|
||||
os.mkdir(app_resources_path)
|
||||
|
||||
copy(command_path, app_macos_path)
|
||||
copy_tree(resources_path, app_macos_resources_path)
|
||||
copy_tree(payloads_path, app_macos_payload_path)
|
||||
copy(icns_path, app_resources_path)
|
||||
copy(plist_path, contents_path)
|
||||
copy(icns_path, app_macos_path)
|
||||
|
||||
446
CHANGELOG.md
@@ -1,25 +1,469 @@
|
||||
# OpenCore Legacy Patcher changelog
|
||||
|
||||
## 0.2.5
|
||||
|
||||
- Implement Latebloom configuration via command line tool
|
||||
- Implement Root Volume backups in addition to APFS snapshot reversions
|
||||
- Backups applicable to machines with sealed APFS snapshots
|
||||
- Allow Root Patching on Mojave and Catalina
|
||||
- Currently experimental
|
||||
- Allow disabling of faulty Thunderbolt controllers on 2013-2014 MacBook Pros
|
||||
- Currently limited to MacBookPro11,x
|
||||
- Set iMacPro1,1 SMBIOS for Mac Pro and Xserve models
|
||||
- Allows for wider array of OS support (High Sierra+)
|
||||
- Use plist override for BCM943224 and BCM94331 support in Big Sur+
|
||||
- Allows for older OS support through OpenCore
|
||||
- Increment Binaries:
|
||||
- OpenCore 0.7.2 release
|
||||
- Lilu 1.5.5 release
|
||||
- AppleALC 1.6.3 release
|
||||
- WhateverGreen 1.5.2 release
|
||||
- FeatureUnlock 1.0.3 release
|
||||
- PatcherSupportPkg 0.1.2 release
|
||||
- Allow iGPU/dGPU switching in Windows
|
||||
- Applicable to MacBook Pros with Intel iGPU and Nvidia/AMD dGPU
|
||||
- Clean up Patcher Settings
|
||||
- Allow disabling of TeraScale 2 Acceleration during root volume patch
|
||||
- Use for MacBookPro8,x with heavily degraded dGPUs
|
||||
- Add non-Metal Monterey Acceleration
|
||||
- Currently supports:
|
||||
- Intel Ironlake and Sandy Bridge
|
||||
- Nvidia Tesla
|
||||
- AMD TeraScale 1 and 2
|
||||
- Allow Trackpad gestures on MacBook4,1 and MacBook5,2
|
||||
- System Preferences will not report settings however
|
||||
- Allow Root Volume Patched Systems to use FileVault 2
|
||||
- Requires macOS 11.3 (20E232) or newer
|
||||
- Add offline TUI build
|
||||
- Allows for root patching without network connection
|
||||
- Add Legacy Wireless support for Monterey
|
||||
- Applicable for BCM94328, BCM94322 and Atheros chipsets
|
||||
- Add Legacy Bluetooth support for Monterey
|
||||
- Applicable for BRCM2046 and BRCM2070 chipsets
|
||||
- Disable Library Validation allowing for AMFI usage
|
||||
- Remove reliance on amfi_get_out_of_my_way=1
|
||||
- Add Kepler Accleration Patches for Monterey Beta 7 and newer
|
||||
- Add FirmwareFeature upgrading to all Models
|
||||
- Fixes Monterey Beta 7 installation issues
|
||||
- Add iMac7,1 USB map
|
||||
|
||||
## 0.2.4
|
||||
|
||||
- Fix BlessOverride typo
|
||||
- Fix Wake on WLAN typo
|
||||
- Fix Catalyst App crashing in macOS 11.5 (ie. Messages.app)
|
||||
- Increment Binaries
|
||||
- PatcherSupportPkg 0.0.15 release
|
||||
- Implement Latebloom.kext support (v0.19)
|
||||
- Work around macOS 11.3+ race condition on pre-Sandy Bridge Macs
|
||||
- Disable USB Map injection when unneeded
|
||||
|
||||
## 0.2.3
|
||||
|
||||
- Fix more IORegistry issues
|
||||
- Implement OpenCore GUI
|
||||
- Ensure symlinks are preserved
|
||||
- Enable TeraScale 2 patches by default on all models
|
||||
- Fix NightShift support for macOS Monterey
|
||||
- Add UniversalControl support
|
||||
- Currently not enabled by Apple in macOS Monterey Beta 2/iOS 15 Beta 2
|
||||
- Add optional Wake in WLAN setting
|
||||
- Note: enabling may create network instability
|
||||
- Increment Binaries
|
||||
- OpenCore 0.7.1 release (07-05-2021)
|
||||
- FeatureUnlock 1.0.3 rolling (07-07-2021)
|
||||
- Previously known as SidecarFixup
|
||||
- Lilu 1.5.4 release (07-05-2021)
|
||||
- AppleALC 1.6.2 release
|
||||
- WhateverGreen 1.6.2 release
|
||||
- PatcherSupportPkg 0.0.13 release
|
||||
- Fix Intel HD4000 DRM Support in macOS Monterey (thanks EduCovas!)
|
||||
- Support optionally re-enabling iGPU in iMac14,x with dGPUs
|
||||
- Fix Windows scanning in OpenCore menu when Windows and macOS are stored on the same ESP
|
||||
|
||||
## 0.2.2
|
||||
|
||||
- Fix IORegistry issue
|
||||
- Fix Root Patch Failure on Nvidia Tesla GPUs
|
||||
|
||||
## 0.2.1
|
||||
|
||||
- Fix NVMe Crash on build
|
||||
|
||||
## 0.2.0
|
||||
|
||||
- Refactor device probe logic
|
||||
- Implement PatcherSupportPkg v0.0.10
|
||||
- Reduces binary sizes depending on OS
|
||||
- Deprecates Apple-Binaries-OCLP
|
||||
- Fix full screen and Airplay to Mac support for Intel HD4000 iGPUs in Monterey
|
||||
- Automatically set `CMIO_Unit_Input_ASC.DoNotUseOpenCL` on TeraScale 2 GPUs
|
||||
- Fix Country Code detection on Wireless Cards
|
||||
- Add Windows detection and prompt during installation
|
||||
- Fix Google Fonts rendering for Intel HD4000 iGPUs in Monterey
|
||||
- Increment Binaries
|
||||
- Lilu 1.5.4 rolling (f69a972 - 06-20-2021)
|
||||
- RestrictEvents 1.0.3 rolling (3773ce2 - 06-20-2021)
|
||||
- SidecarFixup 1.0.2 rolling (2c29166 - 06-21-2021)
|
||||
- PatcherSupportPkg 0.0.18
|
||||
- Allow AirPlay to Mac support on Skylake - Coffeelake Macs
|
||||
|
||||
## 0.1.9
|
||||
|
||||
- Fix incorrect AMFI and SIP detection
|
||||
|
||||
## 0.1.8
|
||||
|
||||
- Fix Kernel Panic in Big Sur and Monterey
|
||||
- Increment binaries:
|
||||
- Lilu (1.5.4 rolling - 06-15-2021)
|
||||
|
||||
## 0.1.7
|
||||
|
||||
- Add FireWire Boot Support for Catalina and newer
|
||||
- Add NVMe firmware support for older models (ie. MacPro3,1)
|
||||
- OpenCore must be stored on a bootable volume (ie. USB or SATA)
|
||||
- Fix Thunderbolt Ethernet support on MacBookAir4,x
|
||||
- Fix XHCI hangs on pre-2012 Machines
|
||||
- XHCI boot support dropped due to instability
|
||||
- Add beta macOS Monterey Support
|
||||
- Fix iMac13,x sleep support
|
||||
- Add support for following models:
|
||||
- iMac14,4
|
||||
- iMac15,1
|
||||
- MacBook8,1
|
||||
- MacBookAir6,1
|
||||
- MacBookAir6,2
|
||||
- MacBookPro11,1
|
||||
- MacBookPro11,2
|
||||
- MacBookPro11,3
|
||||
- Increment binaries:
|
||||
- OpenCore (0.7.0 release - 06-07-2021)
|
||||
- AirportBrcmFixup (2.1.3 rolling - 06-08-2021)
|
||||
- AppleALC (1.6.2 rolling - 06-08-2021)
|
||||
- CPUFriend (1.2.4 rolling - 06-08-2021)
|
||||
- Lilu (1.5.4 rolling - 06-11-2021)
|
||||
- NVMeFix (1.0.9 rolling - 06-12-2021)
|
||||
- WhateverGreen (1.5.1 rolling - 06-08-2021)
|
||||
- RestrictEvents (1.0.3 rolling - 06-11-2021)
|
||||
- Apple Binaries (0.0.18 release - 06-12-2021)
|
||||
- MouSSE (0.95 release - 06-08-2021)
|
||||
- SidecarFixup (1.0.2 rolling - 06-11-2021)
|
||||
- Fix SSE4,2 Emulation
|
||||
- Fix Sidecar and CPU renaming support in macOS Monterey
|
||||
- Add AirPlay support to older Models
|
||||
- Add Intel HD4000 Acceleration
|
||||
- Big thanks to Jackluke, EduCovas, DhinakG, MykolaG!
|
||||
- Add DebugEnhancer for better macOS Monterey logs
|
||||
- DebugEnhancer (1.0.3 rolling - 06-08-2021)
|
||||
- Add TeraScale 2 Graphics Acceleration to Big Sur
|
||||
- User configurable, those prone to seizures are recommended to avoid or have another setup the machine due to initial colour strobing before forcing Million Colours on the display with SwitchResX or ResXtreme
|
||||
|
||||
## 0.1.6
|
||||
|
||||
- Add XHCI UEFI Driver for 3rd Party USB 3.0 Controllers
|
||||
- Allows for Boot Support from OpenCore' Picker
|
||||
- Fix UEFI output on MacPro3,1 with PC GPUs
|
||||
- Increment binaries:
|
||||
- OpenCore 4e0ff2d (0.7.0 rolling - 05-23-2021)
|
||||
- Apple Binaries 59a52a3 (0.0.8 release - 05-24-2021)
|
||||
- Allow legacy macOS Booting
|
||||
- Fix Photos app distortion on legacy GPUs
|
||||
- Fix device tree renaming on Mac Pros and Xserves
|
||||
- Ensure no Acceleration Patches applied when no compatible GPU found
|
||||
- Allow custom SMBIOS overriding
|
||||
- Fix incorrectly setting CPU override for non-Minimal SMBIOS spoofs
|
||||
- Support Minimal SMBIOS spoofing on El Capitan era Macs
|
||||
- Fix GPU Switching on MacBookPro6,x
|
||||
|
||||
## 0.1.5
|
||||
|
||||
- Fix crashing when Wireless module not present
|
||||
- Add iMac10,1 default dGPU pathing
|
||||
- Add agdpmod=vit9696 to all Nvidia Metal iMacs
|
||||
- Fixes external display support on Nvidia iMac12,x
|
||||
- Remove reliance on AppleBacklightFixup
|
||||
- Support space in path when downloading Root Patches
|
||||
- Enable PanicNoKextDump by default
|
||||
- Expand AppleGraphicsPowerManagement and AppleGraphicsDeviceControl Override support
|
||||
- Fix MacBookPro8,2/3 Brightness Control
|
||||
- dGPU must be disabled via NVRAM or deMUXed
|
||||
- Increment binaries:
|
||||
- Apple Binaries 478f6a6 (0.0.7 release - 05-16-2021)
|
||||
- Add SeedUtil option to Advanced Patcher Settings
|
||||
|
||||
## 0.1.4
|
||||
|
||||
- Fix Device Path formatting on 2012+ iMacs
|
||||
|
||||
## 0.1.3
|
||||
|
||||
- Fix internal PCIe devices reporting as external
|
||||
- Opt for `built-in` when device path is detectable
|
||||
- Innie 0ccd95e (1.3.0 release - 01-16-2021)
|
||||
- Fix MacBookPro5,4 audio support
|
||||
- Increment binaries
|
||||
- AppleALC 58b57ee (1.6.1 rolling - 05-07-2021)
|
||||
- Apple Binaries 74bd80f (0.0.6 release - 05-09-2021)
|
||||
- Support custom CPU names in About This Mac
|
||||
- Fix NightShift accidentally disabling on Minimal SMBIOS configs
|
||||
- Fix iMac9,1 audio support
|
||||
- Heavily expand Graphics ID list
|
||||
- Fix iMac7,1 and iMac8,1 audio support
|
||||
- Work-around Bluetooth Kernel Panic on Apple's Bluetooth 2.0 Controllers (USB 05AC:8206)
|
||||
- Affects iMac7,1 and MacPro3,1
|
||||
- Fix iMac external display support
|
||||
- Fix NVMe properties not applying when OpenCore is installed
|
||||
|
||||
## 0.1.2
|
||||
|
||||
- Fix IDE support on 2008 era MacBooks, iMacs and Xserves
|
||||
- Fix reduced output speeds on BCM94360 series Wifi cards
|
||||
- Fix accidentally disabling non-existent iGPU in iMac11,2
|
||||
- Remove USB ACPI Patching requirement for Minimal SMBIOS setups
|
||||
- Probe hardware for Backlight pathing on iMac10,1, iMac11,x and iMac12,x with Metal GPUs
|
||||
- Add Windows UEFI Audio support to Sandy and Ivy Bridge Macs
|
||||
- Add 3rd Party NVMe Power Management Patches
|
||||
- NVMeFix fafc52d (1.0.7 release - 05-03-2021)
|
||||
- Strip unused ACPI and Kernel entries during build
|
||||
- Allow native Macs to use OpenCore
|
||||
- Better 3rd party NVMe support
|
||||
- Better Wireless networking support
|
||||
- Fix MacBook6,1 audio support
|
||||
- Increment binaries
|
||||
- OpenCore 65cc81b (0.6.9 release - 05-03-2021)
|
||||
- Lilu c77722d (1.5.3 release - 05-03-2021)
|
||||
- AppleALC 84850d0 (1.6.0 rolling - 04-30-2021)
|
||||
- RestrictEvents 9e2bb0f (1.0.1 release - 05-03-2021)
|
||||
- Allow CPUFriend on all El-Capitan Era Macs
|
||||
- Fix UEFI 2.0 Application support on upgraded Nvidia GPUs
|
||||
- Add experimental Sidecar support
|
||||
- Requires Mac with Metal Intel iGPU and the iPad to be directly plugged in, wireless highly unstable
|
||||
- SidecarFixup efdf11c (1.0.0 release - 05-02-2021)
|
||||
|
||||
## 0.1.1
|
||||
|
||||
- Fix iMac11,3 GFX0 pathing
|
||||
- Add MouSSE support to iMac10,1 with Metal AMD GPU
|
||||
- Fix iMac11,1 and iMac11,3 Nvidia boot issues after PRAM reset
|
||||
- Fix DRM support on Nvidia-only configurations
|
||||
- Support optional setting between DRM and QuickSync support on iMacs13,x and iMac14,x
|
||||
- Add public beta support for Legacy GPU Acceleration (v0.0.4)
|
||||
- Note ATI/AMD TeraScale 2 unsupported (HD 5/6000)
|
||||
- Add better kmutil crash handling
|
||||
- Fix build crashing when no wifi card is present
|
||||
- Allow Legacy Acceleration Patches on Mac Pros and Xserves
|
||||
- Fix USB kernel panics on iMac7,1
|
||||
- Fix AppleALC support in Mojave
|
||||
- Fix TeraScale 1 GPU detection
|
||||
- Enable Graphics Acceleration on legacy GPUs by default
|
||||
- Fix incorrectly disabling SIP/SMB on Metal GPUs
|
||||
- Fix error output when rebuilding kernel cache fails
|
||||
- Fix Acceleration Linking for Intel Ironlake iGPUs
|
||||
|
||||
## 0.1.0
|
||||
|
||||
- Fix crash on iMacs with Metal GPUs
|
||||
|
||||
## 0.0.23
|
||||
|
||||
- Fix MacBookPro4,1 15" and 17" audio support
|
||||
- Fix iMac7,1 24" and iMac9,1 24" audio support
|
||||
- Fix Macmini4,1 audio support
|
||||
- Increment binaries
|
||||
- AppleALC 1a3e5cb (1.6.0 rolling - 04-14-2021)
|
||||
- Enhance Wifi model detection
|
||||
- Hide OpenShell.efi by default
|
||||
- Add Brightness Control patches for legacy Nvidia, AMD and Intel GPUs
|
||||
- Models with brightness control issues in Catalina partially supported
|
||||
- Add user configurable Bootstrap setting
|
||||
- Enhance GPU Detection logic
|
||||
- Increment AppleBackLightFixup v1.0.1
|
||||
- Add panel type F10T9cde
|
||||
- Enhance HDMI audio support on Mac Pros and Xserves
|
||||
- Strip unused kext entries during build
|
||||
- Add gfxutil support for better DeviceProperty path detection
|
||||
- Add basic CLI support
|
||||
- Disable SIP and SecureBootModel by default on legacy GPUs
|
||||
|
||||
## 0.0.22
|
||||
|
||||
- Add ExFat support for models missing driver
|
||||
- Aids BootCamp support for EFI based installs on 2010 and older Macs
|
||||
- Fix CPU Boosting on 2011 and older Macs
|
||||
- Add basic support for Xserve2,1
|
||||
- Add AppleALC support(99b3662 - 1.6.0 rolling - 04-09-2021), remove AppleHDA patching requirement
|
||||
- Add BCM94322 and BCM94321 chipset support
|
||||
|
||||
## 0.0.21
|
||||
|
||||
- Fix botched images in OpenCanopy
|
||||
- Add support for 3rd party OpenCore usage detection during building
|
||||
- Mainly for users transitioning from Ausdauersportler's OpenCore configuration
|
||||
|
||||
## 0.0.20
|
||||
|
||||
- Fix CPU Calculation on early MCP79 chipsets (ie. iMac9,1, MacBook5,x)
|
||||
- Increment binaries
|
||||
- OpenCore c528597 (0.6.8 release - 2021-04-05)
|
||||
- Lilu 3ef7ca1 (1.5.2 release - 2021-04-05)
|
||||
- WhateverGreen afcd687 (1.4.9 release - 2021-04-05)
|
||||
- Move Apple binaries to dedicated repo and allow custom repos
|
||||
- Reduces App size 1/5th compared to 0.0.19
|
||||
- Fix OpenCanopy support on iMac7,1 and 8,1
|
||||
- Set iGPU-less iMacs to iMacPro1,1
|
||||
- Additionally fixes Bluetooth on older iMacs with BRCM2046 modules
|
||||
- Add MacBook4,1 support
|
||||
- Create dedicated RestrictEvents build for MacBookPro9,1
|
||||
- Fix Mac Pro and Xserve output issues
|
||||
|
||||
## 0.0.19
|
||||
|
||||
- Add SMC-Spoof.kext to avoid triggering `smcupdater`
|
||||
- Add Root Volume patching for older machines
|
||||
- AppleHDA Patch for 2011 and older (Excluding MacPro4,1+)
|
||||
- Fix CPU Speed reporting
|
||||
- Increment binaries
|
||||
- OpenCore 9cd61bb (0.6.8 rolling - 2021-03-27)
|
||||
- Add Mavericks and newer .app support
|
||||
- Refactor USB map building, fixes USB 3.0 displaying as USB 2.0
|
||||
- Fix blackscreen on MacBookPro9,1
|
||||
- Update RestrictEvents with custom build (1.0.1)
|
||||
- Blocks `/usr/libexec/displaypolicyd` on MacBookPro9,1 to ensure smooth GPU switching
|
||||
- Add custom SD Card icon
|
||||
- Add automatic codesiging and notarization
|
||||
- Fix crashing when CD is present
|
||||
- Add custom SSD icon
|
||||
- Fix Broadcom Ethernet on older 2009-2011 Macs
|
||||
|
||||
## 0.0.18
|
||||
|
||||
- Disable Vault by default due to breaking installations
|
||||
- Move BOOTx64.efi to System/Library/CoreServices/ to support GPT BootCamp installs
|
||||
- Disable verbose by default, still configurable by end-user
|
||||
- Remove `AppleInternal`(0x10) from SIP value
|
||||
- Add Mac Pro DRM patches for Metal GPUs
|
||||
- Force `Moderate` SMBIOS replacement for models without native APFS support
|
||||
- Re-enable legacy BCM94322 networking patches
|
||||
- Add custom drive icons for external drives
|
||||
|
||||
## 0.0.17
|
||||
|
||||
- Fix build detection breaking on older OS
|
||||
|
||||
## 0.0.16
|
||||
|
||||
- Move Serial selection to Patcher Settings
|
||||
- Add new SMBIOS patching options:
|
||||
- Minimal: Only update board ID and BIOSVersion, keep original serials
|
||||
- Moderate: Update entire SMBIOS, keep original serials
|
||||
- Advanced: Update entire SMBIOS, generate new serials
|
||||
- Fix crash on MacBookPro4,1
|
||||
- Fix External Display Support on MacBookPro10,1
|
||||
- Inject Patcher version into NVRAM for easier debugging
|
||||
- Add user-configurable ShowPicker
|
||||
- Add user-configurable Vaulting, enabled by default
|
||||
- Add user-configurable SIP and SecureBootModel
|
||||
- Fix USB Maps not working on "Minimal" SMBIOS
|
||||
- Fix GPU vendor user-configuration
|
||||
- Fix custom EFI Boot icon in Mac Boot Picker
|
||||
- Enable UserInterfaceTheme to ensure DefaultBackgroundColor is respected
|
||||
- Enable `amfi_get_out_of_my_way=1` when SIP is disabled
|
||||
|
||||
## 0.0.15
|
||||
|
||||
- Add user-configurable OpenCore DEBUG builds
|
||||
- Add user-configurable Wifi and GPU patches
|
||||
- Fix ThirdPartyDrives model detection
|
||||
- Add HW_BID injection to fix boot.efi error
|
||||
|
||||
## 0.0.14
|
||||
|
||||
- Enable ThirdPartyDrives to aid with hibernation on 3rd party SATA drives
|
||||
- Increment OpenCore 7bb41aa (0.6.8 rolling, 2021-03-06)
|
||||
- Add ForceBooterSignature to resolve hibernation issues
|
||||
- Add NightShiftEnabler (1.1.0 release e1639f9)
|
||||
- Add user-configurable verbose and debug settings
|
||||
- Add GopPassThrough quirk for UGA-based systems
|
||||
|
||||
## 0.0.13
|
||||
|
||||
- Add CPUFriend support to resolve X86PlatformPlugin clashes
|
||||
- (1.2.3 c388a62 release)
|
||||
- Fix crash with MacBookAir5,x
|
||||
- Fix hibernation support
|
||||
- Remove Wireless patches for BCM4328/4321(14e4:4328) due to boot issues
|
||||
|
||||
## 0.0.12
|
||||
|
||||
- Convert OpenCore-Patcher binary to OpenCore-Patcher.app
|
||||
- Add Backlight patches for modded Nvidia GPUs in iMac10,x-12,x
|
||||
- Fix sleep for iMac12,x with upgraded GPUs
|
||||
|
||||
## 0.0.11
|
||||
|
||||
- Re-add OpenCore GUI
|
||||
- Rewrite in py3
|
||||
- Add OpenCore-Patcher binary for releases avoiding local python requirement
|
||||
- Increment binaries
|
||||
- OpenCore cbd2fa3 (0.6.7 release)
|
||||
- WhateverGreen 2e19d1b (1.4.8 release)
|
||||
- Rework SMBIOS allowing both original and custom serials(Should resolve all iMessage issues)
|
||||
- Support upgraded GPU detection in iMac10,x-12,x
|
||||
- Add Wifi card upgrade detection
|
||||
|
||||
## 0.0.10
|
||||
|
||||
- Increment binaries
|
||||
- OpenCore 43f5339 (0.6.6 release)
|
||||
- Lilu d107554 (1.5.1 release)
|
||||
- WhateverGreen 9e53d8a (1.4.7 release)
|
||||
- Add IDE support to MacPro3,1
|
||||
- Set SecureBootModel to iMac Pro(should aid in booting older OSes with OpenCore)
|
||||
- Update MacBookPro SMBIOS
|
||||
|
||||
## 0.0.9
|
||||
|
||||
- Resolve firmware install issues bricking Macs
|
||||
|
||||
## 0.0.8
|
||||
|
||||
- Fix USB Map
|
||||
- Add HiDPI patch
|
||||
|
||||
## 0.0.7
|
||||
|
||||
- Add MacPro3,1 to HID patch
|
||||
- Fix missing SSDT-CPBG patch
|
||||
- Fix BlacklistAppleUpdate
|
||||
- Add RestrictEvents kext
|
||||
|
||||
## 0.0.6
|
||||
|
||||
- Fix macserial crashing
|
||||
|
||||
## 0.0.5
|
||||
|
||||
- Enable hibernation support
|
||||
- Work around USB Map failing
|
||||
- Add checks whether booting with OpenCore
|
||||
- Fix MouSSE injection
|
||||
|
||||
## 0.0.4
|
||||
|
||||
- Add basic audio support for legacy chipsets
|
||||
- Add patch for dual GPU machines
|
||||
|
||||
## 0.0.3
|
||||
|
||||
- Fix Wireless patch logic
|
||||
|
||||
## 0.0.2
|
||||
|
||||
- Expand IOHIDFamily Patch to all Nvidia chipsets
|
||||
- Fix Airdrop 1.0 support
|
||||
- Add El Capitan era wireless cards
|
||||
|
||||
## 0.0.1
|
||||
- Inital developer preview
|
||||
|
||||
- Initial developer preview
|
||||
|
||||
32
Info.plist
@@ -1,32 +0,0 @@
|
||||
<?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>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>OpenCore-Patcher.command</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>OC-Patcher.icns</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.dortania.OpenCore-Patcher</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>0.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>OpenCore-Patcher</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>0.0</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.4</string>
|
||||
<key>LSMultipleInstancesProhibited</key>
|
||||
<true/>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright 2020 Dortania</string>
|
||||
</dict>
|
||||
</plist>
|
||||
309
OCLP-CLI.command
Executable file
@@ -0,0 +1,309 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright (C) 2020-2021 Mykola Grymalyuk
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import subprocess
|
||||
import sys
|
||||
import platform
|
||||
import argparse
|
||||
from pathlib import Path
|
||||
|
||||
from Resources import Build, ModelArray, Constants, SysPatch, device_probe, Utilities, ModelExample
|
||||
|
||||
|
||||
class OpenCoreLegacyPatcher:
|
||||
def __init__(self):
|
||||
print("Loading...")
|
||||
Utilities.disable_cls()
|
||||
self.constants = Constants.Constants()
|
||||
self.constants.computer = device_probe.Computer.probe()
|
||||
self.computer = self.constants.computer
|
||||
self.constants.detected_os = int(platform.uname().release.partition(".")[0])
|
||||
self.constants.detected_os_minor = int(platform.uname().release.partition(".")[2].partition(".")[0])
|
||||
detected_os_build: str = subprocess.run("sw_vers -buildVersion".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
|
||||
self.constants.detected_os_build = detected_os_build
|
||||
|
||||
custom_cpu_model_value = Utilities.get_nvram("revcpuname", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102", decode=True)
|
||||
if custom_cpu_model_value is not None:
|
||||
# TODO: Fix to not use two separate variables
|
||||
self.constants.custom_cpu_model = 1
|
||||
self.constants.custom_cpu_model_value = custom_cpu_model_value.split("%00")[0]
|
||||
|
||||
if "-v" in (Utilities.get_nvram("boot-args") or ""):
|
||||
self.constants.verbose_debug = True
|
||||
|
||||
# Check if running in RecoveryOS
|
||||
self.constants.recovery_status = Utilities.check_recovery()
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
|
||||
# Generic building args
|
||||
parser.add_argument("--build", help="Build OpenCore", action="store_true", required=False)
|
||||
parser.add_argument("--verbose", help="Enable verbose boot", action="store_true", required=False)
|
||||
parser.add_argument("--debug_oc", help="Enable OpenCore DEBUG", action="store_true", required=False)
|
||||
parser.add_argument("--debug_kext", help="Enable kext DEBUG", action="store_true", required=False)
|
||||
parser.add_argument("--hide_picker", help="Hide OpenCore picker", action="store_true", required=False)
|
||||
parser.add_argument("--disable_sip", help="Disable SIP", action="store_true", required=False)
|
||||
parser.add_argument("--disable_smb", help="Disable SecureBootModel", action="store_true", required=False)
|
||||
parser.add_argument("--vault", help="Enable OpenCore Vaulting", action="store_true", required=False)
|
||||
parser.add_argument("--support_all", help="Allow OpenCore on natively supported Models", action="store_true", required=False)
|
||||
parser.add_argument("--firewire", help="Enable FireWire Booting", action="store_true", required=False)
|
||||
parser.add_argument("--nvme", help="Enable NVMe Booting", action="store_true", required=False)
|
||||
parser.add_argument("--wlan", help="Enable Wake on WLAN support", action="store_true", required=False)
|
||||
# parser.add_argument("--disable_amfi", help="Disable AMFI", action="store_true", required=False)
|
||||
parser.add_argument("--moderate_smbios", help="Moderate SMBIOS Patching", action="store_true", required=False)
|
||||
parser.add_argument("--moj_cat_accel", help="Allow Root Patching on Mojave and Catalina", action="store_true", required=False)
|
||||
parser.add_argument("--disable_thunderbolt", help="Disable Thunderbolt on 2013-2014 MacBook Pros", action="store_true", required=False)
|
||||
|
||||
# Building args requiring value values (ie. --model iMac12,2)
|
||||
parser.add_argument("--model", action="store", help="Set custom model", required=False)
|
||||
parser.add_argument("--disk", action="store", help="Specifies disk to install to", required=False)
|
||||
parser.add_argument("--smbios_spoof", action="store", help="Set SMBIOS patching mode", required=False)
|
||||
parser.add_argument("--lb_delay", action="store", help="Set Latebloom delay in ms", required=False)
|
||||
parser.add_argument("--lb_range", action="store", help="Set Latebloom range in ms", required=False)
|
||||
parser.add_argument("--lb_debug", action="store", help="Set Latebloom debug", required=False)
|
||||
|
||||
# SysPatch args
|
||||
parser.add_argument("--patch_sys_vol", help="Patches root volume", action="store_true", required=False)
|
||||
parser.add_argument("--unpatch_sys_vol", help="Unpatches root volume, EXPERIMENTAL", action="store_true", required=False)
|
||||
# parser.add_argument("--patch_disk", action="store", help="Specifies disk to root patch", required=False)
|
||||
|
||||
parser.add_argument("--validate", help="Validate", action="store_true", required=False)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
self.constants.gui_mode = True
|
||||
self.constants.current_path = Path.cwd()
|
||||
|
||||
if getattr(sys, "frozen", False) and hasattr(sys, "_MEIPASS"):
|
||||
print("- Rerouting payloads location")
|
||||
self.constants.payload_path = sys._MEIPASS / Path("payloads")
|
||||
else:
|
||||
print("- Using default payloads location")
|
||||
|
||||
if args.disk:
|
||||
print(f"- Install Disk set: {args.disk}")
|
||||
self.constants.disk = args.disk
|
||||
if args.validate:
|
||||
self.validate()
|
||||
# if args.patch_disk:
|
||||
# print(f"- Patch Disk set: {args.patch_disk}")
|
||||
# self.constants.patch_disk = args.patch_disk
|
||||
if args.verbose:
|
||||
print("- Set verbose configuration")
|
||||
self.constants.verbose_debug = True
|
||||
if args.debug_oc:
|
||||
print("- Set OpenCore DEBUG configuration")
|
||||
self.constants.opencore_debug = True
|
||||
self.constants.opencore_build = "DEBUG"
|
||||
if args.debug_kext:
|
||||
print("- Set kext DEBUG configuration")
|
||||
self.constants.kext_debug = True
|
||||
if args.hide_picker:
|
||||
print("- Set HidePicker configuration")
|
||||
self.constants.showpicker = False
|
||||
if args.disable_sip:
|
||||
print("- Set Disable SIP configuration")
|
||||
self.constants.sip_status = False
|
||||
if args.disable_smb:
|
||||
print("- Set Disable SecureBootModel configuration")
|
||||
self.constants.secure_status = False
|
||||
if args.vault:
|
||||
print("- Set Vault configuration")
|
||||
self.constants.vault = True
|
||||
if args.firewire:
|
||||
print("- Set FireWire Boot configuration")
|
||||
self.constants.firewire_boot = True
|
||||
if args.nvme:
|
||||
print("- Set NVMe Boot configuration")
|
||||
self.constants.nvme_boot = True
|
||||
# if args.disable_amfi:
|
||||
# print("- Set Disable AMFI configuration")
|
||||
# self.constants.amfi_status = False
|
||||
if args.wlan:
|
||||
print("- Set Wake on WLAN configuration")
|
||||
self.constants.enable_wake_on_wlan = True
|
||||
if args.disable_thunderbolt:
|
||||
print("- Set Disable Thunderbolt configuration")
|
||||
self.constants.disable_thunderbolt = True
|
||||
if args.moderate_smbios:
|
||||
print("- Set Moderate SMBIOS Patching configuration")
|
||||
self.constants.serial_settings = "Moderate"
|
||||
if args.smbios_spoof:
|
||||
if args.smbios_spoof == "Minimal":
|
||||
self.constants.serial_settings = "Minimal"
|
||||
elif args.smbios_spoof == "Moderate":
|
||||
self.constants.serial_settings = "Moderate"
|
||||
elif args.smbios_spoof == "Advanced":
|
||||
self.constants.serial_settings = "Advanced"
|
||||
else:
|
||||
print(f"- Unknown SMBIOS arg passed: {args.smbios_spoof}")
|
||||
|
||||
if args.lb_delay:
|
||||
try:
|
||||
self.constants.latebloom_delay = int(args.lb_delay)
|
||||
print(f"- Set LateBloom delay: {args.lb_delay}")
|
||||
except ValueError:
|
||||
print(f"- Invalid LateBloom delay: {args.lb_delay}")
|
||||
|
||||
if args.lb_range:
|
||||
try:
|
||||
self.constants.latebloom_range = int(args.lb_range)
|
||||
print(f"- Set LateBloom range: {args.lb_range}")
|
||||
except ValueError:
|
||||
print(f"- Invalid LateBloom range: {args.lb_range}")
|
||||
|
||||
if args.lb_debug:
|
||||
try:
|
||||
self.constants.latebloom_debug = int(args.lb_debug)
|
||||
if self.constants.latebloom_debug in [0, 1]:
|
||||
print(f"- Set LateBloom debug: {args.lb_debug}")
|
||||
else:
|
||||
print(f"- Invalid LateBloom debug: {args.lb_debug}")
|
||||
except ValueError:
|
||||
print(f"- Invalid LateBloom range: {args.lb_debug}")
|
||||
|
||||
if args.support_all:
|
||||
print("- Building for natively supported model")
|
||||
self.constants.allow_oc_everywhere = True
|
||||
self.constants.serial_settings = "None"
|
||||
|
||||
if args.build:
|
||||
if args.model:
|
||||
print(f"- Using custom model: {args.model}")
|
||||
self.constants.custom_model = args.model
|
||||
self.set_defaults(self.constants.custom_model, False)
|
||||
self.build_opencore()
|
||||
elif self.computer.real_model not in ModelArray.SupportedSMBIOS and self.constants.allow_oc_everywhere is False:
|
||||
print(
|
||||
"""Your model is not supported by this patcher for running unsupported OSes!"
|
||||
|
||||
If you plan to create the USB for another machine, please select the "Change Model" option in the menu."""
|
||||
)
|
||||
sys.exit(1)
|
||||
else:
|
||||
print(f"- Using detected model: {self.constants.computer.real_model}")
|
||||
self.set_defaults(self.constants.custom_model, True)
|
||||
self.build_opencore()
|
||||
if args.patch_sys_vol:
|
||||
if args.moj_cat_accel:
|
||||
print("- Set Mojave/Catalina root patch configuration")
|
||||
self.constants.moj_cat_accel = True
|
||||
print("- Set System Volume patching")
|
||||
self.patch_vol()
|
||||
elif args.unpatch_sys_vol:
|
||||
print("- Set System Volume unpatching")
|
||||
self.unpatch_vol()
|
||||
|
||||
def set_defaults(self, model, host_is_target):
|
||||
if host_is_target:
|
||||
if Utilities.check_metal_support(device_probe, self.computer) is False:
|
||||
self.constants.disable_cs_lv = True
|
||||
if self.computer.dgpu and self.computer.dgpu.arch == device_probe.NVIDIA.Archs.Kepler:
|
||||
self.constants.sip_status = False
|
||||
self.constants.amfi_status = True
|
||||
self.constants.allow_fv_root = True # Allow FileVault on broken seal
|
||||
if (
|
||||
isinstance(self.computer.wifi, device_probe.Broadcom)
|
||||
and self.computer.wifi.chipset in [device_probe.Broadcom.Chipsets.AirPortBrcm4331, device_probe.Broadcom.Chipsets.AirPortBrcm43224]
|
||||
) or (isinstance(self.computer.wifi, device_probe.Atheros) and self.computer.wifi.chipset == device_probe.Atheros.Chipsets.AirPortAtheros40):
|
||||
self.constants.sip_status = False
|
||||
self.constants.allow_fv_root = True # Allow FileVault on broken seal
|
||||
elif model in ModelArray.LegacyGPU:
|
||||
self.constants.disable_cs_lv = True
|
||||
if model in ModelArray.LegacyGPU:
|
||||
if host_is_target and Utilities.check_metal_support(device_probe, self.computer) is True:
|
||||
# Building on device and we have a native, supported GPU
|
||||
if self.computer.dgpu and self.computer.dgpu.arch == device_probe.NVIDIA.Archs.Kepler:
|
||||
self.constants.sip_status = False
|
||||
# self.constants.secure_status = True # Monterey
|
||||
self.constants.amfi_status = True
|
||||
self.constants.allow_fv_root = True # Allow FileVault on broken seal
|
||||
else:
|
||||
self.constants.sip_status = True
|
||||
# self.constants.secure_status = True # Monterey
|
||||
self.constants.amfi_status = True
|
||||
else:
|
||||
self.constants.sip_status = False # Unsigned kexts
|
||||
self.constants.secure_status = False # Root volume modified
|
||||
self.constants.amfi_status = False # Unsigned binaries
|
||||
self.constants.allow_fv_root = True # Allow FileVault on broken seal
|
||||
if model in ModelArray.ModernGPU:
|
||||
self.constants.sip_status = False # Unsigned kexts
|
||||
self.constants.secure_status = False # Modified root volume
|
||||
self.constants.allow_fv_root = True # Allow FileVault on broken seal
|
||||
# self.constants.amfi_status = True # Signed bundles, Don't need to explicitly set currently
|
||||
if model == "MacBook8,1":
|
||||
# MacBook8,1 has an odd bug where it cannot install Monterey with Minimal spoofing
|
||||
self.constants.serial_settings == "Moderate"
|
||||
|
||||
if self.constants.latebloom_delay == 0:
|
||||
self.constants.latebloom_delay, self.constants.latebloom_range, self.constants.latebloom_debug = Utilities.latebloom_detection(model)
|
||||
|
||||
if Utilities.get_nvram("gpu-power-prefs", "FA4CE28D-B62F-4C99-9CC3-6815686E30F9", decode=True):
|
||||
self.constants.allow_ts2_accel = False
|
||||
|
||||
def patch_vol(self):
|
||||
SysPatch.PatchSysVolume(self.constants.custom_model or self.constants.computer.real_model, self.constants).start_patch()
|
||||
|
||||
def unpatch_vol(self):
|
||||
SysPatch.PatchSysVolume(self.constants.custom_model or self.constants.computer.real_model, self.constants).start_unpatch()
|
||||
|
||||
def build_opencore(self):
|
||||
Build.BuildOpenCore(self.constants.custom_model or self.constants.computer.real_model, self.constants).build_opencore()
|
||||
|
||||
def install_opencore(self):
|
||||
Build.BuildOpenCore(self.constants.custom_model or self.constants.computer.real_model, self.constants).copy_efi()
|
||||
|
||||
def validate(self):
|
||||
# Runs through ocvalidate to check for errors
|
||||
|
||||
valid_dumps = [
|
||||
ModelExample.MacBookPro.MacBookPro92_Stock,
|
||||
# ModelExample.MacBookPro.MacBookPro171_Stock,
|
||||
# ModelExample.Macmini.Macmini91_Stock,
|
||||
ModelExample.iMac.iMac81_Stock,
|
||||
ModelExample.iMac.iMac112_Stock,
|
||||
ModelExample.iMac.iMac122_Upgraded,
|
||||
ModelExample.MacPro.MacPro31_Stock,
|
||||
ModelExample.MacPro.MacPro31_Upgrade,
|
||||
ModelExample.MacPro.MacPro31_Modern_AMD,
|
||||
ModelExample.MacPro.MacPro31_Modern_Kepler,
|
||||
ModelExample.MacPro.MacPro41_Upgrade,
|
||||
ModelExample.MacPro.MacPro41_Modern_AMD,
|
||||
ModelExample.MacPro.MacPro41_51__Flashed_Modern_AMD,
|
||||
]
|
||||
self.constants.validate = True
|
||||
|
||||
for model in ModelArray.SupportedSMBIOS:
|
||||
print(f"Validating predefined model: {model}")
|
||||
self.constants.custom_model = model
|
||||
self.build_opencore()
|
||||
result = subprocess.run([self.constants.ocvalidate_path, f"{self.constants.opencore_release_folder}/EFI/OC/config.plist"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
if result.returncode != 0:
|
||||
print("Error on build!")
|
||||
print(result.stdout.decode())
|
||||
raise Exception(f"Validation failed for predefined model: {model}")
|
||||
else:
|
||||
print(f"Validation succeeded for predefined model: {model}")
|
||||
|
||||
for model in valid_dumps:
|
||||
self.constants.computer = model
|
||||
self.computer = self.constants.computer
|
||||
self.constants.custom_model = ""
|
||||
print(f"Validating dumped model: {self.computer.real_model}")
|
||||
self.build_opencore()
|
||||
result = subprocess.run([self.constants.ocvalidate_path, f"{self.constants.opencore_release_folder}/EFI/OC/config.plist"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
if result.returncode != 0:
|
||||
print("Error on build!")
|
||||
print(result.stdout.decode())
|
||||
raise Exception(f"Validation failed for predefined model: {self.computer.real_model}")
|
||||
else:
|
||||
print(f"Validation succeeded for predefined model: {self.computer.real_model}")
|
||||
|
||||
|
||||
OpenCoreLegacyPatcher()
|
||||
|
||||
# Example arg for OCLP command line
|
||||
# ./OCLP-CLI --build --verbose --debug_oc --debug_kext --model iMac11,2
|
||||
35
OCLP-CLI.spec
Normal file
@@ -0,0 +1,35 @@
|
||||
# -*- mode: python ; coding: utf-8 -*-
|
||||
import sys, os
|
||||
sys.path.append(os.path.abspath(os.getcwd()))
|
||||
from Resources import Constants
|
||||
block_cipher = None
|
||||
|
||||
|
||||
a = Analysis(['OCLP-CLI.command'],
|
||||
pathex=['Resources'],
|
||||
binaries=[],
|
||||
datas=[('payloads', 'payloads')],
|
||||
hiddenimports=[],
|
||||
hookspath=[],
|
||||
runtime_hooks=[],
|
||||
excludes=[],
|
||||
win_no_prefer_redirects=False,
|
||||
win_private_assemblies=False,
|
||||
cipher=block_cipher,
|
||||
noarchive=False)
|
||||
pyz = PYZ(a.pure, a.zipped_data,
|
||||
cipher=block_cipher)
|
||||
exe = EXE(pyz,
|
||||
a.scripts,
|
||||
a.binaries,
|
||||
a.zipfiles,
|
||||
a.datas,
|
||||
[('u', None, 'OPTION')],
|
||||
name='OCLP-CLI',
|
||||
debug=False,
|
||||
bootloader_ignore_signals=False,
|
||||
strip=False,
|
||||
upx=True,
|
||||
upx_exclude=[],
|
||||
runtime_tmpdir=None,
|
||||
console=True )
|
||||
@@ -1,234 +1,434 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
# Copyright (C) 2020-2021, Dhinak G, Mykola Grymalyuk
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
from shutil import copy
|
||||
from shutil import rmtree
|
||||
|
||||
import os
|
||||
import json
|
||||
import platform
|
||||
import subprocess
|
||||
import sys
|
||||
import zipfile
|
||||
|
||||
from Resources import *
|
||||
from Resources import Build, CliMenu, Constants, ModelArray, SysPatch, Utilities, device_probe
|
||||
|
||||
|
||||
# Allow py2 and 3 support
|
||||
try:
|
||||
input = raw_input
|
||||
except NameError:
|
||||
pass
|
||||
class OpenCoreLegacyPatcher:
|
||||
def __init__(self):
|
||||
print("Loading...")
|
||||
self.constants = Constants.Constants()
|
||||
self.constants.computer = device_probe.Computer.probe()
|
||||
self.computer = self.constants.computer
|
||||
self.constants.detected_os = int(platform.uname().release.partition(".")[0])
|
||||
self.constants.detected_os_minor = int(platform.uname().release.partition(".")[2].partition(".")[0])
|
||||
detected_os_build: str = subprocess.run("sw_vers -buildVersion".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
|
||||
self.constants.detected_os_build = detected_os_build
|
||||
self.set_defaults(self.computer.real_model, True)
|
||||
|
||||
# List build versions
|
||||
patcher_version = "0.0.6"
|
||||
def set_defaults(self, model, host_is_target):
|
||||
# Defaults
|
||||
self.constants.sip_status = True
|
||||
self.constants.secure_status = False # Default false for Monterey
|
||||
self.constants.amfi_status = True
|
||||
|
||||
CustomSMBIOS=False
|
||||
MainMenu=True
|
||||
MenuWidth = 52
|
||||
header = '#' * MenuWidth
|
||||
subheader = '-' * MenuWidth
|
||||
|
||||
while MainMenu:
|
||||
os.system('clear')
|
||||
|
||||
print(header)
|
||||
print(" OpenCore Legacy patcher v%s" % patcher_version)
|
||||
print(" Current Model: %s" % BuildOpenCore.current_model)
|
||||
print(header)
|
||||
print("")
|
||||
if BuildOpenCore.current_model not in ModelArray.SupportedSMBIOS:
|
||||
print(" Your model is not supported by this patcher!")
|
||||
print("")
|
||||
print(" If you plan to create the USB for another machine,")
|
||||
print(" please select option 5")
|
||||
print(subheader)
|
||||
print("")
|
||||
elif BuildOpenCore.current_model in ("MacPro3,1", "iMac7,1"):
|
||||
print(" This model is supported")
|
||||
print(" However please ensure the CPU have been upgraded")
|
||||
print(" to support SSE4.1+")
|
||||
print(subheader)
|
||||
print("")
|
||||
else:
|
||||
print(" This model is supported")
|
||||
print(subheader)
|
||||
print("")
|
||||
print(" 1. Build OpenCore")
|
||||
print(" 2. Install OpenCore to USB/internal drive")
|
||||
print(" 3. Change model")
|
||||
print(" 4. Credits")
|
||||
print(" 5. Exit")
|
||||
print("")
|
||||
|
||||
MainMenu = input('Please select an option: ')
|
||||
|
||||
if MainMenu=="1":
|
||||
OpenCoreBuilderMenu=True
|
||||
while OpenCoreBuilderMenu:
|
||||
os.system('clear')
|
||||
|
||||
print(header)
|
||||
print(" Build OpenCore v%s for model: %s" % (Versions.opencore_version, BuildOpenCore.current_model))
|
||||
print(header)
|
||||
print("")
|
||||
print(" 1. Auto build OpenCore")
|
||||
print(" 2. Change OpenCore version")
|
||||
print(" 3. Return to main menu")
|
||||
print("")
|
||||
|
||||
OpenCoreBuilderMenu = input('Please select an option: ')
|
||||
|
||||
if OpenCoreBuilderMenu=="1":
|
||||
AutoBuilderMenu=True
|
||||
while AutoBuilderMenu:
|
||||
os.system('clear')
|
||||
print(header)
|
||||
print(" Building OpenCore for model: %s" % BuildOpenCore.current_model)
|
||||
print(header)
|
||||
print("")
|
||||
print("The current working directory:")
|
||||
print (" %s" % Versions.current_path)
|
||||
print("")
|
||||
BuildOpenCore.BuildEFI()
|
||||
#BuildOpenCore.BuildGUI()
|
||||
BuildOpenCore.BuildSMBIOS()
|
||||
BuildOpenCore.SavePlist()
|
||||
BuildOpenCore.CleanBuildFolder()
|
||||
print("")
|
||||
print("Your OpenCore EFI has been built at:")
|
||||
print(" %s" % Versions.opencore_path_done)
|
||||
print("")
|
||||
AutoBuilderMenu = input("Press any key to return to previous menu: ")
|
||||
if AutoBuilderMenu=="1":
|
||||
print("Returning to previous menu...")
|
||||
AutoBuilderMenu=False
|
||||
OpenCoreBuilderMenu=False
|
||||
elif OpenCoreBuilderMenu=="2":
|
||||
ChangeOCversion=True
|
||||
while ChangeOCversion:
|
||||
os.system('clear')
|
||||
print(header)
|
||||
print(" Current OpenCore version: %s" % Versions.opencore_version)
|
||||
print(header)
|
||||
print("")
|
||||
print(" Supported versions: 0.6.3, 0.6.4")
|
||||
print("")
|
||||
OpenCoreOption = input('Please enter the OpenCore you want (Press enter to exit): ')
|
||||
if OpenCoreOption == "":
|
||||
print("Exiting...")
|
||||
ChangeOCversion=False
|
||||
MainMenu=True
|
||||
else:
|
||||
print("")
|
||||
print(" New SMBIOS: %s" % OpenCoreOption)
|
||||
print("")
|
||||
ChangeOCversionYN = input("Is this correct? (y/n)")
|
||||
if ChangeOCversionYN in {"y", "Y", "yes", "Yes"}:
|
||||
ChangeOCversion=False
|
||||
Versions.opencore_version = OpenCoreOption
|
||||
MainMenu=True
|
||||
elif OpenCoreBuilderMenu=="3":
|
||||
print("\n Returning to main menu...")
|
||||
OpenCoreBuilderMenu=False
|
||||
MainMenu=True
|
||||
else:
|
||||
print("\n Not Valid Choice Try again")
|
||||
OpenCoreBuilderMenu = True
|
||||
|
||||
|
||||
elif MainMenu=="2":
|
||||
print("\n Not yet implemented")
|
||||
OpenCoreInstallerMenu=True
|
||||
while OpenCoreInstallerMenu:
|
||||
os.system('clear')
|
||||
|
||||
print(header)
|
||||
print(" Install OpenCore to drive")
|
||||
print(header)
|
||||
print("")
|
||||
print(" 1. Install to USB/internal drive")
|
||||
print(" 2. Return to main menu")
|
||||
print("")
|
||||
|
||||
OpenCoreInstallerMenu = input('Please select an option: ')
|
||||
|
||||
if OpenCoreInstallerMenu=="1":
|
||||
os.system('clear')
|
||||
if os.path.exists(Versions.opencore_path_done):
|
||||
print("Found OpenCore in Build Folder")
|
||||
BuildOpenCore.ListDiskutil()
|
||||
BuildOpenCore.MoveOpenCore()
|
||||
if host_is_target:
|
||||
if Utilities.check_metal_support(device_probe, self.computer) is False:
|
||||
self.constants.disable_cs_lv = True
|
||||
if self.computer.dgpu and self.computer.dgpu.arch == device_probe.NVIDIA.Archs.Kepler:
|
||||
self.constants.sip_status = False
|
||||
self.constants.amfi_status = True
|
||||
self.constants.allow_fv_root = True # Allow FileVault on broken seal
|
||||
if (
|
||||
isinstance(self.computer.wifi, device_probe.Broadcom)
|
||||
and self.computer.wifi.chipset in [device_probe.Broadcom.Chipsets.AirPortBrcm4331, device_probe.Broadcom.Chipsets.AirPortBrcm43224]
|
||||
) or (isinstance(self.computer.wifi, device_probe.Atheros) and self.computer.wifi.chipset == device_probe.Atheros.Chipsets.AirPortAtheros40):
|
||||
self.constants.sip_status = False
|
||||
self.constants.allow_fv_root = True # Allow FileVault on broken seal
|
||||
elif model in ModelArray.LegacyGPU:
|
||||
self.constants.disable_cs_lv = True
|
||||
|
||||
if model in ModelArray.LegacyGPU:
|
||||
if host_is_target and Utilities.check_metal_support(device_probe, self.computer) is True:
|
||||
# Building on device and we have a native, supported GPU
|
||||
if self.computer.dgpu and self.computer.dgpu.arch == device_probe.NVIDIA.Archs.Kepler:
|
||||
self.constants.sip_status = False
|
||||
# self.constants.secure_status = True # Monterey
|
||||
self.constants.allow_fv_root = True # Allow FileVault on broken seal
|
||||
else:
|
||||
print("OpenCore folder missing!")
|
||||
print("Please build OpenCore first")
|
||||
print("")
|
||||
OpenCoreInstallerMenu = input("Press any key to exit: ")
|
||||
if OpenCoreInstallerMenu=="1":
|
||||
print("Returning to main menu...")
|
||||
OpenCoreInstallerMenu=False
|
||||
elif OpenCoreInstallerMenu=="2":
|
||||
print("\n Returning to main menu...")
|
||||
OpenCoreInstallerMenu=False
|
||||
MainMenu=True
|
||||
self.constants.sip_status = True
|
||||
# self.constants.secure_status = True # Monterey
|
||||
self.constants.amfi_status = True
|
||||
else:
|
||||
print("\n Not Valid Choice Try again")
|
||||
OpenCoreInstallerMenu = True
|
||||
self.constants.sip_status = False # Unsigned kexts
|
||||
self.constants.secure_status = False # Root volume modified
|
||||
self.constants.amfi_status = False # Unsigned binaries
|
||||
self.constants.allow_fv_root = True # Allow FileVault on broken seal
|
||||
if model in ModelArray.ModernGPU:
|
||||
self.constants.sip_status = False # Unsigned kexts
|
||||
self.constants.secure_status = False # Modified root volume
|
||||
self.constants.allow_fv_root = True # Allow FileVault on broken seal
|
||||
# self.constants.amfi_status = True # Signed bundles, Don't need to explicitly set currently
|
||||
|
||||
|
||||
elif MainMenu=="3":
|
||||
SMBIOSMenu=True
|
||||
while SMBIOSMenu:
|
||||
os.system('clear')
|
||||
if model == "MacBook8,1":
|
||||
# MacBook8,1 has an odd bug where it cannot install Monterey with Minimal spoofing
|
||||
self.constants.serial_settings = "Moderate"
|
||||
|
||||
print(header)
|
||||
print(" Enter a new SMBIOS")
|
||||
print(header)
|
||||
print("")
|
||||
print(" Tip: Run this command on the machine to find the SMBIOS")
|
||||
print("")
|
||||
print(" system_profiler SPHardwareDataType | grep 'Model Identifier'")
|
||||
print("")
|
||||
SMBIOSOption = input('Please enter the SMBIOS of your machine (Press enter to exit): ')
|
||||
if SMBIOSOption == "":
|
||||
print("Exiting...")
|
||||
SMBIOSMenu=False
|
||||
MainMenu=True
|
||||
custom_cpu_model_value = Utilities.get_nvram("revcpuname", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102", decode=True)
|
||||
if custom_cpu_model_value is not None:
|
||||
# TODO: Fix to not use two separate variables
|
||||
self.constants.custom_cpu_model = 1
|
||||
self.constants.custom_cpu_model_value = custom_cpu_model_value.split("%00")[0]
|
||||
|
||||
if "-v" in (Utilities.get_nvram("boot-args") or ""):
|
||||
self.constants.verbose_debug = True
|
||||
|
||||
if Utilities.amfi_status() is False:
|
||||
self.constants.amfi_status = False
|
||||
|
||||
if Utilities.get_nvram("gpu-power-prefs", "FA4CE28D-B62F-4C99-9CC3-6815686E30F9", decode=True):
|
||||
self.constants.allow_ts2_accel = False
|
||||
|
||||
if self.constants.latebloom_delay == 0:
|
||||
self.constants.latebloom_delay, self.constants.latebloom_range, self.constants.latebloom_debug = Utilities.latebloom_detection(model)
|
||||
|
||||
if Utilities.get_nvram("gpu-power-prefs", "FA4CE28D-B62F-4C99-9CC3-6815686E30F9", decode=True):
|
||||
self.constants.allow_ts2_accel = False
|
||||
|
||||
# Check if running in RecoveryOS
|
||||
self.constants.recovery_status = Utilities.check_recovery()
|
||||
|
||||
def build_opencore(self):
|
||||
Build.BuildOpenCore(self.constants.custom_model or self.constants.computer.real_model, self.constants).build_opencore()
|
||||
|
||||
def install_opencore(self):
|
||||
Build.BuildOpenCore(self.constants.custom_model or self.constants.computer.real_model, self.constants).copy_efi()
|
||||
|
||||
def change_model(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Select Different Model"])
|
||||
print(
|
||||
"""
|
||||
Tip: Run the following command on the target machine to find the model identifier:
|
||||
|
||||
system_profiler SPHardwareDataType | grep 'Model Identifier'
|
||||
"""
|
||||
)
|
||||
self.constants.custom_model = input("Please enter the model identifier of the target machine: ").strip()
|
||||
if self.constants.custom_model not in ModelArray.SupportedSMBIOS:
|
||||
print(
|
||||
f"""
|
||||
{self.constants.custom_model} is not a valid SMBIOS Identifier for macOS {self.constants.os_support}!
|
||||
"""
|
||||
)
|
||||
print_models = input(f"Print list of valid options for macOS {self.constants.os_support}? (y/n)")
|
||||
if print_models.lower() in {"y", "yes"}:
|
||||
print("\n".join(ModelArray.SupportedSMBIOS))
|
||||
input("\nPress [ENTER] to continue")
|
||||
else:
|
||||
self.set_defaults(self.constants.custom_model, False)
|
||||
|
||||
def patcher_settings(self):
|
||||
response = None
|
||||
while not (response and response == -1):
|
||||
title = ["Adjust Patcher Settings"]
|
||||
menu = Utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True)
|
||||
options = [
|
||||
["Debug Settings", self.patcher_setting_debug],
|
||||
["Security Settings", self.patcher_settings_security],
|
||||
["SMBIOS Settings", self.patcher_settings_smbios],
|
||||
["Boot Volume Settings", self.patcher_settings_boot],
|
||||
["Miscellaneous Settings", self.patcher_settings_misc],
|
||||
["Dump detected hardware", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).dump_hardware],
|
||||
[
|
||||
f"Allow Accel on Mojave/Catalina:\tCurrently {self.constants.moj_cat_accel}",
|
||||
CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).allow_moj_cat_patch,
|
||||
],
|
||||
[
|
||||
f"Allow OpenCore on native Models:\tCurrently {self.constants.allow_oc_everywhere}",
|
||||
CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).allow_native_models,
|
||||
],
|
||||
["Advanced Settings, for developers only", self.advanced_patcher_settings],
|
||||
]
|
||||
|
||||
for option in options:
|
||||
menu.add_menu_option(option[0], function=option[1])
|
||||
|
||||
response = menu.start()
|
||||
|
||||
def patcher_setting_debug(self):
|
||||
response = None
|
||||
while not (response and response == -1):
|
||||
title = ["Adjust Debug Settings"]
|
||||
menu = Utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True)
|
||||
options = [
|
||||
[f"Enable Verbose Mode:\tCurrently {self.constants.verbose_debug}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_verbose],
|
||||
[f"Enable OpenCore DEBUG:\tCurrently {self.constants.opencore_debug}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_oc],
|
||||
[f"Enable Kext DEBUG:\t\tCurrently {self.constants.kext_debug}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_kext],
|
||||
] + (
|
||||
[
|
||||
[
|
||||
f"Set Latebloom args:\t\tDelay {self.constants.latebloom_delay}, Range {self.constants.latebloom_range}, Debug {self.constants.latebloom_debug}",
|
||||
CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).latebloom_settings,
|
||||
]
|
||||
]
|
||||
if ((self.constants.custom_model or self.computer.real_model) in ModelArray.PCIRaceCondition)
|
||||
else []
|
||||
)
|
||||
|
||||
for option in options:
|
||||
menu.add_menu_option(option[0], function=option[1])
|
||||
|
||||
response = menu.start()
|
||||
|
||||
def patcher_settings_security(self):
|
||||
response = None
|
||||
while not (response and response == -1):
|
||||
title = ["Adjust Security Settings"]
|
||||
menu = Utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True)
|
||||
options = [
|
||||
# [
|
||||
# f"Set Apple Mobile File Integrity (AMFI):\tCurrently {self.constants.amfi_status}",
|
||||
# CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).set_amfi,
|
||||
# ],
|
||||
[
|
||||
f"Set System Intrgity Protection (SIP):\tCurrently {self.constants.sip_status}",
|
||||
CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_sip,
|
||||
],
|
||||
[
|
||||
f"Set Secure Boot Model (SBM):\t\tCurrently {self.constants.secure_status}",
|
||||
CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_sbm,
|
||||
],
|
||||
[f"Set Vault Mode:\t\t\t\tCurrently {self.constants.vault}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_vault],
|
||||
]
|
||||
|
||||
for option in options:
|
||||
menu.add_menu_option(option[0], function=option[1])
|
||||
|
||||
response = menu.start()
|
||||
|
||||
def patcher_settings_smbios(self):
|
||||
response = None
|
||||
while not (response and response == -1):
|
||||
title = ["Adjust SMBIOS Settings"]
|
||||
menu = Utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True)
|
||||
options = [
|
||||
[f"Set SMBIOS Spoof Level:\tCurrently {self.constants.serial_settings}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_serial],
|
||||
[f"Set SMBIOS Spoof Model:\tCurrently {self.constants.override_smbios}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).set_smbios],
|
||||
[f"Set Custom name {self.constants.custom_cpu_model_value}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).custom_cpu],
|
||||
]
|
||||
|
||||
for option in options:
|
||||
menu.add_menu_option(option[0], function=option[1])
|
||||
|
||||
response = menu.start()
|
||||
|
||||
def patcher_settings_boot(self):
|
||||
response = None
|
||||
while not (response and response == -1):
|
||||
title = ["Adjust Bootable Volume Settings"]
|
||||
menu = Utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True)
|
||||
options = [
|
||||
[f"Set FireWire Boot:\tCurrently {self.constants.firewire_boot}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).allow_firewire],
|
||||
[f"Set NVMe Boot:\tCurrently {self.constants.nvme_boot}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).allow_nvme],
|
||||
]
|
||||
|
||||
for option in options:
|
||||
menu.add_menu_option(option[0], function=option[1])
|
||||
|
||||
response = menu.start()
|
||||
|
||||
def patcher_settings_misc(self):
|
||||
response = None
|
||||
while not (response and response == -1):
|
||||
title = ["Adjust Miscellaneous Settings"]
|
||||
menu = Utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True)
|
||||
options = [
|
||||
[f"Set ShowPicker Mode:\tCurrently {self.constants.showpicker}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_showpicker],
|
||||
[f"Set Wake on WLAN:\t\tCurrently {self.constants.enable_wake_on_wlan}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).allow_wowl],
|
||||
[f"Set Ivy iMac iGPU:\t\tCurrently {self.constants.allow_ivy_igpu}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).allow_ivy],
|
||||
[f"Set TeraScale 2 Accel:\tCurrently {self.constants.allow_ts2_accel}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).terascale_2_accel],
|
||||
[
|
||||
f"Disable Thunderbolt:\tCurrently {self.constants.disable_thunderbolt}",
|
||||
CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).disable_thunderbolt,
|
||||
],
|
||||
]
|
||||
|
||||
for option in options:
|
||||
menu.add_menu_option(option[0], function=option[1])
|
||||
|
||||
response = menu.start()
|
||||
|
||||
def advanced_patcher_settings(self):
|
||||
response = None
|
||||
while not (response and response == -1):
|
||||
title = ["Adjust Advanced Patcher Settings, for developers ONLY"]
|
||||
menu = Utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True)
|
||||
options = [
|
||||
[f"Set Metal GPU Status:\t\tCurrently {self.constants.imac_vendor}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).change_metal],
|
||||
[f"Set DRM Preferences:\t\tCurrently {self.constants.drm_support}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).drm_setting],
|
||||
[f"Set Generic Bootstrap:\t\tCurrently {self.constants.boot_efi}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).bootstrap_setting],
|
||||
[
|
||||
f"Disable CPU Friend:\t\t\tCurrently {self.constants.disallow_cpufriend}",
|
||||
CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).disable_cpufriend,
|
||||
],
|
||||
]
|
||||
|
||||
for option in options:
|
||||
menu.add_menu_option(option[0], function=option[1])
|
||||
|
||||
response = menu.start()
|
||||
|
||||
def credits(self):
|
||||
Utilities.TUIOnlyPrint(
|
||||
["Credits"],
|
||||
"Press [Enter] to go back.\n",
|
||||
[
|
||||
"""Many thanks to the following:
|
||||
|
||||
- Acidanthera:\tOpenCore, kexts and other tools
|
||||
- Khronokernel:\tWriting and maintaining this patcher
|
||||
- DhinakG:\t\tWriting and maintaining this patcher
|
||||
- ASentientBot:\tLegacy Acceleration Patches
|
||||
- Ausdauersportler:\tLinking fixes for SNBGraphicsFB and AMDX3000
|
||||
- Syncretic:\t\tAAAMouSSE and telemetrap
|
||||
- cdf:\t\tNightShiftEnabler and Innie"""
|
||||
],
|
||||
).start()
|
||||
|
||||
def PatchVolume(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Patching System Volume"])
|
||||
big_sur = """Patches Root volume to fix misc issues such as:
|
||||
|
||||
- Non-Metal Graphics Acceleration
|
||||
- Intel: Ironlake - Sandy Bridge
|
||||
- Nvidia: Tesla - Fermi (8000-500 series)
|
||||
- AMD: TeraScale 1 and 2 (2000-6000 series)
|
||||
- Audio support for iMac7,1 and iMac8,1
|
||||
|
||||
WARNING: Root Volume Patching is still in active development, please
|
||||
have all important user data backed up. Note when the system volume
|
||||
is patched, you can no longer have Delta updates.
|
||||
|
||||
Supported Options:
|
||||
|
||||
1. Patch System Volume
|
||||
2. Unpatch System Volume (Experimental)
|
||||
B. Exit
|
||||
"""
|
||||
monterey = """Patches Root volume to fix misc issues such as:
|
||||
|
||||
- Metal Graphics Acceleration
|
||||
- Intel: Ivy Bridge (4000 series iGPUs)
|
||||
- Nvidia: Kepler (600-700)
|
||||
- Non-Metal Graphics Accelertation
|
||||
- Intel: Ironlake - Sandy Bridge
|
||||
- Nvidia: Tesla - Fermi (8000-500 series)
|
||||
- AMD: TeraScale 1 and 2 (2000-6000 series)
|
||||
- Audio support for iMac7,1 and iMac8,1
|
||||
- Wifi support for BCM94328, BCM94322 and Atheros cards
|
||||
|
||||
WARNING: Root Volume Patching is still in active development, please
|
||||
have all important user data backed up. Note when the system volume
|
||||
is patched, you can no longer have Delta updates.
|
||||
|
||||
Supported Options:
|
||||
|
||||
1. Patch System Volume
|
||||
2. Unpatch System Volume (Experimental)
|
||||
B. Exit
|
||||
"""
|
||||
mojave_catalina = """Patches Root volume to fix misc issues such as:
|
||||
|
||||
- Non-Metal Graphics Acceleration
|
||||
- Intel: Ironlake - Sandy Bridge
|
||||
- Nvidia: Tesla - Fermi (8000-500 series)
|
||||
- AMD: TeraScale 1 and 2 (2000-6000 series)
|
||||
- Audio support for iMac7,1 and iMac8,1
|
||||
|
||||
WARNING: Root Volume Patching is still in active development, please
|
||||
have all important user data backed up. Note when the system volume
|
||||
is patched, you can no longer have Delta updates.
|
||||
|
||||
Supported Options:
|
||||
|
||||
1. Patch System Volume
|
||||
2. Unpatch System Volume (Experimental)
|
||||
B. Exit
|
||||
"""
|
||||
|
||||
default = """
|
||||
This OS has no root patches available to apply, please ensure you're patching a booted
|
||||
install that requires root patches such as macOS Big Sur or Monterey
|
||||
|
||||
Supported Options:
|
||||
|
||||
B. Exit
|
||||
"""
|
||||
no_patch = False
|
||||
if self.constants.detected_os == self.constants.monterey:
|
||||
print(monterey)
|
||||
elif self.constants.detected_os == self.constants.big_sur:
|
||||
print(big_sur)
|
||||
elif self.constants.detected_os in [self.constants.mojave, self.constants.catalina] and self.constants.moj_cat_accel == True:
|
||||
print(mojave_catalina)
|
||||
else:
|
||||
print(default)
|
||||
no_patch = True
|
||||
change_menu = input("Patch System Volume?: ")
|
||||
if no_patch is not True and change_menu == "1":
|
||||
SysPatch.PatchSysVolume(self.constants.custom_model or self.computer.real_model, self.constants).start_patch()
|
||||
elif no_patch is not True and change_menu == "2":
|
||||
SysPatch.PatchSysVolume(self.constants.custom_model or self.computer.real_model, self.constants).start_unpatch()
|
||||
else:
|
||||
print("Returning to main menu")
|
||||
|
||||
def main_menu(self):
|
||||
response = None
|
||||
while not (response and response == -1):
|
||||
title = [
|
||||
f"OpenCore Legacy Patcher v{self.constants.patcher_version}",
|
||||
f"Selected Model: {self.constants.custom_model or self.computer.real_model}",
|
||||
]
|
||||
|
||||
if (self.constants.custom_model or self.computer.real_model) not in ModelArray.SupportedSMBIOS and self.constants.allow_oc_everywhere is False:
|
||||
in_between = [
|
||||
"Your model is not supported by this patcher for running unsupported OSes!",
|
||||
"",
|
||||
'If you plan to create the USB for another machine, please select the \n"Change Model" option in the menu.',
|
||||
"",
|
||||
'If you want to run OCLP on a native Mac, please toggle \n"Allow OpenCore on native Models" in settings',
|
||||
]
|
||||
elif not self.constants.custom_model and self.computer.real_model == "iMac7,1" and "SSE4.1" not in self.computer.cpu.flags:
|
||||
in_between = [
|
||||
"Your model requires a CPU upgrade to a CPU supporting SSE4.1+ to be supported by this patcher!",
|
||||
"",
|
||||
f'If you plan to create the USB for another {self.computer.real_model} with SSE4.1+, please select the "Change Model" option in the menu.',
|
||||
]
|
||||
elif self.constants.custom_model == "iMac7,1":
|
||||
in_between = ["This model is supported", "However please ensure the CPU has been upgraded to support SSE4.1+"]
|
||||
else:
|
||||
print("")
|
||||
print(" New SMBIOS: %s" % SMBIOSOption)
|
||||
print("")
|
||||
SMBIOSMenuYN = input("Is this correct? (y/n)")
|
||||
if SMBIOSMenuYN in {"y", "Y", "yes", "Yes"}:
|
||||
SMBIOSMenu=False
|
||||
BuildOpenCore.current_model = SMBIOSOption
|
||||
MainMenu=True
|
||||
CustomSMBIOS=True
|
||||
elif MainMenu=="4":
|
||||
CreditMenu=True
|
||||
while CreditMenu:
|
||||
os.system('clear')
|
||||
in_between = ["This model is supported"]
|
||||
|
||||
print(header)
|
||||
print(" Credits")
|
||||
print(header)
|
||||
print("")
|
||||
print(" Many thanks to the following:")
|
||||
print("")
|
||||
print(" - Acidanthera: OpenCore, kexts and other tools")
|
||||
print(" - DhinakG: Writing and maintaining this Patcher")
|
||||
print(" - Khronokernel: Writing and maintaining this Patcher")
|
||||
print(" - Syncretic: AAAMouSSE and telemetrap")
|
||||
print(" - Slice: VoodooHDA")
|
||||
print("")
|
||||
CreditMenu = input(" Press any key to exit: ")
|
||||
print("Returning to main menu...")
|
||||
CreditMenu=False
|
||||
MainMenu=True
|
||||
menu = Utilities.TUIMenu(title, "Please select an option: ", in_between=in_between, auto_number=True, top_level=True)
|
||||
|
||||
elif MainMenu=="5":
|
||||
print("\n Closing program...")
|
||||
sys.exit(1)
|
||||
else:
|
||||
print("\n Not Valid Choice Try again")
|
||||
MainMenu=True
|
||||
options = (
|
||||
[["Build OpenCore", self.build_opencore]]
|
||||
if ((self.constants.custom_model or self.computer.real_model) in ModelArray.SupportedSMBIOS) or self.constants.allow_oc_everywhere is True
|
||||
else []
|
||||
) + [
|
||||
["Install OpenCore to USB/internal drive", self.install_opencore],
|
||||
["Post-Install Volume Patch", self.PatchVolume],
|
||||
["Change Model", self.change_model],
|
||||
["Patcher Settings", self.patcher_settings],
|
||||
["Credits", self.credits],
|
||||
]
|
||||
|
||||
for option in options:
|
||||
menu.add_menu_option(option[0], function=option[1])
|
||||
|
||||
response = menu.start()
|
||||
|
||||
if getattr(sys, "frozen", False) and self.constants.recovery_status is False:
|
||||
subprocess.run("""osascript -e 'tell application "Terminal" to close first window' & exit""", shell=True)
|
||||
|
||||
|
||||
OpenCoreLegacyPatcher().main_menu()
|
||||
|
||||
44
OpenCore-Patcher.spec
Normal file
@@ -0,0 +1,44 @@
|
||||
# -*- mode: python ; coding: utf-8 -*-
|
||||
import sys, os
|
||||
sys.path.append(os.path.abspath(os.getcwd()))
|
||||
from Resources import Constants
|
||||
block_cipher = None
|
||||
|
||||
|
||||
a = Analysis(['OpenCore-Patcher.command'],
|
||||
pathex=['Resources'],
|
||||
binaries=[],
|
||||
datas=[('payloads', 'payloads')],
|
||||
hiddenimports=[],
|
||||
hookspath=[],
|
||||
runtime_hooks=[],
|
||||
excludes=[],
|
||||
win_no_prefer_redirects=False,
|
||||
win_private_assemblies=False,
|
||||
cipher=block_cipher,
|
||||
noarchive=False)
|
||||
pyz = PYZ(a.pure, a.zipped_data,
|
||||
cipher=block_cipher)
|
||||
exe = EXE(pyz,
|
||||
a.scripts,
|
||||
a.binaries,
|
||||
a.zipfiles,
|
||||
a.datas,
|
||||
[],
|
||||
name='OpenCore-Patcher',
|
||||
debug=False,
|
||||
bootloader_ignore_signals=False,
|
||||
strip=False,
|
||||
upx=True,
|
||||
upx_exclude=[],
|
||||
runtime_tmpdir=None,
|
||||
console=True )
|
||||
app = BUNDLE(exe,
|
||||
name='OpenCore-Patcher.app',
|
||||
icon="OC-Patcher.icns",
|
||||
bundle_identifier=None,
|
||||
info_plist={
|
||||
"CFBundleShortVersionString": Constants.Constants().patcher_version,
|
||||
"CFBundleExecutable": "MacOS/Launcher",
|
||||
"NSHumanReadableCopyright": "Copyright 2020-2021 Dortania"
|
||||
})
|
||||
171
README.md
@@ -1,130 +1,69 @@
|
||||
# OpenCore Legacy Patcher
|
||||
<div align="center">
|
||||
<img src="images/OC-Patcher.png" alt="OpenCore Patcher Logo" width="256" />
|
||||
<h1>OpenCore Legacy Patcher</h1>
|
||||
</div>
|
||||
|
||||
<img src="OC-Patcher.png" width="256">
|
||||
A python program with an [Objective-C GUI](https://github.com/dortania/OCLP-GUI) for building and booting [OpenCore](https://github.com/acidanthera/OpenCorePkg) on both legacy and modern Macs, see our in-depth [Guide](https://dortania.github.io/OpenCore-Legacy-Patcher/) for more information.
|
||||
|
||||
A python script for building and booting OpenCore on legacy Macs, see [Supported SMBIOS](#supported-smbios) on whether your model is supported.
|
||||
Supported features:
|
||||
|
||||
See [here](https://github.com/dortania/Opencore-Legacy-Patcher/issues/1) for current TO-DOs on this patcher.
|
||||
* System Integrity Protection, FileVault 2, .im4m Secure Boot and Vaulting
|
||||
* WPA Wifi and Personal Hotspot support
|
||||
* Native OTA OS DELTA updates on all Macs
|
||||
* Recovery OS, Safe Mode and Single-user Mode booting
|
||||
* Zero firmware patching required (ie. APFS ROM patching)
|
||||
* GPU Switching on MacBook Pro models (2012 and newer)
|
||||
|
||||
## Supported SMBIOS
|
||||
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.
|
||||
|
||||
Any hardware supporting SSE4.1 CPU and 64-Bit firmware work on this patcher. To check your hardware model, run the below command on the applicable machine:
|
||||
* You can however reinstall macOS with this patcher and retain your original data
|
||||
|
||||
```bash
|
||||
system_profiler SPHardwareDataType | grep 'Model Identifier'
|
||||
```
|
||||
Note 2: Currently OpenCore Legacy Patcher officially supports patching to run macOS 11, Big Sur installs. For older OSes, OpenCore may function however support is currently not provided from Dortania.
|
||||
|
||||
<details>
|
||||
<summary>SMBIOS Support Table</summary>
|
||||
* For macOS Mojave and Catalina support, we recommend the use of [dosdude1's patchers](http://dosdude1.com)
|
||||
* macOS Monterey usage is provided however support is limited, currently recommended for users to run Big Sur for best compatibility
|
||||
|
||||
```
|
||||
MacBook5,1
|
||||
MacBook5,2
|
||||
MacBook6,1
|
||||
MacBook7,1
|
||||
## Support
|
||||
|
||||
MacBookAir2,1
|
||||
MacBookAir3,1
|
||||
MacBookAir3,2
|
||||
MacBookAir4,1
|
||||
MacBookAir4,2
|
||||
MacBookAir5,1
|
||||
MacBookAir5,2
|
||||
To get aid with the patcher, we recommend joining the [OpenCore Patcher Paradise Discord Server](https://discord.gg/rqdPgH8xSN). We're actively there and is the quickest way to receive help. For bigger issues such as patcher crashing on build and such, we recommend opening an issue right here on GitHub(Please review [How to debug with OpenCore](https://dortania.github.io/OpenCore-Legacy-Patcher/DEBUG.html) before opening issues):
|
||||
|
||||
MacBookPro3,1
|
||||
MacBookPro4,1
|
||||
MacBookPro5,1
|
||||
MacBookPro5,2
|
||||
MacBookPro5,3
|
||||
MacBookPro5,4
|
||||
MacBookPro5,5
|
||||
MacBookPro6,1
|
||||
MacBookPro6,2
|
||||
MacBookPro7,1
|
||||
MacBookPro8,1
|
||||
MacBookPro8,2
|
||||
MacBookPro8,3
|
||||
MacBookPro9,1
|
||||
MacBookPro9,2
|
||||
MacBookPro10,1
|
||||
MacBookPro10,2
|
||||
* [OpenCore Legacy Patcher's Issue's tab](https://github.com/dortania/OpenCore-Legacy-Patcher/issues)
|
||||
|
||||
Macmini3,1
|
||||
Macmini4,1
|
||||
Macmini5,1
|
||||
Macmini5,2
|
||||
Macmini5,3
|
||||
Macmini6,1
|
||||
Macmini6,2
|
||||
Nightly builds can be found here courteous of nightly.link:
|
||||
|
||||
iMac7,1
|
||||
iMac8,1
|
||||
iMac9,1
|
||||
iMac10,1
|
||||
iMac11,1
|
||||
iMac11,2
|
||||
iMac11,3
|
||||
iMac12,1
|
||||
iMac12,2
|
||||
iMac13,1
|
||||
iMac13,2
|
||||
iMac14,1
|
||||
iMac14,2
|
||||
iMac14,3
|
||||
* [Nightly OpenCore Patcher (GUI)](https://nightly.link/dortania/OpenCore-Legacy-Patcher/workflows/build-gui/main/OpenCore-Patcher-GUI.app.zip)
|
||||
* [Nightly OpenCore Patcher (TUI)](https://nightly.link/dortania/OpenCore-Legacy-Patcher/workflows/build-app/main/OpenCore-Patcher-TUI.app.zip)
|
||||
* [Offline Variant](https://nightly.link/dortania/OpenCore-Legacy-Patcher/workflows/build-app-offline/main/OpenCore-Patcher-TUI-Offline.app.zip) (No network connection needed on target Mac for Root Patching)
|
||||
* [Nightly OpenCore Patcher (CLI)](https://nightly.link/dortania/OpenCore-Legacy-Patcher/workflows/build-gui/main/OCLP-CLI.zip)
|
||||
|
||||
MacPro3,1
|
||||
MacPro4,1
|
||||
MacPro5,1
|
||||
|
||||
Xserve3,1
|
||||
```
|
||||
|
||||
</details>
|
||||
<br>
|
||||
|
||||
## How to run
|
||||
|
||||
Prerequists:
|
||||
|
||||
* Supported Mac(see above)
|
||||
* macOS Installer installed to USB
|
||||
* See here on how to download and create an installer: [Creating a macOS Installer](https://dortania.github.io/OpenCore-Install-Guide/installer-guide/mac-install.html)
|
||||
* Blank USB drives formatted as GUID Partition Table are also supported
|
||||
|
||||
1. [Download the release](https://github.com/dortania/Opencore-Legacy-Patcher/releases)
|
||||
2. Run the `OpenCore-Patcher.command` file
|
||||
3. Once opened, select option 1 and build your EFI
|
||||
* if patching for a different patching, select option 3 first
|
||||
4. Once finished, run option 2 a the main menu and install onto your desired drive
|
||||
|
||||
Once you're done making your OpenCore installer, you can simply reboot holding the Option key. In the picker, you should see a new EFI Boot Option. Boot it and from there you'll be in the OpenCore picker.
|
||||
|
||||
## How to uninstall OpenCore?
|
||||
|
||||
To remve OpenCore is actually quite simply:
|
||||
|
||||
1. Remove OpenCore either from the USB or internal drive
|
||||
* You'll need to mount the drive's EFI partition, and delete the EFI folder
|
||||
* [See here for example how to mount](https://dortania.github.io/OpenCore-Post-Install/universal/oc2hdd.html)
|
||||
2. Reset NVRAM
|
||||
* [Reset NVRAM or PRAM on your Mac](https://support.apple.com/HT204063)
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
Here are some common errors users may experience while using this patcher:
|
||||
|
||||
* [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)
|
||||
* [Cannot boot macOS without the USB](#cannot-boot-macos-without-the-usb)
|
||||
|
||||
### Stuck on `This version of Mac OS X is not supported on this platform`
|
||||
|
||||
This means macOS has detected a SMBIOS it does not support, to resolve this ensure you're booting OpenCore **before** the macOS installer in the boot picker. Reminder the option will be called `EFI Boot`
|
||||
|
||||
Once you've booted OpenCore at least once, your hardware should now auto boot it until either NVRAM reset or you remove the drive with OpenCore installed.
|
||||
|
||||
### Cannot boot macOS without the USB
|
||||
|
||||
At this time, the OpenCore Patcher won't install macOS onto the internal drive itself during installs. Instead, you'll need to either [manually transfer](https://dortania.github.io/OpenCore-Post-Install/universal/oc2hdd.html) OpenCore to the internal drive's EFI or run this patcher's Option 2 again but select your internal drive.
|
||||
|
||||
Reminder that once this is done, you'll need to select OpenCore in the boot picker again for your hardware to remenber this entry and auto boot from then on.
|
||||
## Credits
|
||||
|
||||
* [Acidanthera](https://github.com/Acidanthera)
|
||||
* OpenCorePkg as well as many of the core kexts and tools
|
||||
* [DhinakG](https://github.com/DhinakG)
|
||||
* Main co-author
|
||||
* [Khronokernel](https://github.com/Khronokernel)
|
||||
* Main co-author
|
||||
* [Ausdauersportler](https://github.com/Ausdauersportler)
|
||||
* iMacs Metal GPUs Upgrade Patch set and documentation
|
||||
* Great amounts of help debugging and code suggestions
|
||||
* [vit9696](https://github.com/vit9696)
|
||||
* Endless amount of help troubleshooting, determining fixes and writing patches
|
||||
* [ASentientBot](https://github.com/ASentientBot)
|
||||
* Legacy Acceleration Patch set and documentation
|
||||
* [cdf](https://github.com/cdf)
|
||||
* Mac Pro on OpenCore Patch set and documentation
|
||||
* [Innie](https://github.com/cdf/Innie) and [NightShiftEnabler](https://github.com/cdf/NightShiftEnabler)
|
||||
* [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/) and [telemetrap](https://forums.macrumors.com/threads/mp3-1-others-sse-4-2-emulation-to-enable-amd-metal-driver.2206682/post-28447707)
|
||||
* [dosdude1](https://github.com/dosdude1)
|
||||
* Main author of GUI
|
||||
* Development of previous patchers, laying out much of what needs to be patched
|
||||
* [BarryKN](https://github.com/BarryKN)
|
||||
* Development of previous patchers, laying out much of what needs to be patched
|
||||
* [mario_bros_tech](https://github.com/mariobrostech) and the rest of the Unsupported Mac Discord
|
||||
* Catalyst that started OpenCore Legacy Patcher
|
||||
* MacRumors and Unsupported Mac Communities
|
||||
* Endless testing, reporting issues
|
||||
* Apple
|
||||
* for macOS and many of the kexts, frameworks and other binaries we reimplemented into newer OSes
|
||||
|
||||
1123
Resources/Build.py
Normal file
@@ -1,377 +0,0 @@
|
||||
# Commands for building the EFI and SMBIOS
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
from shutil import copy
|
||||
from shutil import rmtree
|
||||
from distutils.dir_util import copy_tree
|
||||
|
||||
import os
|
||||
import json
|
||||
import subprocess
|
||||
import sys
|
||||
import zipfile
|
||||
|
||||
from Resources import Versions
|
||||
from Resources import ModelArray
|
||||
|
||||
# Allow py2 and 3 support
|
||||
try:
|
||||
input = raw_input
|
||||
except NameError:
|
||||
pass
|
||||
|
||||
# Find SMBIOS of machine
|
||||
opencore_model = subprocess.Popen(["NVRAM", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:oem-product"], stdout=subprocess.PIPE).communicate()[0]
|
||||
if opencore_model not in ("NVRAM: Error getting variable - '4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:oem-product': (iokit/common) data was not found"):
|
||||
print("Detected OpenCore machine")
|
||||
opencore_model = subprocess.Popen("nvram 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:oem-product".split(), stdout=subprocess.PIPE)
|
||||
opencore_model = [line.strip().split(":oem-product ", 1)[1] for line in opencore_model.stdout.read().split("\n") if line.strip().startswith("4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:")][0]
|
||||
current_model = opencore_model
|
||||
else:
|
||||
print("No OpenCore detected")
|
||||
current_model = subprocess.Popen("system_profiler SPHardwareDataType".split(), stdout=subprocess.PIPE)
|
||||
current_model = [line.strip().split(": ", 1)[1] for line in current_model.stdout.read().split("\n") if line.strip().startswith("Model Identifier")][0]
|
||||
print("Current Model: %s" % current_model)
|
||||
|
||||
OCExist = False
|
||||
|
||||
def BuildEFI():
|
||||
|
||||
if not os.path.exists(Versions.build_path):
|
||||
os.makedirs(Versions.build_path)
|
||||
print("Created Build Folder")
|
||||
else:
|
||||
print("Build Folder already present, skipping")
|
||||
# Copy OpenCore into Build Folder
|
||||
|
||||
if os.path.exists(Versions.opencore_path_build):
|
||||
print("Deleting old copy of OpenCore zip")
|
||||
os.remove(Versions.opencore_path_build)
|
||||
if os.path.exists(Versions.opencore_path_done):
|
||||
print("Deleting old copy of OpenCore folder")
|
||||
rmtree(Versions.opencore_path_done)
|
||||
print("")
|
||||
print("- Adding OpenCore v%s" % Versions.opencore_version)
|
||||
copy(Versions.opencore_path, Versions.build_path)
|
||||
zipfile.ZipFile(Versions.opencore_path_build).extractall(Versions.build_path)
|
||||
|
||||
print("- Adding config.plist v%s" % Versions.opencore_version)
|
||||
# Setup config.plist for editing
|
||||
copy(Versions.plist_path, Versions.plist_path_build)
|
||||
with open(Versions.plist_path_build_full, 'r') as file :
|
||||
Versions.plist_data = file.read()
|
||||
|
||||
print("- Adding Lilu %s" % Versions.lilu_version)
|
||||
copy(Versions.lilu_path, Versions.kext_path_build)
|
||||
|
||||
print("- Adding WhateverGreen %s" % Versions.whatevergreen_version)
|
||||
copy(Versions.whatevergreen_path, Versions.kext_path_build)
|
||||
|
||||
# Checks for kexts
|
||||
# CPU Kext Patches
|
||||
if current_model in ModelArray.DualSocket:
|
||||
print("- Adding AppleMCEReporterDisabler v%s" % Versions.mce_version)
|
||||
copy(Versions.mce_path, Versions.kext_path_build)
|
||||
Versions.plist_data = Versions.plist_data.replace(
|
||||
"<false/><!--AppleMCEReporterDisabler-->",
|
||||
"<true/><!--AppleMCEReporterDisabler-->"
|
||||
)
|
||||
|
||||
if current_model in ModelArray.SSEEmulator:
|
||||
print("- Adding AAAMouSSE v%s" % Versions.mousse_version)
|
||||
copy(Versions.mousse_path, Versions.kext_path_build)
|
||||
Versions.plist_data = Versions.plist_data.replace(
|
||||
"<false/><!--AAAMouSSE-->",
|
||||
"<true/><!--AAAMouSSE-->"
|
||||
)
|
||||
if current_model in ModelArray.MissingSSE42:
|
||||
print("- Adding telemetrap %s" % Versions.telemetrap_version)
|
||||
copy(Versions.telemetrap_path, Versions.kext_path_build)
|
||||
Versions.plist_data = Versions.plist_data.replace(
|
||||
"<false/><!--telemetrap-->",
|
||||
"<true/><!--telemetrap-->"
|
||||
)
|
||||
|
||||
# Ethernet Patches
|
||||
|
||||
if current_model in ModelArray.EthernetNvidia:
|
||||
print("- Adding nForceEthernet v%s" % Versions.nforce_version)
|
||||
copy(Versions.nforce_path, Versions.kext_path_build)
|
||||
Versions.plist_data = Versions.plist_data.replace(
|
||||
"<false/><!--nForceEthernet-->",
|
||||
"<true/><!--nForceEthernet-->"
|
||||
)
|
||||
if current_model in ModelArray.EthernetMarvell:
|
||||
print("- Adding MarvelYukonEthernet v%s" % Versions.marvel_version)
|
||||
copy(Versions.marvel_path, Versions.kext_path_build)
|
||||
Versions.plist_data = Versions.plist_data.replace(
|
||||
"<false/><!--MarvelYukonEthernet-->",
|
||||
"<true/><!--MarvelYukonEthernet-->"
|
||||
)
|
||||
if current_model in ModelArray.EthernetBroadcom:
|
||||
print("- Adding CatalinaBCM5701Ethernet %s" % Versions.bcm570_version)
|
||||
copy(Versions.bcm570_path, Versions.kext_path_build)
|
||||
Versions.plist_data = Versions.plist_data.replace(
|
||||
"<false/><!--CatalinaBCM5701Ethernet-->",
|
||||
"<true/><!--CatalinaBCM5701Ethernet-->"
|
||||
)
|
||||
|
||||
# Wifi Patches
|
||||
|
||||
if current_model in ModelArray.WifiAtheros:
|
||||
print("- Adding IO80211HighSierra v%s" % Versions.io80211high_sierra_version)
|
||||
copy(Versions.io80211high_sierra_path, Versions.kext_path_build)
|
||||
Versions.plist_data = Versions.plist_data.replace(
|
||||
"<false/><!--IO80211HighSierra-->",
|
||||
"<true/><!--IO80211HighSierra-->"
|
||||
)
|
||||
Versions.plist_data = Versions.plist_data.replace(
|
||||
"<false/><!--AirPortAtheros40-->",
|
||||
"<true/><!--AirPortAtheros40-->"
|
||||
)
|
||||
#if current_model in ModelArray.WifiBCM94328:
|
||||
# print("- Wifi patches currently unsupported")
|
||||
#if current_model in ModelArray.WifiBCM94322:
|
||||
# print("- Adding IO80211Mojave %s" % Versions.io80211mojave_version)
|
||||
# copy(Versions.io80211mojave_path, Versions.kext_path_build)
|
||||
# Versions.plist_data = Versions.plist_data.replace(
|
||||
# "<false/><!--IO80211Mojave-->",
|
||||
# "<true/><!--IO80211Mojave-->"
|
||||
# )
|
||||
# Versions.plist_data = Versions.plist_data.replace(
|
||||
# "<false/><!--AirPortBrcm4331-->",
|
||||
# "<true/><!--AirPortBrcm4331-->"
|
||||
# )
|
||||
#if current_model in ModelArray.WifiBCM943224:
|
||||
# print("- Adding IO80211Mojave %s" % Versions.io80211mojave_version)
|
||||
# copy(Versions.io80211mojave_path, Versions.kext_path_build)
|
||||
# Versions.plist_data = Versions.plist_data.replace(
|
||||
# "<false/><!--IO80211Mojave-->",
|
||||
# "<true/><!--IO80211Mojave-->"
|
||||
# )
|
||||
# Versions.plist_data = Versions.plist_data.replace(
|
||||
# "<false/><!--AirPortBrcm4331-->",
|
||||
# "<true/><!--AirPortBrcm4331-->"
|
||||
# )
|
||||
if current_model in ModelArray.WifiBCM94331:
|
||||
print("- Adding AirportBrcmFixup and appling fake ID")
|
||||
copy(Versions.airportbcrmfixup_path, Versions.kext_path_build)
|
||||
Versions.plist_data = Versions.plist_data.replace(
|
||||
"<false/><!--AirportBrcmFixup-->",
|
||||
"<true/><!--AirportBrcmFixup-->"
|
||||
)
|
||||
Versions.plist_data = Versions.plist_data.replace(
|
||||
"<false/><!--AirPortBrcmNIC_Injector-->",
|
||||
"<true/><!--AirPortBrcmNIC_Injector-->"
|
||||
)
|
||||
if current_model in ModelArray.EthernetNvidia:
|
||||
# Nvidia chipsets all have the same path to ARPT
|
||||
Versions.plist_data = Versions.plist_data.replace(
|
||||
"#PciRoot(0x0)/Pci(0x1C,0x1)/Pci(0x0,0x0)",
|
||||
"PciRoot(0x0)/Pci(0x15,0x0)/Pci(0x0,0x0)"
|
||||
)
|
||||
if current_model in ("MacBookAir2,1", "MacBookAir3,1", "MacBookAir3,2" ):
|
||||
Versions.plist_data = Versions.plist_data.replace(
|
||||
"#PciRoot(0x0)/Pci(0x1C,0x1)/Pci(0x0,0x0)",
|
||||
"PciRoot(0x0)/Pci(0x15,0x0)/Pci(0x0,0x0)"
|
||||
)
|
||||
elif current_model in ("iMac7,1", "iMac8,1" ):
|
||||
Versions.plist_data = Versions.plist_data.replace(
|
||||
"#PciRoot(0x0)/Pci(0x1C,0x1)/Pci(0x0,0x0)",
|
||||
"PciRoot(0x0)/Pci(0x1C,0x4)/Pci(0x0,0x0)"
|
||||
)
|
||||
elif current_model in ("iMac13,1", "iMac13,2"):
|
||||
Versions.plist_data = Versions.plist_data.replace(
|
||||
"#PciRoot(0x0)/Pci(0x1C,0x1)/Pci(0x0,0x0)",
|
||||
"PciRoot(0x0)/Pci(0x1C,0x3)/Pci(0x0,0x0)"
|
||||
)
|
||||
elif current_model in ("MacPro5,1"):
|
||||
Versions.plist_data = Versions.plist_data.replace(
|
||||
"#PciRoot(0x0)/Pci(0x1C,0x1)/Pci(0x0,0x0)",
|
||||
"PciRoot(0x0)/Pci(0x1C,0x5)/Pci(0x0,0x0)"
|
||||
)
|
||||
else:
|
||||
# Assumes we have a laptop with Intel chipset
|
||||
Versions.plist_data = Versions.plist_data.replace(
|
||||
"#PciRoot(0x0)/Pci(0x1C,0x1)/Pci(0x0,0x0)",
|
||||
"PciRoot(0x0)/Pci(0x1C,0x1)/Pci(0x0,0x0)"
|
||||
)
|
||||
if current_model in ModelArray.LegacyHID:
|
||||
print("- Adding legacy IOHIDFamily Patch")
|
||||
Versions.plist_data = Versions.plist_data.replace(
|
||||
"<false/><!--IOHIDFamily-->",
|
||||
"<true/><!--IOHIDFamily-->"
|
||||
)
|
||||
|
||||
if current_model in ModelArray.LegacyAudio:
|
||||
print("- Adding VoodooHDA v%s" % Versions.voodoohda_version)
|
||||
copy(Versions.voodoohda_path, Versions.kext_path_build)
|
||||
Versions.plist_data = Versions.plist_data.replace(
|
||||
"<false/><!--VoodooHDA-->",
|
||||
"<true/><!--VoodooHDA-->"
|
||||
)
|
||||
|
||||
usb_map_path = os.path.join(Versions.current_path, "payloads/Kexts/Maps/Zip/" "USB-Map-%s.zip" % current_model)
|
||||
if os.path.exists(usb_map_path):
|
||||
print("- Adding USB Map for %s" % current_model)
|
||||
copy(usb_map_path, Versions.kext_path_build)
|
||||
map_name = ("USB-Map-%s.kext" % current_model)
|
||||
Versions.plist_data = Versions.plist_data.replace(
|
||||
"<<false/><!--USBmap-->",
|
||||
"<true/><!--USBmap-->"
|
||||
)
|
||||
Versions.plist_data = Versions.plist_data.replace(
|
||||
"USB-Map-SMBIOS.kext",
|
||||
map_name
|
||||
)
|
||||
|
||||
if current_model in ModelArray.DualGPUPatch:
|
||||
print("- Adding dual GPU patch")
|
||||
Versions.plist_data = Versions.plist_data.replace(
|
||||
"debug=0x100",
|
||||
"debug=0x100 agdpmod=pikera"
|
||||
)
|
||||
|
||||
|
||||
def BuildGUI():
|
||||
print("- Adding OpenCanopy GUI")
|
||||
rmtree(Versions.gui_path_build)
|
||||
copy(Versions.gui_path, Versions.plist_path_build)
|
||||
Versions.plist_data = Versions.plist_data.replace(
|
||||
"#OpenCanopy.efi",
|
||||
"OpenCanopy.efi"
|
||||
)
|
||||
|
||||
def BuildSMBIOS():
|
||||
# Set new SMBIOS
|
||||
new_model = current_model
|
||||
if current_model in ModelArray.MacBookAir61:
|
||||
print("- Spoofing to MacBookAir6,1")
|
||||
new_model = "MacBookAir6,1"
|
||||
elif current_model in ModelArray.MacBookAir62:
|
||||
print("- Spoofing to MacBookAir6,2")
|
||||
new_model = "MacBookAir6,2"
|
||||
elif current_model in ModelArray.MacBookPro111:
|
||||
print("- Spoofing to MacBookPro11,1")
|
||||
new_model = "MacBookPro11,1"
|
||||
elif current_model in ModelArray.MacBookPro112:
|
||||
print("- Spoofing to MacBookPro11,2")
|
||||
new_model = "MacBookPro11,2"
|
||||
elif current_model in ModelArray.Macmini71:
|
||||
print("- Spoofing to Macmini7,1")
|
||||
new_model = "Macmini7,1"
|
||||
elif current_model in ModelArray.iMac151:
|
||||
print("- Spoofing to iMac15,1")
|
||||
new_model = "iMac15,1"
|
||||
elif current_model in ModelArray.iMac144:
|
||||
print("- Spoofing to iMac14,4")
|
||||
new_model = "iMac14,4"
|
||||
elif current_model in ModelArray.MacPro71:
|
||||
print("- Spoofing to MacPro7,1")
|
||||
new_model = "MacPro7,1"
|
||||
|
||||
# Grab serials from macserial
|
||||
serialPatch = subprocess.Popen(["xattr", "-cr", "./payloads/tools/macserial"], stdout=subprocess.PIPE).communicate()[0]
|
||||
print(serialPatch)
|
||||
serialData = subprocess.Popen((r"./payloads/tools/macserial -g -m " + new_model + " -n 1").split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
serialData = serialData.stdout.read().strip().split(" | ")
|
||||
|
||||
# Patch SMBIOS
|
||||
Versions.plist_data = Versions.plist_data.replace(
|
||||
"iMac19,1",
|
||||
new_model
|
||||
)
|
||||
|
||||
if serialData == "['']":
|
||||
# Used as a backup for when macserial fails
|
||||
print("Failed to load macserial")
|
||||
else:
|
||||
# Patch Number Serial
|
||||
Versions.plist_data = Versions.plist_data.replace(
|
||||
"W00000000001",
|
||||
serialData[0]
|
||||
)
|
||||
# Patch MLB
|
||||
Versions.plist_data = Versions.plist_data.replace(
|
||||
"M0000000000000001",
|
||||
serialData[1]
|
||||
)
|
||||
|
||||
# Patch UUID
|
||||
uuidGen = subprocess.Popen(["uuidgen"], stdout=subprocess.PIPE).communicate()[0]
|
||||
Versions.plist_data = Versions.plist_data.replace(
|
||||
"00000000-0000-0000-0000-000000000000",
|
||||
uuidGen
|
||||
)
|
||||
|
||||
def SavePlist():
|
||||
with open(Versions.plist_path_build_full, 'w') as file:
|
||||
file.write(Versions.plist_data)
|
||||
|
||||
def CleanBuildFolder():
|
||||
# Clean up Build Folder
|
||||
print("")
|
||||
print("Cleaning build folder")
|
||||
os.chdir(Versions.kext_path_build)
|
||||
for item in os.listdir(Versions.kext_path_build):
|
||||
if item.endswith(".zip"):
|
||||
file_name = os.path.abspath(item)
|
||||
zip_ref = zipfile.ZipFile(file_name)
|
||||
zip_ref.extractall(Versions.kext_path_build)
|
||||
zip_ref.close()
|
||||
os.remove(file_name)
|
||||
# Clean up Python's unzip
|
||||
if os.path.exists("__MACOSX"):
|
||||
rmtree("__MACOSX")
|
||||
os.chdir(Versions.plist_path_build)
|
||||
os.chdir(Versions.plist_path_build)
|
||||
for item in os.listdir(Versions.plist_path_build):
|
||||
if item.endswith(".zip"):
|
||||
file_name = os.path.abspath(item)
|
||||
zip_ref = zipfile.ZipFile(file_name)
|
||||
zip_ref.extractall(Versions.plist_path_build)
|
||||
zip_ref.close()
|
||||
os.remove(file_name)
|
||||
if os.path.exists("__MACOSX"):
|
||||
rmtree("__MACOSX")
|
||||
os.chdir(Versions.build_path)
|
||||
if os.path.exists("__MACOSX"):
|
||||
rmtree("__MACOSX")
|
||||
os.remove(Versions.opencore_path_build)
|
||||
os.chdir(Versions.current_path)
|
||||
|
||||
def ListDiskutil():
|
||||
DiskMenu = True
|
||||
while DiskMenu:
|
||||
os.system('clear')
|
||||
print("Loading diskutil...(This may take some time)")
|
||||
diskList = subprocess.Popen(["diskutil", "list"], stdout=subprocess.PIPE).communicate()[0]
|
||||
print(diskList)
|
||||
ChosenDisk = input('Please select the disk you want to install OpenCore to(ie. disk1): ')
|
||||
ChosenDisk = ChosenDisk + "s1"
|
||||
print("Trying to mount %s" % ChosenDisk)
|
||||
diskMount = subprocess.Popen(["sudo", "diskutil", "mount", ChosenDisk], stdout=subprocess.PIPE).communicate()[0]
|
||||
print(diskMount)
|
||||
DiskMenu = input("Press any key to continue: ")
|
||||
|
||||
def MoveOpenCore():
|
||||
print("")
|
||||
efiVol = "/Volumes/EFI"
|
||||
if os.path.exists(efiVol):
|
||||
print("Coping OpenCore onto Volumes/EFI")
|
||||
if os.path.exists("/Volumes/EFI/EFI"):
|
||||
print("Cleaning EFI folder")
|
||||
rmtree("/Volumes/EFI/EFI")
|
||||
if os.path.exists(Versions.opencore_path_done):
|
||||
copy_tree(Versions.opencore_path_done, efiVol)
|
||||
copy(Versions.icon_path, efiVol)
|
||||
print("OpenCore transfer complete")
|
||||
print("")
|
||||
else:
|
||||
print("Couldn't find EFI partition")
|
||||
print("Please ensure your drive is formatted as GUID Partition Table")
|
||||
print("")
|
||||
|
||||
def MountOpenCore():
|
||||
subprocess.Popen((r"sudo diskutil mount $(nvram 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102:boot-path | sed 's/.*GPT,\([^,]*\),.*/\1/')").split())
|
||||
633
Resources/CliMenu.py
Normal file
@@ -0,0 +1,633 @@
|
||||
# Handle misc CLI menu options
|
||||
# Copyright (C) 2020-2021, Dhinak G, Mykola Grymalyuk
|
||||
from __future__ import print_function
|
||||
import subprocess
|
||||
|
||||
from Resources import Constants, Utilities
|
||||
|
||||
|
||||
class MenuOptions:
|
||||
def __init__(self, model, versions):
|
||||
self.model = model
|
||||
self.constants: Constants.Constants = versions
|
||||
|
||||
def change_verbose(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Set Verbose mode"])
|
||||
change_menu = input("Enable Verbose mode(y/n/q): ")
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.verbose_debug = True
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.verbose_debug = False
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
self.change_verbose()
|
||||
|
||||
def change_oc(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Set OpenCore DEBUG mode"])
|
||||
change_menu = input("Enable OpenCore DEBUG mode(y/n/q): ")
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.opencore_debug = True
|
||||
self.constants.opencore_build = "DEBUG"
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.opencore_debug = False
|
||||
self.constants.opencore_build = "RELEASE"
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
self.change_oc()
|
||||
|
||||
def change_kext(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Set Kext DEBUG mode"])
|
||||
change_menu = input("Enable Kext DEBUG mode(y/n/q): ")
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.kext_debug = True
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.kext_debug = False
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
self.change_kext()
|
||||
|
||||
def change_metal(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Assume Metal GPU Always in iMac"])
|
||||
print(
|
||||
"""This is for iMacs that have upgraded Metal GPUs, otherwise
|
||||
Patcher assumes based on stock configuration (ie. iMac10,x-12,x)
|
||||
|
||||
Valid Options:
|
||||
|
||||
1. None(stock GPU)
|
||||
2. Nvidia GPU
|
||||
3. AMD GPU
|
||||
Q. Return to previous menu
|
||||
|
||||
Note: Patcher will detect whether hardware has been upgraded regardless, this
|
||||
option is for those patching on a different machine or OCLP cannot detect.
|
||||
"""
|
||||
)
|
||||
change_menu = input("Set GPU Patch type(ie. 1): ")
|
||||
if change_menu == "1":
|
||||
self.constants.metal_build = False
|
||||
self.constants.imac_vendor = "None"
|
||||
elif change_menu == "2":
|
||||
self.constants.metal_build = True
|
||||
self.constants.imac_vendor = "Nvidia"
|
||||
elif change_menu == "3":
|
||||
self.constants.metal_build = True
|
||||
self.constants.imac_vendor = "AMD"
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
self.change_metal()
|
||||
|
||||
def change_serial(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Set SMBIOS Spoof Level"])
|
||||
print(
|
||||
"""This section is for setting how OpenCore generates the SMBIOS
|
||||
Recommended for adanced users who want control how serials are handled
|
||||
|
||||
Valid options:
|
||||
|
||||
1. Minimal:\tUse original serials and minimally update SMBIOS
|
||||
2. Moderate:\tReplace entire SMBIOS but keep original serials
|
||||
3. Advanced:\tReplace entire SMBIOS and generate new serials
|
||||
Q. Return to previous menu
|
||||
|
||||
Note: For new users we recommend leaving as default(1. Minimal)
|
||||
"""
|
||||
)
|
||||
change_menu = input("Set SMBIOS Spoof Level(ie. 1): ")
|
||||
if change_menu == "1":
|
||||
self.constants.serial_settings = "Minimal"
|
||||
elif change_menu == "2":
|
||||
self.constants.serial_settings = "Moderate"
|
||||
elif change_menu == "3":
|
||||
self.constants.serial_settings = "Advanced"
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
self.change_serial()
|
||||
|
||||
def change_showpicker(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Set OpenCore Picker mode"])
|
||||
print(
|
||||
"""By default, OpenCore will show its boot picker each time on boot up,
|
||||
however this can be disabled by default and be shown on command by repeatedly
|
||||
pressing the "Esc" key
|
||||
"""
|
||||
)
|
||||
change_menu = input("Show OpenCore Picker by default(y/n/q): ")
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.showpicker = True
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.showpicker = False
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
self.change_showpicker()
|
||||
|
||||
def change_vault(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Set OpenCore Vaulting"])
|
||||
print(
|
||||
"""By default, this patcher will sign all your files and ensure none of the
|
||||
contents can be tampered with. However for more advanced users, you may
|
||||
want to be able to freely edit the config.plist and files.
|
||||
|
||||
Note: For security reasons, OpenShell will be disabled when Vault is set.
|
||||
|
||||
"""
|
||||
)
|
||||
change_menu = input("Enable Vault(y/n/q): ")
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.vault = True
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.vault = False
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
self.change_vault()
|
||||
|
||||
def change_sip(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Set System Integrity protection"])
|
||||
print(
|
||||
"""SIP is used to ensure proper secuirty measures are set,
|
||||
however to patch the root volume this must be disabled.
|
||||
Only disable is absolutely necessary. SIP value = 0xFEF
|
||||
|
||||
Valid options:
|
||||
|
||||
1. Enable SIP
|
||||
2. Disable SIP
|
||||
Q. Return to previous menu
|
||||
|
||||
"""
|
||||
)
|
||||
change_menu = input("Set SIP: ")
|
||||
if change_menu == "1":
|
||||
self.constants.sip_status = True
|
||||
elif change_menu == "2":
|
||||
self.constants.sip_status = False
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
self.change_sip()
|
||||
|
||||
def change_sbm(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Set SecureBootModel"])
|
||||
print(
|
||||
"""SecureBootModel is used to ensure best firmware security,
|
||||
however to patch the root volume this must be disabled.
|
||||
Only disable is absolutely necessary. SIP value = 0xFEF
|
||||
|
||||
Valid options:
|
||||
|
||||
1. Enable SecureBootModel
|
||||
2. Disable SecureBootModel
|
||||
Q. Return to previous menu
|
||||
|
||||
"""
|
||||
)
|
||||
change_menu = input("Set SecureBootModel: ")
|
||||
if change_menu == "1":
|
||||
self.constants.secure_status = True
|
||||
elif change_menu == "2":
|
||||
self.constants.secure_status = False
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
self.change_sbm()
|
||||
|
||||
def set_amfi(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Set AMFI"])
|
||||
print(
|
||||
"""Required for Root Patching non-Metal GPUs
|
||||
in macOS Big Sur. Without this, will receive kernel panic once
|
||||
Patcher finishes installing legacy acceleration patches.
|
||||
"""
|
||||
)
|
||||
change_menu = input("Disable AMFI(y/n/q): ")
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.amfi_status = False
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.amfi_status = True
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
self.set_amfi()
|
||||
|
||||
def bootstrap_setting(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Set Bootstrap method"])
|
||||
print(
|
||||
"""Sets OpenCore's bootstrap method, currently the patcher supports the
|
||||
following options.
|
||||
|
||||
Valid options:
|
||||
|
||||
1. System/Library/CoreServices/boot.efi (default)
|
||||
2. EFI/BOOT/BOOTx64.efi
|
||||
Q. Return to previous menu
|
||||
|
||||
Note: S*/L*/C*/boot.efi method is only installed to the EFI partition only
|
||||
and not to macOS itself.
|
||||
|
||||
Recommended to set to BOOTx64.efi in situations where your Mac cannot
|
||||
see the EFI Boot entry in the boot picker.
|
||||
|
||||
"""
|
||||
)
|
||||
change_menu = input("Set Bootstrap method: ")
|
||||
if change_menu == "1":
|
||||
self.constants.boot_efi = False
|
||||
elif change_menu == "2":
|
||||
self.constants.boot_efi = True
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
self.bootstrap_setting()
|
||||
|
||||
def drm_setting(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Set DRM preferences"])
|
||||
print(
|
||||
"""Sets OpenCore's DRM preferences for iMac13,x and iMac14,x.
|
||||
In Big Sur, some DRM based content may be broken by
|
||||
default in AppleTV, Photobooth, etc.
|
||||
|
||||
To resolve, you can opt to disable Intel QuickSync support in
|
||||
favor of Nvidia's Software rendering. This can aid in DRM however
|
||||
greatly hampers Video rendering performance in Final Cut Pro and
|
||||
other programs relying on such features.
|
||||
|
||||
Recommend only disabling if absolutely required.
|
||||
"""
|
||||
)
|
||||
change_menu = input("Enable Nvidia's Software DRM rendering(y/n/q): ")
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.drm_support = True
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.drm_support = False
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
self.drm_setting()
|
||||
|
||||
def allow_native_models(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Allow OpenCore on native Models"])
|
||||
print(
|
||||
"""Allows natively supported Macs to use OpenCore. Recommended
|
||||
for users with 3rd Party NVMe SSDs to achieve improved overall
|
||||
power usage.
|
||||
|
||||
"""
|
||||
)
|
||||
change_menu = input("Allow OpenCore on all Models(y/n/q): ")
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.allow_oc_everywhere = True
|
||||
self.constants.serial_settings = "None"
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.allow_oc_everywhere = False
|
||||
self.constants.serial_settings = "Minimal"
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
self.allow_native_models()
|
||||
|
||||
def custom_cpu(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Set custom CPU Model Name"])
|
||||
print(
|
||||
"""Change reported CPU Model name in About This Mac
|
||||
Custom names will report as follows:
|
||||
|
||||
1: Original Name: 2.5 Ghz Dual-Core Intel Core i5
|
||||
2. CPU name: Intel(R) Core(TM) i5-3210M CPU @ 2.50Ghz
|
||||
3. Custom Name: 2.5Ghz Cotton Candy (example)
|
||||
Q. Return to previous menu
|
||||
"""
|
||||
)
|
||||
if self.constants.custom_cpu_model_value == "":
|
||||
if self.constants.custom_cpu_model == 0:
|
||||
print("Currently using original name")
|
||||
else:
|
||||
print("Currently using CPU name")
|
||||
else:
|
||||
print(f"Custom CPU name currently: {self.constants.custom_cpu_model_value}")
|
||||
change_menu = input("Set custom CPU Name(1,2,3): ")
|
||||
if change_menu == "1":
|
||||
self.constants.custom_cpu_model = 2
|
||||
self.constants.custom_cpu_model_value = ""
|
||||
elif change_menu == "2":
|
||||
self.constants.custom_cpu_model = 0
|
||||
self.constants.custom_cpu_model_value = ""
|
||||
elif change_menu == "3":
|
||||
self.constants.custom_cpu_model = 1
|
||||
self.constants.custom_cpu_model_value = input("Enter new CPU Name: ")
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
self.custom_cpu()
|
||||
|
||||
def disable_cpufriend(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Disable CPU Friend?"])
|
||||
print(
|
||||
"""Only recommended for advanced users
|
||||
Disabling CPUFriend forces macOS into using a different
|
||||
Mac's power profile for CPUs and GPUs, which can harm the
|
||||
hardware
|
||||
"""
|
||||
)
|
||||
change_menu = input("Disable CPU Friend?(y/n/q): ")
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.disallow_cpufriend = True
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.disallow_cpufriend = False
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
self.disable_cpufriend()
|
||||
|
||||
def set_smbios(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Set SMBIOS Spoof Model"])
|
||||
print(
|
||||
"""Change model OpenCore spoofs Mac too
|
||||
|
||||
Valid options:
|
||||
1. Default set by OpenCore (Default)
|
||||
2. User Override
|
||||
3. Disable all spoofing (unsupported configuration)
|
||||
Q. Return to previous menu
|
||||
"""
|
||||
)
|
||||
|
||||
change_menu = input("Set SMBIOS Spoof Model: ")
|
||||
if change_menu == "1":
|
||||
print("Setting SMBIOS spoof to default mode")
|
||||
self.constants.override_smbios = "Default"
|
||||
elif change_menu == "2":
|
||||
custom_smbios = input("Set new SMBIOS mode: ")
|
||||
try:
|
||||
test = self.constants.board_id[custom_smbios]
|
||||
self.constants.override_smbios = custom_smbios
|
||||
except KeyError:
|
||||
print("Unsupported SMBIOS, defaulting to Default setting")
|
||||
self.constants.override_smbios = "Default"
|
||||
elif change_menu == "3":
|
||||
print("Disabling SMBIOS spoof")
|
||||
self.constants.override_smbios = self.model
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
self.set_smbios()
|
||||
|
||||
def allow_firewire(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Allow FireWire Boot Support"])
|
||||
print(
|
||||
"""
|
||||
In macOS Catalina and newer, Apple restricted
|
||||
usage of FireWire devices to boot macOS for
|
||||
security concerns relating to DMA access.
|
||||
|
||||
If you are comfortable lowering the security,
|
||||
you can re-enable FireWire support for Catalina
|
||||
and newer.
|
||||
|
||||
Note: MacBook5,x-7,1 don't support FireWire boot
|
||||
"""
|
||||
)
|
||||
|
||||
change_menu = input("Enable FireWire Boot support?(y/n/q): ")
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.firewire_boot = True
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.firewire_boot = False
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
self.allow_firewire()
|
||||
|
||||
def allow_nvme(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Allow NVMe UEFI Support"])
|
||||
print(
|
||||
"""
|
||||
For machines not natively supporting NVMe,
|
||||
this option allows you to see and boot NVMe
|
||||
drive in OpenCore's picker
|
||||
|
||||
Not required if your machine natively supports NVMe
|
||||
|
||||
Note: You must have OpenCore on a bootable volume
|
||||
first, ie. USB or SATA drive. Once loaded,
|
||||
OpenCore will enable NVMe support in it's picker
|
||||
"""
|
||||
)
|
||||
|
||||
change_menu = input("Enable NVMe Boot support?(y/n/q): ")
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.nvme_boot = True
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.nvme_boot = False
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
self.allow_nvme()
|
||||
|
||||
def allow_wowl(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Allow Wake on WLAN"])
|
||||
print(
|
||||
"""
|
||||
Due to an unfortunate bug in macOS Big Sur+, Wake on WLAN is
|
||||
disabled by default for BCM943224, BCM94331 and BCM94360/2 chipsets.
|
||||
|
||||
This is due to Wake on WLAN creating network instability and in other cases
|
||||
halving network speeds. This issue is not replicable across machines however
|
||||
be prepared if enabling.
|
||||
"""
|
||||
)
|
||||
|
||||
change_menu = input("Allow Wake on WLAN?(y/n/q): ")
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.enable_wake_on_wlan = True
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.enable_wake_on_wlan = False
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
self.allow_wowl()
|
||||
|
||||
def allow_ivy(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Allow Ivy iMac iGPU"])
|
||||
print(
|
||||
"""
|
||||
For iMac13,x systems with a Nvidia dGPU, the iGPU is disabled by default to
|
||||
allow Delta Updates, FileVault, SIP and such on macOS Monterey. However due to
|
||||
this, DRM and QuickSync support may be broken.
|
||||
|
||||
Users can choose to override this option but be aware SIP must be
|
||||
disabled to run root patches to fix DRM and QuickSync.
|
||||
|
||||
Note: This does not apply for Big Sur, the iGPU can be renabled without
|
||||
consequence
|
||||
Note 2: This setting only affects iMac13,x with dGPUs
|
||||
"""
|
||||
)
|
||||
|
||||
change_menu = input("Allow Ivy iMac iGPU?(y/n/q): ")
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.allow_ivy_igpu = True
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.allow_ivy_igpu = False
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
self.allow_ivy()
|
||||
|
||||
def latebloom_settings(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Set latebloom properties"])
|
||||
print(
|
||||
f"""
|
||||
Set latebloom properties, useful for debugging boot stalls on
|
||||
pre-Sandy Bridge Macs.
|
||||
|
||||
Valid options:
|
||||
|
||||
1. Set delay (currently: {self.constants.latebloom_delay}ms)
|
||||
2. Set range (currently: {self.constants.latebloom_range}ms)
|
||||
3. Set debug (currently: {bool(self.constants.latebloom_debug)})
|
||||
Q. Return to previous menu
|
||||
"""
|
||||
)
|
||||
|
||||
change_menu = input("Select latebloom property(1/2/3): ")
|
||||
if change_menu == "1":
|
||||
try:
|
||||
self.constants.latebloom_delay = int(input("Set delay: "))
|
||||
except ValueError:
|
||||
input("Invalid value, press [ENTER] to continue")
|
||||
self.latebloom_settings()
|
||||
elif change_menu == "2":
|
||||
try:
|
||||
self.constants.latebloom_range = int(input("Set range: "))
|
||||
except ValueError:
|
||||
input("Invalid value, press [ENTER] to continue")
|
||||
self.latebloom_settings()
|
||||
elif change_menu == "3":
|
||||
try:
|
||||
print("Currently supports either 0(False) or 1(True)")
|
||||
latebloom_debug = int(input("Set debug(0/1): "))
|
||||
if latebloom_debug not in [0, 1]:
|
||||
input("Invalid value, press [ENTER] to continue")
|
||||
else:
|
||||
self.constants.latebloom_debug = latebloom_debug
|
||||
except ValueError:
|
||||
input("Invalid value, press [ENTER] to continue")
|
||||
self.latebloom_settings()
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
self.latebloom_settings()
|
||||
|
||||
def allow_moj_cat_patch(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Allow Root Patching on Mojave/Catalina"])
|
||||
print(
|
||||
"""
|
||||
This is an experimental option that allows the usage of legacy acceleration
|
||||
patches in Mojave and Catalina.
|
||||
|
||||
The main goal of this is to allow developers to better test patch sets as well
|
||||
as allow acceleration on TeraScale 2 machines. Not all features may be available
|
||||
(ie. GPU switching may not work, etc)
|
||||
|
||||
Note: for the average user, we recommend using dosdude1's legacy patcher:
|
||||
|
||||
- http://dosdude1.com/software.html
|
||||
"""
|
||||
)
|
||||
|
||||
change_menu = input("Allow Root Patching on Mojave/Catalina?(y/n/q): ")
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.moj_cat_accel = True
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.moj_cat_accel = False
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
self.allow_moj_cat_patch()
|
||||
|
||||
def disable_thunderbolt(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Disable Thunderbolt on 2013-14 MacBook Pros"])
|
||||
print(
|
||||
"""
|
||||
Some 2013-14 MacBook Pro's have issues with the built-in thunderbolt,
|
||||
resulting in kernel panics and random shutdowns.
|
||||
|
||||
To alliviate, you can disable the thunderbolt controller on MacBookPro11,x
|
||||
machines with this option.
|
||||
|
||||
Note: This option only works on MacBookPro11,x, file an issue if you know of
|
||||
other devices that benefit from this fix.
|
||||
"""
|
||||
)
|
||||
|
||||
change_menu = input("Disable Thunderbolt?(y/n/q): ")
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.disable_thunderbolt = True
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.disable_thunderbolt = False
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
self.disable_thunderbolt()
|
||||
|
||||
def terascale_2_accel(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Set TeraScale 2 Acceleration"])
|
||||
print(
|
||||
"""
|
||||
By default this patcher will install TeraScale 2 acceleration, however
|
||||
for some laptops this may be undesired due to how degraded their dGPU
|
||||
is.
|
||||
|
||||
Disabling TeraScale 2 acceleration will instead install basic framebuffer
|
||||
support allowing for basic brightness control and let the HD3000 iGPU
|
||||
handle acceleration tasks.
|
||||
"""
|
||||
)
|
||||
|
||||
change_menu = input("Allow TeraScale 2 Acceleration?(y/n/q): ")
|
||||
if change_menu in {"y", "Y", "yes", "Yes"}:
|
||||
self.constants.allow_ts2_accel = True
|
||||
elif change_menu in {"n", "N", "no", "No"}:
|
||||
self.constants.allow_ts2_accel = False
|
||||
elif change_menu in {"q", "Q", "Quit", "quit"}:
|
||||
print("Returning to previous menu")
|
||||
else:
|
||||
self.terascale_2_accel()
|
||||
|
||||
def dump_hardware(self):
|
||||
Utilities.cls()
|
||||
Utilities.header(["Dumping detected hardware"])
|
||||
print("")
|
||||
print(self.constants.computer)
|
||||
input("\nPress [ENTER] to exit: ")
|
||||
819
Resources/Constants.py
Normal file
@@ -0,0 +1,819 @@
|
||||
# pylint: disable=multiple-statements
|
||||
# Define Files
|
||||
# Copyright (C) 2020-2021, Dhinak G, Mykola Grymalyuk
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
from pathlib import Path
|
||||
from typing import Optional
|
||||
|
||||
from Resources import device_probe
|
||||
|
||||
|
||||
class Constants:
|
||||
def __init__(self):
|
||||
# Patcher Versioning
|
||||
self.patcher_version = "0.2.5" # OpenCore-Legacy-Patcher
|
||||
self.patcher_support_pkg_version = "0.1.3" # PatcherSupportPkg
|
||||
|
||||
# OpenCore Versioning
|
||||
# https://github.com/acidanthera/OpenCorePkg
|
||||
self.opencore_commit = "ff4b099 - 09-06-2021"
|
||||
self.opencore_version = "0.7.3"
|
||||
|
||||
# Kext Versioning
|
||||
## Acidanthera
|
||||
## https://github.com/acidanthera
|
||||
self.lilu_version = "1.5.6" # Lilu
|
||||
self.whatevergreen_version = "1.5.3" # WhateverGreen
|
||||
self.airportbcrmfixup_version = "2.1.3" # AirPortBrcmFixup
|
||||
self.nvmefix_version = "1.0.9" # NVMeFix
|
||||
self.applealc_version = "1.6.3" # AppleALC
|
||||
self.restrictevents_version = "1.0.3" # RestrictEvents
|
||||
self.restrictevents_mbp_version = "1.0.3" # RestrictEvents blocking displaypolicyd (see RestrictEvents-MBP91.patch)
|
||||
self.featureunlock_version = "1.0.3" # FeatureUnlock
|
||||
self.debugenhancer_version = "1.0.4" # DebugEnhancer
|
||||
self.cpufriend_version = "1.2.4" # CPUFriend
|
||||
self.bluetool_version = "2.6.1" # BlueToolFixup
|
||||
self.cslvfixup_version = "2.6.1" # CSLVFixup
|
||||
|
||||
## Apple
|
||||
## https://www.apple.com
|
||||
self.marvel_version = "1.0.1" # MarvelYukonEthernet
|
||||
self.nforce_version = "1.0.1" # nForceEthernet
|
||||
self.piixata_version = "1.0.1" # AppleIntelPIIXATA
|
||||
self.fw_kext = "1.0.1" # IOFireWireFamily
|
||||
self.apple_trackpad = "1.0.1" # AppleUSBTrackpad
|
||||
|
||||
## Apple - Dortania Modified
|
||||
self.bcm570_version = "1.0.2" # CatalinaBCM5701Ethernet
|
||||
self.corecaptureelcap_version = "1.0.1" # corecaptureElCap
|
||||
self.io80211elcap_version = "2.0.0" # IO80211ElCap
|
||||
self.io80211high_sierra_version = "1.0.1" # IO80211HighSierra
|
||||
self.io80211mojave_version = "1.0.1" # IO80211Mojave
|
||||
|
||||
## Dortania
|
||||
## https://github.com/dortania
|
||||
self.backlight_injector_version = "1.0.0" # BacklightInjector
|
||||
self.smcspoof_version = "1.0.0" # SMC-Spoof
|
||||
self.mce_version = "1.0.0" # AppleMCEReporterDisabler
|
||||
self.btspoof_version = "1.0.0" # Bluetooth-Spoof
|
||||
|
||||
## Syncretic
|
||||
## https://forums.macrumors.com/members/syncretic.1173816/
|
||||
## https://github.com/reenigneorcim/latebloom
|
||||
self.latebloom_version = "0.22" # Latebloom
|
||||
self.mousse_version = "0.95" # MouSSE
|
||||
self.telemetrap_version = "1.0.0" # telemetrap
|
||||
|
||||
## cdf
|
||||
## https://github.com/cdf/Innie
|
||||
self.innie_version = "1.3.0" # Innie
|
||||
|
||||
# Get resource path
|
||||
self.current_path = Path(__file__).parent.parent.resolve()
|
||||
self.payload_path = self.current_path / Path("payloads")
|
||||
|
||||
# Patcher Settings
|
||||
self.allow_oc_everywhere = False # Set whether Patcher can be run on unsupported Macs
|
||||
self.gui_mode = False # Determine whether running in a GUI or TUI
|
||||
self.disk = "" # Set installation ESP
|
||||
self.patch_disk = "" # Set Root Volume to patch
|
||||
self.validate = False # Enable validation testing for CI
|
||||
self.recovery_status = False # Detect if booted into RecoveryOS
|
||||
|
||||
## Hardware
|
||||
self.computer: device_probe.Computer = None # type: ignore
|
||||
self.custom_model: Optional[str] = None
|
||||
|
||||
## OpenCore Settings
|
||||
self.opencore_debug = False
|
||||
self.opencore_build = "RELEASE"
|
||||
self.showpicker = True # Show or Hide OpenCore's Boot Picker
|
||||
self.boot_efi = False # Use EFI/BOOT/BOOTx64.efi bootstrap
|
||||
|
||||
## Kext Settings
|
||||
self.kext_debug = False # Enables Lilu debug and DebugEnhancer
|
||||
|
||||
## NVRAM Settings
|
||||
self.verbose_debug = False # -v
|
||||
|
||||
## SMBIOS Settings
|
||||
self.custom_cpu_model = 2 # Patch type value
|
||||
self.custom_cpu_model_value = "" # New CPU name within About This Mac
|
||||
self.serial_settings = "Minimal" # Set SMBIOS level used
|
||||
self.override_smbios = "Default" # Set SMBIOS model used
|
||||
|
||||
## Latebloom Settings
|
||||
self.latebloom_status = False # Latebloom Enabled
|
||||
self.latebloom_delay = 0 # Delay between each PCIe Probe
|
||||
self.latebloom_range = 0 # Range each delay can differ
|
||||
self.latebloom_debug = 0 # Debug Setting
|
||||
|
||||
## Security Settings
|
||||
self.apecid_support = False # ApECID
|
||||
self.amfi_status = True # Apple Mobile File Integrity
|
||||
self.sip_status = True # System Integrity Protection
|
||||
self.secure_status = False # Secure Boot Model
|
||||
self.vault = False # EFI Vault
|
||||
self.disable_cs_lv = False # Disable Library validation
|
||||
|
||||
## OS Settings
|
||||
self.os_support = 12.0
|
||||
self.detected_os = 0 # Major Kernel Version
|
||||
self.detected_os_minor = 0 # Minor Kernel Version
|
||||
self.detected_os_build = "" # OS Build
|
||||
self.allow_fv_root = False # Allow FileVault on broken sealed snapshots
|
||||
|
||||
## Boot Volume Settings
|
||||
self.firewire_boot = False # Allow macOS FireWire Boot
|
||||
self.nvme_boot = False # Allow UEFI NVMe Boot
|
||||
|
||||
## Graphics Settings
|
||||
self.metal_build = False # Set MXM Build support
|
||||
self.imac_vendor = "None" # Set MXM GPU vendor
|
||||
self.drm_support = False # Set iMac14,x DRM support
|
||||
self.allow_ivy_igpu = False # Set iMac13,x iGPU support
|
||||
self.moj_cat_accel = False # Set Mojave/Catalina Acceleration support
|
||||
self.allow_ts2_accel = True # Set TeraScale 2 Acceleration support
|
||||
|
||||
## Miscellaneous
|
||||
self.disallow_cpufriend = False # Disable CPUFriend
|
||||
self.enable_wake_on_wlan = False # Allow Wake on WLAN for modern Broadcom
|
||||
self.disable_thunderbolt = False # Disable Thunderbolt Controller
|
||||
|
||||
# OS Versions
|
||||
## Based off Major Kernel Version
|
||||
self.tiger = 8
|
||||
self.leopard = 9
|
||||
self.snow_leopard = 10
|
||||
self.lion = 11
|
||||
self.mountain_lion = 12
|
||||
self.mavericks = 13
|
||||
self.yosemite = 14
|
||||
self.el_capitan = 15
|
||||
self.sierra = 16
|
||||
self.high_sierra = 17
|
||||
self.mojave = 18
|
||||
self.catalina = 19
|
||||
self.big_sur = 20
|
||||
self.monterey = 21
|
||||
|
||||
# Vendor IDs
|
||||
self.pci_nvidia = "10DE"
|
||||
self.pci_amd_ati = "1002"
|
||||
self.pci_intel = "8086"
|
||||
self.pci_broadcom = "14E4"
|
||||
self.pci_atheros = "168C"
|
||||
self.pci_apple = "106B"
|
||||
self.pci_aquantia = "1D6A"
|
||||
self.pci_marvell = "11AB"
|
||||
self.pci_syskonnect = "1148"
|
||||
|
||||
# Class Codes
|
||||
## https://pci-ids.ucw.cz/read/PD
|
||||
self.classcode_sata = "01060100"
|
||||
self.classcode_nvme = "02080100"
|
||||
self.classcode_nvme_generic = "02800100"
|
||||
self.classcode_wifi = "00800200"
|
||||
self.classcode_gpu = "00000300"
|
||||
self.classcode_gpu_variant = "00800300"
|
||||
self.classcode_xhci = "30030C00"
|
||||
self.classcode_ethernet = "00000200"
|
||||
|
||||
# Nvidia GPU Architecture
|
||||
self.arch_tesla = "NV50"
|
||||
self.arch_fermi = "GF100"
|
||||
self.arch_kepler = "GK100"
|
||||
|
||||
# External Files
|
||||
self.url_patcher_support_pkg = "https://github.com/dortania/PatcherSupportPkg/releases/download/"
|
||||
|
||||
self.legacy_accel_support = [
|
||||
self.mojave,
|
||||
self.catalina,
|
||||
self.big_sur,
|
||||
self.monterey,
|
||||
]
|
||||
|
||||
# Payload Location
|
||||
# OpenCore
|
||||
@property
|
||||
def opencore_zip_source(self):
|
||||
return self.payload_path / Path(f"OpenCore/OpenCore-{self.opencore_build}.zip")
|
||||
|
||||
@property
|
||||
def plist_template(self):
|
||||
return self.payload_path / Path("Config/config.plist")
|
||||
|
||||
# Mount Location
|
||||
@property
|
||||
def payload_mnt1_path(self):
|
||||
return self.payload_path / Path("mnt1")
|
||||
|
||||
# ACPI
|
||||
@property
|
||||
def pci_ssdt_path(self):
|
||||
return self.payload_path / Path("ACPI/SSDT-CPBG.aml")
|
||||
|
||||
@property
|
||||
def windows_ssdt_path(self):
|
||||
return self.payload_path / Path("ACPI/SSDT-PCI.aml")
|
||||
|
||||
# Drivers
|
||||
@property
|
||||
def nvme_driver_path(self):
|
||||
return self.payload_path / Path("Drivers/NvmExpressDxe.efi")
|
||||
|
||||
@property
|
||||
def exfat_legacy_driver_path(self):
|
||||
return self.payload_path / Path("Drivers/ExFatDxeLegacy.efi")
|
||||
|
||||
@property
|
||||
def xhci_driver_path(self):
|
||||
return self.payload_path / Path("Drivers/XhciDxe.efi")
|
||||
|
||||
# Kexts
|
||||
@property
|
||||
def payload_kexts_path(self):
|
||||
return self.payload_path / Path("Kexts")
|
||||
|
||||
@property
|
||||
def lilu_path(self):
|
||||
return self.payload_kexts_path / Path(f"Acidanthera/Lilu-v{self.lilu_version}.zip")
|
||||
|
||||
@property
|
||||
def whatevergreen_path(self):
|
||||
return self.payload_kexts_path / Path(f"Acidanthera/WhateverGreen-v{self.whatevergreen_version}.zip")
|
||||
|
||||
@property
|
||||
def airportbcrmfixup_path(self):
|
||||
return self.payload_kexts_path / Path(f"Acidanthera/AirportBrcmFixup-v{self.airportbcrmfixup_version}.zip")
|
||||
|
||||
@property
|
||||
def restrictevents_path(self):
|
||||
return self.payload_kexts_path / Path(f"Acidanthera/RestrictEvents-v{self.restrictevents_version}.zip")
|
||||
|
||||
@property
|
||||
def restrictevents_mbp_path(self):
|
||||
return self.payload_kexts_path / Path(f"Acidanthera/RestrictEvents-MBP91-v{self.restrictevents_mbp_version}.zip")
|
||||
|
||||
@property
|
||||
def bcm570_path(self):
|
||||
return self.payload_kexts_path / Path(f"Ethernet/CatalinaBCM5701Ethernet-v{self.bcm570_version}.zip")
|
||||
|
||||
@property
|
||||
def marvel_path(self):
|
||||
return self.payload_kexts_path / Path(f"Ethernet/MarvelYukonEthernet-v{self.marvel_version}.zip")
|
||||
|
||||
@property
|
||||
def nforce_path(self):
|
||||
return self.payload_kexts_path / Path(f"Ethernet/nForceEthernet-v{self.nforce_version}.zip")
|
||||
|
||||
@property
|
||||
def mce_path(self):
|
||||
return self.payload_kexts_path / Path(f"Misc/AppleMCEReporterDisabler-v{self.mce_version}.zip")
|
||||
|
||||
@property
|
||||
def mousse_path(self):
|
||||
return self.payload_kexts_path / Path(f"SSE/AAAMouSSE-v{self.mousse_version}.zip")
|
||||
|
||||
@property
|
||||
def telemetrap_path(self):
|
||||
return self.payload_kexts_path / Path(f"SSE/telemetrap-v{self.telemetrap_version}.zip")
|
||||
|
||||
@property
|
||||
def corecaptureelcap_path(self):
|
||||
return self.payload_kexts_path / Path(f"Wifi/corecaptureElCap-v{self.corecaptureelcap_version}.zip")
|
||||
|
||||
@property
|
||||
def io80211elcap_path(self):
|
||||
return self.payload_kexts_path / Path(f"Wifi/IO80211ElCap-v{self.io80211elcap_version}.zip")
|
||||
|
||||
@property
|
||||
def io80211high_sierra_path(self):
|
||||
return self.payload_kexts_path / Path(f"Wifi/IO80211HighSierra-v{self.io80211high_sierra_version}.zip")
|
||||
|
||||
@property
|
||||
def io80211mojave_path(self):
|
||||
return self.payload_kexts_path / Path(f"Wifi/IO80211Mojave-v{self.io80211mojave_version}.zip")
|
||||
|
||||
@property
|
||||
def applealc_path(self):
|
||||
return self.payload_kexts_path / Path(f"Acidanthera/AppleALC-v{self.applealc_version}.zip")
|
||||
|
||||
@property
|
||||
def piixata_path(self):
|
||||
return self.payload_kexts_path / Path(f"Misc/AppleIntelPIIXATA-v{self.piixata_version}.zip")
|
||||
|
||||
@property
|
||||
def backlight_injector_path(self):
|
||||
return self.payload_kexts_path / Path(f"Misc/BacklightInjector-v{self.backlight_injector_version}.zip")
|
||||
|
||||
@property
|
||||
def cpufriend_path(self):
|
||||
return self.payload_kexts_path / Path(f"Acidanthera/CPUFriend-v{self.cpufriend_version}.zip")
|
||||
|
||||
@property
|
||||
def smcspoof_path(self):
|
||||
return self.payload_kexts_path / Path(f"Misc/SMC-Spoof-v{self.smcspoof_version}.zip")
|
||||
|
||||
@property
|
||||
def btspoof_path(self):
|
||||
return self.payload_kexts_path / Path(f"Misc/Bluetooth-Spoof-v{self.btspoof_version}.zip")
|
||||
|
||||
@property
|
||||
def nvmefix_path(self):
|
||||
return self.payload_kexts_path / Path(f"Acidanthera/NVMeFix-v{self.nvmefix_version}.zip")
|
||||
|
||||
@property
|
||||
def featureunlock_path(self):
|
||||
return self.payload_kexts_path / Path(f"Acidanthera/FeatureUnlock-v{self.featureunlock_version}.zip")
|
||||
|
||||
@property
|
||||
def debugenhancer_path(self):
|
||||
return self.payload_kexts_path / Path(f"Acidanthera/DebugEnhancer-v{self.debugenhancer_version}.zip")
|
||||
|
||||
@property
|
||||
def bluetool_path(self):
|
||||
return self.payload_kexts_path / Path(f"Acidanthera/BlueToolFixup-v{self.bluetool_version}.zip")
|
||||
|
||||
@property
|
||||
def cslvfixup_path(self):
|
||||
return self.payload_kexts_path / Path(f"Acidanthera/CSLVFixup-v{self.cslvfixup_version}.zip")
|
||||
|
||||
@property
|
||||
def innie_path(self):
|
||||
return self.payload_kexts_path / Path(f"Misc/Innie-v{self.innie_version}.zip")
|
||||
|
||||
@property
|
||||
def latebloom_path(self):
|
||||
return self.payload_kexts_path / Path(f"Misc/latebloom-v{self.latebloom_version}.zip")
|
||||
|
||||
@property
|
||||
def apple_trackpad_path(self):
|
||||
return self.payload_kexts_path / Path(f"Misc/AppleUSBTrackpad-v{self.apple_trackpad}.zip")
|
||||
|
||||
@property
|
||||
def plist_folder_path(self):
|
||||
return self.payload_kexts_path / Path("Plists")
|
||||
|
||||
@property
|
||||
def platform_plugin_plist_path(self):
|
||||
return self.plist_folder_path / Path("PlatformPlugin")
|
||||
|
||||
@property
|
||||
def fw_family_path(self):
|
||||
return self.payload_kexts_path / Path(f"FireWire/IOFireWireFamily-v{self.fw_kext}.zip")
|
||||
|
||||
@property
|
||||
def fw_sbp2_path(self):
|
||||
return self.payload_kexts_path / Path(f"FireWire/IOFireWireSBP2-v{self.fw_kext}.zip")
|
||||
|
||||
@property
|
||||
def fw_bus_path(self):
|
||||
return self.payload_kexts_path / Path(f"FireWire/IOFireWireSerialBusProtocolTransport-v{self.fw_kext}.zip")
|
||||
|
||||
# Build Location
|
||||
@property
|
||||
def build_path(self):
|
||||
return self.current_path / Path("Build-Folder/")
|
||||
|
||||
@property
|
||||
def opencore_release_folder(self):
|
||||
return self.build_path / Path(f"OpenCore-Build")
|
||||
|
||||
@property
|
||||
def opencore_zip_copied(self):
|
||||
return self.build_path / Path(f"OpenCore-{self.opencore_build}.zip")
|
||||
|
||||
@property
|
||||
def oc_folder(self):
|
||||
return self.opencore_release_folder / Path("EFI/OC/")
|
||||
|
||||
@property
|
||||
def plist_path(self):
|
||||
return self.oc_folder / Path("config.plist")
|
||||
|
||||
@property
|
||||
def acpi_path(self):
|
||||
return self.oc_folder / Path("ACPI")
|
||||
|
||||
@property
|
||||
def drivers_path(self):
|
||||
return self.oc_folder / Path("Drivers")
|
||||
|
||||
@property
|
||||
def kexts_path(self):
|
||||
return self.oc_folder / Path("Kexts")
|
||||
|
||||
@property
|
||||
def resources_path(self):
|
||||
return self.oc_folder / Path("Resources")
|
||||
|
||||
@property
|
||||
def map_kext_folder(self):
|
||||
return self.kexts_path / Path("USB-Map.kext")
|
||||
|
||||
@property
|
||||
def map_contents_folder(self):
|
||||
return self.map_kext_folder / Path("Contents")
|
||||
|
||||
@property
|
||||
def pp_kext_folder(self):
|
||||
return self.kexts_path / Path("CPUFriendDataProvider.kext")
|
||||
|
||||
@property
|
||||
def pp_contents_folder(self):
|
||||
return self.pp_kext_folder / Path("Contents")
|
||||
|
||||
@property
|
||||
def agdp_kext_folder(self):
|
||||
return self.kexts_path / Path("AGDP-Override.kext")
|
||||
|
||||
@property
|
||||
def agdp_contents_folder(self):
|
||||
return self.agdp_kext_folder / Path("Contents")
|
||||
|
||||
@property
|
||||
def agpm_kext_folder(self):
|
||||
return self.kexts_path / Path("AGPM-Override.kext")
|
||||
|
||||
@property
|
||||
def agpm_contents_folder(self):
|
||||
return self.agpm_kext_folder / Path("Contents")
|
||||
|
||||
@property
|
||||
def amc_kext_folder(self):
|
||||
return self.kexts_path / Path("AMC-Override.kext")
|
||||
|
||||
@property
|
||||
def amc_contents_folder(self):
|
||||
return self.amc_kext_folder / Path("Contents")
|
||||
|
||||
# Tools
|
||||
@property
|
||||
def macserial_path(self):
|
||||
return self.payload_path / Path("Tools/macserial")
|
||||
|
||||
@property
|
||||
def gfxutil_path(self):
|
||||
return self.payload_path / Path("Tools/gfxutil")
|
||||
|
||||
@property
|
||||
def vault_path(self):
|
||||
return self.payload_path / Path("Tools/CreateVault/sign.command")
|
||||
|
||||
@property
|
||||
def ocvalidate_path(self):
|
||||
return self.payload_path / Path("Tools/ocvalidate")
|
||||
|
||||
# Icons
|
||||
@property
|
||||
def app_icon_path(self):
|
||||
return self.current_path / Path("OC-Patcher.icns")
|
||||
|
||||
@property
|
||||
def icon_path_external(self):
|
||||
return self.payload_path / Path("Icon/External/.VolumeIcon.icns")
|
||||
|
||||
@property
|
||||
def icon_path_internal(self):
|
||||
return self.payload_path / Path("Icon/Internal/.VolumeIcon.icns")
|
||||
|
||||
@property
|
||||
def icon_path_sd(self):
|
||||
return self.payload_path / Path("Icon/SD-Card/.VolumeIcon.icns")
|
||||
|
||||
@property
|
||||
def icon_path_ssd(self):
|
||||
return self.payload_path / Path("Icon/SSD/.VolumeIcon.icns")
|
||||
|
||||
@property
|
||||
def gui_path(self):
|
||||
return self.payload_path / Path("Icon/Resources.zip")
|
||||
|
||||
# Apple Payloads Paths
|
||||
|
||||
@property
|
||||
def payload_apple_root_path_zip(self):
|
||||
return self.payload_path / Path("Apple.zip")
|
||||
|
||||
@property
|
||||
def payload_apple_root_path(self):
|
||||
return self.payload_path / Path("Apple")
|
||||
|
||||
@property
|
||||
def payload_apple_kexts_path(self):
|
||||
return self.payload_apple_root_path / Path("Extensions")
|
||||
|
||||
@property
|
||||
def payload_apple_coreservices_path(self):
|
||||
return self.payload_apple_root_path / Path("CoreServices")
|
||||
|
||||
@property
|
||||
def payload_apple_usr_path(self):
|
||||
return self.payload_apple_root_path / Path("usr")
|
||||
|
||||
@property
|
||||
def payload_apple_libexec_path(self):
|
||||
return self.payload_apple_usr_path / Path("libexec")
|
||||
|
||||
@property
|
||||
def payload_apple_frameworks_path(self):
|
||||
return self.payload_apple_root_path / Path("Frameworks")
|
||||
|
||||
@property
|
||||
def payload_apple_frameworks_path_accel(self):
|
||||
return self.payload_apple_frameworks_path / Path("Graphics-Acceleration")
|
||||
|
||||
@property
|
||||
def payload_apple_frameworks_path_accel_ts2(self):
|
||||
return self.payload_apple_frameworks_path / Path("Graphics-Acceleration-TeraScale-2")
|
||||
|
||||
@property
|
||||
def payload_apple_frameworks_path_accel_ivy(self):
|
||||
return self.payload_apple_frameworks_path / Path("Graphics-Acceleration-Ivy-Bridge")
|
||||
|
||||
@property
|
||||
def payload_apple_lauchd_path(self):
|
||||
return self.payload_apple_root_path / Path("LaunchDaemons")
|
||||
|
||||
@property
|
||||
def payload_apple_lauchd_path_accel(self):
|
||||
return self.payload_apple_lauchd_path / Path("Graphics-Acceleration")
|
||||
|
||||
@property
|
||||
def payload_apple_private_frameworks_path(self):
|
||||
return self.payload_apple_root_path / Path("PrivateFrameworks")
|
||||
|
||||
@property
|
||||
def payload_apple_private_frameworks_path_accel(self):
|
||||
return self.payload_apple_private_frameworks_path / Path("Graphics-Acceleration")
|
||||
|
||||
@property
|
||||
def payload_apple_private_frameworks_path_accel_ts2(self):
|
||||
return self.payload_apple_private_frameworks_path / Path("Graphics-Acceleration-TeraScale-2")
|
||||
|
||||
@property
|
||||
def payload_apple_private_frameworks_path_accel_ivy(self):
|
||||
return self.payload_apple_private_frameworks_path / Path("Graphics-Acceleration-Ivy-Bridge")
|
||||
|
||||
@property
|
||||
def payload_apple_private_frameworks_path_brightness(self):
|
||||
return self.payload_apple_private_frameworks_path / Path("Brightness-Control")
|
||||
|
||||
# Apple Extensions
|
||||
@property
|
||||
def audio_path(self):
|
||||
return self.payload_apple_kexts_path / Path("Audio")
|
||||
|
||||
# GPU Kexts and Bundles
|
||||
|
||||
@property
|
||||
def legacy_graphics(self):
|
||||
return self.payload_apple_kexts_path / Path("Graphics-Acceleration")
|
||||
|
||||
@property
|
||||
def legacy_nvidia_path(self):
|
||||
return self.legacy_graphics / Path("Nvidia-Tesla")
|
||||
|
||||
@property
|
||||
def legacy_nvidia_kepler_path(self):
|
||||
return self.legacy_graphics / Path("Nvidia-Kepler")
|
||||
|
||||
@property
|
||||
def legacy_amd_path(self):
|
||||
return self.legacy_graphics / Path("AMD-TeraScale")
|
||||
|
||||
@property
|
||||
def legacy_amd_path_ts2(self):
|
||||
return self.legacy_graphics / Path("AMD-TeraScale-2")
|
||||
|
||||
@property
|
||||
def legacy_intel_gen1_path(self):
|
||||
return self.legacy_graphics / Path("Intel-Gen5-Ironlake")
|
||||
|
||||
@property
|
||||
def legacy_intel_gen2_path(self):
|
||||
return self.legacy_graphics / Path("Intel-Gen6-SandyBridge")
|
||||
|
||||
@property
|
||||
def legacy_intel_gen3_path(self):
|
||||
return self.legacy_graphics / Path("Intel-Gen7-IvyBridge")
|
||||
|
||||
@property
|
||||
def legacy_general_path(self):
|
||||
return self.legacy_graphics / Path("General-Patches")
|
||||
|
||||
@property
|
||||
def legacy_brightness(self):
|
||||
return self.payload_apple_kexts_path / Path("Brightness-Control")
|
||||
|
||||
@property
|
||||
def legacy_wifi_coreservices(self):
|
||||
return self.payload_apple_coreservices_path / Path("Legacy-Wifi")
|
||||
|
||||
@property
|
||||
def legacy_wifi_libexec(self):
|
||||
return self.payload_apple_libexec_path / Path("Legacy-Wifi")
|
||||
|
||||
csr_values = {
|
||||
# Source: macOS 11.4 (XNU's csr.h)
|
||||
# https://opensource.apple.com/source/xnu/xnu-7195.121.3/bsd/sys/csr.h.auto.html
|
||||
"CSR_ALLOW_UNTRUSTED_KEXTS": False, # 0x1 - Allows Unsigned Kexts - Introduced in El Capitan # noqa: E241
|
||||
"CSR_ALLOW_UNRESTRICTED_FS": False, # 0x2 - File System Access - Introduced in El Capitan # noqa: E241
|
||||
"CSR_ALLOW_TASK_FOR_PID": False, # 0x4 - Unrestricted task_for_pid() - Introduced in El Capitan # noqa: E241
|
||||
"CSR_ALLOW_KERNEL_DEBUGGER": False, # 0x8 - Allow Kernel Debugger - Introduced in El Capitan # noqa: E241
|
||||
"CSR_ALLOW_APPLE_INTERNAL": False, # 0x10 - Set AppleInternal Features - Introduced in El Capitan # noqa: E241
|
||||
# "CSR_ALLOW_DESTRUCTIVE_DTRACE": False, # 0x20 - Allow destructive DTrace - Deprecated # noqa: E241
|
||||
"CSR_ALLOW_UNRESTRICTED_DTRACE": False, # 0x20 - Unrestricted DTrace usage - Introduced in El Capitan # noqa: E241
|
||||
"CSR_ALLOW_UNRESTRICTED_NVRAM": False, # 0x40 - Unrestricted NVRAM write - Introduced in El Capitan # noqa: E241
|
||||
"CSR_ALLOW_DEVICE_CONFIGURATION": False, # 0x80 - Allow custom DeviceTree (iOS) - Introduced in El Capitan # noqa: E241
|
||||
"CSR_ALLOW_ANY_RECOVERY_OS": False, # 0x100 - Skip BaseSystem Verification - Introduced in Sierra # noqa: E241
|
||||
"CSR_ALLOW_UNAPPROVED_KEXTS": False, # 0x200 - Allow Unnotarized Kexts - Introduced in High Sierra # noqa: E241
|
||||
"CSR_ALLOW_EXECUTABLE_POLICY_OVERRIDE": False, # 0x400 - Override Executable Policy - Introduced in Mojave # noqa: E241
|
||||
"CSR_ALLOW_UNAUTHENTICATED_ROOT": False, # 0x800 - Allow Root Volume Mounting - Introduced in Big Sur # noqa: E241
|
||||
}
|
||||
|
||||
root_patch_sip_mojave = [
|
||||
# Variables required to root patch in Mojave and Catalina
|
||||
"CSR_ALLOW_UNTRUSTED_KEXTS",
|
||||
"CSR_ALLOW_UNRESTRICTED_FS",
|
||||
"CSR_ALLOW_UNAPPROVED_KEXTS",
|
||||
"CSR_ALLOW_EXECUTABLE_POLICY_OVERRIDE",
|
||||
]
|
||||
|
||||
root_patch_sip_big_sur = [
|
||||
# Variables required to root patch in Big Sur and Monterey
|
||||
"CSR_ALLOW_UNTRUSTED_KEXTS",
|
||||
"CSR_ALLOW_UNRESTRICTED_FS",
|
||||
"CSR_ALLOW_UNAPPROVED_KEXTS",
|
||||
"CSR_ALLOW_EXECUTABLE_POLICY_OVERRIDE",
|
||||
"CSR_ALLOW_UNAUTHENTICATED_ROOT",
|
||||
]
|
||||
|
||||
sbm_values = [
|
||||
"j137ap", # iMacPro1,1
|
||||
"j680ap", # MacBookPro15,1
|
||||
"j132ap", # MacBookPro15,2
|
||||
"j174ap", # Macmini8,1
|
||||
"j140kap", # MacBookAir8,1
|
||||
"j780ap", # MacBookPro15,3
|
||||
"j213ap", # MacBookPro15,4
|
||||
"j140aap", # MacBookAir8,2
|
||||
"j152fap", # MacBookPro16,1
|
||||
"j160ap", # MacPro7,1
|
||||
"j230kap", # MacBookAir9,1
|
||||
"j214kap", # MacBookPro16,2
|
||||
"j223ap", # MacBookPro16,3
|
||||
"j215ap", # MacBookPro16,4
|
||||
"j185ap", # iMac20,1
|
||||
"j185fap", # iMac20,2
|
||||
# "x86legacy", # non-T2 Macs/VMs, Monterey's boot.efi enforces this on all Macs
|
||||
]
|
||||
|
||||
sandy_board_id = [
|
||||
"Mac-E43C1C25D4880AD6", # MacBookPro12,1
|
||||
"Mac-06F11F11946D27C5", # MacBookPro11,5
|
||||
"Mac-9F18E312C5C2BF0B", # MacBookAir7,1
|
||||
"Mac-937CB26E2E02BB01", # MacBookAir7,2
|
||||
"Mac-35C5E08120C7EEAF", # Macmini7,1
|
||||
"Mac-7BA5B2D9E42DDD94", # iMacPro1,1
|
||||
]
|
||||
|
||||
board_id = {
|
||||
"MacBook1,1": "Mac-F4208CC8",
|
||||
"MacBook2,1": "Mac-F4208CA9",
|
||||
"MacBook3,1": "Mac-F22788C8",
|
||||
"MacBook4,1": "Mac-F22788A9",
|
||||
"MacBook5,1": "Mac-F42D89C8",
|
||||
"MacBook5,2": "Mac-F22788AA",
|
||||
"MacBook6,1": "Mac-F22C8AC8",
|
||||
"MacBook7,1": "Mac-F22C89C8",
|
||||
"MacBook8,1": "Mac-BE0E8AC46FE800CC",
|
||||
"MacBook9,1": "Mac-9AE82516C7C6B903",
|
||||
"MacBook10,1": "Mac-EE2EBD4B90B839A8",
|
||||
"MacBookAir1,1": "Mac-F42C8CC8",
|
||||
"MacBookAir2,1": "Mac-F42D88C8",
|
||||
"MacBookAir3,1": "Mac-942452F5819B1C1B",
|
||||
"MacBookAir3,2": "Mac-942C5DF58193131B",
|
||||
"MacBookAir4,1": "Mac-C08A6BB70A942AC2",
|
||||
"MacBookAir4,2": "Mac-742912EFDBEE19B3",
|
||||
"MacBookAir5,1": "Mac-66F35F19FE2A0D05",
|
||||
"MacBookAir5,2": "Mac-2E6FAB96566FE58C",
|
||||
"MacBookAir6,1": "Mac-35C1E88140C3E6CF",
|
||||
"MacBookAir6,2": "Mac-7DF21CB3ED6977E5",
|
||||
"MacBookAir7,1": "Mac-9F18E312C5C2BF0B",
|
||||
"MacBookAir7,2": "Mac-937CB26E2E02BB01",
|
||||
"MacBookAir8,1": "Mac-827FAC58A8FDFA22",
|
||||
"MacBookAir8,2": "Mac-226CB3C6A851A671",
|
||||
"MacBookAir9,1": "Mac-0CFF9C7C2B63DF8D",
|
||||
"MacBookPro1,1": "Mac-F425BEC8",
|
||||
"MacBookPro1,2": "Mac-F42DBEC8",
|
||||
"MacBookPro2,1": "Mac-F42189C8",
|
||||
"MacBookPro2,2": "Mac-F42187C8",
|
||||
"MacBookPro3,1": "Mac-F4238BC8",
|
||||
"MacBookPro4,1": "Mac-F42C89C8",
|
||||
"MacBookPro5,1": "Mac-F42D86C8",
|
||||
"MacBookPro5,2": "Mac-F2268EC8",
|
||||
"MacBookPro5,3": "Mac-F22587C8",
|
||||
"MacBookPro5,4": "Mac-F22587A1",
|
||||
"MacBookPro5,5": "Mac-F2268AC8",
|
||||
"MacBookPro6,1": "Mac-F22589C8",
|
||||
"MacBookPro6,2": "Mac-F22586C8",
|
||||
"MacBookPro7,1": "Mac-F222BEC8",
|
||||
"MacBookPro8,1": "Mac-94245B3640C91C81",
|
||||
"MacBookPro8,2": "Mac-94245A3940C91C80",
|
||||
"MacBookPro8,3": "Mac-942459F5819B171B",
|
||||
"MacBookPro9,1": "Mac-4B7AC7E43945597E",
|
||||
"MacBookPro9,2": "Mac-6F01561E16C75D06",
|
||||
"MacBookPro10,1": "Mac-C3EC7CD22292981F",
|
||||
"MacBookPro10,2": "Mac-AFD8A9D944EA4843",
|
||||
"MacBookPro11,1": "Mac-189A3D4F975D5FFC",
|
||||
"MacBookPro11,2": "Mac-3CBD00234E554E41",
|
||||
"MacBookPro11,3": "Mac-2BD1B31983FE1663",
|
||||
"MacBookPro11,4": "Mac-06F11FD93F0323C5",
|
||||
"MacBookPro11,5": "Mac-06F11F11946D27C5",
|
||||
"MacBookPro12,1": "Mac-E43C1C25D4880AD6",
|
||||
"MacBookPro13,1": "Mac-473D31EABEB93F9B",
|
||||
"MacBookPro13,2": "Mac-66E35819EE2D0D05",
|
||||
"MacBookPro13,3": "Mac-A5C67F76ED83108C",
|
||||
"MacBookPro14,1": "Mac-B4831CEBD52A0C4C",
|
||||
"MacBookPro14,2": "Mac-CAD6701F7CEA0921",
|
||||
"MacBookPro14,3": "Mac-551B86E5744E2388",
|
||||
"MacBookPro15,1": "Mac-937A206F2EE63C01",
|
||||
"MacBookPro15,2": "Mac-827FB448E656EC26",
|
||||
"MacBookPro15,3": "Mac-1E7E29AD0135F9BC",
|
||||
"MacBookPro15,4": "Mac-53FDB3D8DB8CA971",
|
||||
"MacBookPro16,1": "Mac-E1008331FDC96864",
|
||||
"MacBookPro16,2": "Mac-5F9802EFE386AA28",
|
||||
"MacBookPro16,3": "Mac-E7203C0F68AA0004",
|
||||
"MacBookPro16,4": "Mac-A61BADE1FDAD7B05",
|
||||
"Macmini1,1": "Mac-F4208EC8",
|
||||
"Macmini2,1": "Mac-F4208EAA",
|
||||
"Macmini3,1": "Mac-F22C86C8",
|
||||
"Macmini4,1": "Mac-F2208EC8",
|
||||
"Macmini5,1": "Mac-8ED6AF5B48C039E1",
|
||||
"Macmini5,2": "Mac-4BC72D62AD45599E",
|
||||
"Macmini5,3": "Mac-7BA5B2794B2CDB12",
|
||||
"Macmini6,1": "Mac-031AEE4D24BFF0B1",
|
||||
"Macmini6,2": "Mac-F65AE981FFA204ED",
|
||||
"Macmini7,1": "Mac-35C5E08120C7EEAF",
|
||||
"Macmini8,1": "Mac-7BA5B2DFE22DDD8C",
|
||||
"iMac4,1": "Mac-F42786C8",
|
||||
"iMac4,2": "Mac-F4218EC8",
|
||||
"iMac5,1": "Mac-F4228EC8",
|
||||
"iMac5,2": "Mac-F4218EC8",
|
||||
"iMac6,1": "Mac-F4218FC8",
|
||||
"iMac7,1": "Mac-F42386C8",
|
||||
"iMac8,1": "Mac-F227BEC8",
|
||||
"iMac9,1": "Mac-F2218FA9",
|
||||
"iMac10,1": "Mac-F221DCC8",
|
||||
# "iMac10,1": "Mac-F2268CC8",
|
||||
"iMac11,1": "Mac-F2268DAE",
|
||||
"iMac11,2": "Mac-F2238AC8",
|
||||
"iMac11,3": "Mac-F2238BAE",
|
||||
"iMac12,1": "Mac-942B5BF58194151B",
|
||||
"iMac12,2": "Mac-942B59F58194171B",
|
||||
"iMac13,1": "Mac-00BE6ED71E35EB86",
|
||||
"iMac13,2": "Mac-FC02E91DDD3FA6A4",
|
||||
"iMac13,3": "Mac-7DF2A3B5E5D671ED",
|
||||
"iMac14,1": "Mac-031B6874CF7F642A",
|
||||
"iMac14,2": "Mac-27ADBB7B4CEE8E61",
|
||||
"iMac14,3": "Mac-77EB7D7DAF985301",
|
||||
"iMac14,4": "Mac-81E3E92DD6088272",
|
||||
"iMac15,1": "Mac-42FD25EABCABB274",
|
||||
"iMac16,1": "Mac-A369DDC4E67F1C45",
|
||||
"iMac16,2": "Mac-FFE5EF870D7BA81A",
|
||||
"iMac17,1": "Mac-DB15BD556843C820",
|
||||
# iMac17,1": "Mac-65CE76090165799A",
|
||||
# iMac17,1": "Mac-B809C3757DA9BB8D",
|
||||
"iMac18,1": "Mac-4B682C642B45593E",
|
||||
"iMac18,2": "Mac-77F17D7DA9285301",
|
||||
"iMac18,3": "Mac-BE088AF8C5EB4FA2",
|
||||
"iMac19,1": "Mac-AA95B1DDAB278B95",
|
||||
"iMac19,2": "Mac-63001698E7A34814",
|
||||
"iMac20,1": "Mac-CFF7D910A743CAAF",
|
||||
"iMac20,2": "Mac-AF89B6D9451A490B",
|
||||
"iMacPro1,1": "Mac-7BA5B2D9E42DDD94",
|
||||
"MacPro1,1": "Mac-F4208DC8",
|
||||
"MacPro2,1": "Mac-F4208DA9",
|
||||
"MacPro3,1": "Mac-F42C88C8",
|
||||
"MacPro4,1": "Mac-F221BEC8",
|
||||
"MacPro5,1": "Mac-F221BEC8",
|
||||
"MacPro6,1": "Mac-F60DEB81FF30ACF6",
|
||||
"MacPro7,1": "Mac-27AD2F918AE68F61",
|
||||
"Xserve1,1": "Mac-F4208AC8",
|
||||
"Xserve2,1": "Mac-F42289C8",
|
||||
"Xserve3,1": "Mac-F223BEC8",
|
||||
}
|
||||
|
||||
target_type = {
|
||||
"ADP3,2": "J273",
|
||||
"MacBookAir10,1": "J313",
|
||||
"MacBookPro17,1": "J293",
|
||||
"Macmini9,1": "J274",
|
||||
"iMac21,1": "J256",
|
||||
"iMac21,2": "J257",
|
||||
}
|
||||
343
Resources/ModelExample.py
Normal file
@@ -0,0 +1,343 @@
|
||||
# Example Hardware probe of multiple models
|
||||
# To be used when running validation tests
|
||||
from Resources import device_probe
|
||||
|
||||
class MacBook:
|
||||
|
||||
MacBook71 = device_probe.Computer(
|
||||
real_model="MacBook7,1",
|
||||
real_board_id="Mac-F22C89C8",
|
||||
reported_model="MacBook7,1",
|
||||
reported_board_id="Mac-F22C89C8",
|
||||
gpus=[
|
||||
device_probe.NVIDIA(vendor_id=4318, device_id=2208, class_code=196608, name="IGPU", model="NVIDIA GeForce 320M", pci_path="PciRoot(0x0)/Pci(0x2,0x0)"),
|
||||
],
|
||||
igpu=device_probe.NVIDIA(vendor_id=4318, device_id=2208, class_code=196608, name="IGPU", model="NVIDIA GeForce 320M", pci_path="PciRoot(0x0)/Pci(0x2,0x0)"),
|
||||
dgpu=None,
|
||||
storage=[
|
||||
device_probe.SATAController(vendor_id=4318, device_id=3464, class_code=67073, name="SATA", model=None, pci_path="PciRoot(0x0)/Pci(0xa,0x0)"),
|
||||
],
|
||||
wifi=device_probe.Broadcom(vendor_id=5348, device_id=17235, class_code=163840, name="ARPT", model=None, pci_path="PciRoot(0x0)/Pci(0x15,0x0)/Pci(0x0,0x0)"),
|
||||
cpu=device_probe.CPU(
|
||||
name="Intel(R) Core(TM)2 Duo CPU P8600 @ 2.40GHz",
|
||||
flags=["FPU", "VME", "DE", "PSE", "TSC", "MSR", "PAE", "MCE", "CX8", "APIC", "SEP", "MTRR", "PGE", "MCA", "CMOV", "PAT", "PSE36", "CLFSH", "DS", "ACPI", "MMX", "FXSR", "SSE", "SSE2", "SS", "HTT", "TM", "PBE", "SSE3", "DTES64", "MON", "DSCPL", "VMX", "SMX", "EST", "TM2", "SSSE3", "CX16", "TPR", "PDCM", "SSE4.1"],
|
||||
),
|
||||
oclp_version=None,
|
||||
opencore_version=None,
|
||||
)
|
||||
|
||||
class MacBookPro:
|
||||
|
||||
MacBookPro92_Stock = device_probe.Computer(
|
||||
real_model="MacBookPro9,2",
|
||||
real_board_id="Mac-6F01561E16C75D06",
|
||||
reported_model="MacBookPro9,2",
|
||||
reported_board_id="Mac-6F01561E16C75D06",
|
||||
gpus=[
|
||||
device_probe.Intel(vendor_id=32902, device_id=358, class_code=196608, name="IGPU", model="Intel HD Graphics 4000", pci_path="PciRoot(0x0)/Pci(0x2,0x0)")
|
||||
],
|
||||
igpu=device_probe.Intel(vendor_id=32902, device_id=358, class_code=196608, name="IGPU", model="Intel HD Graphics 4000", pci_path="PciRoot(0x0)/Pci(0x2,0x0)"),
|
||||
dgpu=None,
|
||||
storage=[device_probe.SATAController(vendor_id=32902, device_id=7683, class_code=67073, name="SATA", model=None, pci_path="PciRoot(0x0)/Pci(0x1f,0x2)")],
|
||||
wifi=device_probe.Broadcom(vendor_id=5348, device_id=17201, class_code=163840, name="ARPT", model=None, pci_path="PciRoot(0x0)/Pci(0x1c,0x1)/Pci(0x0,0x0)"),
|
||||
cpu=device_probe.CPU(
|
||||
name='Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz',
|
||||
flags=['FPU', 'VME', 'DE', 'PSE', 'TSC', 'MSR', 'PAE', 'MCE', 'CX8', 'APIC', 'SEP', 'MTRR', 'PGE', 'MCA', 'CMOV', 'PAT', 'PSE36', 'CLFSH', 'DS', 'ACPI', 'MMX', 'FXSR', 'SSE', 'SSE2', 'SS', 'HTT', 'TM', 'PBE', 'SSE3', 'PCLMULQDQ', 'DTES64', 'MON', 'DSCPL', 'VMX', 'EST', 'TM2', 'SSSE3', 'CX16', 'TPR', 'PDCM', 'SSE4.1', 'SSE4.2', 'x2APIC', 'POPCNT', 'AES', 'PCID', 'XSAVE', 'OSXSAVE', 'TSCTMR', 'AVX1.0', 'RDRAND', 'F16C']
|
||||
),
|
||||
oclp_version=None,
|
||||
opencore_version=None,
|
||||
)
|
||||
|
||||
MacBookPro171_Stock = device_probe.Computer(
|
||||
# Run under Rosetta
|
||||
real_model="MacBookPro17,1",
|
||||
real_board_id="J293",
|
||||
reported_model="MacBookPro17,1",
|
||||
reported_board_id="J293",
|
||||
gpus=[device_probe.AMD(vendor_id=4098, device_id=26640, class_code=196608, name="display", model="Unknown Unknown", pci_path="")],
|
||||
igpu=None,
|
||||
dgpu=None,
|
||||
storage=[],
|
||||
wifi=device_probe.Broadcom(vendor_id=5348, device_id=17445, class_code=163840, name="wlan", model=None, pci_path=""),
|
||||
cpu=device_probe.CPU(
|
||||
name="Apple M1",
|
||||
flags=["FPU", "VME", "DE", "PSE", "TSC", "MSR", "PAE", "MCE", "CX8", "APIC", "SEP", "MTRR", "PGE", "MCA", "CMOV", "PAT", "PSE36", "CLFSH", "DS", "ACPI", "MMX", "FXSR", "SSE", "SSE2", "SS", "HTT", "TM", "PBE", "SSE3", "PCLMULQDQ", "DTSE64", "MON", "DSCPL", "VMX", "EST", "TM2", "SSSE3", "CX16", "TPR", "PDCM", "SSE4.1", "SSE4.2", "AES", "SEGLIM64"],
|
||||
),
|
||||
oclp_version=None,
|
||||
opencore_version=None,
|
||||
)
|
||||
|
||||
class Macmini:
|
||||
|
||||
Macmini81_Stock = device_probe.Computer(
|
||||
real_model="Macmini8,1",
|
||||
real_board_id="Mac-7BA5B2DFE22DDD8C",
|
||||
reported_model="Macmini8,1",
|
||||
reported_board_id="Mac-7BA5B2DFE22DDD8C",
|
||||
gpus=[device_probe.Intel(vendor_id=32902, device_id=16027, class_code=196608, name="IGPU", model="Intel UHD Graphics 630", pci_path="PciRoot(0x0)/Pci(0x2,0x0)")],
|
||||
igpu=device_probe.Intel(vendor_id=32902, device_id=16027, class_code=196608, name="IGPU", model="Intel UHD Graphics 630", pci_path="PciRoot(0x0)/Pci(0x2,0x0)"),
|
||||
dgpu=None,
|
||||
storage=[],
|
||||
wifi=device_probe.Broadcom(vendor_id=5348, device_id=17508, class_code=163840, name="ARPT", model=None, pci_path="PciRoot(0x0)/Pci(0x1c,0x0)/Pci(0x0,0x0)"),
|
||||
cpu=device_probe.CPU(
|
||||
name="Intel(R) Core(TM) i7-8700B CPU @ 3.20GHz",
|
||||
flags=["FPU", "VME", "DE", "PSE", "TSC", "MSR", "PAE", "MCE", "CX8", "APIC", "SEP", "MTRR", "PGE", "MCA", "CMOV", "PAT", "PSE36", "CLFSH", "DS", "ACPI", "MMX", "FXSR", "SSE", "SSE2", "SS", "HTT", "TM", "PBE", "SSE3", "PCLMULQDQ", "DTES64", "MON", "DSCPL", "VMX", "SMX", "EST", "TM2", "SSSE3", "FMA", "CX16", "TPR", "PDCM", "SSE4.1", "SSE4.2", "x2APIC", "MOVBE", "POPCNT", "AES", "PCID", "XSAVE", "OSXSAVE", "SEGLIM64", "TSCTMR", "AVX1.0", "RDRAND", "F16C"]
|
||||
),
|
||||
oclp_version=None,
|
||||
opencore_version=None
|
||||
)
|
||||
|
||||
Macmini91_Stock = device_probe.Computer(
|
||||
# Run under Rosetta
|
||||
real_model="Macmini9,1",
|
||||
real_board_id="J274",
|
||||
reported_model="Macmini9,1",
|
||||
reported_board_id="J274",
|
||||
gpus=[
|
||||
device_probe.AMD(vendor_id=4098, device_id=26640, class_code=196608, name="display", model="Unknown Unknown", pci_path="", )
|
||||
],
|
||||
igpu=None,
|
||||
dgpu=None,
|
||||
storage=[],
|
||||
wifi=device_probe.Broadcom(vendor_id=5348, device_id=17445, class_code=163840, name="wlan", model=None, pci_path=""),
|
||||
cpu=device_probe.CPU(
|
||||
name="Apple M1",
|
||||
flags=["FPU", "VME", "DE", "PSE", "TSC", "MSR", "PAE", "MCE", "CX8", "APIC", "SEP", "MTRR", "PGE", "MCA", "CMOV", "PAT", "PSE36", "CLFSH", "DS", "ACPI", "MMX", "FXSR", "SSE", "SSE2", "SS", "HTT", "TM", "PBE", "SSE3", "PCLMULQDQ", "DTSE64", "MON", "DSCPL", "VMX", "EST", "TM2", "SSSE3", "CX16", "TPR", "PDCM", "SSE4.1", "SSE4.2", "AES", "SEGLIM64"]
|
||||
),
|
||||
oclp_version=None,
|
||||
opencore_version=None
|
||||
)
|
||||
|
||||
class iMac:
|
||||
|
||||
iMac81_Stock = device_probe.Computer(
|
||||
# Stock Model
|
||||
real_model="iMac8,1",
|
||||
real_board_id="Mac-F226BEC8",
|
||||
reported_model="iMac8,1",
|
||||
reported_board_id="Mac-F226BEC8",
|
||||
gpus=[
|
||||
device_probe.AMD(vendor_id=4098, device_id=38088, class_code=196608, name="GFX0", model="ATI Radeon HD 2400", pci_path="PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)")
|
||||
],
|
||||
igpu=None,
|
||||
dgpu=device_probe.AMD(vendor_id=4098, device_id=38088, class_code=196608, name="GFX0", model="ATI Radeon HD 2400", pci_path="PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)"),
|
||||
storage=[
|
||||
device_probe.SATAController(vendor_id=32902, device_id=10281, class_code=67073, name="SATA", model=None, pci_path="PciRoot(0x0)/Pci(0x1f,0x2)")
|
||||
],
|
||||
wifi=device_probe.Broadcom(vendor_id=5348, device_id=17192, class_code=163840, name="ARPT", model=None, pci_path="PciRoot(0x0)/Pci(0x1c,0x4)/Pci(0x0,0x0)"),
|
||||
cpu=device_probe.CPU(
|
||||
name="Intel(R) Core(TM)2 Duo CPU E8135 @ 2.40GHz",
|
||||
flags=["FPU", "VME", "DE", "PSE", "TSC", "MSR", "PAE", "MCE", "CX8", "APIC", "SEP", "MTRR", "PGE", "MCA", "CMOV", "PAT", "PSE36", "CLFSH", "DS", "ACPI", "MMX", "FXSR", "SSE", "SSE2", "SS", "HTT", "TM", "PBE", "SSE3", "DTES64", "MON", "DSCPL", "VMX", "EST", "TM2", "SSSE3", "CX16", "TPR", "PDCM", "SSE4.1"]
|
||||
),
|
||||
oclp_version=None,
|
||||
opencore_version=None,
|
||||
)
|
||||
|
||||
iMac112_Stock = device_probe.Computer(
|
||||
# Stock Model
|
||||
real_model="iMac11,2",
|
||||
real_board_id="Mac-F2238AC8",
|
||||
reported_model="iMac11,2",
|
||||
reported_board_id="Mac-F2238AC8",
|
||||
gpus=[
|
||||
device_probe.AMD(vendor_id=4098, device_id=38024, class_code=196608, name="GFX0", model="ATI Radeon HD 4670", pci_path="PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)")
|
||||
],
|
||||
igpu=None,
|
||||
dgpu=device_probe.AMD(vendor_id=4098, device_id=38024, class_code=196608, name="GFX0", model="ATI Radeon HD 4670", pci_path="PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)"),
|
||||
storage=[
|
||||
device_probe.SATAController(vendor_id=32902, device_id=15138, class_code=67073, name="SATA", model=None, pci_path="PciRoot(0x0)/Pci(0x1f,0x2)")
|
||||
],
|
||||
wifi=device_probe.Atheros(vendor_id=5772, device_id=42, class_code=163840, name="ARPT", model=None, pci_path="PciRoot(0x0)/Pci(0x1c,0x1)/Pci(0x0,0x0)"),
|
||||
cpu=device_probe.CPU(
|
||||
name="Intel(R) Core(TM) i3 CPU 540 @ 3.07GHz",
|
||||
flags=["FPU", "VME", "DE", "PSE", "TSC", "MSR", "PAE", "MCE", "CX8", "APIC", "SEP", "MTRR", "PGE", "MCA", "CMOV", "PAT", "PSE36", "CLFSH", "DS", "ACPI", "MMX", "FXSR", "SSE", "SSE2", "SS", "HTT", "TM", "PBE", "SSE3", "DTES64", "MON", "DSCPL", "VMX", "EST", "TM2", "SSSE3", "CX16", "TPR", "PDCM", "SSE4.1", "SSE4.2", "POPCNT", "PCID"]
|
||||
),
|
||||
oclp_version=None,
|
||||
opencore_version=None,
|
||||
)
|
||||
|
||||
iMac122_Upgraded = device_probe.Computer(
|
||||
real_model="iMac12,2",
|
||||
real_board_id="Mac-942B59F58194171B",
|
||||
reported_model="iMac12,2",
|
||||
reported_board_id="Mac-942B59F58194171B",
|
||||
gpus=[
|
||||
device_probe.Intel(vendor_id=32902, device_id=258, class_code=196608, name="HD Graphics 3000", model=None, pci_path="PciRoot(0x0)/Pci(0x2,0x0)"),
|
||||
device_probe.AMD(vendor_id=4098, device_id=26600, class_code=196608, name="GFX0", model="Radeon Pro WX4130", pci_path="PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)"),
|
||||
],
|
||||
igpu=device_probe.Intel(vendor_id=32902, device_id=258, class_code=196608, name="HD Graphics 3000", model=None, pci_path="PciRoot(0x0)/Pci(0x2,0x0)"),
|
||||
dgpu=device_probe.AMD(vendor_id=4098, device_id=26600, class_code=196608, name="GFX0", model="Radeon Pro WX4130", pci_path="PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)"),
|
||||
storage=[
|
||||
device_probe.SATAController(vendor_id=32902, device_id=7170, class_code=67073, name="SATA", model=None, pci_path="PciRoot(0x0)/Pci(0x1f,0x2)")
|
||||
],
|
||||
wifi=device_probe.Broadcom(vendor_id=5348, device_id=17338, class_code=163840, name="ARPT", model=None, pci_path="PciRoot(0x0)/Pci(0x1c,0x1)/Pci(0x0,0x0)"),
|
||||
cpu=device_probe.CPU(
|
||||
name="Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz",
|
||||
flags=["FPU", "VME", "DE", "PSE", "TSC", "MSR", "PAE", "MCE", "CX8", "APIC", "SEP", "MTRR", "PGE", "MCA", "CMOV", "PAT", "PSE36", "CLFSH", "DS", "ACPI", "MMX", "FXSR", "SSE", "SSE2", "SS", "HTT", "TM", "PBE", "SSE3", "PCLMULQDQ", "DTES64", "MON", "DSCPL", "VMX", "SMX", "EST", "TM2", "SSSE3", "CX16", "TPR", "PDCM", "SSE4.1", "SSE4.2", "xAPIC", "POPCNT", "AES", "PCID", "XSAVE", "OSXSAVE", "TSCTMR", "AVX1.0"]
|
||||
),
|
||||
oclp_version=None,
|
||||
opencore_version=None,
|
||||
)
|
||||
|
||||
class MacPro:
|
||||
|
||||
MacPro31_Stock = device_probe.Computer(
|
||||
# Stock Model, stock TS1 GPU and no Wifi card
|
||||
real_model="MacPro3,1",
|
||||
real_board_id="Mac-F42C88C8",
|
||||
reported_model="MacPro3,1",
|
||||
reported_board_id="Mac-F42C88C8",
|
||||
gpus=[
|
||||
device_probe.AMD(vendor_id=4098, device_id=38272, class_code=196608, name="GFX0", model="ATI Radeon HD 2600", pci_path="PciRoot(0x0)/Pci(0x5,0x0)/Pci(0x0,0x0)")
|
||||
],
|
||||
igpu=None,
|
||||
dgpu=device_probe.AMD(vendor_id=4098, device_id=38272, class_code=196608, name="GFX0", model="ATI Radeon HD 2600", pci_path="PciRoot(0x0)/Pci(0x5,0x0)/Pci(0x0,0x0)"),
|
||||
storage=[
|
||||
device_probe.SATAController(vendor_id=32902, device_id=9857, class_code=67073, name="SATA", model=None, pci_path="PciRoot(0x0)/Pci(0x1f,0x2)")
|
||||
],
|
||||
wifi=None,
|
||||
cpu=device_probe.CPU(
|
||||
name="Intel(R) Xeon(R) CPU X5482 @ 3.20GHz",
|
||||
flags=["FPU", "VME", "DE", "PSE", "TSC", "MSR", "PAE", "MCE", "CX8", "APIC", "SEP", "MTRR", "PGE", "MCA", "CMOV", "PAT", "PSE36", "CLFSH", "DS", "ACPI", "MMX", "FXSR", "SSE", "SSE2", "SS", "HTT", "TM", "PBE", "SSE3", "DTES64", "MON", "DSCPL", "VMX", "EST", "TM2", "SSSE3", "CX16", "TPR", "PDCM", "SSE4.1"],
|
||||
),
|
||||
oclp_version=None,
|
||||
opencore_version=None,
|
||||
)
|
||||
|
||||
MacPro31_Upgrade = device_probe.Computer(
|
||||
# Upgraded Model, TS2 GPU and El-Capitan era Wifi card
|
||||
real_model="MacPro3,1",
|
||||
real_board_id="Mac-F42C88C8",
|
||||
reported_model="MacPro3,1",
|
||||
reported_board_id="Mac-F42C88C8",
|
||||
gpus=[
|
||||
device_probe.AMD(vendor_id=4098, device_id=26808, class_code=196608, name="GFX0", model="ATI Radeon HD 5770", pci_path="PciRoot(0x0)/Pci(0x5,0x0)/Pci(0x0,0x0)")
|
||||
],
|
||||
igpu=None,
|
||||
dgpu=device_probe.AMD(vendor_id=4098, device_id=26808, class_code=196608, name="GFX0", model="ATI Radeon HD 5770", pci_path="PciRoot(0x0)/Pci(0x5,0x0)/Pci(0x0,0x0)"),
|
||||
storage=[
|
||||
device_probe.SATAController(vendor_id=32902, device_id=9857, class_code=67073, name="SATA", model=None, pci_path="PciRoot(0x0)/Pci(0x1f,0x2)")
|
||||
],
|
||||
wifi=device_probe.Broadcom(
|
||||
vendor_id=5348, device_id=17192, class_code=163840, name="ARPT", model=None, pci_path="PciRoot(0x0)/Pci(0x1c,0x3)/Pci(0x0,0x0)"
|
||||
),
|
||||
cpu=device_probe.CPU(
|
||||
name="Intel(R) Xeon(R) CPU X5482 @ 3.20GHz",
|
||||
flags=["FPU", "VME", "DE", "PSE", "TSC", "MSR", "PAE", "MCE", "CX8", "APIC", "SEP", "MTRR", "PGE", "MCA", "CMOV", "PAT", "PSE36", "CLFSH", "DS", "ACPI", "MMX", "FXSR", "SSE", "SSE2", "SS", "HTT", "TM", "PBE", "SSE3", "DTES64", "MON", "DSCPL", "VMX", "EST", "TM2", "SSSE3", "CX16", "TPR", "PDCM", "SSE4.1"],
|
||||
),
|
||||
oclp_version=None,
|
||||
opencore_version=None,
|
||||
)
|
||||
|
||||
MacPro31_Modern_AMD = device_probe.Computer(
|
||||
# Upgraded Model, Polaris GPU and BCM94360CD
|
||||
real_model="MacPro3,1",
|
||||
real_board_id="Mac-F42C88C8",
|
||||
reported_model="MacPro3,1",
|
||||
reported_board_id="Mac-F42C88C8",
|
||||
gpus=[
|
||||
device_probe.AMD(vendor_id=4098, device_id=26591, class_code=196608, name="GFX0", model="Radeon RX 470/570", pci_path="PciRoot(0x0)/Pci(0x5,0x0)/Pci(0x0,0x0)")
|
||||
],
|
||||
igpu=None,
|
||||
dgpu=device_probe.AMD(vendor_id=4098, device_id=26591, class_code=196608, name="GFX0", model="Radeon RX 470/570", pci_path="PciRoot(0x0)/Pci(0x5,0x0)/Pci(0x0,0x0)"),
|
||||
storage=[
|
||||
device_probe.SATAController(vendor_id=32902, device_id=9857, class_code=67073, name="SATA", model=None, pci_path="PciRoot(0x0)/Pci(0x1f,0x2)")
|
||||
],
|
||||
wifi=device_probe.Broadcom(
|
||||
vendor_id=5348, device_id=17312, class_code=163840, name="ARPT", model=None, pci_path="PciRoot(0x0)/Pci(0x1c,0x3)/Pci(0x0,0x0)"
|
||||
),
|
||||
cpu=device_probe.CPU(
|
||||
name="Intel(R) Xeon(R) CPU X5482 @ 3.20GHz",
|
||||
flags=["FPU", "VME", "DE", "PSE", "TSC", "MSR", "PAE", "MCE", "CX8", "APIC", "SEP", "MTRR", "PGE", "MCA", "CMOV", "PAT", "PSE36", "CLFSH", "DS", "ACPI", "MMX", "FXSR", "SSE", "SSE2", "SS", "HTT", "TM", "PBE", "SSE3", "DTES64", "MON", "DSCPL", "VMX", "EST", "TM2", "SSSE3", "CX16", "TPR", "PDCM", "SSE4.1"],
|
||||
),
|
||||
oclp_version=None,
|
||||
opencore_version=None,
|
||||
)
|
||||
|
||||
MacPro31_Modern_Kepler = device_probe.Computer(
|
||||
# Upgraded Model, Kepler GPU and BCM94360CD
|
||||
real_model="MacPro3,1",
|
||||
real_board_id="Mac-F42C88C8",
|
||||
reported_model="MacPro3,1",
|
||||
reported_board_id="Mac-F42C88C8",
|
||||
gpus=[device_probe.NVIDIA(vendor_id=4318, device_id=4737, class_code=196608, name="GFX0", model="NVIDIA GeForce GT 710", pci_path="PciRoot(0x0)/Pci(0x5,0x0)/Pci(0x0,0x0)")],
|
||||
igpu=None,
|
||||
dgpu=device_probe.NVIDIA(vendor_id=4318, device_id=4737, class_code=196608, name="GFX0", model="NVIDIA GeForce GT 710", pci_path="PciRoot(0x0)/Pci(0x5,0x0)/Pci(0x0,0x0)"),
|
||||
storage=[
|
||||
device_probe.SATAController(vendor_id=32902, device_id=9857, class_code=67073, name="SATA", model=None, pci_path="PciRoot(0x0)/Pci(0x1f,0x2)")
|
||||
],
|
||||
wifi=device_probe.Broadcom(
|
||||
vendor_id=5348, device_id=17312, class_code=163840, name="ARPT", model=None, pci_path="PciRoot(0x0)/Pci(0x1c,0x3)/Pci(0x0,0x0)"
|
||||
),
|
||||
cpu=device_probe.CPU(
|
||||
name="Intel(R) Xeon(R) CPU X5482 @ 3.20GHz",
|
||||
flags=["FPU", "VME", "DE", "PSE", "TSC", "MSR", "PAE", "MCE", "CX8", "APIC", "SEP", "MTRR", "PGE", "MCA", "CMOV", "PAT", "PSE36", "CLFSH", "DS", "ACPI", "MMX", "FXSR", "SSE", "SSE2", "SS", "HTT", "TM", "PBE", "SSE3", "DTES64", "MON", "DSCPL", "VMX", "EST", "TM2", "SSSE3", "CX16", "TPR", "PDCM", "SSE4.1"],
|
||||
),
|
||||
oclp_version=None,
|
||||
opencore_version=None,
|
||||
)
|
||||
|
||||
MacPro41_Upgrade = device_probe.Computer(
|
||||
# Upgraded model with AMD HD7950, Atheros PCIe card
|
||||
real_model="MacPro4,1",
|
||||
real_board_id="Mac-F221BEC8",
|
||||
reported_model="MacPro4,1",
|
||||
reported_board_id="Mac-F221BEC8",
|
||||
gpus=[device_probe.AMD(vendor_id=4098, device_id=26522, class_code=196608, name="PXS1", model="AMD Radeon HD 7950", pci_path="PciRoot(0x0)/Pci(0x3,0x0)/Pci(0x0,0x0)")],
|
||||
igpu=None,
|
||||
dgpu=None,
|
||||
storage=[device_probe.SATAController(vendor_id=32902, device_id=14882, class_code=67073, name="SATA", model=None, pci_path="PciRoot(0x0)/Pci(0x1f,0x2)")],
|
||||
wifi=device_probe.Atheros(vendor_id=5772, device_id=48, class_code=163840, name="PXS4", model=None, pci_path="PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)/Pci(0x4,0x0)/Pci(0x0,0x0)"),
|
||||
cpu=device_probe.CPU(
|
||||
name="Intel(R) Xeon(R) CPU W3520 @ 2.67GHz",
|
||||
flags=["FPU", "VME", "DE", "PSE", "TSC", "MSR", "PAE", "MCE", "CX8", "APIC", "SEP", "MTRR", "PGE", "MCA", "CMOV", "PAT", "PSE36", "CLFSH", "DS", "ACPI", "MMX", "FXSR", "SSE", "SSE2", "SS", "HTT", "TM", "PBE", "SSE3", "DTES64", "MON", "DSCPL", "VMX", "EST", "TM2", "SSSE3", "CX16", "TPR", "PDCM", "SSE4.1", "SSE4.2", "POPCNT"]
|
||||
),
|
||||
oclp_version=None,
|
||||
opencore_version=None
|
||||
)
|
||||
|
||||
MacPro41_Modern_AMD = device_probe.Computer(
|
||||
# Upgraded model with AMD RX470, BCM94360CD, Intel 660p
|
||||
# Booted through OpenCore
|
||||
real_model="MacPro4,1",
|
||||
real_board_id="Mac-F221BEC8",
|
||||
reported_model="MacPro4,1",
|
||||
reported_board_id="Mac-27AD2F918AE68F61",
|
||||
gpus=[device_probe.AMD(vendor_id=4098, device_id=26591, class_code=196608, name="GFX0", model="Radeon RX 470/570", pci_path="PciRoot(0x0)/Pci(0x3,0x0)/Pci(0x0,0x0)")],
|
||||
igpu=None,
|
||||
dgpu=device_probe.AMD(vendor_id=4098, device_id=26591, class_code=196608, name="GFX0", model="Radeon RX 470/570", pci_path="PciRoot(0x0)/Pci(0x3,0x0)/Pci(0x0,0x0)"),
|
||||
storage=[
|
||||
device_probe.SATAController(vendor_id=32902, device_id=14882, class_code=67073, name="SATA", model=None, pci_path="PciRoot(0x0)/Pci(0x1f,0x2)"),
|
||||
device_probe.NVMeController(vendor_id=32902, device_id=61864, class_code=67586, name="PXS3", model=None, pci_path="PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)", aspm=2)
|
||||
],
|
||||
wifi=device_probe.Broadcom(vendor_id=5348, device_id=17312, class_code=163840, name="ARPT", model=None, pci_path="PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)/Pci(0x4,0x0)/Pci(0x0,0x0)"),
|
||||
cpu=device_probe.CPU(
|
||||
name="Intel(R) Xeon(R) CPU W3520 @ 2.67GHz",
|
||||
flags=["FPU", "VME", "DE", "PSE", "TSC", "MSR", "PAE", "MCE", "CX8", "APIC", "SEP", "MTRR", "PGE", "MCA", "CMOV", "PAT", "PSE36", "CLFSH", "DS", "ACPI", "MMX", "FXSR", "SSE", "SSE2", "SS", "HTT", "TM", "PBE", "SSE3", "DTES64", "MON", "DSCPL", "VMX", "EST", "TM2", "SSSE3", "CX16", "TPR", "PDCM", "SSE4.1", "SSE4.2", "POPCNT"]
|
||||
),
|
||||
oclp_version="0.2.5",
|
||||
opencore_version="REL-071-2021-07-02"
|
||||
)
|
||||
|
||||
MacPro41_51__Flashed_Modern_AMD = device_probe.Computer(
|
||||
# 4,1 flashed to 5,1, RX5700XT, BCM94360CD, WD SN750 NVMe
|
||||
real_model="MacPro5,1",
|
||||
real_board_id="Mac-F221BEC8",
|
||||
reported_model="MacPro5,1",
|
||||
reported_board_id="Mac-F221BEC8",
|
||||
gpus=[device_probe.AMD(vendor_id=4098, device_id=29471, class_code=196608, name="GFX0", model="AMD Radeon RX 5700 XT", pci_path="PciRoot(0x0)/Pci(0x3,0x0)/Pci(0x0,0x0)/Pci(0x0,0x0)/Pci(0x0,0x0)")],
|
||||
igpu=None,
|
||||
dgpu=device_probe.AMD(vendor_id=4098, device_id=29471, class_code=196608, name="GFX0", model="AMD Radeon RX 5700 XT", pci_path="PciRoot(0x0)/Pci(0x3,0x0)/Pci(0x0,0x0)/Pci(0x0,0x0)/Pci(0x0,0x0)"),
|
||||
storage=[
|
||||
device_probe.SATAController(vendor_id=32902, device_id=14882, class_code=67073, name="SATA", model=None, pci_path="PciRoot(0x0)/Pci(0x1f,0x2)"),
|
||||
device_probe.NVMeController(vendor_id=5559, device_id=20482, class_code=67586, name="PXS3", model=None, pci_path="PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)/Pci(0x2,0x0)/Pci(0x0,0x0)", aspm=2)
|
||||
],
|
||||
|
||||
wifi=device_probe.Broadcom(vendor_id=5348, device_id=17312, class_code=163840, name="PXS4", model=None, pci_path="PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)/Pci(0x4,0x0)/Pci(0x0,0x0)"),
|
||||
cpu=device_probe.CPU(
|
||||
name="Intel(R) Xeon(R) CPU X5670 @ 2.93GHz",
|
||||
flags=["FPU", "VME", "DE", "PSE", "TSC", "MSR", "PAE", "MCE", "CX8", "APIC", "SEP", "MTRR", "PGE", "MCA", "CMOV", "PAT", "PSE36", "CLFSH", "DS", "ACPI", "MMX", "FXSR", "SSE", "SSE2", "SS", "HTT", "TM", "PBE", "SSE3", "PCLMULQDQ", "DTES64", "MON", "DSCPL", "VMX", "SMX", "EST", "TM2", "SSSE3", "CX16", "TPR", "PDCM", "SSE4.1", "SSE4.2", "POPCNT", "AES", "PCID"]
|
||||
),
|
||||
oclp_version="0.2.5",
|
||||
opencore_version="REL-071-2021-07-02"
|
||||
)
|
||||
972
Resources/PCIIDArray.py
Normal file
@@ -0,0 +1,972 @@
|
||||
# Array of Device IDs for different devices
|
||||
|
||||
|
||||
class nvidia_ids:
|
||||
# Courteous of envytools as well as Macrumors:
|
||||
# https://envytools.readthedocs.io/en/latest/hw/pciid.html
|
||||
# https://forums.macrumors.com/threads/2011-imac-graphics-card-upgrade.1596614/
|
||||
tesla_ids = [
|
||||
# G80
|
||||
0x0190, # G80 [GeForce 8800 GTS / 8800 GTX]
|
||||
0x0191, # G80 [GeForce 8800 GTX]
|
||||
0x0193, # G80 [GeForce 8800 GTS]
|
||||
0x0194, # G80 [GeForce 8800 Ultra]
|
||||
0x019E, # G80GL [Quadro FX 4600]
|
||||
0x019D, # G80GL [Quadro FX 5600]
|
||||
# G84
|
||||
0x0400, # G84 [8600 GTS]
|
||||
0x0401, # G84 [8600 GT]
|
||||
0x0402, # G84 [8600 GT]
|
||||
0x0403, # G84 [8600 GS]
|
||||
0x0404, # G84 [8400 GS]
|
||||
0x0405, # G84 [9500M GS]
|
||||
0x0406, # G84 [8300 GS]
|
||||
0x0407, # G84 [8600M GT]
|
||||
0x0408, # G84 [9650M GS]
|
||||
0x0409, # G84 [8700M GT]
|
||||
0x040A, # G84 [FX 370]
|
||||
0x040B, # G84 [NVS 320M]
|
||||
0x040C, # G84 [FX 570M]
|
||||
0x040D, # G84 [FX 1600M]
|
||||
0x040E, # G84 [FX 570]
|
||||
0x040F, # G84 [FX 1700]
|
||||
# G86
|
||||
0x0420, # G86 [8400 SE]
|
||||
0x0421, # G86 [8500 GT]
|
||||
0x0422, # G86 [8400 GS]
|
||||
0x0423, # G86 [8300 GS]
|
||||
0x0424, # G86 [8400 GS]
|
||||
0x0425, # G86 [8600M GS]
|
||||
0x0426, # G86 [8400M GT]
|
||||
0x0427, # G86 [8400M GS]
|
||||
0x0428, # G86 [8400M G]
|
||||
0x0429, # G86 [NVS 140M]
|
||||
0x042A, # G86 [NVS 130M]
|
||||
0x042B, # G86 [NVS 135M]
|
||||
0x042C, # G86 [9400 GT]
|
||||
0x042D, # G86 [FX 360M]
|
||||
0x042E, # G86 [9300M G]
|
||||
0x042F, # G86 [NVS 290]
|
||||
# G92
|
||||
0x0410, # G92 [GT 330]
|
||||
0x0600, # G92 [8800 GTS 512]
|
||||
0x0601, # G92 [9800 GT]
|
||||
0x0602, # G92 [8800 GT]
|
||||
0x0603, # G92 [GT 230]
|
||||
0x0604, # G92 [9800 GX2]
|
||||
0x0605, # G92 [9800 GT]
|
||||
0x0606, # G92 [8800 GS]
|
||||
0x0607, # G92 [GTS 240]
|
||||
0x0608, # G92 [9800M GTX]
|
||||
0x0609, # G92 [8800M GTS]
|
||||
0x060A, # G92 [GTX 280M]
|
||||
0x060B, # G92 [9800M GT]
|
||||
0x060C, # G92 [8800M GTX]
|
||||
0x060F, # G92 [GTX 285M]
|
||||
0x0610, # G92 [9600 GSO]
|
||||
0x0611, # G92 [8800 GT]
|
||||
0x0612, # G92 [9800 GTX/9800 GTX+]
|
||||
0x0613, # G92 [9800 GTX+]
|
||||
0x0614, # G92 [9800 GT]
|
||||
0x0615, # G92 [GTS 250]
|
||||
0x0617, # G92 [9800M GTX]
|
||||
0x0618, # G92 [GTX 260M]
|
||||
0x0619, # G92 [FX 4700 X2]
|
||||
0x061A, # G92 [FX 3700]
|
||||
0x061B, # G92 [VX 200]
|
||||
0x061C, # G92 [FX 3600M]
|
||||
0x061D, # G92 [FX 2800M]
|
||||
0x061E, # G92 [FX 3700M]
|
||||
0x061F, # G92 [FX 3800M]
|
||||
# G94
|
||||
0x0621, # G94 [GT 230]
|
||||
0x0622, # G94 [9600 GT]
|
||||
0x0623, # G94 [9600 GS]
|
||||
0x0624, # G94 [9600 GT Green Edition]
|
||||
0x0625, # G94 [9600 GSO 512]
|
||||
0x0626, # G94 [GT 130]
|
||||
0x0627, # G94 [GT 140]
|
||||
0x0628, # G94 [9800M GTS]
|
||||
0x062A, # G94 [9700M GTS]
|
||||
0x062B, # G94 [9800M GS]
|
||||
0x062C, # G94 [9800M GTS ]
|
||||
0x062D, # G94 [9600 GT]
|
||||
0x062E, # G94 [9600 GT]
|
||||
0x062F, # G94 [9800 S]
|
||||
0x0631, # G94 [GTS 160M]
|
||||
0x0635, # G94 [9600 GSO]
|
||||
0x0637, # G94 [9600 GT]
|
||||
0x0638, # G94 [FX 1800]
|
||||
0x063A, # G94 [FX 2700M]
|
||||
# G96
|
||||
0x0640, # G96 [9500 GT]
|
||||
0x0641, # G96 [9400 GT]
|
||||
0x0643, # G96 [9500 GT]
|
||||
0x0644, # G96 [9500 GS]
|
||||
0x0645, # G96 [9500 GS]
|
||||
0x0646, # G96 [GT 120]
|
||||
0x0647, # G96 [9600M GT]
|
||||
0x0648, # G96 [9600M GS]
|
||||
0x0649, # G96 [9600M GT]
|
||||
0x064A, # G96 [9700M GT]
|
||||
0x064B, # G96 [9500M G]
|
||||
0x064C, # G96 [9650M GT]
|
||||
0x0651, # G96 [G 110M]
|
||||
0x0652, # G96 [GT 130M]
|
||||
0x0653, # G96 [GT 120M]
|
||||
0x0654, # G96 [GT 220M]
|
||||
0x0655, # G96 [GT 120]
|
||||
0x0656, # G96 [GT 120 ]
|
||||
0x0658, # G96 [FX 380]
|
||||
0x0659, # G96 [FX 580]
|
||||
0x065A, # G96 [FX 1700M]
|
||||
0x065B, # G96 [9400 GT]
|
||||
0x065C, # G96 [FX 770M]
|
||||
0x065F, # G96 [G210]
|
||||
# G98
|
||||
0x06E0, # G98 [9300 GE]
|
||||
0x06E1, # G98 [9300 GS]
|
||||
0x06E2, # G98 [8400]
|
||||
0x06E3, # G98 [8400 SE]
|
||||
0x06E4, # G98 [8400 GS]
|
||||
0x06E5, # G98M [9300M GS]
|
||||
0x06E6, # G98 [G100]
|
||||
0x06E7, # G98 [9300 SE]
|
||||
0x06E8, # G98 [9200M GS]
|
||||
0x06E9, # G98 [9300M GS]
|
||||
0x06EA, # G98 [NVS 150M]
|
||||
0x06EB, # G98 [NVS 160M]
|
||||
0x06EC, # G98 [G 105M]
|
||||
0x06ED, # G98 [9600 GT / 9800 GT]
|
||||
0x06EF, # G98 [G 103M]
|
||||
0x06F1, # G98 [G105M]
|
||||
0x06F8, # G98 [NVS 420]
|
||||
0x06F9, # G98 [FX 370 LP]
|
||||
0x06FA, # G98 [NVS 450]
|
||||
0x06FB, # G98 [FX 370M]
|
||||
0x06FD, # G98 [NVS 295]
|
||||
0x06FF, # G98 [HICx16]
|
||||
# GT200
|
||||
0x05E0, # GT200 [GTX 295]
|
||||
0x05E1, # GT200 [GTX 280]
|
||||
0x05E2, # GT200 [GTX 260]
|
||||
0x05E3, # GT200 [GTX 285]
|
||||
0x05E6, # GT200 [GTX 275]
|
||||
0x05E7, # GT200 [C1060]
|
||||
0x05E9, # GT200 [CX]
|
||||
0x05EA, # GT200 [GTX 260]
|
||||
0x05EB, # GT200 [GTX 295]
|
||||
0x05ED, # GT200 [FX 5800]
|
||||
0x05EE, # GT200 [FX 4800]
|
||||
0x05EF, # GT200 [FX 3800]
|
||||
0x05FD, # GT200GL [Quadro FX 5800]
|
||||
0x05FE, # GT200GL [Quadro FX 4800]
|
||||
0x05FF, # GT200GL [Quadro FX 3800]
|
||||
# MCP77 GPU
|
||||
0x0840, # MCP77 GPU [8200M]
|
||||
0x0844, # MCP77 GPU [9100M G]
|
||||
0x0845, # MCP77 GPU [8200M G]
|
||||
0x0846, # MCP77 GPU [9200]
|
||||
0x0847, # MCP77 GPU [9100]
|
||||
0x0848, # MCP77 GPU [8300]
|
||||
0x0849, # MCP77 GPU [8200]
|
||||
0x084A, # MCP77 GPU [730A]
|
||||
0x084B, # MCP77 GPU [9200]
|
||||
0x084C, # MCP77 GPU [980A/780A SLI]
|
||||
0x084D, # MCP77 GPU [750A SLI]
|
||||
0x084F, # MCP77 GPU [8100 / 720A]
|
||||
# MCP79 GPU
|
||||
0x0860, # MCP79 GPU [9400]
|
||||
0x0861, # MCP79 GPU [9400]
|
||||
0x0862, # MCP79 GPU [9400M G]
|
||||
0x0863, # MCP79 GPU [9400M]
|
||||
0x0864, # MCP79 GPU [9300]
|
||||
0x0865, # MCP79 GPU [ION]
|
||||
0x0866, # MCP79 GPU [9400M G]
|
||||
0x0867, # MCP79 GPU [9400]
|
||||
0x0868, # MCP79 GPU [760i SLI]
|
||||
0x0869, # MCP79 GPU [9400]
|
||||
0x086A, # MCP79 GPU [9400]
|
||||
0x086C, # MCP79 GPU [9300 / 730i]
|
||||
0x086D, # MCP79 GPU [9200]
|
||||
0x086E, # MCP79 GPU [9100M G]
|
||||
0x086F, # MCP79 GPU [8200M G]
|
||||
0x0870, # MCP79 GPU [9400M]
|
||||
0x0871, # MCP79 GPU [9200]
|
||||
0x0872, # MCP79 GPU [G102M]
|
||||
0x0873, # MCP79 GPU [G102M]
|
||||
0x0874, # MCP79 GPU [ION]
|
||||
0x0876, # MCP79 GPU [ION]
|
||||
0x087A, # MCP79 GPU [9400]
|
||||
0x087D, # MCP79 GPU [ION]
|
||||
0x087E, # MCP79 GPU [ION LE]
|
||||
0x087F, # MCP79 GPU [ION LE]
|
||||
# GT215
|
||||
0x0CA0, # GT215 [GT 330]
|
||||
0x0CA2, # GT215 [GT 320]
|
||||
0x0CA3, # GT215 [GT 240]
|
||||
0x0CA4, # GT215 [GT 340]
|
||||
0x0CA5, # GT215 [GT 220]
|
||||
0x0CA7, # GT215 [GT 330]
|
||||
0x0CA9, # GT215 [GTS 250M]
|
||||
0x0CAC, # GT215 [GT 220]
|
||||
0x0CAF, # GT215 [GT 335M]
|
||||
0x0CB0, # GT215 [GTS 350M]
|
||||
0x0CB1, # GT215 [GTS 360M]
|
||||
0x0CBC, # GT215 [FX 1800M]
|
||||
# GT216
|
||||
0x0A20, # GT216 [GT 220]
|
||||
0x0A22, # GT216 [315]
|
||||
0x0A23, # GT216 [210]
|
||||
0x0A26, # GT216 [405]
|
||||
0x0A27, # GT216 [405]
|
||||
0x0A28, # GT216 [GT 230M]
|
||||
0x0A29, # GT216 [GT 330M]
|
||||
0x0A2A, # GT216 [GT 230M]
|
||||
0x0A2B, # GT216 [GT 330M]
|
||||
0x0A2C, # GT216 [NVS 5100M]
|
||||
0x0A2D, # GT216 [GT 320M]
|
||||
0x0A32, # GT216 [GT 415]
|
||||
0x0A34, # GT216 [GT 240M]
|
||||
0x0A35, # GT216 [GT 325M]
|
||||
0x0A38, # GT216 [400]
|
||||
0x0A3C, # GT216 [FX 880M]
|
||||
# GT218
|
||||
0x0A60, # GT218 [G210]
|
||||
0x0A62, # GT218 [205]
|
||||
0x0A63, # GT218 [310]
|
||||
0x0A64, # GT218 [ION]
|
||||
0x0A65, # GT218 [210]
|
||||
0x0A66, # GT218 [310]
|
||||
0x0A67, # GT218 [315]
|
||||
0x0A68, # GT218 [G105M]
|
||||
0x0A69, # GT218 [G105M]
|
||||
0x0A6A, # GT218 [NVS 2100M]
|
||||
0x0A6C, # GT218 [NVS 3100M]
|
||||
0x0A6E, # GT218 [305M]
|
||||
0x0A6F, # GT218 [ION]
|
||||
0x0A70, # GT218 [310M]
|
||||
0x0A71, # GT218 [305M]
|
||||
0x0A72, # GT218 [310M]
|
||||
0x0A73, # GT218 [305M]
|
||||
0x0A74, # GT218 [G210M]
|
||||
0x0A75, # GT218 [310M]
|
||||
0x0A76, # GT218 [ION]
|
||||
0x0A78, # GT218 [FX 380 LP]
|
||||
0x0A7A, # GT218 [315M]
|
||||
0x0A7C, # GT218 [FX 380M]
|
||||
0x10C0, # GT218 [9300 GS]
|
||||
0x10C3, # GT218 [8400GS]
|
||||
0x10C5, # GT218 [405]
|
||||
0x10D8, # GT218 [NVS 300]
|
||||
# MCP89 GPU
|
||||
0x08A0, # MCP89 GPU [320M]
|
||||
0x08A2, # MCP89 GPU [320M]
|
||||
0x08A3, # MCP89 GPU [320M]
|
||||
0x08A4, # MCP89 GPU [320M]
|
||||
]
|
||||
|
||||
fermi_ids = [
|
||||
# GF100
|
||||
0x06C0, # GF100 [GTX 480]
|
||||
0x06C4, # GF100 [GTX 465]
|
||||
0x06CA, # GF100 [GTX 480M]
|
||||
0x06CB, # GF100 [GTX 480]
|
||||
0x06CD, # GF100 [GTX 470]
|
||||
0x06D1, # GF100 [C2050 / C2070]
|
||||
0x06D2, # GF100 [M2070]
|
||||
0x06D8, # GF100 [6000]
|
||||
0x06D9, # GF100 [5000]
|
||||
0x06DA, # GF100 [5000M]
|
||||
0x06DC, # GF100 [6000]
|
||||
0x06DD, # GF100 [4000]
|
||||
0x06DE, # GF100 [T20]
|
||||
0x06DF, # GF100 [M2070-Q]
|
||||
# GF104
|
||||
0x0E22, # GF104 [GTX 460]
|
||||
0x0E23, # GF104 [GTX 460 SE]
|
||||
0x0E24, # GF104 [GTX 460 OEM]
|
||||
0x0E30, # GF104 [GTX 470M]
|
||||
0x0E31, # GF104 [GTX 485M]
|
||||
0x0E3A, # GF104 [3000M]
|
||||
0x0E3B, # GF104 [4000M]
|
||||
# GF114
|
||||
0x1200, # GF114 [GTX 560 Ti]
|
||||
0x1201, # GF114 [GTX 560]
|
||||
0x1202, # GF114 [GTX 560 Ti OEM]
|
||||
0x1203, # GF114 [GTX 460 SE v2]
|
||||
0x1205, # GF114 [GTX 460 v2]
|
||||
0x1206, # GF114 [GTX 555]
|
||||
0x1207, # GF114 [GT 645 OEM]
|
||||
0x1208, # GF114 [GTX 560 SE]
|
||||
0x1210, # GF114 [GTX 570M]
|
||||
0x1211, # GF114 [GTX 580M]
|
||||
0x1212, # GF114 [GTX 675M]
|
||||
0x1213, # GF114 [GTX 670M]
|
||||
# GF106
|
||||
0x0DC0, # GF106 [GT 440]
|
||||
0x0DC4, # GF106 [GTS 450]
|
||||
0x0DC5, # GF106 [GTS 450]
|
||||
0x0DC6, # GF106 [GTS 450]
|
||||
0x0DCD, # GF106 [GT 555M]
|
||||
0x0DCE, # GF106 [GT 555M]
|
||||
0x0DD1, # GF106 [GTX 460M]
|
||||
0x0DD2, # GF106 [GT 445M]
|
||||
0x0DD3, # GF106 [GT 435M]
|
||||
0x0DD6, # GF106 [GT 550M]
|
||||
0x0DD8, # GF106 [2000]
|
||||
0x0DDA, # GF106 [2000M]
|
||||
# GF116
|
||||
0x1241, # GF116 [GT 545 OEM]
|
||||
0x1243, # GF116 [GT 545]
|
||||
0x1244, # GF116 [GTX 550 Ti]
|
||||
0x1245, # GF116 [GTS 450 Rev. 2]
|
||||
0x1246, # GF116 [GT 550M]
|
||||
0x1247, # GF116 [GT 635M]
|
||||
0x1248, # GF116 [GT 555M]
|
||||
0x1249, # GF116 [GTS 450 Rev. 3]
|
||||
0x124B, # GF116 [GT 640 OEM]
|
||||
0x124D, # GF116 [GT 555M]
|
||||
0x1251, # GF116 [GTX 560M]
|
||||
# GF108
|
||||
0x0DE0, # GF108 [GT 440]
|
||||
0x0DE1, # GF108 [GT 430]
|
||||
0x0DE2, # GF108 [GT 420]
|
||||
0x0DE3, # GF108 [GT 635M]
|
||||
0x0DE4, # GF108 [GT 520]
|
||||
0x0DE5, # GF108 [GT 530]
|
||||
0x0DE8, # GF108 [GT 620M]
|
||||
0x0DE9, # GF108 [GT 630M]
|
||||
0x0DEA, # GF108 [610M]
|
||||
0x0DEB, # GF108 [GT 555M]
|
||||
0x0DEC, # GF108 [GT 525M]
|
||||
0x0DED, # GF108 [GT 520M]
|
||||
0x0DEE, # GF108 [GT 415M]
|
||||
0x0DEF, # GF108 [NVS 5400M]
|
||||
0x0DF0, # GF108 [GT 425M]
|
||||
0x0DF1, # GF108 [GT 420M]
|
||||
0x0DF2, # GF108 [GT 435M]
|
||||
0x0DF3, # GF108 [GT 420M]
|
||||
0x0DF4, # GF108 [GT 540M]
|
||||
0x0DF5, # GF108 [GT 525M]
|
||||
0x0DF6, # GF108 [GT 550M]
|
||||
0x0DF7, # GF108 [GT 520M]
|
||||
0x0DF8, # GF108 [600]
|
||||
0x0DF9, # GF108 [500M]
|
||||
0x0DFA, # GF108 [1000M]
|
||||
0x0DFC, # GF108 [NVS 5200M]
|
||||
0x0F00, # GF108 [GT 630]
|
||||
0x0F01, # GF108 [GT 620]
|
||||
0x0F02, # GF108 [GT 730]
|
||||
# GF110
|
||||
0x1080, # GF110 [GTX 580]
|
||||
0x1081, # GF110 [GTX 570]
|
||||
0x1082, # GF110 [GTX 560 Ti]
|
||||
0x1084, # GF110 [GTX 560]
|
||||
0x1086, # GF110 [GTX 570]
|
||||
0x1087, # GF110 [GTX 560 Ti]
|
||||
0x1088, # GF110 [GTX 590]
|
||||
0x1089, # GF110 [GTX 580]
|
||||
0x108B, # GF110 [GTX 580]
|
||||
0x1091, # GF110 [M2090]
|
||||
0x1096, # GF110GL [Tesla C2050 / C2075]
|
||||
0x109A, # GF110 [5010M]
|
||||
0x109B, # GF110 [7000]
|
||||
# GF119
|
||||
0x1040, # GF119 [GT 520]
|
||||
0x1042, # GF119 [510]
|
||||
0x1048, # GF119 [605]
|
||||
0x1049, # GF119 [GT 620]
|
||||
0x104A, # GF119 [GT 610]
|
||||
0x104B, # GF119 [GT 625 OEM]
|
||||
0x104C, # GF119 [GT 705]
|
||||
0x1050, # GF119 [GT 520M]
|
||||
0x1051, # GF119 [GT 520MX]
|
||||
0x1052, # GF119 [GT 520M]
|
||||
0x1054, # GF119 [410M]
|
||||
0x1055, # GF119 [410M]
|
||||
0x1056, # GF119 [NVS 4200M]
|
||||
0x1057, # GF119 [NVS 4200M]
|
||||
0x1058, # GF119 [610M]
|
||||
0x1059, # GF119 [610M]
|
||||
0x105A, # GF119 [610M]
|
||||
0x105B, # GF119M [705M]
|
||||
0x107C, # GF119 [NVS 315]
|
||||
0x107D, # GF119 [NVS 310]
|
||||
# GF117
|
||||
0x1140, # GF117 [GT 620M]
|
||||
]
|
||||
|
||||
kepler_ids = [
|
||||
# GK104
|
||||
0x1180, # GK104 [GTX 680]
|
||||
0x1183, # GK104 [GTX 660 Ti]
|
||||
0x1184, # GK104 [GTX 770]
|
||||
0x1185, # GK104 [GTX 660]
|
||||
0x1186, # GK104 [GTX 660 Ti]
|
||||
0x1187, # GK104 [GTX 760]
|
||||
0x1188, # GK104 [GTX 690]
|
||||
0x1189, # GK104 [GTX 670]
|
||||
0x118E, # GK104 [GTX 760 OEM]
|
||||
0x118F, # GK104GL [Tesla K10]
|
||||
0x1198, # GTX 880M
|
||||
0x1199, # GK104 [GTX 870M]
|
||||
0x119A, # GTX 860M
|
||||
0x119D, # GK104M [GTX 775M Mac Edition]
|
||||
0x119E, # GTX 780M
|
||||
0x119F, # GK104 [GTX 780M]
|
||||
0x11A0, # GK104 [GTX 680M]
|
||||
0x11A1, # GK104 [GTX 670MX]
|
||||
0x11A2, # GK104 [GTX 675MX]
|
||||
0x11A3, # GK104 [GTX 680MX]
|
||||
0x11A7, # GK104 [GTX 675MX]
|
||||
0x11A9, # GTX 870M
|
||||
0x11B4, # GK104GL [Quadro K4200]
|
||||
0x11B6, # Quadro K3100M
|
||||
0x11B7, # Quadro K4100M
|
||||
0x11B8, # Quadro K5100M
|
||||
0x11BA, # GK104 [K5000]
|
||||
0x11BC, # GK104 [K5000M]
|
||||
0x11BD, # GK104 [K4000M]
|
||||
0x11BE, # GK104 [K3000M]
|
||||
0x11BF, # GK104 [GRID K2]
|
||||
# GK106
|
||||
0x11C0, # GK106 [GTX 660]
|
||||
0x11C2, # GK106 [GTX 650 Ti BOOST]
|
||||
0x11C6, # GK106 [GTX 650 Ti]
|
||||
0x11E0, # GK106 [GTX 770M]
|
||||
0x11E1, # GTX 765M
|
||||
0x11E2, # GTX 765M
|
||||
0x11FA, # GK106 [K4000]
|
||||
0x11FC, # Quadro K2100M
|
||||
# GK107
|
||||
0x0FC0, # GK107 [GT 640]
|
||||
0x0FC1, # GK107 [GT 640]
|
||||
0x0FC2, # GK107 [GT 630]
|
||||
0x0FC6, # GK107 [GTX 650]
|
||||
0x0FC8, # GK107 [GT 740]
|
||||
0x0FCD, # GK107M [GT 755M]
|
||||
0x0FD1, # GK107 [GT 650M]
|
||||
0x0FD2, # GK107 [GT 640M]
|
||||
0x0FD3, # GK107 [GT 640M LE]
|
||||
0x0FD4, # GK107 [GTX 660M]
|
||||
0x0FD5, # GK107 [GT 650M]
|
||||
0x0FD8, # GK107 [GT 640M]
|
||||
0x0FD9, # GK107 [GT 645M]
|
||||
0x0FDF, # GK107M [ GT 740M]
|
||||
0x0FE0, # GK107 [GTX 660M]
|
||||
0x0FE1, # GK107M [GT 730M]
|
||||
0x0FE3, # GK107M [GT 745M]
|
||||
0x0FE4, # GK107M [GT 750M]
|
||||
0x0FE9, # GK107 [GT 750M Mac Edition]
|
||||
0x0FEA, # GK107M [GT 755M Mac Edition]
|
||||
0x0FEE, # GK107M [810M]
|
||||
0x0FF2, # GK107GL [GRID K1]
|
||||
0x0FF3, # GK107GL [Quadro K420]
|
||||
0x0FF6, # Quadro K1100M
|
||||
0x0FF9, # GK107 [K2000D]
|
||||
0x0FFA, # GK107 [K600]
|
||||
0x0FFB, # GK107 [K2000M]
|
||||
0x0FFC, # GK107 [K1000M]
|
||||
0x0FFD, # GK107 [NVS 510]
|
||||
0x0FFE, # GK107 [K2000]
|
||||
0x0FFF, # GK107 [410]
|
||||
# GK110
|
||||
0x1001, # GK110B [GTX TITAN Z]
|
||||
0x1003, # GK110 [GTX Titan LE]
|
||||
0x1004, # GK110 [GTX 780]
|
||||
0x1005, # GK110 [GTX Titan]
|
||||
0x1007, # GK110 [GTX 780 Rev. 2]
|
||||
0x100A, # GK110B [GTX 780 Ti]
|
||||
0x100C, # GK110B [GTX TITAN Black]
|
||||
0x101F, # GK110 [TEslA K20]
|
||||
0x1020, # GK110 [TEslA K2]
|
||||
0x1021, # GK110 [TEslA K2m]
|
||||
0x1022, # GK110 [TEslA K20C]
|
||||
0x1023, # GK110BGL [Tesla K40m]
|
||||
0x1024, # GK180GL [Tesla K40c]
|
||||
0x1026, # GK110 [TEslA K20s]
|
||||
0x1028, # GK110 [TEslA K20m]
|
||||
0x102D, # GK210GL [Tesla K80]
|
||||
0x103C, # GK110GL [Quadro K5200]
|
||||
# GK208
|
||||
0x1280, # GK208 [GT 635]
|
||||
0x1281, # GK208 [GT 710]
|
||||
0x1282, # GK208 [GT 640 REv. 2]
|
||||
0x1284, # GK208 [GT 630 REv. 2]
|
||||
0x1286, # GK208 [GT 720]
|
||||
0x1287, # GK208B [GT 730]
|
||||
0x1288, # GK208B [GT 720]
|
||||
0x1289, # GK208 [GT 710]
|
||||
0x128B, # GK208B [GT 710]
|
||||
0x1290, # GK208 [GT 730M]
|
||||
0x1291, # GK208 [GT 735M]
|
||||
0x1292, # GK208 [GT 740M]
|
||||
0x1293, # GK208 [GT 730M]
|
||||
0x1294, # GK208 [GT 740M]
|
||||
0x1295, # GK208 [710M]
|
||||
0x1296, # GK208M [825M]
|
||||
0x1298, # GK208M [GT 720M]
|
||||
0x1299, # GK208BM [920M]
|
||||
0x129A, # GK208BM [910M]
|
||||
0x12B9, # GK208 [K610M]
|
||||
0x12BA, # GK208 [K510M]
|
||||
]
|
||||
|
||||
|
||||
class amd_ids:
|
||||
legacy_gcn_ids = [
|
||||
# AMDRadeonX4000
|
||||
# AMDBonaireGraphicsAccelerator
|
||||
0x6640,
|
||||
0x6641,
|
||||
0x6646,
|
||||
0x6647,
|
||||
0x6650,
|
||||
0x6651,
|
||||
0x665C,
|
||||
0x665D,
|
||||
# AMDFijiGraphicsAccelerator
|
||||
0x7300,
|
||||
0x730F,
|
||||
# AMDHawaiiGraphicsAccelerator
|
||||
0x67B0,
|
||||
# AMDPitcairnGraphicsAccelerator
|
||||
0x6800,
|
||||
0x6801,
|
||||
0x6806,
|
||||
0x6808,
|
||||
0x6810,
|
||||
0x6818,
|
||||
0x6819,
|
||||
# AMDTahitiGraphicsAccelerator
|
||||
0x6790,
|
||||
0x6798,
|
||||
0x679A,
|
||||
0x679E,
|
||||
0x6780,
|
||||
# AMDTongaGraphicsAccelerator
|
||||
0x6920,
|
||||
0x6921,
|
||||
0x6930,
|
||||
0x6938,
|
||||
0x6939,
|
||||
# AMDVerdeGraphicsAccelerator
|
||||
0x6820,
|
||||
0x6821,
|
||||
0x6823,
|
||||
0x6825,
|
||||
0x6827,
|
||||
0x682B,
|
||||
0x682D,
|
||||
0x682F,
|
||||
0x6835,
|
||||
0x6839,
|
||||
0x683B,
|
||||
0x683D,
|
||||
0x683F,
|
||||
]
|
||||
|
||||
polaris_ids = [
|
||||
# AMDRadeonX4000
|
||||
# AMDBaffinGraphicsAccelerator
|
||||
0x67E0,
|
||||
0x67E3,
|
||||
0x67E8,
|
||||
0x67EB,
|
||||
0x67EF,
|
||||
0x67FF,
|
||||
0x67E1,
|
||||
0x67E7,
|
||||
0x67E9,
|
||||
# AMDEllesmereGraphicsAccelerator
|
||||
0x67C0,
|
||||
0x67C1,
|
||||
0x67C2,
|
||||
0x67C4,
|
||||
0x67C7,
|
||||
0x67DF,
|
||||
0x67D0,
|
||||
0x67C8,
|
||||
0x67C9,
|
||||
0x67CA,
|
||||
0x67CC,
|
||||
0x67CF,
|
||||
]
|
||||
|
||||
vega_ids = [
|
||||
# AMDRadeonX5000
|
||||
# AMDVega10GraphicsAccelerator
|
||||
0x6860,
|
||||
0x6861,
|
||||
0x6862,
|
||||
0x6863,
|
||||
0x6864,
|
||||
0x6867,
|
||||
0x6868,
|
||||
0x6869,
|
||||
0x686A,
|
||||
0x686B,
|
||||
0x686C,
|
||||
0x686D,
|
||||
0x686E,
|
||||
0x686F,
|
||||
0x687F,
|
||||
# AMDVega12GraphicsAccelerator
|
||||
0x69A0,
|
||||
0x69A1,
|
||||
0x69A2,
|
||||
0x69A3,
|
||||
0x69AF,
|
||||
# AMDVega20GraphicsAccelerator
|
||||
0x66A0,
|
||||
0x66A1,
|
||||
0x66A2,
|
||||
0x66A3,
|
||||
0x66A7,
|
||||
0x66AF,
|
||||
]
|
||||
|
||||
navi_ids = [
|
||||
# AMDRadeonX6000
|
||||
# AMDNavi10GraphicsAccelerator
|
||||
0x7310,
|
||||
0x7312,
|
||||
0x7318,
|
||||
0x7319,
|
||||
0x731A,
|
||||
0x731B,
|
||||
0x731F,
|
||||
# AMDNavi12GraphicsAccelerator
|
||||
0x7360,
|
||||
# AMDNavi14GraphicsAccelerator
|
||||
0x7340,
|
||||
0x7341,
|
||||
0x7343,
|
||||
0x7347,
|
||||
0x734F,
|
||||
# AMDNavi21GraphicsAccelerator
|
||||
0x73A2,
|
||||
0x73AB,
|
||||
0x73BF,
|
||||
]
|
||||
terascale_1_ids = [
|
||||
0x9400,
|
||||
0x9401,
|
||||
0x9402,
|
||||
0x9403,
|
||||
0x9581,
|
||||
0x9583,
|
||||
0x9588,
|
||||
0x94C8,
|
||||
0x94C9,
|
||||
0x9500,
|
||||
0x9501,
|
||||
0x9505,
|
||||
0x9507,
|
||||
0x9504,
|
||||
0x9506,
|
||||
0x9598,
|
||||
0x9488,
|
||||
0x9599,
|
||||
0x9591,
|
||||
0x9593,
|
||||
0x9440,
|
||||
0x9442,
|
||||
0x944A,
|
||||
0x945A,
|
||||
0x9490,
|
||||
0x949E,
|
||||
0x9480,
|
||||
0x9540,
|
||||
0x9541,
|
||||
0x954E,
|
||||
0x954F,
|
||||
0x9552,
|
||||
0x9553,
|
||||
0x94A0,
|
||||
]
|
||||
|
||||
terascale_2_ids = [
|
||||
0x6738,
|
||||
0x6739,
|
||||
0x6720,
|
||||
0x6722,
|
||||
0x6768,
|
||||
0x6770,
|
||||
0x6779,
|
||||
0x6760,
|
||||
0x6761,
|
||||
0x68E0,
|
||||
0x6898,
|
||||
0x6899,
|
||||
0x68B8,
|
||||
0x68B0,
|
||||
0x68B1,
|
||||
0x68A0,
|
||||
0x68A1,
|
||||
0x6840,
|
||||
0x6841,
|
||||
0x68D8,
|
||||
0x68C0,
|
||||
0x68C1,
|
||||
0x68D9,
|
||||
0x6750,
|
||||
0x6758,
|
||||
0x6759,
|
||||
0x6740,
|
||||
0x6741,
|
||||
0x6745,
|
||||
]
|
||||
|
||||
|
||||
class intel_ids:
|
||||
iron_ids = [
|
||||
# AppleIntelHDGraphics IDs
|
||||
0x0044,
|
||||
0x0046,
|
||||
]
|
||||
|
||||
sandy_ids = [
|
||||
# AppleIntelHD3000Graphics IDs
|
||||
# AppleIntelSNBGraphicsFB IDs
|
||||
0x0106,
|
||||
0x0601,
|
||||
0x0116,
|
||||
0x0102,
|
||||
0x0126,
|
||||
]
|
||||
|
||||
ivy_ids = [
|
||||
# AppleIntelHD4000Graphics IDs
|
||||
# AppleIntelFramebufferCapri IDs
|
||||
0x0152,
|
||||
0x0156,
|
||||
0x0162,
|
||||
0x0166,
|
||||
]
|
||||
|
||||
haswell_ids = [
|
||||
# AppleIntelHD5000Graphics IDs
|
||||
# AppleIntelFramebufferAzul IDs
|
||||
0x0D26,
|
||||
0x0A26,
|
||||
0x0A2E,
|
||||
0x0D22,
|
||||
0x0412,
|
||||
]
|
||||
|
||||
broadwell_ids = [
|
||||
# AppleIntelBDWGraphicsFramebuffer IDs
|
||||
0x0BD1,
|
||||
0x0BD2,
|
||||
0x0BD3,
|
||||
0x1606,
|
||||
0x160E,
|
||||
0x1616,
|
||||
0x161E,
|
||||
0x1626,
|
||||
0x1622,
|
||||
0x1612,
|
||||
0x162B,
|
||||
]
|
||||
|
||||
skylake_ids = [
|
||||
# AppleIntelSKLGraphicsFramebuffer IDs
|
||||
0x1916,
|
||||
0x191E,
|
||||
0x1926,
|
||||
0x1927,
|
||||
0x1912,
|
||||
0x1932,
|
||||
0x1902,
|
||||
0x1917,
|
||||
0x193B,
|
||||
0x191B,
|
||||
]
|
||||
|
||||
kaby_lake_ids = [
|
||||
# AppleIntelKBLGraphicsFramebuffer IDs
|
||||
0x5912,
|
||||
0x5916,
|
||||
0x591B,
|
||||
0x591C,
|
||||
0x591E,
|
||||
0x5926,
|
||||
0x5927,
|
||||
0x5923,
|
||||
]
|
||||
|
||||
coffee_lake_ids = [
|
||||
# AppleIntelCFLGraphicsFramebuffer IDs
|
||||
0x3E9B,
|
||||
0x3EA5,
|
||||
0x3EA6,
|
||||
0x3E92,
|
||||
0x3E91,
|
||||
0x3E98,
|
||||
]
|
||||
|
||||
ice_lake_ids = [
|
||||
# AppleIntelICLLPGraphicsFramebuffer IDs
|
||||
0xFF05,
|
||||
0x8A70,
|
||||
0x8A71,
|
||||
0x8A51,
|
||||
0x8A5C,
|
||||
0x8A5D,
|
||||
0x8A52,
|
||||
0x8A53,
|
||||
0x8A5A,
|
||||
0x8A5B,
|
||||
]
|
||||
|
||||
AppleIntel8254XEthernet = [
|
||||
# AppleIntel8254XEthernet IDs
|
||||
0x1096,
|
||||
0x100F,
|
||||
0x105E,
|
||||
]
|
||||
|
||||
AppleIntelI210Ethernet = [
|
||||
# AppleIntelI210Ethernet IDs
|
||||
0x1533, # I210
|
||||
0x15F2, # I225
|
||||
0x15F3, # I225
|
||||
0x3100, # I225
|
||||
0x3101, # I225
|
||||
0x5502, # I225
|
||||
0x0D9F, # I225
|
||||
0x15F8, # I225
|
||||
0x15F7, # I225
|
||||
0x15FD, # I225
|
||||
]
|
||||
|
||||
Intel82574L = [
|
||||
# Intel82574L IDs
|
||||
0x104B,
|
||||
0x10F6,
|
||||
]
|
||||
|
||||
|
||||
class broadcom_ids:
|
||||
AirPortBrcmNIC = [
|
||||
# AirPortBrcmNIC IDs
|
||||
0x43BA, # BCM43602
|
||||
0x43A3, # BCM4350
|
||||
0x43A0, # BCM4360
|
||||
]
|
||||
|
||||
AirPortBrcm4360 = [
|
||||
# AirPortBrcm4360 IDs (removed duplicates for 4360 class cards)
|
||||
0x4331, # BCM94331
|
||||
0x4353, # BCM943224
|
||||
]
|
||||
|
||||
AirPortBrcm4331 = [
|
||||
# AirPortBrcm4331 IDs (removed duplicates for 4331 class cards)
|
||||
0x432B, # BCM94322
|
||||
]
|
||||
|
||||
AppleAirPortBrcm43224 = [
|
||||
# AppleAirPortBrcm43224 IDs
|
||||
0x4311, # BCM4311 - never used by Apple
|
||||
0x4312, # BCM4311 - never used by Apple
|
||||
0x4313, # BCM4311 - never used by Apple
|
||||
0x4318, # BCM4318 - never used by Apple
|
||||
0x4319, # BCM4318 - never used by Apple
|
||||
0x431A, # Unknown - never used by Apple
|
||||
0x4320, # BCM4306 - never used by Apple
|
||||
0x4324, # BCM4309 - never used by Apple
|
||||
0x4325, # BCM4306 - never used by Apple
|
||||
0x4328, # BCM4328
|
||||
0x432C, # BCM4322 - never used by Apple
|
||||
0x432D, # BCM4322 - never used by Apple
|
||||
]
|
||||
|
||||
AppleBCM5701Ethernet = [
|
||||
# AppleBCM5701Ethernet IDs
|
||||
0x1684,
|
||||
0x16B0,
|
||||
0x16B4,
|
||||
0x1682,
|
||||
0x1686,
|
||||
]
|
||||
|
||||
|
||||
class aquantia_ids:
|
||||
AppleEthernetAquantiaAqtion = [
|
||||
# AppleEthernetAquantiaAqtion IDs
|
||||
0x0001, # AQC107
|
||||
0xD107, # AQC107
|
||||
0x07B1, # AQC107
|
||||
0x80B1, # AQC107
|
||||
0x87B1, # AQC107
|
||||
0x88B1, # AQC107
|
||||
0x89B1, # AQC107
|
||||
0x91B1, # AQC107
|
||||
0x92B1, # AQC107
|
||||
0x00C0, # AQC113
|
||||
0x04C0, # AQC113
|
||||
]
|
||||
|
||||
|
||||
class marvell_ids:
|
||||
MarvelYukonEthernet = [
|
||||
# AppleYukon2.kext IDs
|
||||
# AppleYukon2 supports 2 vendors (Marvell and SysKonnect)
|
||||
0x9E00,
|
||||
0x2100,
|
||||
0x9E00,
|
||||
0x2200,
|
||||
0x9E00,
|
||||
0x8100,
|
||||
0x9E00,
|
||||
0x8200,
|
||||
0x9E00,
|
||||
0x9100,
|
||||
0x9E00,
|
||||
0x9200,
|
||||
0x9000,
|
||||
0x2100,
|
||||
0x9000,
|
||||
0x2200,
|
||||
0x9000,
|
||||
0x8100,
|
||||
0x9000,
|
||||
0x8200,
|
||||
0x9000,
|
||||
0x9100,
|
||||
0x9000,
|
||||
0x9200,
|
||||
0x9E00,
|
||||
0x2200,
|
||||
0x9E00,
|
||||
0x2200,
|
||||
]
|
||||
|
||||
|
||||
class syskonnect_ids:
|
||||
MarvelYukonEthernet = [
|
||||
# AppleYukon2.kext IDs
|
||||
# AppleYukon2 supports 2 vendors (Marvell and SysKonnect)
|
||||
0x4365,
|
||||
0x4360,
|
||||
0x435A,
|
||||
0x4354,
|
||||
0x4362,
|
||||
0x4363,
|
||||
0x00BA,
|
||||
0x436A,
|
||||
]
|
||||
|
||||
|
||||
class atheros_ids:
|
||||
AtherosWifi = [
|
||||
# AirPortAtheros40 IDs
|
||||
0x0030, # AR93xx
|
||||
0x002A, # AR928X
|
||||
0x001C, # AR242x / AR542x
|
||||
0x0023, # AR5416 - never used by Apple
|
||||
0x0024, # AR5418
|
||||
]
|
||||
110
Resources/SMBIOSData.py
Normal file
@@ -0,0 +1,110 @@
|
||||
FirmwareFeatures = {
|
||||
"iMac7,1": "0xC0001407",
|
||||
"iMac8,1": "0xC0001403",
|
||||
"iMac9,1": "0xC0001403",
|
||||
"iMac10,1": "0xE00DE137",
|
||||
"iMac11,1": "0xE00DE137",
|
||||
"iMac11,2": "0xC00C9423",
|
||||
"iMac11,3": "0xE00DE137",
|
||||
"iMac12,1": "0xE00DE137",
|
||||
"iMac12,2": "0xE00DE137",
|
||||
"iMac13,1": "0xE00DE137",
|
||||
"iMac13,2": "0xE00DE137",
|
||||
"iMac13,3": "0xE00DE137",
|
||||
"iMac14,1": "0xFB0FF577",
|
||||
"iMac14,2": "0xE00FE137",
|
||||
"iMac14,3": "0xE00FE137",
|
||||
"iMac14,4": "0xF00FE137",
|
||||
"iMac15,1": "0xF80FE137",
|
||||
"iMac16,1": "0xFC0FE137",
|
||||
"iMac16,2": "0xFC0FE137",
|
||||
"iMac17,1": "0xFC0FE137",
|
||||
"iMac18,1": "0xFD0FF576",
|
||||
"iMac18,2": "0xFD0FF576",
|
||||
"iMac18,3": "0xFD0FF576",
|
||||
"iMac19,1": "0xFD8FF576",
|
||||
"iMac19,2": "0xFD8FF576",
|
||||
"iMac20,1": "0xFD8FF576",
|
||||
"iMac20,2": "0xFD8FF576",
|
||||
"iMacPro1,1": "0xFD8FF53E",
|
||||
"MacBook3,1": "0xC0001407",
|
||||
"MacBook4,1": "0xC0001403",
|
||||
"MacBook5,1": "0xC0001403",
|
||||
"MacBook5,2": "0xC0001403",
|
||||
"MacBook6,1": "0xFC0FE13F",
|
||||
"MacBook7,1": "0xFC0FE13F",
|
||||
"MacBook8,1": "0xFC0FE13F",
|
||||
"MacBook9,1": "0xFC0FE13F",
|
||||
"MacBook10,1": "0xFC0FE13F",
|
||||
"MacBookAir1,1": "0xC0001403",
|
||||
"MacBookAir2,1": "0xC0001403",
|
||||
"MacBookAir3,1": "0xD00DE137",
|
||||
"MacBookAir3,2": "0xD00DE137",
|
||||
"MacBookAir4,1": "0xD00DE137",
|
||||
"MacBookAir4,2": "0xD00DE137",
|
||||
"MacBookAir5,1": "0xE00DE137",
|
||||
"MacBookAir5,2": "0xE00DE137",
|
||||
"MacBookAir6,1": "0xE00FE137",
|
||||
"MacBookAir6,2": "0xE00FE137",
|
||||
"MacBookAir7,1": "0xFF0FF576",
|
||||
"MacBookAir7,2": "0xFF0FF576",
|
||||
"MacBookAir8,1": "0xFD8FF42E",
|
||||
"MacBookAir8,2": "0xFD8FF42E",
|
||||
"MacBookAir9,1": "0xFFAFF06E",
|
||||
"MacBookPro3,1": "0xC0001407",
|
||||
"MacBookPro4,1": "0xC0001403",
|
||||
"MacBookPro5,1": "0xC0001403",
|
||||
"MacBookPro5,2": "0xC0001403",
|
||||
"MacBookPro5,3": "0xC0001403",
|
||||
"MacBookPro5,4": "0xC0001403",
|
||||
"MacBookPro5,5": "0xC0001403",
|
||||
"MacBookPro6,1": "0xC00DE137",
|
||||
"MacBookPro6,2": "0xC00DE137",
|
||||
"MacBookPro7,1": "0xC00DE137",
|
||||
"MacBookPro8,1": "0xC00DE137",
|
||||
"MacBookPro8,2": "0xC00DE137",
|
||||
"MacBookPro8,3": "0xC00DE137",
|
||||
"MacBookPro9,1": "0xC00DE137",
|
||||
"MacBookPro9,2": "0xC10DF577",
|
||||
"MacBookPro10,1": "0xE00DE137",
|
||||
"MacBookPro10,2": "0xE00DE137",
|
||||
"MacBookPro11,1": "0xEB0FF577",
|
||||
"MacBookPro11,2": "0xEB0FF577",
|
||||
"MacBookPro11,3": "0xEB0FF577",
|
||||
"MacBookPro11,4": "0xEB0FF577",
|
||||
"MacBookPro11,5": "0xEB0FF577",
|
||||
"MacBookPro12,1": "0xFD0FF576",
|
||||
"MacBookPro13,1": "0xFC0FE137",
|
||||
"MacBookPro13,2": "0xFC0FE137",
|
||||
"MacBookPro13,3": "0xFC0FE137",
|
||||
"MacBookPro14,1": "0xFF0FF57E",
|
||||
"MacBookPro14,2": "0xFF0FF57E",
|
||||
"MacBookPro14,3": "0xFF0FF57E",
|
||||
"MacBookPro15,1": "0xFD8FF426",
|
||||
"MacBookPro15,2": "0xFD8FF426",
|
||||
"MacBookPro15,3": "0xFD8FF426",
|
||||
"MacBookPro15,4": "0xFD8FF426",
|
||||
"MacBookPro16,1": "0xFDAFF066",
|
||||
"MacBookPro16,2": "0xFFAFF06E",
|
||||
"MacBookPro16,3": "0xFDAFF066",
|
||||
"MacBookPro16,4": "0xFDAFF066",
|
||||
"Macmini3,1": "0xC0001403",
|
||||
"Macmini4,1": "0xC00C9423",
|
||||
"Macmini5,1": "0xD00DE137",
|
||||
"Macmini5,2": "0xD00DE137",
|
||||
"Macmini5,3": "0xD00DE137",
|
||||
"Macmini6,1": "0xE00DE137",
|
||||
"Macmini6,2": "0xE00DE137",
|
||||
"Macmini7,1": "0xE00DE137",
|
||||
"Macmini8,1": "0xFD8FF466",
|
||||
"MacPro1,1": "0x80000015",
|
||||
"MacPro2,1": "0xC0000015",
|
||||
"MacPro3,1": "0xC0001403",
|
||||
"MacPro4,1": "0xE001F537",
|
||||
"MacPro5,1": "0xE80FE137",
|
||||
"MacPro6,1": "0xE90FF576",
|
||||
"MacPro7,1": "0xFDAFF066",
|
||||
"Xserve2,1": "0xC0001403",
|
||||
"Xserve3,1": "0xE001F537",
|
||||
"Dortania1,1": "0xFDAFF066",
|
||||
}
|
||||
798
Resources/SysPatch.py
Normal file
@@ -0,0 +1,798 @@
|
||||
# Framework for mounting and patching macOS root volume
|
||||
# Copyright (C) 2020-2021, Dhinak G, Mykola Grymalyuk
|
||||
# Missing Features:
|
||||
# - Full System/Library Snapshotting (need to research how Apple achieves this)
|
||||
# - Temporary Work-around: sudo bless --mount /System/Volumes/Update/mnt1 --bootefi --last-sealed-snapshot
|
||||
# - Work-around battery throttling on laptops with no battery (IOPlatformPluginFamily.kext/Contents/PlugIns/ACPI_SMC_PlatformPlugin.kext/Contents/Resources/)
|
||||
|
||||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
import zipfile
|
||||
from pathlib import Path
|
||||
|
||||
from Resources import Constants, device_probe, ModelArray, SysPatchArray, Utilities
|
||||
|
||||
|
||||
class PatchSysVolume:
|
||||
def __init__(self, model, versions):
|
||||
self.model = model
|
||||
self.constants: Constants.Constants = versions
|
||||
self.computer = self.constants.computer
|
||||
self.root_mount_path = None
|
||||
self.sip_enabled = True
|
||||
self.sbm_enabled = True
|
||||
self.amfi_enabled = True
|
||||
self.fv_enabled = True
|
||||
self.dosdude_patched = True
|
||||
self.nvidia_legacy = False
|
||||
self.kepler_gpu = False
|
||||
self.amd_ts1 = False
|
||||
self.amd_ts2 = False
|
||||
self.iron_gpu = False
|
||||
self.sandy_gpu = False
|
||||
self.ivy_gpu = False
|
||||
self.brightness_legacy = False
|
||||
self.legacy_audio = False
|
||||
self.legacy_wifi = False
|
||||
self.added_legacy_kexts = False
|
||||
self.amfi_must_disable = False
|
||||
self.check_board_id = False
|
||||
self.bad_board_id = False
|
||||
self.no_patch = True
|
||||
self.validate = False
|
||||
self.supports_metal = False
|
||||
|
||||
# if (Path.home() / "Desktop/OCLP-Test/").exists:
|
||||
# self.mount_location = Path.home() / "Desktop/OCLP-Test"
|
||||
# self.validate = True
|
||||
if self.constants.detected_os > self.constants.catalina:
|
||||
# Big Sur and newer use APFS snapshots
|
||||
self.mount_location = "/System/Volumes/Update/mnt1"
|
||||
else:
|
||||
self.mount_location = ""
|
||||
self.mount_coreservices = f"{self.mount_location}/System/Library/CoreServices"
|
||||
self.mount_extensions = f"{self.mount_location}/System/Library/Extensions"
|
||||
self.mount_frameworks = f"{self.mount_location}/System/Library/Frameworks"
|
||||
self.mount_lauchd = f"{self.mount_location}/System/Library/LaunchDaemons"
|
||||
self.mount_private_frameworks = f"{self.mount_location}/System/Library/PrivateFrameworks"
|
||||
self.mount_libexec = f"{self.mount_location}/usr/libexec"
|
||||
|
||||
def elevated(self, *args, **kwargs) -> subprocess.CompletedProcess:
|
||||
if os.getuid() == 0 or self.constants.gui_mode is True:
|
||||
return subprocess.run(*args, **kwargs)
|
||||
else:
|
||||
return subprocess.run(["sudo"] + [args[0][0]] + args[0][1:], **kwargs)
|
||||
|
||||
def find_mount_root_vol(self, patch):
|
||||
self.root_mount_path = Utilities.get_disk_path()
|
||||
if self.root_mount_path.startswith("disk"):
|
||||
if self.constants.detected_os == self.constants.catalina and self.validate is False:
|
||||
print("- Mounting Catalina Root Volume as writable")
|
||||
self.elevated(["mount", "-uw", f"{self.mount_location}/"], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
print(f"- Found Root Volume at: {self.root_mount_path}")
|
||||
if Path(self.mount_extensions).exists():
|
||||
print("- Root Volume is already mounted")
|
||||
if patch is True:
|
||||
if self.constants.detected_os < self.constants.big_sur or (self.constants.detected_os == self.constants.big_sur and Utilities.check_seal() is True):
|
||||
self.backup_volume()
|
||||
self.patch_root_vol()
|
||||
return True
|
||||
else:
|
||||
self.unpatch_root_vol()
|
||||
return True
|
||||
else:
|
||||
if self.constants.detected_os > self.constants.catalina:
|
||||
print("- Mounting APFS Snapshot as writable")
|
||||
self.elevated(["mount", "-o", "nobrowse", "-t", "apfs", f"/dev/{self.root_mount_path}", self.mount_location], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
if Path(self.mount_extensions).exists():
|
||||
print("- Successfully mounted the Root Volume")
|
||||
if patch is True:
|
||||
if self.constants.detected_os < self.constants.big_sur or (self.constants.detected_os == self.constants.big_sur and Utilities.check_seal() is True):
|
||||
self.backup_volume()
|
||||
self.patch_root_vol()
|
||||
return True
|
||||
else:
|
||||
self.unpatch_root_vol()
|
||||
return True
|
||||
else:
|
||||
print("- Failed to mount the Root Volume")
|
||||
print("- Recommend rebooting the machine and trying to patch again")
|
||||
if self.constants.gui_mode is False:
|
||||
input("- Press [ENTER] to exit: ")
|
||||
else:
|
||||
print("- Could not find root volume")
|
||||
if self.constants.gui_mode is False:
|
||||
input("- Press [ENTER] to exit: ")
|
||||
|
||||
def backup_volume(self):
|
||||
for location in SysPatchArray.BackupLocations:
|
||||
Utilities.cls()
|
||||
print("Backing up root volume before patching (This may take some time)")
|
||||
print(f"- Attempting to backup {location}")
|
||||
location_zip = f"{location}-Backup.zip"
|
||||
location_zip_path = Path(self.mount_location) / Path(location_zip)
|
||||
|
||||
if location_zip_path.exists():
|
||||
print(f"- Found existing {location_zip}, skipping")
|
||||
else:
|
||||
print(f"- Backing up {location}")
|
||||
# cp -r ./Extensions ./Extensions-Backup
|
||||
# ditto -c -k --sequesterRsrc --keepParent ./Extensions-Backup ./Extensions-Backup.zip
|
||||
# rm -r ./Extensions-Backup
|
||||
|
||||
print("- Creating Backup folder")
|
||||
Utilities.process_status(
|
||||
self.elevated(
|
||||
["cp", "-r", f"{self.mount_location}/{location}", f"{self.mount_location}/{location}-Backup"],
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT,
|
||||
)
|
||||
)
|
||||
print("- Zipping Backup folder")
|
||||
Utilities.process_status(
|
||||
self.elevated(
|
||||
["ditto", "-c", "-k", "--sequesterRsrc", "--keepParent", f"{self.mount_location}/{location}-Backup", f"{self.mount_location}/{location_zip}"],
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT,
|
||||
)
|
||||
)
|
||||
|
||||
print("- Removing Backup folder")
|
||||
Utilities.process_status(
|
||||
self.elevated(
|
||||
["rm", "-r", f"{self.mount_location}/{location}-Backup"],
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT,
|
||||
)
|
||||
)
|
||||
|
||||
def manual_root_patch_revert(self):
|
||||
print("- Attempting to revert patches")
|
||||
if (Path(self.mount_location) / Path("/System/Library/Extensions-Backup.zip")).exists():
|
||||
print("- Verified manual unpatching is available")
|
||||
|
||||
for location in SysPatchArray.BackupLocations:
|
||||
Utilities.cls()
|
||||
print("Reverting root volume patches (This may take some time)")
|
||||
|
||||
print(f"- Attempting to unpatch {location}")
|
||||
location_zip = f"/{location}-Backup.zip"
|
||||
location_zip_path = Path(self.mount_location) / Path(location_zip)
|
||||
location_old_path = Path(self.mount_location) / Path(location)
|
||||
|
||||
if "PrivateFrameworks" in location:
|
||||
copy_path = Path(self.mount_location) / Path("/System/Library/PrivateFrameworks")
|
||||
elif "Frameworks" in location:
|
||||
copy_path = Path(self.mount_location) / Path("/System/Library/Frameworks")
|
||||
else:
|
||||
copy_path = Path(self.mount_location) / Path("/System/Library")
|
||||
|
||||
if location_zip_path.exists():
|
||||
print(f"- Found {location_zip}")
|
||||
|
||||
print(f"- Unzipping {location_zip}")
|
||||
Utilities.process_status(self.elevated(["unzip", location_zip_path, "-d", copy_path], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
|
||||
if location_old_path.exists():
|
||||
print(f"- Renaming {location}")
|
||||
Utilities.process_status(self.elevated(["mv", location_old_path, f"{location_old_path}-Patched"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
|
||||
print(f"- Renaming {location}-Backup")
|
||||
Utilities.process_status(self.elevated(["mv", f"{location_old_path}-Backup", location_old_path], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
|
||||
print(f"- Removing {location_old_path}-Patched")
|
||||
Utilities.process_status(self.elevated(["rm", "-r", f"{location_old_path}-Patched"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
|
||||
# ditto will create a '__MACOSX' folder
|
||||
# print("- Removing __MACOSX folder")
|
||||
# Utilities.process_status(self.elevated(["rm", "-r", f"{copy_path}/__MACOSX"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
|
||||
else:
|
||||
print(f"- Failed to find {location_zip}, unable to unpatch")
|
||||
if self.validate is False:
|
||||
self.rebuild_snapshot()
|
||||
else:
|
||||
print("- Could not find Extensions.zip, cannot manually unpatch root volume")
|
||||
|
||||
def unpatch_root_vol(self):
|
||||
if self.constants.detected_os > self.constants.catalina:
|
||||
print("- Reverting to last signed APFS snapshot")
|
||||
result = self.elevated(["bless", "--mount", self.mount_location, "--bootefi", "--last-sealed-snapshot"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
if result.returncode != 0:
|
||||
print("- Unable to revert root volume patches")
|
||||
print("Reason for unpatch Failure:")
|
||||
print(result.stdout.decode())
|
||||
print("- Failed to revert snapshot via bless, falling back on manual restoration")
|
||||
self.manual_root_patch_revert()
|
||||
else:
|
||||
print("- Unpatching complete")
|
||||
print("\nPlease reboot the machine for patches to take effect")
|
||||
else:
|
||||
self.manual_root_patch_revert()
|
||||
|
||||
def rebuild_snapshot(self):
|
||||
if self.constants.gui_mode is False:
|
||||
input("Press [ENTER] to continue with cache rebuild: ")
|
||||
print("- Rebuilding Kernel Cache (This may take some time)")
|
||||
if self.constants.detected_os > self.constants.catalina:
|
||||
result = self.elevated(["kmutil", "install", "--volume-root", self.mount_location, "--update-all"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
else:
|
||||
result = self.elevated(["kextcache", "-i", f"{self.mount_location}/"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
|
||||
# kextcache always returns 0, even if it fails
|
||||
# Check the output for 'KernelCache ID' to see if the cache was successfully rebuilt
|
||||
if result.returncode != 0 or (self.constants.detected_os < self.constants.catalina and "KernelCache ID" not in result.stdout.decode()):
|
||||
self.success_status = False
|
||||
print("- Unable to build new kernel cache")
|
||||
print("\nPlease report this to Github")
|
||||
print("Reason for Patch Failure:")
|
||||
print(result.stdout.decode())
|
||||
print("")
|
||||
print("\nPlease reboot the machine to avoid potential issues rerunning the patcher")
|
||||
if self.constants.gui_mode is False:
|
||||
input("Press [ENTER] to continue")
|
||||
else:
|
||||
self.success_status = True
|
||||
print("- Successfully built new kernel cache")
|
||||
if self.constants.gui_mode is False:
|
||||
if self.constants.detected_os > self.constants.catalina:
|
||||
input("Press [ENTER] to continue with snapshotting")
|
||||
else:
|
||||
input("Press [ENTER] to continue with kernel and dyld cache merging")
|
||||
if self.constants.detected_os > self.constants.catalina:
|
||||
print("- Creating new APFS snapshot")
|
||||
self.elevated(["bless", "--folder", f"{self.mount_location}/System/Library/CoreServices", "--bootefi", "--create-snapshot"], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
self.unmount_drive()
|
||||
else:
|
||||
if self.constants.detected_os == self.constants.catalina:
|
||||
print("- Merging kernel cache")
|
||||
Utilities.process_status(self.elevated(["kcditto"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
print("- Merging dyld cache")
|
||||
Utilities.process_status(self.elevated(["update_dyld_shared_cache", "-root", f"{self.mount_location}/"]))
|
||||
print("- Patching complete")
|
||||
print("\nPlease reboot the machine for patches to take effect")
|
||||
if self.amd_ts2 is True and self.constants.allow_ts2_accel is True:
|
||||
print(
|
||||
"""\nPlease note that with ATI TeraScale 2 GPUs, you may experience colour strobing
|
||||
on reboot. Please use SwitchResX or ResXtreme to force 1 million colours on your
|
||||
monitor to fix this. If you are epileptic, please ask for someone to aid you or
|
||||
set million colour before rebooting"""
|
||||
)
|
||||
if self.constants.gui_mode is False:
|
||||
input("\nPress [ENTER] to continue")
|
||||
|
||||
def unmount_drive(self):
|
||||
print("- Unmounting Root Volume (Don't worry if this fails)")
|
||||
self.elevated(["diskutil", "unmount", self.root_mount_path], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||
|
||||
def delete_old_binaries(self, vendor_patch):
|
||||
for delete_current_kext in vendor_patch:
|
||||
delete_path = Path(self.mount_extensions) / Path(delete_current_kext)
|
||||
if Path(delete_path).exists():
|
||||
print(f"- Deleting {delete_current_kext}")
|
||||
Utilities.process_status(self.elevated(["rm", "-R", delete_path], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
else:
|
||||
print(f"- Couldn't find {delete_current_kext}, skipping")
|
||||
|
||||
def add_new_binaries(self, vendor_patch, vendor_location):
|
||||
for add_current_kext in vendor_patch:
|
||||
existing_path = Path(self.mount_extensions) / Path(add_current_kext)
|
||||
if Path(existing_path).exists():
|
||||
print(f"- Found conflicting kext, Deleting Root Volume's {add_current_kext}")
|
||||
Utilities.process_status(self.elevated(["rm", "-R", existing_path], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
print(f"- Adding {add_current_kext}")
|
||||
Utilities.process_status(self.elevated(["cp", "-R", f"{vendor_location}/{add_current_kext}", self.mount_extensions], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
Utilities.process_status(self.elevated(["chmod", "-Rf", "755", f"{self.mount_extensions}/{add_current_kext}"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
Utilities.process_status(self.elevated(["chown", "-Rf", "root:wheel", f"{self.mount_extensions}/{add_current_kext}"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
|
||||
def add_brightness_patch(self):
|
||||
self.delete_old_binaries(SysPatchArray.DeleteBrightness)
|
||||
self.add_new_binaries(SysPatchArray.AddBrightness, self.constants.legacy_brightness)
|
||||
self.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.payload_apple_private_frameworks_path_brightness}/", self.mount_private_frameworks], stdout=subprocess.PIPE)
|
||||
Utilities.process_status(self.elevated(["chmod", "-Rf", "755", f"{self.mount_private_frameworks}/DisplayServices.framework"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
Utilities.process_status(self.elevated(["chown", "-Rf", "root:wheel", f"{self.mount_private_frameworks}/DisplayServices.framework"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
|
||||
def add_audio_patch(self):
|
||||
self.delete_old_binaries(SysPatchArray.DeleteVolumeControl)
|
||||
self.add_new_binaries(SysPatchArray.AddVolumeControl, self.constants.audio_path)
|
||||
|
||||
def add_wifi_patch(self):
|
||||
print("- Merging Wireless CoreSerices patches")
|
||||
self.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.legacy_wifi_coreservices}/", self.mount_coreservices], stdout=subprocess.PIPE)
|
||||
Utilities.process_status(self.elevated(["chmod", "-Rf", "755", f"{self.mount_coreservices}/WiFiAgent.app"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
Utilities.process_status(self.elevated(["chown", "-Rf", "root:wheel", f"{self.mount_coreservices}/WiFiAgent.app"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
print("- Merging Wireless usr/libexec patches")
|
||||
self.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.legacy_wifi_libexec}/", self.mount_libexec], stdout=subprocess.PIPE)
|
||||
Utilities.process_status(self.elevated(["chmod", "755", f"{self.mount_libexec}/airportd"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
Utilities.process_status(self.elevated(["chown", "root:wheel", f"{self.mount_libexec}/airportd"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
|
||||
def gpu_accel_legacy(self):
|
||||
if self.constants.detected_os == self.constants.mojave:
|
||||
print("- Installing General Acceleration Kext patches for Mojave")
|
||||
self.add_new_binaries(SysPatchArray.AddGeneralAccelMojave, self.constants.legacy_general_path)
|
||||
elif self.constants.detected_os == self.constants.catalina:
|
||||
print("- Installing General Acceleration Kext patches for Catalina")
|
||||
self.add_new_binaries(SysPatchArray.AddGeneralAccelCatalina, self.constants.legacy_general_path)
|
||||
elif self.constants.detected_os in [self.constants.big_sur, self.constants.monterey]:
|
||||
print("- Installing General Acceleration Kext patches for Big Sur/Monterey")
|
||||
self.add_new_binaries(SysPatchArray.AddGeneralAccel, self.constants.legacy_general_path)
|
||||
|
||||
# Nvidia
|
||||
def gpu_accel_legacy_nvidia_master(self):
|
||||
if self.constants.detected_os in [self.constants.mojave, self.constants.catalina]:
|
||||
print("- Installing Nvidia Acceleration Kext patches for Mojave/Catalina")
|
||||
self.gpu_accel_legacy()
|
||||
self.add_new_binaries(SysPatchArray.AddNvidiaAccelLegacy, self.constants.legacy_nvidia_path)
|
||||
elif self.constants.detected_os in [self.constants.big_sur, self.constants.monterey]:
|
||||
print("- Installing Nvidia Acceleration Kext patches for Big Sur/Monterey")
|
||||
self.delete_old_binaries(SysPatchArray.DeleteNvidiaAccel11)
|
||||
self.gpu_accel_legacy()
|
||||
self.add_new_binaries(SysPatchArray.AddNvidiaAccel11, self.constants.legacy_nvidia_path)
|
||||
else:
|
||||
print("- Installing basic Nvidia Framebuffer Kext patches for generic OS")
|
||||
self.add_new_binaries(SysPatchArray.AddNvidiaBrightness, self.constants.legacy_nvidia_path)
|
||||
|
||||
# AMD/ATI
|
||||
def gpu_accel_legacy_ts1_master(self):
|
||||
if self.constants.detected_os in [self.constants.mojave, self.constants.catalina]:
|
||||
print("- Installing TeraScale 1 Acceleration Kext patches for Mojave/Catalina")
|
||||
self.gpu_accel_legacy()
|
||||
self.add_new_binaries(SysPatchArray.AddAMDAccelLegacy, self.constants.legacy_amd_path)
|
||||
elif self.constants.detected_os in [self.constants.big_sur, self.constants.monterey]:
|
||||
print("- Installing TeraScale 1 Acceleration Kext patches for Big Sur/Monterey")
|
||||
self.delete_old_binaries(SysPatchArray.DeleteAMDAccel11)
|
||||
self.gpu_accel_legacy()
|
||||
self.add_new_binaries(SysPatchArray.AddAMDAccel11, self.constants.legacy_amd_path)
|
||||
else:
|
||||
print("- Installing basic TeraScale 1 Framebuffer Kext patches for generic OS")
|
||||
self.add_new_binaries(SysPatchArray.AddAMDBrightness, self.constants.legacy_amd_path)
|
||||
|
||||
def gpu_accel_legacy_ts2_master(self):
|
||||
if self.constants.detected_os in [self.constants.mojave, self.constants.catalina] and self.constants.allow_ts2_accel is True:
|
||||
print("- Installing TeraScale 2 Acceleration Kext patches for Mojave/Catalina")
|
||||
self.gpu_accel_legacy()
|
||||
self.add_new_binaries(SysPatchArray.AddAMDAccelLegacy, self.constants.legacy_amd_path)
|
||||
elif self.constants.detected_os in [self.constants.big_sur, self.constants.monterey] and self.constants.allow_ts2_accel is True:
|
||||
# TODO: Enable for Monterey when acceleration patches proress
|
||||
print("- Installing TeraScale 2 Acceleration Kext patches for Big Sur")
|
||||
self.delete_old_binaries(SysPatchArray.DeleteAMDAccel11)
|
||||
self.delete_old_binaries(SysPatchArray.DeleteAMDAccel11TS2)
|
||||
self.gpu_accel_legacy()
|
||||
self.add_new_binaries(SysPatchArray.AddAMDAccel11, self.constants.legacy_amd_path)
|
||||
else:
|
||||
print("- Installing basic TeraScale 2 Framebuffer Kext patches for generic OS")
|
||||
self.add_new_binaries(SysPatchArray.AddAMDBrightness, self.constants.legacy_amd_path)
|
||||
|
||||
# Intel
|
||||
def gpu_accel_legacy_ironlake_master(self):
|
||||
if self.constants.detected_os in [self.constants.mojave, self.constants.catalina]:
|
||||
print("- Installing Ironlake Acceleration Kext patches for Mojave/Catalina")
|
||||
self.gpu_accel_legacy()
|
||||
self.add_new_binaries(SysPatchArray.AddIntelGen1Accel, self.constants.legacy_intel_gen1_path)
|
||||
elif self.constants.detected_os in [self.constants.big_sur, self.constants.monterey]:
|
||||
print("- Installing Ironlake Acceleration Kext patches for Big Sur/Monterey")
|
||||
self.delete_old_binaries(SysPatchArray.DeleteNvidiaAccel11)
|
||||
self.gpu_accel_legacy()
|
||||
self.add_new_binaries(SysPatchArray.AddIntelGen1Accel, self.constants.legacy_intel_gen1_path)
|
||||
else:
|
||||
print("- Installing basic Ironlake Framebuffer Kext patches for generic OS")
|
||||
self.add_new_binaries(SysPatchArray.AddIntelGen1Accel, self.constants.legacy_intel_gen1_path)
|
||||
|
||||
def gpu_accel_legacy_sandybridge_master(self):
|
||||
if self.constants.detected_os in [self.constants.mojave, self.constants.catalina]:
|
||||
print("- Installing Sandy Bridge Acceleration Kext patches for Mojave/Catalina")
|
||||
self.gpu_accel_legacy()
|
||||
self.add_new_binaries(SysPatchArray.AddIntelGen2Accel, self.constants.legacy_intel_gen2_path)
|
||||
elif self.constants.detected_os in [self.constants.big_sur, self.constants.monterey]:
|
||||
print("- Installing Sandy Bridge Acceleration Kext patches for Big Sur/Monterey")
|
||||
self.delete_old_binaries(SysPatchArray.DeleteNvidiaAccel11)
|
||||
self.gpu_accel_legacy()
|
||||
self.add_new_binaries(SysPatchArray.AddIntelGen2Accel, self.constants.legacy_intel_gen2_path)
|
||||
else:
|
||||
print("- Installing basic Sandy Bridge Framebuffer Kext patches for generic OS")
|
||||
self.add_new_binaries(SysPatchArray.AddIntelGen2Accel, self.constants.legacy_intel_gen2_path)
|
||||
|
||||
def gpu_framebuffer_ivybridge_master(self):
|
||||
if self.constants.detected_os == self.constants.monterey:
|
||||
print("- Installing IvyBridge Acceleration Kext patches for Monterey")
|
||||
self.add_new_binaries(SysPatchArray.AddIntelGen3Accel, self.constants.legacy_intel_gen3_path)
|
||||
if self.validate is False:
|
||||
print("- Fixing Acceleration in CoreMedia")
|
||||
Utilities.process_status(subprocess.run(["defaults", "write", "com.apple.coremedia", "hardwareVideoDecoder", "-string", "enable"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
print("- Merging Ivy Bridge Frameworks")
|
||||
self.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.payload_apple_frameworks_path_accel_ivy}/", self.mount_frameworks], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
print("- Merging Ivy Bridge PrivateFrameworks")
|
||||
self.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.payload_apple_private_frameworks_path_accel_ivy}/", self.mount_private_frameworks], stdout=subprocess.PIPE)
|
||||
else:
|
||||
print("- Installing basic Ivy Bridge Kext patches for generic OS")
|
||||
self.add_new_binaries(SysPatchArray.AddIntelGen3Accel, self.constants.legacy_intel_gen3_path)
|
||||
|
||||
def gpu_franevuffer_kepler_master(self):
|
||||
if self.constants.detected_os == self.constants.monterey:
|
||||
print("- Installing Kepler Acceleration Kext patches for Monterey")
|
||||
self.add_new_binaries(SysPatchArray.AddNvidiaKeplerAccel11, self.constants.legacy_nvidia_kepler_path)
|
||||
else:
|
||||
print("- Installing Kepler Kext patches for generic OS")
|
||||
self.add_new_binaries(SysPatchArray.AddNvidiaKeplerAccel11, self.constants.legacy_nvidia_kepler_path)
|
||||
|
||||
def gpu_accel_legacy_extended(self):
|
||||
print("- Merging general legacy Frameworks")
|
||||
self.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.payload_apple_frameworks_path_accel}/", self.mount_frameworks], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
if self.constants.detected_os > self.constants.big_sur:
|
||||
print("- Merging Monterey WebKit patch")
|
||||
self.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.payload_apple_frameworks_path_accel_ivy}/", self.mount_frameworks], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
|
||||
print("- Merging general legacy PrivateFrameworks")
|
||||
self.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.payload_apple_private_frameworks_path_accel}/", self.mount_private_frameworks], stdout=subprocess.PIPE)
|
||||
if self.constants.detected_os > self.constants.catalina:
|
||||
print("- Adding IOHID-Fixup.plist")
|
||||
Utilities.process_status(
|
||||
self.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.payload_apple_lauchd_path_accel}/", self.mount_lauchd], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
)
|
||||
Utilities.process_status(self.elevated(["chmod", "755", f"{self.mount_lauchd}/IOHID-Fixup.plist"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
Utilities.process_status(self.elevated(["chown", "root:wheel", f"{self.mount_lauchd}/IOHID-Fixup.plist"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
else:
|
||||
print("- Disabling Library Validation")
|
||||
Utilities.process_status(
|
||||
self.elevated(
|
||||
["defaults", "write", "/Library/Preferences/com.apple.security.libraryvalidation.plist", "DisableLibraryValidation", "-bool", "true"],
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT,
|
||||
)
|
||||
)
|
||||
|
||||
def gpu_accel_legacy_extended_ts2(self):
|
||||
print("- Merging TeraScale 2 legacy Frameworks")
|
||||
self.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.payload_apple_frameworks_path_accel_ts2}/", self.mount_frameworks], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
|
||||
print("- Merging TeraScale 2 PrivateFrameworks")
|
||||
self.elevated(["rsync", "-r", "-i", "-a", f"{self.constants.payload_apple_private_frameworks_path_accel_ts2}/", self.mount_private_frameworks], stdout=subprocess.PIPE)
|
||||
if self.validate is False:
|
||||
print("- Fixing Acceleration in CMIO")
|
||||
Utilities.process_status(subprocess.run(["defaults", "write", "com.apple.cmio", "CMIO_Unit_Input_ASC.DoNotUseOpenCL", "-bool", "true"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
||||
|
||||
def patch_root_vol(self):
|
||||
print(f"- Running patches for {self.model}")
|
||||
# Graphics patches
|
||||
if self.nvidia_legacy is True:
|
||||
print("- Installing legacy Nvidia Patches")
|
||||
if self.constants.detected_os in self.constants.legacy_accel_support:
|
||||
print("- Detected supported OS, installing Acceleration Patches")
|
||||
self.added_legacy_kexts = True
|
||||
else:
|
||||
print("- Detected unsupported OS, installing Basic Framebuffer")
|
||||
self.gpu_accel_legacy_nvidia_master()
|
||||
|
||||
elif self.kepler_gpu is True:
|
||||
print("- Installing Kepler Patches")
|
||||
if self.constants.detected_os == self.constants.monterey:
|
||||
print("- Detected supported OS, installing Acceleration Patches")
|
||||
else:
|
||||
print("- Detected unsupported OS, installing Basic Framebuffer")
|
||||
self.gpu_franevuffer_kepler_master()
|
||||
|
||||
elif self.amd_ts1 is True:
|
||||
print("- Installing legacy TeraScale 1 Patches")
|
||||
if self.constants.detected_os in self.constants.legacy_accel_support:
|
||||
print("- Detected supported OS, installing Acceleration Patches")
|
||||
self.added_legacy_kexts = True
|
||||
else:
|
||||
print("- Detected unsupported OS, installing Basic Framebuffer")
|
||||
self.gpu_accel_legacy_ts1_master()
|
||||
|
||||
elif self.amd_ts2 is True:
|
||||
print("- Installing legacy TeraScale 2 Patches")
|
||||
if self.constants.detected_os in self.constants.legacy_accel_support:
|
||||
print("- Detected supported OS, installing Acceleration Patches")
|
||||
self.added_legacy_kexts = True
|
||||
else:
|
||||
print("- Detected unsupported OS, installing Basic Framebuffer")
|
||||
self.gpu_accel_legacy_ts2_master()
|
||||
|
||||
if self.iron_gpu is True:
|
||||
print("- Installing legacy Ironlake Patches")
|
||||
if self.constants.detected_os in self.constants.legacy_accel_support:
|
||||
print("- Detected supported OS, installing Acceleration Patches")
|
||||
self.added_legacy_kexts = True
|
||||
else:
|
||||
print("- Detected unsupported OS, installing Basic Framebuffer")
|
||||
self.gpu_accel_legacy_ironlake_master()
|
||||
|
||||
elif self.sandy_gpu is True:
|
||||
print("- Installing legacy Sandy Bridge Patches")
|
||||
if self.constants.detected_os in self.constants.legacy_accel_support:
|
||||
print("- Detected supported OS, installing Acceleration Patches")
|
||||
self.added_legacy_kexts = True
|
||||
else:
|
||||
print("- Detected unsupported OS, installing Basic Framebuffer")
|
||||
self.gpu_accel_legacy_sandybridge_master()
|
||||
|
||||
elif self.ivy_gpu is True:
|
||||
print("- Installing Ivy Bridge Patches")
|
||||
if self.constants.detected_os == self.constants.monterey:
|
||||
print("- Detected supported OS, installing Acceleration Patches")
|
||||
else:
|
||||
print("- Detected unsupported OS, installing Basic Framebuffer")
|
||||
self.gpu_framebuffer_ivybridge_master()
|
||||
|
||||
if self.amd_ts2 is True and self.constants.detected_os in self.constants.legacy_accel_support and self.constants.allow_ts2_accel is True:
|
||||
# TeraScale 2 patches must be installed after Intel HD3000
|
||||
self.add_new_binaries(SysPatchArray.AddAMDAccel11TS2, self.constants.legacy_amd_path_ts2)
|
||||
|
||||
if self.added_legacy_kexts is True and self.constants.detected_os in self.constants.legacy_accel_support:
|
||||
self.gpu_accel_legacy_extended()
|
||||
if self.amd_ts2 is True and self.constants.allow_ts2_accel is True:
|
||||
self.gpu_accel_legacy_extended_ts2()
|
||||
|
||||
# Misc patches
|
||||
if self.brightness_legacy is True:
|
||||
print("- Installing legacy Brightness Control")
|
||||
self.add_brightness_patch()
|
||||
|
||||
if self.legacy_audio is True:
|
||||
print("- Fixing Volume Control Support")
|
||||
self.add_audio_patch()
|
||||
|
||||
if self.legacy_wifi is True:
|
||||
print("- Installing legacy Wireless support")
|
||||
self.add_wifi_patch()
|
||||
|
||||
if self.validate is False:
|
||||
self.rebuild_snapshot()
|
||||
|
||||
def check_files(self):
|
||||
if Path(self.constants.payload_apple_root_path).exists():
|
||||
print("- Found Apple Binaries")
|
||||
if self.constants.gui_mode is False:
|
||||
patch_input = input("Would you like to redownload?(y/n): ")
|
||||
if patch_input in {"y", "Y", "yes", "Yes"}:
|
||||
shutil.rmtree(Path(self.constants.payload_apple_root_path))
|
||||
self.download_files()
|
||||
else:
|
||||
self.download_files()
|
||||
else:
|
||||
print("- Apple binaries missing")
|
||||
self.download_files()
|
||||
|
||||
def download_files(self):
|
||||
if self.constants.detected_os == self.constants.monterey:
|
||||
os_ver = "12-Monterey"
|
||||
elif self.constants.detected_os == self.constants.big_sur:
|
||||
os_ver = "11-Big-Sur"
|
||||
elif self.constants.detected_os == self.constants.catalina:
|
||||
os_ver = "10.15-Catalina"
|
||||
elif self.constants.detected_os == self.constants.mojave:
|
||||
os_ver = "10.14-Mojave"
|
||||
else:
|
||||
raise Exception(f"Unsupported OS: {self.constants.detected_os}")
|
||||
link = f"{self.constants.url_patcher_support_pkg}{self.constants.patcher_support_pkg_version}/{os_ver}.zip"
|
||||
|
||||
if Path(self.constants.payload_apple_root_path).exists():
|
||||
print("- Removing old Apple Binaries folder")
|
||||
Path(self.constants.payload_apple_root_path).unlink()
|
||||
if Path(self.constants.payload_apple_root_path_zip).exists():
|
||||
print("- Removing old Apple Binaries zip")
|
||||
Path(self.constants.payload_apple_root_path_zip).unlink()
|
||||
|
||||
local_zip = Path(self.constants.payload_path) / f"{os_ver}.zip"
|
||||
if Path(local_zip).exists():
|
||||
print(f"- Found local {os_ver} zip, skipping download")
|
||||
print(f"- Duplicating into Apple.zip")
|
||||
shutil.copy(local_zip, self.constants.payload_apple_root_path_zip)
|
||||
else:
|
||||
Utilities.download_file(link, self.constants.payload_apple_root_path_zip)
|
||||
|
||||
if self.constants.payload_apple_root_path_zip.exists():
|
||||
print("- Download completed")
|
||||
print("- Unzipping download...")
|
||||
try:
|
||||
Utilities.process_status(subprocess.run(["unzip", self.constants.payload_apple_root_path_zip], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=self.constants.payload_path))
|
||||
print("- Renaming folder")
|
||||
os.rename(self.constants.payload_path / Path(os_ver), self.constants.payload_apple_root_path)
|
||||
Path(self.constants.payload_apple_root_path_zip).unlink()
|
||||
print("- Binaries downloaded to:")
|
||||
print(self.constants.payload_path)
|
||||
if self.constants.gui_mode is False:
|
||||
input("Press [ENTER] to continue")
|
||||
except zipfile.BadZipFile:
|
||||
print("- Couldn't unzip")
|
||||
return
|
||||
else:
|
||||
print("- Download failed, please verify the below link works:")
|
||||
print(link)
|
||||
input("Press [ENTER] to continue")
|
||||
|
||||
def detect_gpus(self):
|
||||
gpus = self.constants.computer.gpus
|
||||
if self.constants.moj_cat_accel is True:
|
||||
non_metal_os = self.constants.high_sierra
|
||||
else:
|
||||
non_metal_os = self.constants.catalina
|
||||
i = 0
|
||||
for gpu in gpus:
|
||||
if gpu.class_code and gpu.class_code != 0xFFFFFFFF:
|
||||
print(f"- Found GPU ({i}): {Utilities.friendly_hex(gpu.vendor_id)}:{Utilities.friendly_hex(gpu.device_id)}")
|
||||
if gpu.arch in [device_probe.NVIDIA.Archs.Tesla, device_probe.NVIDIA.Archs.Fermi]:
|
||||
if self.constants.detected_os > non_metal_os:
|
||||
self.nvidia_legacy = True
|
||||
self.amfi_must_disable = True
|
||||
elif gpu.arch == device_probe.NVIDIA.Archs.Kepler:
|
||||
if self.constants.detected_os > self.constants.big_sur:
|
||||
# Kepler drivers were dropped with Beta 7
|
||||
# 12.0 Beta 5: 21.0.0 - 21A5304g
|
||||
# 12.0 Beta 6: 21.1.0 - 21A5506j
|
||||
# 12.0 Beta 7: 21.1.0 - 21A5522h
|
||||
if self.constants.detected_os == self.constants.monterey and self.constants.detected_os_minor > 0:
|
||||
if "21A5506j" not in self.constants.detected_os_build:
|
||||
self.kepler_gpu = True
|
||||
self.supports_metal = True
|
||||
elif gpu.arch == device_probe.AMD.Archs.TeraScale_1:
|
||||
if self.constants.detected_os > non_metal_os:
|
||||
self.amd_ts1 = True
|
||||
self.amfi_must_disable = True
|
||||
elif gpu.arch == device_probe.AMD.Archs.TeraScale_2:
|
||||
if self.constants.detected_os > non_metal_os:
|
||||
self.amd_ts2 = True
|
||||
self.amfi_must_disable = True
|
||||
elif gpu.arch == device_probe.Intel.Archs.Iron_Lake:
|
||||
if self.constants.detected_os > non_metal_os:
|
||||
self.iron_gpu = True
|
||||
self.amfi_must_disable = True
|
||||
elif gpu.arch == device_probe.Intel.Archs.Sandy_Bridge:
|
||||
if self.constants.detected_os > non_metal_os:
|
||||
self.sandy_gpu = True
|
||||
self.amfi_must_disable = True
|
||||
self.check_board_id = True
|
||||
elif gpu.arch == device_probe.Intel.Archs.Ivy_Bridge:
|
||||
if self.constants.detected_os > self.constants.big_sur:
|
||||
self.ivy_gpu = True
|
||||
self.supports_metal = True
|
||||
i += 1
|
||||
if self.supports_metal is True:
|
||||
# Avoid patching Metal and non-Metal GPUs if both present, prioritize Metal GPU
|
||||
# Main concerns are for iMac12,x with Sandy iGPU and Kepler dGPU
|
||||
self.nvidia_legacy = False
|
||||
self.amd_ts1 = False
|
||||
self.amd_ts2 = False
|
||||
self.iron_gpu = False
|
||||
self.sandy_gpu = False
|
||||
|
||||
|
||||
def detect_patch_set(self):
|
||||
self.detect_gpus()
|
||||
if self.model in ModelArray.LegacyBrightness:
|
||||
if self.constants.detected_os > self.constants.catalina:
|
||||
self.brightness_legacy = True
|
||||
|
||||
if self.model in ["iMac7,1", "iMac8,1"]:
|
||||
if self.constants.detected_os > self.constants.catalina:
|
||||
self.legacy_audio = True
|
||||
|
||||
if (
|
||||
isinstance(self.constants.computer.wifi, device_probe.Broadcom)
|
||||
and self.constants.computer.wifi.chipset in [device_probe.Broadcom.Chipsets.AirPortBrcm4331, device_probe.Broadcom.Chipsets.AirPortBrcm43224]
|
||||
) or (isinstance(self.constants.computer.wifi, device_probe.Atheros) and self.constants.computer.wifi.chipset == device_probe.Atheros.Chipsets.AirPortAtheros40):
|
||||
if self.constants.detected_os > self.constants.big_sur:
|
||||
self.legacy_wifi = True
|
||||
|
||||
Utilities.cls()
|
||||
print("The following patches will be applied:")
|
||||
if self.nvidia_legacy is True:
|
||||
print("- Add Legacy Nvidia Tesla Graphics Patch")
|
||||
elif self.kepler_gpu is True:
|
||||
print("- Add Legacy Nvidia Kepler Graphics Patch")
|
||||
elif self.amd_ts1 is True:
|
||||
print("- Add Legacy ATI TeraScale 1 Graphics Patch")
|
||||
elif self.amd_ts2 is True:
|
||||
print("- Add Legacy ATI TeraScale 2 Graphics Patch")
|
||||
if self.iron_gpu is True:
|
||||
print("- Add Legacy Intel IronLake Graphics Patch")
|
||||
elif self.sandy_gpu is True:
|
||||
print("- Add Legacy Intel Sandy Bridge Graphics Patch")
|
||||
elif self.ivy_gpu is True:
|
||||
print("- Add Legacy Intel Ivy Bridge Graphics Patch")
|
||||
if self.brightness_legacy is True:
|
||||
print("- Add Legacy Brightness Control")
|
||||
if self.legacy_audio is True:
|
||||
print("- Add legacy Audio Control")
|
||||
if self.legacy_wifi is True:
|
||||
print("- Add legacy WiFi Control")
|
||||
|
||||
self.no_patch = not any(
|
||||
[
|
||||
self.nvidia_legacy,
|
||||
self.kepler_gpu,
|
||||
self.amd_ts1,
|
||||
self.amd_ts2,
|
||||
self.iron_gpu,
|
||||
self.sandy_gpu,
|
||||
self.ivy_gpu,
|
||||
self.brightness_legacy,
|
||||
self.legacy_audio,
|
||||
self.legacy_wifi,
|
||||
]
|
||||
)
|
||||
|
||||
def verify_patch_allowed(self):
|
||||
sip = self.constants.root_patch_sip_big_sur if self.constants.detected_os > self.constants.catalina else self.constants.root_patch_sip_mojave
|
||||
if sip == self.constants.root_patch_sip_mojave:
|
||||
sip_value = "For Hackintoshes, please set csr-active-config to '03060000' (0x603)\nFor non-OpenCore Macs, please run 'csrutil disable' in RecoveryOS"
|
||||
else:
|
||||
sip_value = (
|
||||
"For Hackintoshes, please set csr-active-config to '030E0000' (0xE03)\nFor non-OpenCore Macs, please run 'csrutil disable' and \n'csrutil authenticated-root disable' in RecoveryOS"
|
||||
)
|
||||
self.sip_enabled, self.sbm_enabled, self.amfi_enabled, self.fv_enabled, self.dosdude_patched = Utilities.patching_status(sip, self.constants.detected_os)
|
||||
if self.sip_enabled is True:
|
||||
print("\nCannot patch! Please disable System Integrity Protection (SIP).")
|
||||
print("Disable SIP in Patcher Settings and Rebuild OpenCore\n")
|
||||
print("Ensure the following bits are set for csr-active-config:")
|
||||
print("\n".join(sip))
|
||||
print(sip_value)
|
||||
|
||||
if self.sbm_enabled is True:
|
||||
print("\nCannot patch! Please disable Apple Secure Boot.")
|
||||
print("Disable SecureBootModel in Patcher Settings and Rebuild OpenCore")
|
||||
print("For Hackintoshes, set SecureBootModel to Disabled")
|
||||
|
||||
if self.fv_enabled is True:
|
||||
print("\nCannot patch! Please disable FileVault.")
|
||||
print("For OCLP Macs, please rebuild your config with 0.2.5 or newer")
|
||||
print("For others, Go to System Preferences -> Security and disable FileVault")
|
||||
|
||||
if self.amfi_enabled is True and self.amfi_must_disable is True:
|
||||
print("\nCannot patch! Please disable AMFI.")
|
||||
print("For Hackintoshes, please add amfi_get_out_of_my_way=1 to boot-args")
|
||||
|
||||
if self.check_board_id is True and self.computer.reported_board_id not in self.constants.sandy_board_id:
|
||||
print("\nCannot patch! Board ID not supported by AppleIntelSNBGraphicsFB")
|
||||
print(f"Detected Board ID: {self.computer.reported_board_id}")
|
||||
print("Please ensure your Board ID is listed below:")
|
||||
print("\n".join(self.constants.sandy_board_id))
|
||||
self.bad_board_id = True
|
||||
|
||||
if self.dosdude_patched is True:
|
||||
print("\nCannot patch! Detected machine has already been patched by another patcher")
|
||||
print("Please ensure your install is either clean or patched with OpenCore Legacy Patcher")
|
||||
|
||||
if any(
|
||||
[self.sip_enabled, self.sbm_enabled, self.fv_enabled, self.dosdude_patched, self.amfi_enabled if self.amfi_must_disable else False, self.bad_board_id if self.check_board_id else False]
|
||||
):
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
|
||||
# Entry Function
|
||||
def start_patch(self):
|
||||
print("- Starting Patch Process")
|
||||
print(f"- Determinging Required Patch set for Darwin {self.constants.detected_os}")
|
||||
self.detect_patch_set()
|
||||
if self.no_patch is True:
|
||||
change_menu = None
|
||||
print("- No Root Patches required for your machine!")
|
||||
if self.constants.gui_mode is False:
|
||||
input("\nPress [ENTER] to return to the main menu: ")
|
||||
elif self.constants.gui_mode is False:
|
||||
change_menu = input("Would you like to continue with Root Volume Patching?(y/n): ")
|
||||
else:
|
||||
change_menu = "y"
|
||||
print("Continuing root patching")
|
||||
if change_menu in ["y", "Y"]:
|
||||
print("- Continuing with Patching")
|
||||
print("- Verifying whether Root Patching possible")
|
||||
if self.verify_patch_allowed() is True:
|
||||
print("- Patcher is capable of patching")
|
||||
self.check_files()
|
||||
self.find_mount_root_vol(True)
|
||||
elif self.constants.gui_mode is False:
|
||||
input("\nPress [ENTER] to return to the main menu: ")
|
||||
|
||||
else:
|
||||
print("- Returning to main menu")
|
||||
|
||||
def start_unpatch(self):
|
||||
print("- Starting Unpatch Process")
|
||||
if self.verify_patch_allowed() is True:
|
||||
self.find_mount_root_vol(False)
|
||||
if self.constants.gui_mode is False:
|
||||
input("\nPress [ENTER] to return to the main menu")
|
||||
261
Resources/SysPatchArray.py
Normal file
@@ -0,0 +1,261 @@
|
||||
# Lists Root patches used by SysPatch.py
|
||||
# Copyright (C) 2020-2021, Dhinak G, Mykola Grymalyuk
|
||||
DeleteNvidiaAccel11 = [
|
||||
"AMDRadeonX4000.kext",
|
||||
"AMDRadeonX4000HWServices.kext",
|
||||
"AMDRadeonX5000.kext",
|
||||
"AMDRadeonX5000HWServices.kext",
|
||||
"AMDRadeonX6000.kext",
|
||||
"AMDRadeonX6000Framebuffer.kext",
|
||||
"AMDRadeonX6000HWServices.kext",
|
||||
"AppleIntelBDWGraphics.kext",
|
||||
"AppleIntelBDWGraphicsFramebuffer.kext",
|
||||
"AppleIntelCFLGraphicsFramebuffer.kext",
|
||||
"AppleIntelHD4000Graphics.kext",
|
||||
"AppleIntelHD5000Graphics.kext",
|
||||
"AppleIntelICLGraphics.kext",
|
||||
"AppleIntelICLLPGraphicsFramebuffer.kext",
|
||||
"AppleIntelKBLGraphics.kext",
|
||||
"AppleIntelKBLGraphicsFramebuffer.kext",
|
||||
"AppleIntelSKLGraphics.kext",
|
||||
"AppleIntelSKLGraphicsFramebuffer.kext",
|
||||
"AppleIntelFramebufferAzul.kext",
|
||||
"AppleIntelFramebufferCapri.kext",
|
||||
"AppleParavirtGPU.kext",
|
||||
"GeForce.kext",
|
||||
"IOAcceleratorFamily2.kext",
|
||||
"IOGPUFamily.kext",
|
||||
]
|
||||
|
||||
DeleteAMDAccel11 = [
|
||||
"AMDRadeonX4000.kext",
|
||||
"AMDRadeonX4000HWServices.kext",
|
||||
"AMDRadeonX5000.kext",
|
||||
"AMDRadeonX5000HWServices.kext",
|
||||
"AMDRadeonX6000.kext",
|
||||
"AMDRadeonX6000Framebuffer.kext",
|
||||
"AMDRadeonX6000HWServices.kext",
|
||||
"AMD7000Controller.kext", # AMDSupport Dependency
|
||||
"AMD8000Controller.kext", # AMDSupport Dependency
|
||||
"AMD9000Controller.kext", # AMDSupport Dependency
|
||||
"AMD9500Controller.kext", # AMDSupport Dependency
|
||||
"AMD10000Controller.kext", # AMDSupport Dependency
|
||||
"AppleIntelBDWGraphics.kext",
|
||||
"AppleIntelBDWGraphicsFramebuffer.kext",
|
||||
"AppleIntelCFLGraphicsFramebuffer.kext",
|
||||
"AppleIntelHD4000Graphics.kext",
|
||||
"AppleIntelHD5000Graphics.kext",
|
||||
"AppleIntelICLGraphics.kext",
|
||||
"AppleIntelICLLPGraphicsFramebuffer.kext",
|
||||
"AppleIntelKBLGraphics.kext",
|
||||
"AppleIntelKBLGraphicsFramebuffer.kext",
|
||||
"AppleIntelSKLGraphics.kext",
|
||||
"AppleIntelSKLGraphicsFramebuffer.kext",
|
||||
"AppleIntelFramebufferAzul.kext",
|
||||
"AppleIntelFramebufferCapri.kext",
|
||||
"AppleParavirtGPU.kext",
|
||||
"GeForce.kext",
|
||||
"IOGPUFamily.kext",
|
||||
]
|
||||
|
||||
DeleteAMDAccel11TS2 = [
|
||||
"AppleCameraInterface.kext",
|
||||
]
|
||||
|
||||
AddNvidiaAccel11 = [
|
||||
"GeForceGA.bundle",
|
||||
"GeForceTesla.kext",
|
||||
"GeForceTeslaGLDriver.bundle",
|
||||
"GeForceTeslaVADriver.bundle",
|
||||
"NVDANV50HalTesla.kext",
|
||||
"NVDAResmanTesla.kext",
|
||||
"IOSurface.kext",
|
||||
]
|
||||
|
||||
AddNvidiaBrightness = [
|
||||
"GeForceGA.bundle",
|
||||
"GeForceTesla.kext",
|
||||
"GeForceTeslaGLDriver.bundle",
|
||||
"GeForceTeslaVADriver.bundle",
|
||||
"NVDANV50HalTesla.kext",
|
||||
"NVDAResmanTesla.kext",
|
||||
]
|
||||
|
||||
AddNvidiaKeplerAccel11 = [
|
||||
"GeForce.kext",
|
||||
"GeForceAIRPlugin.bundle",
|
||||
"GeForceGLDriver.bundle",
|
||||
"GeForceMTLDriver.bundle",
|
||||
"GeForceVADriver.bundle",
|
||||
"NVDAGF100Hal.kext",
|
||||
"NVDAGK100Hal.kext",
|
||||
"NVDAResman.kext",
|
||||
"NVDAStartup.kext",
|
||||
]
|
||||
|
||||
AddAMDAccel11 = [
|
||||
"AMD2400Controller.kext",
|
||||
"AMD2600Controller.kext",
|
||||
"AMD3800Controller.kext",
|
||||
"AMD4600Controller.kext",
|
||||
"AMD4800Controller.kext",
|
||||
"AMD5000Controller.kext",
|
||||
"AMD6000Controller.kext",
|
||||
"AMDFramebuffer.kext",
|
||||
"AMDLegacyFramebuffer.kext",
|
||||
"AMDLegacySupport.kext",
|
||||
"AMDRadeonVADriver.bundle",
|
||||
"AMDRadeonVADriver2.bundle",
|
||||
"AMDRadeonX3000.kext",
|
||||
"AMDRadeonX3000GLDriver.bundle",
|
||||
"AMDShared.bundle",
|
||||
"AMDSupport.kext",
|
||||
"ATIRadeonX2000.kext",
|
||||
"ATIRadeonX2000GA.plugin",
|
||||
"ATIRadeonX2000GLDriver.bundle",
|
||||
"ATIRadeonX2000VADriver.bundle",
|
||||
]
|
||||
|
||||
AddAMDBrightness = [
|
||||
"AMD2400Controller.kext",
|
||||
"AMD2600Controller.kext",
|
||||
"AMD3800Controller.kext",
|
||||
"AMD4600Controller.kext",
|
||||
"AMD4800Controller.kext",
|
||||
"AMD5000Controller.kext",
|
||||
"AMD6000Controller.kext",
|
||||
"AMDLegacyFramebuffer.kext",
|
||||
"AMDLegacySupport.kext",
|
||||
"AMDRadeonVADriver.bundle",
|
||||
"AMDRadeonVADriver2.bundle",
|
||||
# "AMDRadeonX3000.kext",
|
||||
# "AMDRadeonX3000GLDriver.bundle",
|
||||
"AMDShared.bundle",
|
||||
"ATIRadeonX2000.kext",
|
||||
"ATIRadeonX2000GA.plugin",
|
||||
"ATIRadeonX2000GLDriver.bundle",
|
||||
"ATIRadeonX2000VADriver.bundle",
|
||||
]
|
||||
|
||||
AddAMDAccel11TS2 = [
|
||||
"IOSurface.kext",
|
||||
"IOAcceleratorFamily2.kext",
|
||||
]
|
||||
|
||||
AddIntelGen1Accel = [
|
||||
"AppleIntelHDGraphics.kext",
|
||||
"AppleIntelHDGraphicsFB.kext",
|
||||
"AppleIntelHDGraphicsGA.plugin",
|
||||
"AppleIntelHDGraphicsGLDriver.bundle",
|
||||
"AppleIntelHDGraphicsVADriver.bundle",
|
||||
]
|
||||
|
||||
AddIntelGen2Accel = [
|
||||
"AppleIntelHD3000Graphics.kext",
|
||||
"AppleIntelHD3000GraphicsGA.plugin",
|
||||
"AppleIntelHD3000GraphicsGLDriver.bundle",
|
||||
"AppleIntelHD3000GraphicsVADriver.bundle",
|
||||
"AppleIntelSNBGraphicsFB.kext",
|
||||
"AppleIntelSNBVA.bundle",
|
||||
]
|
||||
|
||||
AddIntelGen3Accel = [
|
||||
"AppleIntelFramebufferCapri.kext",
|
||||
"AppleIntelHD4000Graphics.kext",
|
||||
"AppleIntelHD4000GraphicsGLDriver.bundle",
|
||||
"AppleIntelHD4000GraphicsMTLDriver.bundle",
|
||||
"AppleIntelHD4000GraphicsVADriver.bundle",
|
||||
"AppleIntelIVBVA.bundle",
|
||||
"AppleIntelGraphicsShared.bundle",
|
||||
]
|
||||
|
||||
AddGeneralAccel = ["IOAcceleratorFamily2.kext", "IOSurface.kext"]
|
||||
|
||||
DeleteBrightness = ["AppleGraphicsControl.kext/Contents/PlugIns/AGDCBacklightControl.kext"]
|
||||
|
||||
AddBrightness = [
|
||||
"AppleBacklight.kext",
|
||||
"AppleBacklightExpert.kext",
|
||||
]
|
||||
|
||||
AddVolumeControl = [
|
||||
"AppleHDA.kext",
|
||||
"IOAudioFamily.kext",
|
||||
]
|
||||
|
||||
DeleteVolumeControl = [
|
||||
"AppleVirtIO.kext",
|
||||
"AppleVirtualGraphics.kext",
|
||||
"AppleVirtualPlatform.kext",
|
||||
"ApplePVPanic.kext",
|
||||
"AppleVirtIOStorage.kext",
|
||||
]
|
||||
|
||||
AddNvidiaAccelLegacy = [
|
||||
# "GeForceGA.bundle",
|
||||
"GeForceTesla.kext",
|
||||
"GeForceTeslaGLDriver.bundle",
|
||||
"GeForceTeslaVADriver.bundle",
|
||||
"NVDANV50HalTesla.kext",
|
||||
"NVDAResmanTesla.kext",
|
||||
]
|
||||
|
||||
AddAMDAccelLegacy = [
|
||||
"AMD2400Controller.kext",
|
||||
"AMD2600Controller.kext",
|
||||
"AMD3800Controller.kext",
|
||||
"AMD4600Controller.kext",
|
||||
"AMD4800Controller.kext",
|
||||
"AMD5000Controller.kext",
|
||||
"AMD6000Controller.kext",
|
||||
"AMDFramebuffer.kext",
|
||||
"AMDLegacyFramebuffer.kext",
|
||||
"AMDLegacySupport.kext",
|
||||
"AMDRadeonVADriver.bundle",
|
||||
"AMDRadeonVADriver2.bundle",
|
||||
"AMDRadeonX3000.kext",
|
||||
"AMDRadeonX3000GLDriver.bundle",
|
||||
"AMDRadeonX4000HWServices.kext",
|
||||
"AMDRadeonX4000.kext",
|
||||
"AMDRadeonX4000GLDriver.bundle",
|
||||
"AMDShared.bundle",
|
||||
"AMDSupport.kext",
|
||||
"ATIRadeonX2000.kext",
|
||||
"ATIRadeonX2000GA.plugin",
|
||||
"ATIRadeonX2000GLDriver.bundle",
|
||||
"ATIRadeonX2000VADriver.bundle",
|
||||
]
|
||||
|
||||
AddGeneralAccelCatalina = [
|
||||
"AppleGraphicsControl.kext",
|
||||
"AppleGraphicsPowerManagement.kext",
|
||||
"AppleMCCSControl.kext",
|
||||
"IOGraphicsFamily.kext",
|
||||
"IONDRVSupport.kext",
|
||||
"IOSurface.kext",
|
||||
]
|
||||
|
||||
AddGeneralAccelMojave = [
|
||||
"IONDRVSupport.kext",
|
||||
"AppleGraphicsControl.kext",
|
||||
"AppleGraphicsPowerManagement.kext",
|
||||
"AppleMCCSControl.kext",
|
||||
"IOAccelerator2D.plugin",
|
||||
"IOAcceleratorFamily2.kext",
|
||||
"IOGraphicsFamily.kext",
|
||||
]
|
||||
|
||||
BackupLocations = [
|
||||
"System/Library/Extensions",
|
||||
"System/Library/Frameworks/CoreDisplay.framework",
|
||||
"System/Library/Frameworks/IOSurface.framework",
|
||||
"System/Library/Frameworks/OpenGL.framework",
|
||||
"System/Library/Frameworks/WebKit.framework",
|
||||
"System/Library/LaunchDaemons",
|
||||
"System/Library/PrivateFrameworks/DisplayServices.framework",
|
||||
"System/Library/PrivateFrameworks/GPUSupport.framework",
|
||||
"System/Library/PrivateFrameworks/SkyLight.framework",
|
||||
"System/Library/PrivateFrameworks/IOAccelerator.framework",
|
||||
"System/Library/PrivateFrameworks/AppleGVA.framework",
|
||||
"System/Library/PrivateFrameworks/AppleGVACore.framework",
|
||||
]
|
||||
431
Resources/Utilities.py
Normal file
@@ -0,0 +1,431 @@
|
||||
# Copyright (C) 2020-2021, Dhinak G
|
||||
from __future__ import print_function
|
||||
|
||||
import hashlib
|
||||
import math
|
||||
import os
|
||||
import plistlib
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
import re
|
||||
import os
|
||||
import binascii
|
||||
|
||||
try:
|
||||
import requests
|
||||
except ImportError:
|
||||
subprocess.run(["pip3", "install", "requests"], stdout=subprocess.PIPE)
|
||||
try:
|
||||
import requests
|
||||
except ImportError:
|
||||
raise Exception("Missing requests library!\nPlease run the following before starting OCLP:\npip3 install requests")
|
||||
|
||||
from Resources import Constants, ioreg, device_probe
|
||||
|
||||
|
||||
def hexswap(input_hex: str):
|
||||
hex_pairs = [input_hex[i : i + 2] for i in range(0, len(input_hex), 2)]
|
||||
hex_rev = hex_pairs[::-1]
|
||||
hex_str = "".join(["".join(x) for x in hex_rev])
|
||||
return hex_str.upper()
|
||||
|
||||
|
||||
def string_to_hex(input_string):
|
||||
if not (len(input_string) % 2) == 0:
|
||||
input_string = "0" + input_string
|
||||
input_string = hexswap(input_string)
|
||||
input_string = binascii.unhexlify(input_string)
|
||||
return input_string
|
||||
|
||||
|
||||
def process_status(process_result):
|
||||
if process_result.returncode != 0:
|
||||
print(f"Process failed with exit code {process_result.returncode}")
|
||||
print(f"Please file an issue on our Github")
|
||||
raise Exception(f"Process result: \n{process_result.stdout.decode()}")
|
||||
|
||||
|
||||
def human_fmt(num):
|
||||
for unit in ["B", "KB", "MB", "GB", "TB", "PB"]:
|
||||
if abs(num) < 1000.0:
|
||||
return "%3.1f %s" % (num, unit)
|
||||
num /= 1000.0
|
||||
return "%.1f %s" % (num, "EB")
|
||||
|
||||
|
||||
def header(lines):
|
||||
lines = [i for i in lines if i is not None]
|
||||
total_length = len(max(lines, key=len)) + 4
|
||||
print("#" * (total_length))
|
||||
for line in lines:
|
||||
left_side = math.floor(((total_length - 2 - len(line.strip())) / 2))
|
||||
print("#" + " " * left_side + line.strip() + " " * (total_length - len("#" + " " * left_side + line.strip()) - 1) + "#")
|
||||
print("#" * total_length)
|
||||
|
||||
|
||||
RECOVERY_STATUS = None
|
||||
|
||||
|
||||
def check_recovery():
|
||||
global RECOVERY_STATUS # pylint: disable=global-statement # We need to cache the result
|
||||
|
||||
if RECOVERY_STATUS is None:
|
||||
RECOVERY_STATUS = Path("/System/Library/BaseSystem").exists()
|
||||
|
||||
return RECOVERY_STATUS
|
||||
|
||||
|
||||
def get_disk_path():
|
||||
root_partition_info = plistlib.loads(subprocess.run("diskutil info -plist /".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
||||
root_mount_path = root_partition_info["DeviceIdentifier"]
|
||||
root_mount_path = root_mount_path[:-2] if root_mount_path.count("s") > 1 else root_mount_path
|
||||
return root_mount_path
|
||||
|
||||
|
||||
def check_seal():
|
||||
# 'Snapshot Sealed' property is only listed on booted snapshots
|
||||
sealed = subprocess.run(["diskutil", "apfs", "list"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
if "Snapshot Sealed: Yes" in sealed.stdout.decode():
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
def latebloom_detection(model):
|
||||
if model in ["MacPro4,1", "MacPro5,1", "iMac7,1", "iMac8,1"]:
|
||||
# These machines are more likely to experience boot hangs, increase delays to accomodate
|
||||
lb_delay = "250"
|
||||
else:
|
||||
lb_delay = "100"
|
||||
lb_range = "1"
|
||||
lb_debug = "1"
|
||||
boot_args = get_nvram("boot-args", decode=False)
|
||||
# boot_args = "latebloom=200 lb_range=40 lb_debug=0 keepsyms=1 debug=0x100 -lilubetaall"
|
||||
if boot_args:
|
||||
# TODO: This crashes if latebloom=xxx is the very first entry in boot-args
|
||||
if "latebloom=" in boot_args:
|
||||
lb_delay = re.search(r"(?:[, ])latebloom=(\d+)", boot_args)
|
||||
lb_delay = lb_delay[1]
|
||||
if "lb_range=" in boot_args:
|
||||
lb_range = re.search(r"(?:[, ])lb_range=(\d+)", boot_args)
|
||||
lb_range = lb_range[1]
|
||||
if "lb_debug=" in boot_args:
|
||||
lb_debug = re.search(r"(?:[, ])lb_debug=(\d+)", boot_args)
|
||||
lb_debug = lb_debug[1]
|
||||
return int(lb_delay), int(lb_range), int(lb_debug)
|
||||
|
||||
|
||||
def csr_decode(csr_active_config, os_sip):
|
||||
if csr_active_config is None:
|
||||
csr_active_config = b"\x00\x00\x00\x00"
|
||||
sip_int = int.from_bytes(csr_active_config, byteorder="little")
|
||||
i = 0
|
||||
for current_sip_bit in Constants.Constants.csr_values:
|
||||
if sip_int & (1 << i):
|
||||
Constants.Constants.csr_values[current_sip_bit] = True
|
||||
i = i + 1
|
||||
|
||||
# Can be adjusted to whatever OS needs patching
|
||||
sip_needs_change = all(Constants.Constants.csr_values[i] for i in os_sip)
|
||||
if sip_needs_change is True:
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
|
||||
|
||||
def friendly_hex(integer: int):
|
||||
return "{:02X}".format(integer)
|
||||
|
||||
|
||||
def amfi_status():
|
||||
amfi_1 = "amfi_get_out_of_my_way=0x1"
|
||||
amfi_2 = "amfi_get_out_of_my_way=1"
|
||||
|
||||
if get_nvram("OCLP-Settings", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102", decode=False):
|
||||
if "-allow_amfi" in get_nvram("OCLP-Settings", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102", decode=True):
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
elif get_nvram("boot-args", decode=False):
|
||||
if amfi_1 in get_nvram("boot-args", decode=False) or amfi_2 in get_nvram("boot-args", decode=False):
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
|
||||
|
||||
def check_oclp_boot():
|
||||
if get_nvram("OCLP-Version", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102", decode=True):
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
def check_monterey_wifi():
|
||||
IO80211ElCap = "com.apple.iokit.IO80211ElCap"
|
||||
CoreCaptureElCap = "com.apple.driver.corecaptureElCap"
|
||||
loaded_kexts: str = subprocess.run("kextcache".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
|
||||
if IO80211ElCap in loaded_kexts and CoreCaptureElCap in loaded_kexts:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
def check_metal_support(device_probe, computer):
|
||||
dgpu = computer.dgpu
|
||||
igpu = computer.igpu
|
||||
if (
|
||||
(dgpu and dgpu.arch in [device_probe.NVIDIA.Archs.Tesla, device_probe.NVIDIA.Archs.Fermi, device_probe.AMD.Archs.TeraScale_1, device_probe.AMD.Archs.TeraScale_2])
|
||||
or (igpu and igpu.arch in [device_probe.Intel.Archs.Iron_Lake, device_probe.Intel.Archs.Sandy_Bridge])
|
||||
or isinstance(igpu, device_probe.NVIDIA)
|
||||
):
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
|
||||
|
||||
def check_filevault_skip():
|
||||
# Check whether we can skip FileVault check with Root Patching
|
||||
if get_nvram("OCLP-Settings", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102", decode=False) and "-allow_fv" in get_nvram("OCLP-Settings", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102", decode=True):
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
def patching_status(os_sip, os):
|
||||
# Detection for Root Patching
|
||||
sip_enabled = True # System Integrity Protection
|
||||
sbm_enabled = True # Secure Boot Status (SecureBootModel)
|
||||
amfi_enabled = True # Apple Mobile File Integrity
|
||||
fv_enabled = True # FileVault
|
||||
dosdude_patched = True
|
||||
|
||||
gen6_kext = "/System/Library/Extension/AppleIntelHDGraphics.kext"
|
||||
gen7_kext = "/System/Library/Extension/AppleIntelHD3000Graphics.kext"
|
||||
|
||||
if os > Constants.Constants().catalina:
|
||||
amfi_enabled = amfi_status()
|
||||
else:
|
||||
# Catalina and older supports individually disabling Library Validation
|
||||
amfi_enabled = False
|
||||
|
||||
if get_nvram("HardwareModel", "94B73556-2197-4702-82A8-3E1337DAFBFB", decode=False) not in Constants.Constants.sbm_values:
|
||||
sbm_enabled = False
|
||||
|
||||
if get_nvram("csr-active-config", decode=False) and csr_decode(get_nvram("csr-active-config", decode=False), os_sip) is False:
|
||||
sip_enabled = False
|
||||
|
||||
if os > Constants.Constants().catalina and not check_filevault_skip():
|
||||
# Assume non-OCLP Macs do not have our APFS seal patch
|
||||
fv_status: str = subprocess.run("fdesetup status".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
|
||||
if "FileVault is Off" in fv_status:
|
||||
fv_enabled = False
|
||||
else:
|
||||
fv_enabled = False
|
||||
|
||||
if not (Path(gen6_kext).exists() and Path(gen7_kext).exists()):
|
||||
dosdude_patched = False
|
||||
|
||||
return sip_enabled, sbm_enabled, amfi_enabled, fv_enabled, dosdude_patched
|
||||
|
||||
|
||||
clear = True
|
||||
|
||||
|
||||
def disable_cls():
|
||||
global clear
|
||||
clear = False
|
||||
|
||||
|
||||
def cls():
|
||||
global clear
|
||||
if not clear:
|
||||
return
|
||||
if not check_recovery():
|
||||
os.system("cls" if os.name == "nt" else "clear")
|
||||
else:
|
||||
print("\u001Bc")
|
||||
|
||||
|
||||
def get_nvram(variable: str, uuid: str = None, *, decode: bool = False):
|
||||
# TODO: Properly fix for El Capitan, which does not print the XML representation even though we say to
|
||||
|
||||
if uuid is not None:
|
||||
uuid += ":"
|
||||
else:
|
||||
uuid = ""
|
||||
|
||||
nvram = ioreg.IORegistryEntryFromPath(ioreg.kIOMasterPortDefault, "IODeviceTree:/options".encode())
|
||||
|
||||
value = ioreg.IORegistryEntryCreateCFProperty(nvram, f"{uuid}{variable}", ioreg.kCFAllocatorDefault, ioreg.kNilOptions)
|
||||
|
||||
ioreg.IOObjectRelease(nvram)
|
||||
|
||||
if not value:
|
||||
return None
|
||||
|
||||
value = ioreg.corefoundation_to_native(value)
|
||||
|
||||
if decode and isinstance(value, bytes):
|
||||
value = value.strip(b"\0").decode()
|
||||
return value
|
||||
|
||||
|
||||
def get_rom(variable: str, *, decode: bool = False):
|
||||
# TODO: Properly fix for El Capitan, which does not print the XML representation even though we say to
|
||||
|
||||
rom = ioreg.IORegistryEntryFromPath(ioreg.kIOMasterPortDefault, "IODeviceTree:/rom".encode())
|
||||
|
||||
value = ioreg.IORegistryEntryCreateCFProperty(rom, variable, ioreg.kCFAllocatorDefault, ioreg.kNilOptions)
|
||||
|
||||
ioreg.IOObjectRelease(rom)
|
||||
|
||||
if not value:
|
||||
return None
|
||||
|
||||
value = ioreg.corefoundation_to_native(value)
|
||||
|
||||
if decode and isinstance(value, bytes):
|
||||
value = value.strip(b"\0").decode()
|
||||
return value
|
||||
|
||||
|
||||
def download_file(link, location):
|
||||
print("- Attempting download from following link:")
|
||||
print(link)
|
||||
if Path(location).exists():
|
||||
print("- Removing old file")
|
||||
Path(location).unlink()
|
||||
response = requests.get(link, stream=True)
|
||||
with location.open("wb") as file:
|
||||
count = 0
|
||||
for chunk in response.iter_content(1024 * 1024 * 4):
|
||||
file.write(chunk)
|
||||
count += len(chunk)
|
||||
cls()
|
||||
print("- Downloading package")
|
||||
print(f"- {count / 1024 / 1024}MB Downloaded")
|
||||
checksum = hashlib.sha256()
|
||||
with location.open("rb") as file:
|
||||
chunk = file.read(1024 * 1024 * 16)
|
||||
while chunk:
|
||||
checksum.update(chunk)
|
||||
chunk = file.read(1024 * 1024 * 16)
|
||||
return checksum
|
||||
|
||||
|
||||
def enable_apfs(fw_feature):
|
||||
fw_feature |= 2 ** 19 # Enable FW_FEATURE_SUPPORTS_APFS
|
||||
return fw_feature
|
||||
|
||||
def enable_apfs_extended(fw_feature):
|
||||
fw_feature |= 2 ** 20 # Enable FW_FEATURE_SUPPORTS_APFS_EXTRA
|
||||
return fw_feature
|
||||
|
||||
def enable_large_basesystem(fw_feature):
|
||||
fw_feature |= 2 ** 35 # Enable FW_FEATURE_SUPPORTS_LARGE_BASESYSTEM
|
||||
return fw_feature
|
||||
|
||||
|
||||
# def menu(title, prompt, menu_options, add_quit=True, auto_number=False, in_between=[], top_level=False):
|
||||
# return_option = ["Q", "Quit", None] if top_level else ["B", "Back", None]
|
||||
# if add_quit: menu_options.append(return_option)
|
||||
|
||||
# cls()
|
||||
# header(title)
|
||||
# print()
|
||||
|
||||
# for i in in_between: print(i)
|
||||
# if in_between: print()
|
||||
|
||||
# for index, option in enumerate(menu_options):
|
||||
# if auto_number and not (index == (len(menu_options) - 1) and add_quit):
|
||||
# option[0] = str((index + 1))
|
||||
# print(option[0] + ". " + option[1])
|
||||
|
||||
# print()
|
||||
# selected = input(prompt)
|
||||
|
||||
# keys = [option[0].upper() for option in menu_options]
|
||||
# if not selected or selected.upper() not in keys:
|
||||
# return
|
||||
# if selected.upper() == return_option[0]:
|
||||
# return -1
|
||||
# else:
|
||||
# menu_options[keys.index(selected.upper())][2]() if menu_options[keys.index(selected.upper())][2] else None
|
||||
|
||||
|
||||
class TUIMenu:
|
||||
def __init__(self, title, prompt, options=None, return_number_instead_of_direct_call=False, add_quit=True, auto_number=False, in_between=None, top_level=False, loop=False):
|
||||
self.title = title
|
||||
self.prompt = prompt
|
||||
self.in_between = in_between or []
|
||||
self.options = options or []
|
||||
self.return_number_instead_of_direct_call = return_number_instead_of_direct_call
|
||||
self.auto_number = auto_number
|
||||
self.add_quit = add_quit
|
||||
self.top_level = top_level
|
||||
self.loop = loop
|
||||
self.added_quit = False
|
||||
|
||||
def add_menu_option(self, name, description="", function=None, key=""):
|
||||
self.options.append([key, name, description, function])
|
||||
|
||||
def start(self):
|
||||
return_option = ["Q", "Quit"] if self.top_level else ["B", "Back"]
|
||||
if self.add_quit and not self.added_quit:
|
||||
self.add_menu_option(return_option[1], function=None, key=return_option[0])
|
||||
self.added_quit = True
|
||||
|
||||
while True:
|
||||
cls()
|
||||
header(self.title)
|
||||
print()
|
||||
|
||||
for i in self.in_between:
|
||||
print(i)
|
||||
if self.in_between:
|
||||
print()
|
||||
|
||||
for index, option in enumerate(self.options):
|
||||
if self.auto_number and not (index == (len(self.options) - 1) and self.add_quit):
|
||||
option[0] = str((index + 1))
|
||||
print(option[0] + ". " + option[1])
|
||||
for i in option[2]:
|
||||
print("\t" + i)
|
||||
|
||||
print()
|
||||
selected = input(self.prompt)
|
||||
|
||||
keys = [option[0].upper() for option in self.options]
|
||||
if not selected or selected.upper() not in keys:
|
||||
if self.loop:
|
||||
continue
|
||||
else:
|
||||
return
|
||||
if self.add_quit and selected.upper() == return_option[0]:
|
||||
return -1
|
||||
elif self.return_number_instead_of_direct_call:
|
||||
return self.options[keys.index(selected.upper())][0]
|
||||
else:
|
||||
self.options[keys.index(selected.upper())][3]() if self.options[keys.index(selected.upper())][3] else None
|
||||
if not self.loop:
|
||||
return
|
||||
|
||||
|
||||
class TUIOnlyPrint:
|
||||
def __init__(self, title, prompt, in_between=None):
|
||||
self.title = title
|
||||
self.prompt = prompt
|
||||
self.in_between = in_between or []
|
||||
|
||||
def start(self):
|
||||
cls()
|
||||
header(self.title)
|
||||
print()
|
||||
|
||||
for i in self.in_between:
|
||||
print(i)
|
||||
if self.in_between:
|
||||
print()
|
||||
|
||||
return input(self.prompt)
|
||||
@@ -1,75 +0,0 @@
|
||||
# Define Files
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
from shutil import copy
|
||||
from shutil import rmtree
|
||||
|
||||
import os
|
||||
import json
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
# List build versions
|
||||
opencore_version = "0.6.4"
|
||||
lilu_version = "1.4.9"
|
||||
whatevergreen_version = "1.4.4"
|
||||
airportbcrmfixup_version = "2.1.1"
|
||||
bcm570_version = "1.0.0"
|
||||
marvel_version = "1.0.0"
|
||||
nforce_version = "1.0.0"
|
||||
mce_version = "1.0.0"
|
||||
mousse_version = "0.93"
|
||||
telemetrap_version = "1.0.0"
|
||||
io80211high_sierra_version = "1.0.0"
|
||||
io80211mojave_version = "1.0.0"
|
||||
voodoohda_version = "296"
|
||||
|
||||
# List current location
|
||||
os.chdir(os.path.dirname(os.path.realpath(__file__)))
|
||||
os.chdir("..")
|
||||
current_path = os.getcwd()
|
||||
|
||||
# Payload Location
|
||||
# OpenCore
|
||||
opencore_path = os.path.join(current_path, "payloads/OpenCore/" "OpenCore-v%s.zip" % opencore_version)
|
||||
plist_path = os.path.join(current_path, "payloads/Config/v%s/" "config.plist" % opencore_version)
|
||||
|
||||
# ACPI
|
||||
pci_ssdt_path = os.path.join(current_path, "payloads/ACPI/" "SSDT-CPBG.aml")
|
||||
|
||||
# Drivers
|
||||
nvme_driver_path = os.path.join(current_path, "payloads/Drivers/" "NvmExpressDxe.efi")
|
||||
|
||||
# Kexts
|
||||
lilu_path = os.path.join(current_path, "payloads/Kexts/Acidanthera/" "Lilu-v%s.zip" % lilu_version)
|
||||
whatevergreen_path = os.path.join(current_path, "payloads/Kexts/Acidanthera/" "WhateverGreen-v%s.zip" % whatevergreen_version)
|
||||
airportbcrmfixup_path = os.path.join(current_path, "payloads/Kexts/Acidanthera/" "AirportBrcmFixup-v%s.zip" % airportbcrmfixup_version)
|
||||
bcm570_path = os.path.join(current_path, "payloads/Kexts/Ethernet/" "CatalinaBCM5701Ethernet-v%s.zip" % bcm570_version)
|
||||
marvel_path = os.path.join(current_path, "payloads/Kexts/Ethernet/" "MarvelYukonEthernet-v%s.zip" % marvel_version)
|
||||
nforce_path = os.path.join(current_path, "payloads/Kexts/Ethernet/" "nForceEthernet-v%s.zip" % nforce_version)
|
||||
mce_path = os.path.join(current_path, "payloads/Kexts/Misc/" "AppleMCEReporterDisabler-v%s.zip" % mce_version)
|
||||
mousse_path = os.path.join(current_path, "payloads/Kexts/SSE/" "AAAMouSSE-v%s.zip" % mousse_version)
|
||||
telemetrap_path = os.path.join(current_path, "payloads/Kexts/SSE/" "telemetrap-v%s.zip" % telemetrap_version)
|
||||
io80211high_sierra_path = os.path.join(current_path, "payloads/Kexts/Wifi/" "IO80211HighSierra-v%s.zip" % io80211high_sierra_version)
|
||||
io80211mojave_path = os.path.join(current_path, "payloads/Kexts/Wifi/" "IO80211Mojave-v%s.zip" % io80211mojave_version)
|
||||
voodoohda_path = os.path.join(current_path, "payloads/Kexts/Audio/" "VoodooHDA-v%s.zip" % voodoohda_version)
|
||||
|
||||
# Build Location
|
||||
opencore_path_build = os.path.join(current_path, "Build-Folder/" "OpenCore-v%s.zip" % opencore_version)
|
||||
plist_path_build = os.path.join(current_path, "Build-Folder/" "OpenCore-v%s/EFI/OC/" % opencore_version)
|
||||
plist_path_build_full = os.path.join(current_path, "Build-Folder/" "OpenCore-v%s/EFI/OC/config.plist" % opencore_version)
|
||||
acpi_path_build = os.path.join(current_path, "Build-Folder/" "OpenCore-v%s/EFI/OC/ACPI" % opencore_version)
|
||||
drivers_path_build = os.path.join(current_path, "Build-Folder/" "OpenCore-v%s/EFI/OC/Drivers" % opencore_version)
|
||||
kext_path_build = os.path.join(current_path, "Build-Folder/" "OpenCore-v%s/EFI/OC/Kexts" % opencore_version)
|
||||
opencore_path_done = os.path.join(current_path, "Build-Folder/" "OpenCore-v%s" % opencore_version)
|
||||
build_path = os.path.join(current_path, r'Build-Folder/')
|
||||
gui_path_build = os.path.join(current_path, "Build-Folder/" "OpenCore-v%s/EFI/OC/Resources" % opencore_version)
|
||||
|
||||
# Tools
|
||||
macserial_path = os.path.join(current_path, "payloads/" "Tools")
|
||||
|
||||
# Icons
|
||||
app_icon_path = os.path.join(current_path, "OC-Patcher.icns")
|
||||
icon_path = os.path.join(current_path, "payloads/Icon/" ".VolumeIcon.icns")
|
||||
gui_path = os.path.join(current_path, "payloads/Icon/" "Resources.zip")
|
||||
452
Resources/device_probe.py
Normal file
@@ -0,0 +1,452 @@
|
||||
# Hardware probing
|
||||
# Copyright (C) 2020-2021, Dhinak G, Mykola Grymalyuk
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import binascii
|
||||
import enum
|
||||
import itertools
|
||||
import subprocess
|
||||
from dataclasses import dataclass, field
|
||||
from typing import Any, ClassVar, Optional, Type, Union
|
||||
|
||||
from Resources import PCIIDArray, Utilities, ioreg
|
||||
|
||||
|
||||
@dataclass
|
||||
class CPU:
|
||||
name: str
|
||||
flags: list[str]
|
||||
|
||||
|
||||
@dataclass
|
||||
class PCIDevice:
|
||||
VENDOR_ID: ClassVar[int] # Default vendor id, for subclasses.
|
||||
|
||||
vendor_id: int # The vendor ID of this PCI device
|
||||
device_id: int # The device ID of this PCI device
|
||||
class_code: int # The class code of this PCI device
|
||||
|
||||
# ioregistryentry: Optional[ioreg.IORegistryEntry] = None
|
||||
name: Optional[str] = None # Name of IORegistryEntry
|
||||
model: Optional[str] = None # model property
|
||||
acpi_path: Optional[str] = None
|
||||
pci_path: Optional[str] = None
|
||||
|
||||
# def __getstate__(self):
|
||||
# state = self.__dict__.copy()
|
||||
# state.pop("ioregistryentry")
|
||||
# return state
|
||||
|
||||
@classmethod
|
||||
def from_ioregistry(cls, entry: ioreg.io_registry_entry_t, anti_spoof=False):
|
||||
properties: dict = ioreg.corefoundation_to_native(ioreg.IORegistryEntryCreateCFProperties(entry, None, ioreg.kCFAllocatorDefault, ioreg.kNilOptions)[1]) # type: ignore
|
||||
if anti_spoof and "IOName" in properties:
|
||||
vendor_id, device_id = (int(i, 16) for i in properties["IOName"][3:].split(","))
|
||||
else:
|
||||
vendor_id, device_id = [int.from_bytes(properties[i][:4], byteorder="little") for i in ["vendor-id", "device-id"]]
|
||||
|
||||
device = cls(vendor_id, device_id, int.from_bytes(properties["class-code"][:6], byteorder="little"), name=ioreg.io_name_t_to_str(ioreg.IORegistryEntryGetName(entry, None)[1]))
|
||||
if "model" in properties:
|
||||
device.model = properties["model"].strip(b"\0").decode()
|
||||
if "acpi_path" in properties:
|
||||
device.acpi_path = properties["acpi-path"].strip(b"\0").decode()
|
||||
device.populate_pci_path(entry)
|
||||
return device
|
||||
|
||||
# @staticmethod
|
||||
# def vendor_detect_old(device):
|
||||
# for i in [NVIDIA, AMD]:
|
||||
# if i.detect(device):
|
||||
# return i
|
||||
# return None
|
||||
|
||||
def vendor_detect(self, *, inherits: ClassVar[Any] = None, classes: list = None):
|
||||
for i in classes or itertools.chain.from_iterable([subclass.__subclasses__() for subclass in PCIDevice.__subclasses__()]):
|
||||
if issubclass(i, inherits or object) and i.detect(self):
|
||||
return i
|
||||
return None
|
||||
|
||||
@classmethod
|
||||
def detect(cls, device):
|
||||
return device.vendor_id == cls.VENDOR_ID and ((device.class_code == cls.CLASS_CODE) if getattr(cls, "CLASS_CODE", None) else True) # type: ignore # pylint: disable=no-member
|
||||
|
||||
# def acpi_path(self):
|
||||
# # Eventually
|
||||
# raise NotImplementedError
|
||||
|
||||
def populate_pci_path(self, original_entry: ioreg.io_registry_entry_t):
|
||||
# Based off gfxutil logic, seems to work.
|
||||
paths = []
|
||||
entry = original_entry
|
||||
while entry:
|
||||
if ioreg.IOObjectConformsTo(entry, "IOPCIDevice".encode()):
|
||||
location = [hex(int(i, 16)) for i in ioreg.io_name_t_to_str(ioreg.IORegistryEntryGetLocationInPlane(entry, "IOService".encode(), None)[1]).split(",") + ["0"]]
|
||||
paths.append(f"Pci({location[0]},{location[1]})")
|
||||
elif ioreg.IOObjectConformsTo(entry, "IOACPIPlatformDevice".encode()):
|
||||
paths.append(f"PciRoot({hex(int(ioreg.corefoundation_to_native(ioreg.IORegistryEntryCreateCFProperty(entry, '_UID', ioreg.kCFAllocatorDefault, ioreg.kNilOptions)) or 0))})") # type: ignore
|
||||
break
|
||||
elif ioreg.IOObjectConformsTo(entry, "IOPCIBridge".encode()):
|
||||
pass
|
||||
else:
|
||||
# There's something in between that's not PCI! Abort
|
||||
paths = []
|
||||
break
|
||||
parent = ioreg.IORegistryEntryGetParentEntry(entry, "IOService".encode(), None)[1]
|
||||
if entry != original_entry:
|
||||
ioreg.IOObjectRelease(entry)
|
||||
entry = parent
|
||||
self.pci_path = "/".join(reversed(paths))
|
||||
|
||||
|
||||
@dataclass
|
||||
class GPU(PCIDevice):
|
||||
arch: enum.Enum = field(init=False) # The architecture, see subclasses.
|
||||
|
||||
def __post_init__(self):
|
||||
self.detect_arch()
|
||||
|
||||
def detect_arch(self):
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
@dataclass
|
||||
class WirelessCard(PCIDevice):
|
||||
CLASS_CODE: ClassVar[int] = 0x028000 # 00800200 hexswapped
|
||||
country_code: str = field(init=False)
|
||||
chipset: enum.Enum = field(init=False)
|
||||
|
||||
def __post_init__(self):
|
||||
self.detect_chipset()
|
||||
|
||||
@classmethod
|
||||
def from_ioregistry(cls, entry: ioreg.io_registry_entry_t, anti_spoof=True):
|
||||
device = super().from_ioregistry(entry, anti_spoof=anti_spoof)
|
||||
|
||||
matching_dict = {
|
||||
"IOParentMatch": ioreg.corefoundation_to_native(ioreg.IORegistryEntryIDMatching(ioreg.IORegistryEntryGetRegistryEntryID(entry, None)[1])),
|
||||
"IOProviderClass": "IO80211Interface",
|
||||
}
|
||||
|
||||
interface = next(ioreg.ioiterator_to_list(ioreg.IOServiceGetMatchingServices(ioreg.kIOMasterPortDefault, matching_dict, None)[1]), None)
|
||||
if interface:
|
||||
device.country_code = ioreg.corefoundation_to_native(ioreg.IORegistryEntryCreateCFProperty(interface, "IO80211CountryCode", ioreg.kCFAllocatorDefault, ioreg.kNilOptions)) # type: ignore # If not present, will be None anyways
|
||||
else:
|
||||
device.country_code = None # type: ignore
|
||||
|
||||
return device
|
||||
|
||||
def detect_chipset(self):
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
@dataclass
|
||||
class NVMeController(PCIDevice):
|
||||
CLASS_CODE: ClassVar[int] = 0x010802
|
||||
|
||||
aspm: Optional[int] = None
|
||||
# parent_aspm: Optional[int] = None
|
||||
|
||||
|
||||
@dataclass
|
||||
class SATAController(PCIDevice):
|
||||
CLASS_CODE: ClassVar[int] = 0x010601
|
||||
|
||||
|
||||
@dataclass
|
||||
class NVIDIA(GPU):
|
||||
VENDOR_ID: ClassVar[int] = 0x10DE
|
||||
|
||||
class Archs(enum.Enum):
|
||||
# pylint: disable=invalid-name
|
||||
Fermi = "Fermi"
|
||||
Tesla = "Tesla"
|
||||
Kepler = "Kepler"
|
||||
Unknown = "Unknown"
|
||||
|
||||
arch: Archs = field(init=False)
|
||||
|
||||
def detect_arch(self):
|
||||
# G80/G80GL
|
||||
if self.device_id in PCIIDArray.nvidia_ids.tesla_ids:
|
||||
self.arch = NVIDIA.Archs.Tesla
|
||||
elif self.device_id in PCIIDArray.nvidia_ids.fermi_ids:
|
||||
self.arch = NVIDIA.Archs.Fermi
|
||||
elif self.device_id in PCIIDArray.nvidia_ids.kepler_ids:
|
||||
self.arch = NVIDIA.Archs.Kepler
|
||||
else:
|
||||
self.arch = NVIDIA.Archs.Unknown
|
||||
|
||||
|
||||
@dataclass
|
||||
class AMD(GPU):
|
||||
VENDOR_ID: ClassVar[int] = 0x1002
|
||||
|
||||
class Archs(enum.Enum):
|
||||
# pylint: disable=invalid-name
|
||||
Legacy_GCN = "Legacy GCN"
|
||||
TeraScale_1 = "TeraScale 1"
|
||||
TeraScale_2 = "TeraScale 2"
|
||||
Polaris = "Polaris"
|
||||
Vega = "Vega"
|
||||
Navi = "Navi"
|
||||
Unknown = "Unknown"
|
||||
|
||||
arch: Archs = field(init=False)
|
||||
|
||||
def detect_arch(self):
|
||||
if self.device_id in PCIIDArray.amd_ids.legacy_gcn_ids:
|
||||
self.arch = AMD.Archs.Legacy_GCN
|
||||
elif self.device_id in PCIIDArray.amd_ids.terascale_1_ids:
|
||||
self.arch = AMD.Archs.TeraScale_1
|
||||
elif self.device_id in PCIIDArray.amd_ids.terascale_2_ids:
|
||||
self.arch = AMD.Archs.TeraScale_2
|
||||
elif self.device_id in PCIIDArray.amd_ids.polaris_ids:
|
||||
self.arch = AMD.Archs.Polaris
|
||||
elif self.device_id in PCIIDArray.amd_ids.vega_ids:
|
||||
self.arch = AMD.Archs.Vega
|
||||
elif self.device_id in PCIIDArray.amd_ids.navi_ids:
|
||||
self.arch = AMD.Archs.Navi
|
||||
else:
|
||||
self.arch = AMD.Archs.Unknown
|
||||
|
||||
|
||||
@dataclass
|
||||
class Intel(GPU):
|
||||
VENDOR_ID: ClassVar[int] = 0x8086
|
||||
|
||||
class Archs(enum.Enum):
|
||||
# pylint: disable=invalid-name
|
||||
Iron_Lake = "Iron Lake"
|
||||
Sandy_Bridge = "Sandy Bridge"
|
||||
Ivy_Bridge = "Ivy Bridge"
|
||||
Haswell = "Haswell"
|
||||
Broadwell = "Broadwell"
|
||||
Skylake = "Skylake"
|
||||
Kaby_Lake = "Kaby Lake"
|
||||
Coffee_Lake = "Coffee Lake"
|
||||
Ice_Lake = "Ice Lake"
|
||||
Unknown = "Unknown"
|
||||
|
||||
arch: Archs = field(init=False)
|
||||
|
||||
def detect_arch(self):
|
||||
if self.device_id in PCIIDArray.intel_ids.iron_ids:
|
||||
self.arch = Intel.Archs.Iron_Lake
|
||||
elif self.device_id in PCIIDArray.intel_ids.sandy_ids:
|
||||
self.arch = Intel.Archs.Sandy_Bridge
|
||||
elif self.device_id in PCIIDArray.intel_ids.ivy_ids:
|
||||
self.arch = Intel.Archs.Ivy_Bridge
|
||||
elif self.device_id in PCIIDArray.intel_ids.haswell_ids:
|
||||
self.arch = Intel.Archs.Haswell
|
||||
elif self.device_id in PCIIDArray.intel_ids.broadwell_ids:
|
||||
self.arch = Intel.Archs.Broadwell
|
||||
elif self.device_id in PCIIDArray.intel_ids.skylake_ids:
|
||||
self.arch = Intel.Archs.Skylake
|
||||
elif self.device_id in PCIIDArray.intel_ids.kaby_lake_ids:
|
||||
self.arch = Intel.Archs.Kaby_Lake
|
||||
elif self.device_id in PCIIDArray.intel_ids.coffee_lake_ids:
|
||||
self.arch = Intel.Archs.Coffee_Lake
|
||||
elif self.device_id in PCIIDArray.intel_ids.ice_lake_ids:
|
||||
self.arch = Intel.Archs.Ice_Lake
|
||||
else:
|
||||
self.arch = Intel.Archs.Unknown
|
||||
|
||||
|
||||
@dataclass
|
||||
class Broadcom(WirelessCard):
|
||||
VENDOR_ID: ClassVar[int] = 0x14E4
|
||||
|
||||
class Chipsets(enum.Enum):
|
||||
# pylint: disable=invalid-name
|
||||
AirportBrcmNIC = "AirportBrcmNIC supported"
|
||||
AirPortBrcm4360 = "AirPortBrcm4360 supported"
|
||||
AirPortBrcm4331 = "AirPortBrcm4331 supported"
|
||||
AirPortBrcm43224 = "AppleAirPortBrcm43224 supported"
|
||||
Unknown = "Unknown"
|
||||
|
||||
chipset: Chipsets = field(init=False)
|
||||
|
||||
def detect_chipset(self):
|
||||
if self.device_id in PCIIDArray.broadcom_ids.AirPortBrcmNIC:
|
||||
self.chipset = Broadcom.Chipsets.AirportBrcmNIC
|
||||
elif self.device_id in PCIIDArray.broadcom_ids.AirPortBrcm4360:
|
||||
self.chipset = Broadcom.Chipsets.AirPortBrcm4360
|
||||
elif self.device_id in PCIIDArray.broadcom_ids.AirPortBrcm4331:
|
||||
self.chipset = Broadcom.Chipsets.AirPortBrcm4331
|
||||
elif self.device_id in PCIIDArray.broadcom_ids.AppleAirPortBrcm43224:
|
||||
self.chipset = Broadcom.Chipsets.AirPortBrcm43224
|
||||
else:
|
||||
self.chipset = Broadcom.Chipsets.Unknown
|
||||
|
||||
|
||||
@dataclass
|
||||
class Atheros(WirelessCard):
|
||||
VENDOR_ID: ClassVar[int] = 0x168C
|
||||
|
||||
class Chipsets(enum.Enum):
|
||||
# pylint: disable=invalid-name
|
||||
# Well there's only one model but
|
||||
AirPortAtheros40 = "AirPortAtheros40 supported"
|
||||
Unknown = "Unknown"
|
||||
|
||||
chipset: Chipsets = field(init=False)
|
||||
|
||||
def detect_chipset(self):
|
||||
if self.device_id in PCIIDArray.atheros_ids.AtherosWifi:
|
||||
self.chipset = Atheros.Chipsets.AirPortAtheros40
|
||||
else:
|
||||
self.chipset = Atheros.Chipsets.Unknown
|
||||
|
||||
|
||||
@dataclass
|
||||
class Computer:
|
||||
real_model: Optional[str] = None
|
||||
real_board_id: Optional[str] = None
|
||||
reported_model: Optional[str] = None
|
||||
reported_board_id: Optional[str] = None
|
||||
gpus: list[GPU] = field(default_factory=list)
|
||||
igpu: Optional[GPU] = None # Shortcut for IGPU
|
||||
dgpu: Optional[GPU] = None # Shortcut for GFX0
|
||||
storage: list[PCIDevice] = field(default_factory=list)
|
||||
wifi: Optional[WirelessCard] = None
|
||||
cpu: Optional[CPU] = None
|
||||
oclp_version: Optional[str] = None
|
||||
opencore_version: Optional[str] = None
|
||||
bluetooth_chipset: Optional[str] = None
|
||||
|
||||
@staticmethod
|
||||
def probe():
|
||||
computer = Computer()
|
||||
computer.gpu_probe()
|
||||
computer.dgpu_probe()
|
||||
computer.igpu_probe()
|
||||
computer.wifi_probe()
|
||||
computer.storage_probe()
|
||||
computer.smbios_probe()
|
||||
computer.cpu_probe()
|
||||
computer.bluetooth_probe()
|
||||
return computer
|
||||
|
||||
def gpu_probe(self):
|
||||
# Chain together two iterators: one for class code 00000300, the other for class code 00800300
|
||||
devices = ioreg.ioiterator_to_list(
|
||||
ioreg.IOServiceGetMatchingServices(
|
||||
ioreg.kIOMasterPortDefault, {"IOProviderClass": "IOPCIDevice", "IOPropertyMatch": [{"class-code": binascii.a2b_hex("00000300")}, {"class-code": binascii.a2b_hex("00800300")}]}, None
|
||||
)[1]
|
||||
)
|
||||
|
||||
for device in devices:
|
||||
vendor: Type[GPU] = PCIDevice.from_ioregistry(device).vendor_detect(inherits=GPU) # type: ignore
|
||||
if vendor:
|
||||
self.gpus.append(vendor.from_ioregistry(device)) # type: ignore
|
||||
ioreg.IOObjectRelease(device)
|
||||
|
||||
def dgpu_probe(self):
|
||||
device = next(ioreg.ioiterator_to_list(ioreg.IOServiceGetMatchingServices(ioreg.kIOMasterPortDefault, ioreg.IOServiceNameMatching("GFX0".encode()), None)[1]), None)
|
||||
if not device:
|
||||
# No devices
|
||||
return
|
||||
|
||||
vendor: Type[GPU] = PCIDevice.from_ioregistry(device).vendor_detect(inherits=GPU) # type: ignore
|
||||
if vendor:
|
||||
self.dgpu = vendor.from_ioregistry(device) # type: ignore
|
||||
ioreg.IOObjectRelease(device)
|
||||
|
||||
def igpu_probe(self):
|
||||
device = next(ioreg.ioiterator_to_list(ioreg.IOServiceGetMatchingServices(ioreg.kIOMasterPortDefault, ioreg.IOServiceNameMatching("IGPU".encode()), None)[1]), None)
|
||||
if not device:
|
||||
# No devices
|
||||
return
|
||||
|
||||
vendor: Type[GPU] = PCIDevice.from_ioregistry(device).vendor_detect(inherits=GPU) # type: ignore
|
||||
if vendor:
|
||||
self.igpu = vendor.from_ioregistry(device) # type: ignore
|
||||
ioreg.IOObjectRelease(device)
|
||||
|
||||
def wifi_probe(self):
|
||||
# result = subprocess.run("ioreg -r -c IOPCIDevice -a -d2".split(), stdout=subprocess.PIPE).stdout.strip()
|
||||
devices = ioreg.ioiterator_to_list(
|
||||
ioreg.IOServiceGetMatchingServices(
|
||||
ioreg.kIOMasterPortDefault,
|
||||
{"IOProviderClass": "IOPCIDevice", "IOPropertyMatch": {"class-code": binascii.a2b_hex(Utilities.hexswap(hex(WirelessCard.CLASS_CODE)[2:].zfill(8)))}},
|
||||
None,
|
||||
)[1]
|
||||
)
|
||||
|
||||
for device in devices:
|
||||
vendor: Type[WirelessCard] = PCIDevice.from_ioregistry(device, anti_spoof=True).vendor_detect(inherits=WirelessCard) # type: ignore
|
||||
if vendor:
|
||||
self.wifi = vendor.from_ioregistry(device, anti_spoof=True) # type: ignore
|
||||
break
|
||||
ioreg.IOObjectRelease(device)
|
||||
|
||||
def storage_probe(self):
|
||||
sata_controllers = ioreg.ioiterator_to_list(
|
||||
ioreg.IOServiceGetMatchingServices(
|
||||
ioreg.kIOMasterPortDefault,
|
||||
{"IOProviderClass": "IOPCIDevice", "IOPropertyMatch": [{"class-code": binascii.a2b_hex(Utilities.hexswap(hex(SATAController.CLASS_CODE)[2:].zfill(8)))}]},
|
||||
None,
|
||||
)[1]
|
||||
)
|
||||
nvme_controllers = ioreg.ioiterator_to_list(
|
||||
ioreg.IOServiceGetMatchingServices(
|
||||
ioreg.kIOMasterPortDefault, {"IOProviderClass": "IONVMeController", "IOParentMatch": {"IOProviderClass": "IOPCIDevice"}, "IOPropertyMatch": {"IOClass": "IONVMeController"}}, None
|
||||
)[1]
|
||||
)
|
||||
for device in sata_controllers:
|
||||
self.storage.append(SATAController.from_ioregistry(device))
|
||||
ioreg.IOObjectRelease(device)
|
||||
for device in nvme_controllers:
|
||||
parent = ioreg.IORegistryEntryGetParentEntry(device, "IOService".encode(), None)[1]
|
||||
ioreg.IOObjectRelease(device)
|
||||
|
||||
aspm: Union[int, bytes] = ioreg.corefoundation_to_native(ioreg.IORegistryEntryCreateCFProperty(parent, "pci-aspm-default", ioreg.kCFAllocatorDefault, ioreg.kNilOptions)) or 0 # type: ignore
|
||||
if isinstance(aspm, bytes):
|
||||
aspm = int.from_bytes(aspm, byteorder="little")
|
||||
|
||||
controller = NVMeController.from_ioregistry(parent)
|
||||
controller.aspm = aspm
|
||||
|
||||
if controller.vendor_id != 0x106B:
|
||||
self.storage.append(controller)
|
||||
|
||||
ioreg.IOObjectRelease(parent)
|
||||
|
||||
def smbios_probe(self):
|
||||
# Reported model
|
||||
entry = next(ioreg.ioiterator_to_list(ioreg.IOServiceGetMatchingServices(ioreg.kIOMasterPortDefault, ioreg.IOServiceMatching("IOPlatformExpertDevice".encode()), None)[1]))
|
||||
self.reported_model = ioreg.corefoundation_to_native(ioreg.IORegistryEntryCreateCFProperty(entry, "model", ioreg.kCFAllocatorDefault, ioreg.kNilOptions)).strip(b"\0").decode() # type: ignore
|
||||
translated = subprocess.run("sysctl -in sysctl.proc_translated".split(), stdout=subprocess.PIPE).stdout.decode()
|
||||
if translated:
|
||||
board = "target-type"
|
||||
else:
|
||||
board = "board-id"
|
||||
self.reported_board_id = ioreg.corefoundation_to_native(ioreg.IORegistryEntryCreateCFProperty(entry, board, ioreg.kCFAllocatorDefault, ioreg.kNilOptions)).strip(b"\0").decode() # type: ignore
|
||||
ioreg.IOObjectRelease(entry)
|
||||
|
||||
# Real model
|
||||
# TODO: We previously had logic for OC users using iMacPro1,1 with incorrect ExposeSensitiveData. Add logic?
|
||||
self.real_model = Utilities.get_nvram("oem-product", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102", decode=True) or self.reported_model
|
||||
self.real_board_id = Utilities.get_nvram("oem-board", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102", decode=True) or self.reported_board_id
|
||||
|
||||
# OCLP version
|
||||
self.oclp_version = Utilities.get_nvram("OCLP-Version", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102", decode=True)
|
||||
self.opencore_version = Utilities.get_nvram("opencore-version", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102", decode=True)
|
||||
|
||||
def cpu_probe(self):
|
||||
self.cpu = CPU(
|
||||
subprocess.run("sysctl machdep.cpu.brand_string".split(), stdout=subprocess.PIPE).stdout.decode().partition(": ")[2].strip(),
|
||||
subprocess.run("sysctl machdep.cpu.features".split(), stdout=subprocess.PIPE).stdout.decode().partition(": ")[2].strip().split(" "),
|
||||
)
|
||||
|
||||
def bluetooth_probe(self):
|
||||
usb_data: str = subprocess.run("system_profiler SPUSBDataType".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()
|
||||
if "BRCM2070 Hub" in usb_data:
|
||||
self.bluetooth_chipset = "BRCM2070 Hub"
|
||||
elif "BRCM2046 Hub" in usb_data:
|
||||
self.bluetooth_chipset = "BRCM2046 Hub"
|
||||
elif "BRCM20702 Hub" in usb_data:
|
||||
self.bluetooth_chipset = "BRCM20702 Hub"
|
||||
elif "Bluetooth":
|
||||
self.bluetooth_chipset = "Generic"
|
||||
253
Resources/ioreg.py
Normal file
@@ -0,0 +1,253 @@
|
||||
# Handle misc CLI menu options
|
||||
# Copyright (C) 2020-2021, Dhinak G
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import NewType, Union
|
||||
import subprocess
|
||||
|
||||
try:
|
||||
import objc
|
||||
except ImportError:
|
||||
subprocess.run(["pip3", "install", "pyobjc"], stdout=subprocess.PIPE)
|
||||
try:
|
||||
import objc
|
||||
except ImportError:
|
||||
raise Exception("Missing PyObjc library!\nPlease run the following before starting OCLP:\npip3 install pyobjc")
|
||||
|
||||
from CoreFoundation import CFRelease, kCFAllocatorDefault # type: ignore # pylint: disable=no-name-in-module
|
||||
from Foundation import NSBundle # type: ignore # pylint: disable=no-name-in-module
|
||||
from PyObjCTools import Conversion
|
||||
|
||||
IOKit_bundle = NSBundle.bundleWithIdentifier_("com.apple.framework.IOKit")
|
||||
|
||||
# pylint: disable=invalid-name
|
||||
io_name_t_ref_out = b"[128c]" # io_name_t is char[128]
|
||||
const_io_name_t_ref_in = b"r*"
|
||||
CFStringRef = b"^{__CFString=}"
|
||||
CFDictionaryRef = b"^{__CFDictionary=}"
|
||||
CFAllocatorRef = b"^{__CFAllocator=}"
|
||||
# pylint: enable=invalid-name
|
||||
|
||||
# https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtTypeEncodings.html
|
||||
functions = [
|
||||
("IORegistryEntryCreateCFProperties", b"IIo^@" + CFAllocatorRef + b"I"),
|
||||
("IOServiceMatching", CFDictionaryRef + b"r*"),
|
||||
("IOServiceGetMatchingServices", b"II" + CFDictionaryRef + b"o^I"),
|
||||
("IOIteratorNext", b"II"),
|
||||
("IORegistryEntryGetParentEntry", b"IIr*o^I"),
|
||||
("IOObjectRelease", b"II"),
|
||||
("IORegistryEntryGetName", b"IIo" + io_name_t_ref_out),
|
||||
("IOObjectGetClass", b"IIo" + io_name_t_ref_out),
|
||||
("IOObjectCopyClass", CFStringRef + b"I"),
|
||||
("IOObjectCopySuperclassForClass", CFStringRef + CFStringRef),
|
||||
("IORegistryEntryGetChildIterator", b"IIr*o^I"),
|
||||
("IORegistryCreateIterator", b"IIr*Io^I"),
|
||||
("IORegistryEntryCreateIterator", b"IIr*Io^I"),
|
||||
("IORegistryIteratorEnterEntry", b"II"),
|
||||
("IORegistryIteratorExitEntry", b"II"),
|
||||
("IORegistryEntryCreateCFProperty", b"@I" + CFStringRef + CFAllocatorRef + b"I"),
|
||||
("IORegistryEntryGetPath", b"IIr*oI"),
|
||||
("IORegistryEntryCopyPath", CFStringRef + b"Ir*"),
|
||||
("IOObjectConformsTo", b"II" + const_io_name_t_ref_in),
|
||||
("IORegistryEntryGetLocationInPlane", b"II" + const_io_name_t_ref_in + b"o" + io_name_t_ref_out),
|
||||
("IOServiceNameMatching", CFDictionaryRef + b"r*"),
|
||||
("IORegistryEntryGetRegistryEntryID", b"IIo^Q"),
|
||||
("IORegistryEntryIDMatching", CFDictionaryRef + b"Q"),
|
||||
("IORegistryEntryFromPath", b"II" + const_io_name_t_ref_in),
|
||||
]
|
||||
|
||||
variables = [("kIOMasterPortDefault", b"I")]
|
||||
|
||||
# pylint: disable=invalid-name
|
||||
pointer = type(None)
|
||||
|
||||
kern_return_t = NewType("kern_return_t", int)
|
||||
boolean_t = int
|
||||
|
||||
io_object_t = NewType("io_object_t", object)
|
||||
io_name_t = bytes
|
||||
io_string_t = bytes
|
||||
|
||||
# io_registry_entry_t = NewType("io_registry_entry_t", io_object_t)
|
||||
io_registry_entry_t = io_object_t
|
||||
io_iterator_t = NewType("io_iterator_t", io_object_t)
|
||||
|
||||
CFTypeRef = Union[int, float, bytes, dict, list]
|
||||
|
||||
IOOptionBits = int
|
||||
mach_port_t = int
|
||||
CFAllocatorType = type(kCFAllocatorDefault)
|
||||
|
||||
NULL = 0
|
||||
|
||||
kIOMasterPortDefault: mach_port_t
|
||||
kNilOptions: IOOptionBits = NULL
|
||||
|
||||
# IOKitLib.h
|
||||
kIORegistryIterateRecursively = 1
|
||||
kIORegistryIterateParents = 2
|
||||
|
||||
# pylint: enable=invalid-name
|
||||
|
||||
|
||||
# kern_return_t IORegistryEntryCreateCFProperties(io_registry_entry_t entry, CFMutableDictionaryRef * properties, CFAllocatorRef allocator, IOOptionBits options);
|
||||
def IORegistryEntryCreateCFProperties(entry: io_registry_entry_t, properties: pointer, allocator: CFAllocatorType, options: IOOptionBits) -> tuple[kern_return_t, dict]: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# CFMutableDictionaryRef IOServiceMatching(const char * name);
|
||||
def IOServiceMatching(name: bytes) -> dict: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# kern_return_t IOServiceGetMatchingServices(mach_port_t masterPort, CFDictionaryRef matching CF_RELEASES_ARGUMENT, io_iterator_t * existing);
|
||||
def IOServiceGetMatchingServices(masterPort: mach_port_t, matching: dict, existing: pointer) -> tuple[kern_return_t, io_iterator_t]: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# io_object_t IOIteratorNext(io_iterator_t iterator);
|
||||
def IOIteratorNext(iterator: io_iterator_t) -> io_object_t: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# kern_return_t IORegistryEntryGetParentEntry(io_registry_entry_t entry, const io_name_t plane, io_registry_entry_t * parent);
|
||||
def IORegistryEntryGetParentEntry(entry: io_registry_entry_t, plane: io_name_t, parent: pointer) -> tuple[kern_return_t, io_registry_entry_t]: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# kern_return_t IOObjectRelease(io_object_t object);
|
||||
def IOObjectRelease(object: io_object_t) -> kern_return_t: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# kern_return_t IORegistryEntryGetName(io_registry_entry_t entry, io_name_t name);
|
||||
def IORegistryEntryGetName(entry: io_registry_entry_t, name: pointer) -> tuple[kern_return_t, bytes]: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# kern_return_t IOObjectGetClass(io_object_t object, io_name_t className);
|
||||
def IOObjectGetClass(object: io_object_t, className: pointer) -> tuple[kern_return_t, bytes]: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# CFStringRef IOObjectCopyClass(io_object_t object);
|
||||
def IOObjectCopyClass(object: io_object_t) -> str: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# CFStringRef IOObjectCopySuperclassForClass(CFStringRef classname)
|
||||
def IOObjectCopySuperclassForClass(classname: str) -> str: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# kern_return_t IORegistryEntryGetChildIterator(io_registry_entry_t entry, const io_name_t plane, io_iterator_t * iterator);
|
||||
def IORegistryEntryGetChildIterator(entry: io_registry_entry_t, plane: io_name_t, iterator: pointer) -> tuple[kern_return_t, io_iterator_t]: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# kern_return_t IORegistryCreateIterator(mach_port_t masterPort, const io_name_t plane, IOOptionBits options, io_iterator_t * iterator)
|
||||
def IORegistryCreateIterator(masterPort: mach_port_t, plane: io_name_t, options: IOOptionBits, iterator: pointer) -> tuple[kern_return_t, io_iterator_t]: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# kern_return_t IORegistryEntryCreateIterator(io_registry_entry_t entry, const io_name_t plane, IOOptionBits options, io_iterator_t * iterator)
|
||||
def IORegistryEntryCreateIterator(entry: io_registry_entry_t, plane: io_name_t, options: IOOptionBits, iterator: pointer) -> tuple[kern_return_t, io_iterator_t]: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# kern_return_t IORegistryIteratorEnterEntry(io_iterator_t iterator)
|
||||
def IORegistryIteratorEnterEntry(iterator: io_iterator_t) -> kern_return_t: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# kern_return_t IORegistryIteratorExitEntry(io_iterator_t iterator)
|
||||
def IORegistryIteratorExitEntry(iterator: io_iterator_t) -> kern_return_t: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# CFTypeRef IORegistryEntryCreateCFProperty(io_registry_entry_t entry, CFStringRef key, CFAllocatorRef allocator, IOOptionBits options);
|
||||
def IORegistryEntryCreateCFProperty(entry: io_registry_entry_t, key: str, allocator: CFAllocatorType, options: IOOptionBits) -> CFTypeRef: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# kern_return_t IORegistryEntryGetPath(io_registry_entry_t entry, const io_name_t plane, io_string_t path);
|
||||
def IORegistryEntryGetPath(entry: io_registry_entry_t, plane: io_name_t, path: pointer) -> tuple[kern_return_t, io_string_t]: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# CFStringRef IORegistryEntryCopyPath(io_registry_entry_t entry, const io_name_t plane)
|
||||
def IORegistryEntryCopyPath(entry: io_registry_entry_t, plane: bytes) -> str: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# boolean_t IOObjectConformsTo(io_object_t object, const io_name_t className)
|
||||
def IOObjectConformsTo(object: io_object_t, className: bytes) -> boolean_t: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# kern_return_t IORegistryEntryGetLocationInPlane(io_registry_entry_t entry, const io_name_t plane, io_name_t location)
|
||||
def IORegistryEntryGetLocationInPlane(entry: io_registry_entry_t, plane: io_name_t, location: pointer) -> tuple[kern_return_t, bytes]: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# CFMutableDictionaryRef IOServiceNameMatching(const char * name);
|
||||
def IOServiceNameMatching(name: bytes) -> dict: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# kern_return_t IORegistryEntryGetRegistryEntryID(io_registry_entry_t entry, uint64_t * entryID)
|
||||
def IORegistryEntryGetRegistryEntryID(entry: io_registry_entry_t, entryID: pointer) -> tuple[kern_return_t, int]: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# CFMutableDictionaryRef IORegistryEntryIDMatching(uint64_t entryID);
|
||||
def IORegistryEntryIDMatching(entryID: int) -> dict: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
# io_registry_entry_t IORegistryEntryFromPath(mach_port_t mainPort, const io_string_t path)
|
||||
def IORegistryEntryFromPath(mainPort: mach_port_t, path: io_string_t) -> io_registry_entry_t: # pylint: disable=invalid-name
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
objc.loadBundleFunctions(IOKit_bundle, globals(), functions) # type: ignore # pylint: disable=no-member
|
||||
objc.loadBundleVariables(IOKit_bundle, globals(), variables) # type: ignore # pylint: disable=no-member
|
||||
|
||||
|
||||
def ioiterator_to_list(iterator: io_iterator_t):
|
||||
# items = []
|
||||
item = IOIteratorNext(iterator) # noqa: F821
|
||||
while item:
|
||||
# items.append(next)
|
||||
yield item
|
||||
item = IOIteratorNext(iterator) # noqa: F821
|
||||
IOObjectRelease(iterator) # noqa: F821
|
||||
# return items
|
||||
|
||||
|
||||
def corefoundation_to_native(collection):
|
||||
if collection is None: # nullptr
|
||||
return None
|
||||
native = Conversion.pythonCollectionFromPropertyList(collection)
|
||||
CFRelease(collection)
|
||||
return native
|
||||
|
||||
|
||||
def native_to_corefoundation(native):
|
||||
return Conversion.propertyListFromPythonCollection(native)
|
||||
|
||||
|
||||
def io_name_t_to_str(name):
|
||||
return name.partition(b"\0")[0].decode()
|
||||
|
||||
|
||||
def get_class_inheritance(io_object):
|
||||
classes = []
|
||||
cls = IOObjectCopyClass(io_object)
|
||||
while cls:
|
||||
# yield cls
|
||||
classes.append(cls)
|
||||
CFRelease(cls)
|
||||
cls = IOObjectCopySuperclassForClass(cls)
|
||||
return classes
|
||||
@@ -1,303 +0,0 @@
|
||||
[
|
||||
{
|
||||
"models": [
|
||||
"MacBook5,1",
|
||||
"MacBook5,2"
|
||||
],
|
||||
"patches": [
|
||||
"WifiBCM94322",
|
||||
"LegacyAudio",
|
||||
"MissingSSE42",
|
||||
"EthernetNvidia",
|
||||
"LegacyGPU"
|
||||
]
|
||||
},
|
||||
{
|
||||
"models": [
|
||||
"MacBook6,1",
|
||||
"MacBook7,1"
|
||||
],
|
||||
"patches": [
|
||||
"WifiBCM943224",
|
||||
"LegacyAudio",
|
||||
"MissingSSE42",
|
||||
"EthernetNvidia",
|
||||
"LegacyGPU"
|
||||
]
|
||||
},
|
||||
{
|
||||
"models": [
|
||||
"MacBookAir2,1",
|
||||
"MacBookAir3,1",
|
||||
"MacBookAir3,2"
|
||||
],
|
||||
"patches": [
|
||||
"WifiBCM94322",
|
||||
"LegacyAudio",
|
||||
"MissingSSE42",
|
||||
"LegacyGPU"
|
||||
]
|
||||
},
|
||||
{
|
||||
"models": [
|
||||
"MacBookAir4,1",
|
||||
"MacBookAir4,2"
|
||||
],
|
||||
"patches": [
|
||||
"WifiBCM94322",
|
||||
"LegacyAudio",
|
||||
"LegacyGPU"
|
||||
]
|
||||
},
|
||||
{
|
||||
"models": [
|
||||
"MacBookAir5,1",
|
||||
"MacBookAir5,2"
|
||||
],
|
||||
"patches": [
|
||||
"WifiBCM94322"
|
||||
]
|
||||
},
|
||||
{
|
||||
"models": [
|
||||
"MacBookPro3,1"
|
||||
],
|
||||
"patches": [
|
||||
"WifiAtheros",
|
||||
"EthernetMarvell",
|
||||
"LegacyAudio",
|
||||
"MissingSSE42",
|
||||
"LegacyGPU"
|
||||
]
|
||||
},
|
||||
{
|
||||
"models": [
|
||||
"MacBookPro4,1"
|
||||
],
|
||||
"patches": [
|
||||
"WifiBCM94328",
|
||||
"EthernetMarvell",
|
||||
"LegacyAudio",
|
||||
"MissingSSE42",
|
||||
"LegacyGPU"
|
||||
]
|
||||
},
|
||||
{
|
||||
"models": [
|
||||
"MacBookPro5,1",
|
||||
"MacBookPro5,2",
|
||||
"MacBookPro5,3",
|
||||
"MacBookPro5,4",
|
||||
"MacBookPro5,5"
|
||||
],
|
||||
"patches": [
|
||||
"WifiBCM94322",
|
||||
"EthernetNvidia",
|
||||
"LegacyAudio",
|
||||
"MissingSSE42",
|
||||
"LegacyGPU"
|
||||
]
|
||||
},
|
||||
{
|
||||
"models": [
|
||||
"MacBookPro6,1",
|
||||
"MacBookPro6,2"
|
||||
],
|
||||
"patches": [
|
||||
"WifiBCM943224",
|
||||
"EthernetBroadcom",
|
||||
"LegacyAudio",
|
||||
"LegacyGPU",
|
||||
"PCIBridge"
|
||||
]
|
||||
},
|
||||
{
|
||||
"models": [
|
||||
"MacBookPro7,1"
|
||||
],
|
||||
"patches": [
|
||||
"WifiBCM94322",
|
||||
"EthernetNvidia",
|
||||
"LegacyAudio",
|
||||
"MissingSSE42",
|
||||
"LegacyGPU"
|
||||
]
|
||||
},
|
||||
{
|
||||
"models": [
|
||||
"MacBookPro8,1",
|
||||
"MacBookPro8,2",
|
||||
"MacBookPro8,3"
|
||||
],
|
||||
"patches": [
|
||||
"WifiBCM94331",
|
||||
"EthernetBroadcom",
|
||||
"LegacyAudio",
|
||||
"LegacyGPU"
|
||||
]
|
||||
},
|
||||
{
|
||||
"models": [
|
||||
"MacBookPro9,1",
|
||||
"MacBookPro9,2",
|
||||
"MacBookPro10,1",
|
||||
"MacBookPro10,2"
|
||||
],
|
||||
"patches": [
|
||||
"WifiBCM94331"
|
||||
]
|
||||
},
|
||||
{
|
||||
"models": [
|
||||
"MacMini3,1",
|
||||
"MacMini4,1"
|
||||
],
|
||||
"patches": [
|
||||
"WifiBCM943224",
|
||||
"EthernetNvidia",
|
||||
"LegacyAudio",
|
||||
"MissingSSE42",
|
||||
"LegacyGPU"
|
||||
]
|
||||
},
|
||||
{
|
||||
"models": [
|
||||
"Macmini5,1",
|
||||
"Macmini5,2",
|
||||
"Macmini5,3"
|
||||
],
|
||||
"patches": [
|
||||
"WifiBCM94331",
|
||||
"EthernetBroadcom",
|
||||
"LegacyAudio",
|
||||
"LegacyGPU"
|
||||
]
|
||||
},
|
||||
{
|
||||
"models": [
|
||||
"MacMini6,1",
|
||||
"MacMini6,2"
|
||||
],
|
||||
"patches": [
|
||||
"WifiBCM94331"
|
||||
]
|
||||
},
|
||||
{
|
||||
"models": [
|
||||
"iMac7,1",
|
||||
"iMac8,1"
|
||||
],
|
||||
"patches": [
|
||||
"WifiBCM94328",
|
||||
"EthernetNvidia",
|
||||
"LegacyAudio",
|
||||
"MissingSSE42",
|
||||
"LegacyGPU"
|
||||
]
|
||||
},
|
||||
{
|
||||
"models": [
|
||||
"iMac9,1"
|
||||
],
|
||||
"patches": [
|
||||
"WifiBCM94322",
|
||||
"EthernetNvidia",
|
||||
"LegacyAudio",
|
||||
"MissingSSE42",
|
||||
"LegacyGPU"
|
||||
]
|
||||
},
|
||||
{
|
||||
"models": [
|
||||
"iMac10,1"
|
||||
],
|
||||
"patches": [
|
||||
"WifiAtheros",
|
||||
"EthernetNvidia",
|
||||
"LegacyAudio",
|
||||
"MissingSSE42",
|
||||
"LegacyGPU"
|
||||
]
|
||||
},
|
||||
{
|
||||
"models": [
|
||||
"iMac11,1",
|
||||
"iMac11,2",
|
||||
"iMac11,3"
|
||||
],
|
||||
"patches": [
|
||||
"WifiAtheros",
|
||||
"EthernetBroadcom",
|
||||
"LegacyAudio",
|
||||
"LegacyGPU",
|
||||
"PCIBridge"
|
||||
]
|
||||
},
|
||||
{
|
||||
"models": [
|
||||
"iMac12,1",
|
||||
"iMac12,2"
|
||||
],
|
||||
"patches": [
|
||||
"WifiAtheros",
|
||||
"EthernetBroadcom",
|
||||
"LegacyAudio",
|
||||
"LegacyGPU"
|
||||
]
|
||||
},
|
||||
{
|
||||
"models": [
|
||||
"iMac13,1",
|
||||
"iMac13,2"
|
||||
],
|
||||
"patches": [
|
||||
"WifiBCM94331"
|
||||
]
|
||||
},
|
||||
{
|
||||
"models": [
|
||||
"iMac14,1",
|
||||
"iMac14,2",
|
||||
"iMac14,3"
|
||||
],
|
||||
"patches": []
|
||||
},
|
||||
{
|
||||
"models": [
|
||||
"MacPro3,1"
|
||||
],
|
||||
"patches": [
|
||||
"WifiAtheros",
|
||||
"LegacyAudio",
|
||||
"MissingSSE42",
|
||||
"SSEEmulator",
|
||||
"DualSocket"
|
||||
]
|
||||
},
|
||||
{
|
||||
"models": [
|
||||
"MacPro4,1"
|
||||
],
|
||||
"patches": [
|
||||
"WifiAtheros",
|
||||
"DualSocket"
|
||||
]
|
||||
},
|
||||
{
|
||||
"models": [
|
||||
"MacPro5,1"
|
||||
],
|
||||
"patches": [
|
||||
"WifiBCM94322",
|
||||
"DualSocket"
|
||||
]
|
||||
},
|
||||
{
|
||||
"models": [
|
||||
"Xserve3,1"
|
||||
],
|
||||
"patches": [
|
||||
"DualSocket"
|
||||
]
|
||||
}
|
||||
]
|
||||
2
after_pyinstaller.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
cp launcher.sh dist/OpenCore-Patcher.app/Contents/MacOS/Launcher
|
||||
14
create-offline-build.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import subprocess
|
||||
from Resources import Constants
|
||||
|
||||
patcher_support_pkg_version = Constants.Constants().patcher_support_pkg_version
|
||||
binary_packages = ["10.14-Mojave", "10.15-Catalina", "11-Big-Sur", "12-Monterey"]
|
||||
|
||||
for binary_package in binary_packages:
|
||||
print(f"- Downloading {binary_package}...")
|
||||
download_cmd = f"curl -LO https://github.com/dortania/PatcherSupportPkg/releases/download/{patcher_support_pkg_version}/{binary_package}.zip"
|
||||
subprocess.run(download_cmd, shell=True)
|
||||
print("- Moving into payloads")
|
||||
move_cmd = f"mv {binary_package}.zip ./payloads/"
|
||||
subprocess.run(move_cmd, shell=True)
|
||||
print("- Download complete")
|
||||
14
docs/.markdownlint.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"default": true,
|
||||
"line_length": false,
|
||||
"no-alt-text": false,
|
||||
"no-inline-html": false,
|
||||
"header-increment": false,
|
||||
"no-duplicate-header": false,
|
||||
"fenced-code-language": false,
|
||||
"no-emphasis-as-heading": false,
|
||||
"single-title": false,
|
||||
"ul-style": {
|
||||
"style": "asterisk"
|
||||
}
|
||||
}
|
||||
10
docs/.markdownlintignore
Normal file
@@ -0,0 +1,10 @@
|
||||
/node_modules/
|
||||
/_book/
|
||||
*.json
|
||||
/extra-files/
|
||||
/.git/
|
||||
/icons/
|
||||
/images/
|
||||
/styles/
|
||||
/.github/
|
||||
/.vuepress/
|
||||
154
docs/.vuepress/config.js
Executable file
@@ -0,0 +1,154 @@
|
||||
const {
|
||||
description
|
||||
} = require('../package')
|
||||
|
||||
module.exports = {
|
||||
title: 'OpenCore Legacy Patcher',
|
||||
head: [
|
||||
['meta', {
|
||||
name: 'theme-color',
|
||||
content: '#3eaf7c'
|
||||
}],
|
||||
['meta', {
|
||||
name: 'apple-mobile-web-app-capable',
|
||||
content: 'yes'
|
||||
}],
|
||||
['meta', {
|
||||
name: 'apple-mobile-web-app-status-bar-style',
|
||||
content: 'black'
|
||||
}],
|
||||
["link", {
|
||||
rel: "'stylesheet",
|
||||
href: "/styles/website.css"
|
||||
},]
|
||||
],
|
||||
base: '/OpenCore-Legacy-Patcher/',
|
||||
|
||||
watch: {
|
||||
$page(newPage, oldPage) {
|
||||
if (newPage.key !== oldPage.key) {
|
||||
requestAnimationFrame(() => {
|
||||
if (this.$route.hash) {
|
||||
const element = document.getElementById(this.$route.hash.slice(1));
|
||||
|
||||
if (element && element.scrollIntoView) {
|
||||
element.scrollIntoView();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
markdown: {
|
||||
extendMarkdown: md => {
|
||||
md.use(require('markdown-it-multimd-table'), {
|
||||
rowspan: true,
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
theme: 'vuepress-theme-succinct',
|
||||
globalUIComponents: [
|
||||
'ThemeManager'
|
||||
],
|
||||
|
||||
themeConfig: {
|
||||
lastUpdated: true,
|
||||
repo: 'https://github.com/dortania/OpenCore-Legacy-Patcher/',
|
||||
docsDir: 'docs',
|
||||
docsBranch: 'main',
|
||||
editLinks: true,
|
||||
editLinkText: 'Help us improve this page!',
|
||||
logo: 'homepage.png',
|
||||
|
||||
sidebar: [{
|
||||
title: 'Introduction',
|
||||
collapsable: false,
|
||||
sidebarDepth: 1,
|
||||
children: [
|
||||
'START',
|
||||
'MODELS',
|
||||
['BENIFITS', 'Benefits and drawbacks'],
|
||||
]
|
||||
|
||||
},
|
||||
{
|
||||
title: 'Setting up',
|
||||
collapsable: false,
|
||||
sidebarDepth: 1,
|
||||
children: [
|
||||
'INSTALLER',
|
||||
'BUILD',
|
||||
]
|
||||
|
||||
},
|
||||
{
|
||||
title: 'Installation',
|
||||
collapsable: false,
|
||||
sidebarDepth: 1,
|
||||
children: [
|
||||
'BOOT',
|
||||
'POST-INSTALL',
|
||||
]
|
||||
|
||||
},
|
||||
{
|
||||
title: 'macOS Monterey',
|
||||
collapsable: false,
|
||||
sidebarDepth: 1,
|
||||
children: [
|
||||
'MONTEREY-DROP',
|
||||
]
|
||||
},
|
||||
{
|
||||
title: 'Misc',
|
||||
collapsable: false,
|
||||
sidebarDepth: 1,
|
||||
children: [
|
||||
'ACCEL',
|
||||
'TROUBLESHOOTING',
|
||||
'DEBUG',
|
||||
'UPDATE',
|
||||
'UNINSTALL',
|
||||
'ICNS',
|
||||
'WINDOWS',
|
||||
]
|
||||
},
|
||||
{
|
||||
title: 'Credit',
|
||||
collapsable: false,
|
||||
sidebarDepth: 1,
|
||||
children: [
|
||||
'DONATE',
|
||||
'LICENSE',
|
||||
]
|
||||
|
||||
},
|
||||
{
|
||||
title: 'Documentation',
|
||||
collapsable: false,
|
||||
sidebarDepth: 1,
|
||||
children: [
|
||||
'TESTED',
|
||||
'TERMS',
|
||||
'HOW',
|
||||
'PATCHEXPLAIN',
|
||||
'CLI',
|
||||
]
|
||||
|
||||
},
|
||||
],
|
||||
},
|
||||
plugins: [
|
||||
'@vuepress/plugin-back-to-top',
|
||||
'vuepress-plugin-smooth-scroll',
|
||||
['vuepress-plugin-medium-zoom',
|
||||
{
|
||||
selector: "img",
|
||||
options: {
|
||||
background: 'var(--bodyBgColor)'
|
||||
}
|
||||
}],
|
||||
]
|
||||
}
|
||||
BIN
docs/.vuepress/public/favicon.ico
Normal file
|
After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 270 KiB After Width: | Height: | Size: 270 KiB |
49
docs/.vuepress/styles/index.styl
Executable file
@@ -0,0 +1,49 @@
|
||||
/**
|
||||
* Custom Styles here.
|
||||
*
|
||||
* ref:https://v1.vuepress.vuejs.org/config/#index-styl
|
||||
*/
|
||||
|
||||
[data-theme='light']
|
||||
--sideBgColor $sideBgColor
|
||||
|
||||
[data-theme='dark']
|
||||
--sideBgColor $sideBgColorDark
|
||||
--dropShadowColor $dropShadowColor
|
||||
|
||||
.home .hero img
|
||||
max-width 450px!important
|
||||
|
||||
.navbar
|
||||
filter drop-shadow(0px 1px 1px var(--dropShadowColor))
|
||||
|
||||
.sidebar
|
||||
background-color var(--sideBgColor)
|
||||
|
||||
div[class*="language-"]
|
||||
pre, pre[class*="language-"]
|
||||
margin-top 0
|
||||
|
||||
html {
|
||||
overflow-y: scroll;
|
||||
overflow-x: hidden;
|
||||
background-color: unset;
|
||||
}
|
||||
::-webkit-scrollbar {
|
||||
width 0px
|
||||
background transparent /* make scrollbar transparent */
|
||||
}
|
||||
|
||||
tr
|
||||
&:nth-child(1n)
|
||||
background-color var(--bodyBgColor)
|
||||
&:nth-child(2n)
|
||||
background-color var(--sideBgColor)
|
||||
|
||||
|
||||
|
||||
.dropdown-wrapper .nav-dropdown
|
||||
border 1px solid var(--sideBgColor)!important
|
||||
background-color var(--sideBgColor)!important
|
||||
box-shadow 0px 0px 2px var(--bodyBgColor)
|
||||
right -12%!important
|
||||
23
docs/.vuepress/styles/palette.styl
Executable file
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* Custom palette here.
|
||||
*
|
||||
* ref:https://v1.vuepress.vuejs.org/zh/config/#palette-styl
|
||||
*/
|
||||
|
||||
$bodyFontSize = 16px
|
||||
$fallbackTheme = 'dark'
|
||||
$dropShadowColor = #111112
|
||||
|
||||
// Light Theme
|
||||
$accentColor = #19b3e7
|
||||
$textColor = #2c3e50
|
||||
$bodyBgColor = #fff
|
||||
$sideBgColor = #fff
|
||||
$badgeTipColor = #caf2ff
|
||||
|
||||
// Dark Theme
|
||||
$accentColorDark = #30BCD5
|
||||
$textColorDark = #ccc
|
||||
$bodyBgColorDark = #2d3033
|
||||
$sideBgColorDark = #363b40
|
||||
$badgeTipColorDark = #023e52
|
||||
138
docs/ACCEL.md
Normal file
@@ -0,0 +1,138 @@
|
||||
# Working Around Legacy Acceleration Issues
|
||||
|
||||
* [Downloading older non-Metal Apps](#downloading-older-non-metal-apps)
|
||||
* [Unable to run Zoom](#unable-to-run-zoom)
|
||||
* [Unable to grant special permissions to apps (ie. Camera Access to Zoom)](#unable-to-grant-special-permissions-to-apps-ie-camera-access-to-zoom)
|
||||
* [Keyboard Backlight broken](#keyboard-backlight-broken)
|
||||
* [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)
|
||||
* [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)
|
||||
* [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)
|
||||
|
||||
The below page is for users experiencing issues with their overall usage of macOS Big Sur and the Legacy Graphics Acceleration patches. Note that the following GPUs currently do not have acceleration support in Big Sur:
|
||||
|
||||
* Intel 3rd and 4th Gen - GMA series
|
||||
|
||||
For those unfamiliar with what is considered a non-Metal GPU, see below chart:
|
||||
|
||||
::: details macOS GPU Chart
|
||||
|
||||
| Graphics Vendor | Architecture | Series | Supports Metal |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| ATI | TeraScale 1 | HD2000 - HD4000 | <span style="color:red">No</span> |
|
||||
| ^^ | TeraScale 2 | HD5000 - HD6000 | ^^ |
|
||||
| AMD | GCN (and newer) | HD7000+ | <span style="color:green">Yes</span> |
|
||||
| Nvidia | Tesla | 8000GT - GT300 | <span style="color:red">No</span> |
|
||||
| ^^ | Fermi | GT400 - GT500 | ^^ |
|
||||
| ^^ | Kepler | GT600 - GT700 | <span style="color:green">Yes</span> |
|
||||
| Intel | GMA | GMA900 - GMA3000 | <span style="color:red">No</span> |
|
||||
| ^^ | Iron Lake | HD series | ^^ |
|
||||
| ^^ | Sandy Bridge | HD3000 | ^^ |
|
||||
| ^^ | Ivy Bridge (and newer) | HD4000 | <span style="color:green">Yes</span> |
|
||||
|
||||
:::
|
||||
|
||||
Additionally we currently do not have macOS Monterey acceleration patches for non-Metal Macs. We recommend users either upgrade their Macs with a Metal GPU or remain on Big Sur until further development
|
||||
|
||||
::: details Why there's no non-Metal patches for Monterey
|
||||
|
||||
With macOS Monterey, please understand our current legacy acceleration patch sets are no longer functional. As of right now, only basic framebuffer and brightness control may be achieved, however proper animations and hardware acceleration is not available.
|
||||
|
||||
This is due to numerous changes with Skylight and other macOS frameworks relying more and more on Metal functions and thus making it even more difficult to re-add legacy OpenGL support.
|
||||
|
||||
> When can we expect acceleration support
|
||||
|
||||
For the time being, please understand we cannot predict when there will be patch sets ready. Note that it took over 300 days from Big Sur's unveiling to achieve public acceleration for non-Metal GPUs. And with TeraScale 2 acceleration, this took almost 3 years to achieve public acceleration.
|
||||
|
||||
So please be patient as developers are hard at work, however please expect no acceleration support in Monterey until next year at the minimum if not even later.
|
||||
|
||||
:::
|
||||
|
||||
## Downloading older non-Metal Apps
|
||||
|
||||
Many Apple apps now have direct reliance on Metal for proper functioning, however legacy builds of these apps still do work in Big Sur. See below for archive of many apps such as Pages, iMovie, GarageBand.
|
||||
|
||||
* [Apple Apps for Non-Metal Macs](https://archive.org/details/apple-apps-for-non-metal-macs)
|
||||
|
||||
Note: This archive assumes that you own these copies of these apps through the Mac App Store, Dortania does not condone piracy
|
||||
|
||||
## Unable to run Zoom
|
||||
|
||||
Currently Zoom relies partially on Metal and so needs a small binary patch. Dosdude1 has provided a nice script for this:
|
||||
|
||||
* [Zoom Non-Metal Fix](http://dosdude1.com/catalina/zoomnonmetal-new.command.zip)
|
||||
|
||||
## Unable to grant special permissions to apps (ie. Camera Access to Zoom)
|
||||
|
||||
With version 0.2.5, this issue should be full resolved
|
||||
|
||||
::: details 0.2.4 and older Work-Around
|
||||
|
||||
Due to the usage of `amfi_get_out_of_my_way=1`, macOS will fail to prompt users for special permissions upon application start as well as omit the entires in System Preferences. To work around this, we recommend users install [tccplus](https://github.com/jslegendre/tccplus) to manage permissions.
|
||||
|
||||
Example usage with Discord and microphone permissions:
|
||||
|
||||
```sh
|
||||
# Open Terminal and run the following commands
|
||||
cd ~/Downloads/
|
||||
chmod +x tccplus
|
||||
./tccplus add Microphone com.hnc.Discord
|
||||
```
|
||||
|
||||
For those who may experience issues with `tccplus`, you can manually patch `com.apple.TCC` to add permissions:
|
||||
|
||||
```sh
|
||||
# get app id (Zoom.us used in example):
|
||||
$ osascript -e 'id of app "zoom.us"'
|
||||
# output: us.zoom.xos
|
||||
|
||||
$ sudo sqlite3 ~/Library/Application\ Support/com.apple.TCC/TCC.db "INSERT or REPLACE INTO access VALUES('kTCCServiceMicrophone','us.zoom.xos',0,2,0,1,NULL,NULL,NULL,'UNUSED',NULL,0,1541440109);"
|
||||
|
||||
$ sudo sqlite3 ~/Library/Application\ Support/com.apple.TCC/TCC.db "INSERT or REPLACE INTO access VALUES('kTCCServiceCamera','us.zoom.xos',0,2,0,1,NULL,NULL,NULL,'UNUSED',NULL,0,1541440109);"
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
## Keyboard Backlight broken
|
||||
|
||||
Due to forcing `hidd` into spinning up with the fallback mode enabled, this can break the OS's recognition of backlight keyboards. Thankfully the drivers themselves still do operate so applications such as [LabTick](https://www.macupdate.com/app/mac/22151/lab-tick) are able to set the brightness manually.
|
||||
|
||||
## Photos and Maps Apps Heavily Distorted
|
||||
|
||||
Due to the Metal Backend, the enhanced color output of these apps seems to heavily break overall UI usage. To work around this, [users reported](https://forums.macrumors.com/threads/macos-11-big-sur-on-unsupported-macs-thread.2242172/post-29870324) forcing the color output of their monitor from Billions to Millions of colors helped greatly. Apps easily allowing this customization are [SwitchResX](https://www.madrau.com), [ResXreme](https://macdownload.informer.com/resxtreme/) and [EasyRes](http://easyresapp.com).
|
||||
|
||||
## Cannot press "Done" when editing a Sidebar Widget
|
||||
|
||||
To work around this, simply press Tab to hover over and press spacebar to simulate a click.
|
||||
|
||||
## Wake from sleep heavily distorted on AMD/ATI in macOS 11.3 and newer
|
||||
|
||||
Unfortunately a very well known issue the community is investigating, current known solution is to simply downgrade to 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
|
||||
|
||||
* Note, this issue should be exclusive to TeraScale 1 GPUs (ie. HD2000-4000). TeraScale 2 GPUs should not exhibit this issue
|
||||
|
||||
In the event Apple removes 11.2.3 from their catalogue, we've provided a mirror below:
|
||||
|
||||
* [Install macOS 11.2.3 20D91](https://archive.org/details/install-mac-os-11.2.3-20-d-91)
|
||||
|
||||
## 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.
|
||||
|
||||
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:
|
||||
|
||||
```sh
|
||||
nvram FA4CE28D-B62F-4C99-9CC3-6815686E30F9:gpu-power-prefs=%01%00%00%00
|
||||
```
|
||||
|
||||
This will disable the dGPU and allow the iGPU to function in Big Sur. Note that external display outputs are directly routed to the dGPU and therefore can no longer be used. Solutions such as a [DisplayLink Adapters](https://www.displaylink.com/products/usb-adapters) can work around this limitation in theory. However, currently the proprietary DisplayLink driver refuses to function on legacy-patched systems, either resulting in a windowserver crash loop or no output at all.
|
||||
|
||||
## Erratic Colours on ATI TeraScale 2 GPUs (HD5000/HD6000)
|
||||
|
||||
Due to an odd bug with ATI's TeraScale 2 GPUs, many users will experience erratic/strobing colours once finished installing and rebooting into the accelerated patches. The issue stems from an incorrect assumption in the GPU drivers where it will enforce the Billion Colour space on your display. To fix, simply force your Display into a lower color depth such as a Million Colours.
|
||||
|
||||
Applications that can set color depth are:
|
||||
|
||||
* [SwitchResX](https://www.madrau.com)
|
||||
* [ResXtreme](https://macdownload.informer.com/resxtreme/)
|
||||
24
docs/BENIFITS.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# Benefits and Drawbacks between OpenCore Legacy Patcher and other patchers
|
||||
|
||||
With OpenCore Legacy Patcher we recommend users go through the below table to understand what the benefits and drawbacks are compared to other patchers. There are positive and negatives to each and we feel transparency is most important when patching another users machine. There should be no grey areas where users may be mislead.
|
||||
|
||||
* Note: [Patched Sur](https://github.com/BenSova/Patched-Sur) and [MicropatcherAutomator](https://github.com/moosethegoose2213/automator-for-barrykn-micropatcher) are iterations of [BarryKN's micropatcher](https://github.com/barrykn/big-sur-micropatcher) and therefore share many of the same benefits and limitations. Patched Sur is used for this comparison as it's the most common form of BarryKN's patcher users will find.
|
||||
|
||||
| Features | [OpenCore Legacy Patcher](https://github.com/dortania/OpenCore-Legacy-Patcher/) | [Patched Sur](https://github.com/BenSova/Patched-Sur) |
|
||||
| :--- | :--- | :--- |
|
||||
| Over The Air Updates | <span style="color:#30BCD5">Native System Preferences, additionally supports Deltas (~2GB) for Metal GPUs</span> | <span style="color:red">Inside Patcher Sur app (~12GB), only available when InstallAssistants release.</span> InstallAssistants generally available same day as System Preference updates, however developer betas will lag behind by 1 day compared to OTAs |
|
||||
| FileVault | <span style="color:#30BCD5">Fully supported on all machines</span> | <span style="color:red">Not supported</span> |
|
||||
| System Integrity Protection | <span style="color:#30BCD5">Fully enabled on Metal GPUs</span> | <span style="color:red">Disabled for early 2013 and older during the patching process and first boot afterwards, otherwise enabled</span> |
|
||||
| APFS Snapshots | <span style="color:#30BCD5">Fully enabled</span> | <span style="color:red">Disabled</span> |
|
||||
| User facing | <span style="color:red">TUI interface</span> | <span style="color:#30BCD5">SwiftUI interface, more user friendly</span> |
|
||||
| Supported OSes | <span style="color:#30BCD5">10.7-11</span> | <span style="color:red">10.15-11</span> |
|
||||
| Firmware Patching | <span style="color:#30BCD5">None required</span> | <span style="color:red">Required for models without native APFS support</span> |
|
||||
| BootCamp Switching | <span style="color:red">Requires EFI Conversion for Start Disk support, otherwise still supported</span> | <span style="color:#30BCD5">Native</span> |
|
||||
| Non-Metal GPU Acceleration | <span style="color:#30BCD5">In active development</span>, see Acceleration Progress Tracker: [Link](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108) | <span style="color:red">Currently not researching</span> |
|
||||
| El Capitan-era Wifi cards | <span style="color:#30BCD5">Supported</span> | <span style="colorred">Not supported</span> |
|
||||
| WPA Wireless Support | <span style="color:#30BCD5">Supported</span> | <span style="color:red">Minority may experience issues on early 2013 and older Models</span> |
|
||||
| Personal Hotspot Support | <span style="color:#30BCD5">Native</span> | <span style="color:red">Often requires extra steps to achieve on early 2013 and older Models</span> |
|
||||
| HEVC/H.265 Support for Mac Pros and iMacs with Polaris+ GPUs | <span style="color:#30BCD5">Supported</span> | <span style="color:red">Not supported</span> |
|
||||
| Big Sur-styled Boot Picker | <span style="color:#30BCD5">Available</span>, though as a shim to the original boot picker | <span style="color:red">Not available</span> |
|
||||
| Hibernation Support | <span style="color:#30BCD5">Supports 3rd party SATA SSDs on 2011 and older models in addition to stock drives</span> | <span style="color:red">Only supports stock drives on 2011 and older models</span> |
|
||||
| Sidecar Support | <span style="color:#30BCD5">Supports any Mac with Metal Intel iGPU</span>, artifacting way exhibited on high movement screen content | <span style="color:red">Not supported at all</span> |
|
||||
21
docs/BOOT.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# Booting OpenCore and macOS
|
||||
|
||||
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):
|
||||
|
||||
* This will be the Mac Boot Picker
|
||||
|
||||

|
||||
|
||||
Now that you've loaded OpenCore, now select Install macOS!:
|
||||
|
||||
* This will be the OpenCore Picker
|
||||
|
||||

|
||||
|
||||
After plenty of verbose booting, you will reach the installer 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)
|
||||
|
||||
# Once installed and booting, head to [Post-Installation](./POST-INSTALL.md)
|
||||
36
docs/BUILD.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# Building and installing OpenCore
|
||||
|
||||
Now that we have a macOS installer, lets now build our OpenCore configuration!
|
||||
|
||||
First Download the latest release:
|
||||
|
||||
* [OpenCore Legacy Patcher Releases](https://github.com/dortania/Opencore-Legacy-Patcher/releases)
|
||||
|
||||
Next, run the `OpenCore-Patcher.app`:
|
||||
|
||||

|
||||
|
||||
From here you have a couple important options:
|
||||
|
||||
* Build OpenCore
|
||||
* Install OpenCore to USB/internal drive
|
||||
* Change Model
|
||||
* Patcher Settings
|
||||
|
||||
If you're patching for a different machine than you're running, please select "Change Model" and enter the updated SMBIOS. For more advanced users, you may also tweak the patcher's build settings via "Patcher Settings"
|
||||
|
||||
Now lets enter "Build OpenCore":
|
||||
|
||||

|
||||
|
||||
The process should be quite quick to build, once finished you'll be plopped back to the main menu.
|
||||
|
||||
Next lets run `Install OpenCore to USB/internal drive`:
|
||||
|
||||
| Select Drive | Select EFI/FAT32 Partition |
|
||||
| :--- | :--- |
|
||||
|  |  |
|
||||
|
||||
* If you have issues, please ensure you install OpenCore onto a FAT32 partition to ensure your Mac is able to boot it. You will need to format your drive as GUID/GPT in Disk Utility
|
||||
|
||||
# Once finished, head to [Booting OpenCore and macOS](./BOOT.md)
|
||||
41
docs/CLI.md
Normal file
@@ -0,0 +1,41 @@
|
||||
# Command Line Args
|
||||
|
||||
With OpenCore Legacy Patcher, we include an extra binary called [OCLP-CLI](https://github.com/dortania/OpenCore-Legacy-Patcher/releases/). The purpose of this binary is to easily run our OpenCore build process for other programs to hook onto. Below is documentation on currently supported arguments.
|
||||
|
||||
### Build Arguments
|
||||
|
||||
* **--build**: Build OpenCore
|
||||
* **--model xxxx**: override default model detection
|
||||
* ex. **--model iMac11,2**
|
||||
* **--metal_gpu xxxx**: override default GPU detection (ie. Nvidia, AMD)
|
||||
* **--metal_gpu Nvidia**
|
||||
* **--smbios_spoof xxxx**: set spoofing mode, defaults to Minimal if no arg provided (ie. Minimal, Moderate, Advanced)
|
||||
* ex. **--smbios_spoof Moderate**
|
||||
* **--verbose**: enable verbose booting
|
||||
* **--debug_oc**: enable debug OpenCore
|
||||
* **--debug_kext**: enable debug kexts
|
||||
* **--skip_wifi**: skip wifi patch
|
||||
* **--hide_picker**: hide OpenCore's picker
|
||||
* **--disable_sip**: disables SIP
|
||||
* **--disable_smb**: disables SecureBootModel
|
||||
* **--vault**: enable OpenCore vaulting
|
||||
|
||||
Example usage:
|
||||
|
||||
```bash
|
||||
./OCLP-CLI --build --verbose --debug_oc --debug_kext --model iMac11,2
|
||||
```
|
||||
|
||||
Note, when building OpenCore the output folder will be next to the OCLP binary as OpenCore-RELEASE or OpenCore-DEBUG folder.
|
||||
|
||||
### Patch System Arguments
|
||||
|
||||
* **--patch_sys_vol**: patches root volume with detected hardware
|
||||
|
||||
Example usage:
|
||||
|
||||
```bash
|
||||
sudo ./OCLP-CLI --patch_sys_vol
|
||||
```
|
||||
|
||||
Note, root volume patching needs to be run as sudo
|
||||
48
docs/DEBUG.md
Normal file
@@ -0,0 +1,48 @@
|
||||
# How to debug with OpenCore
|
||||
|
||||
For those who've hit an odd bug and unsure if it's user error or patcher, the below will tell you how to get more verbose debug information as well as logs to help [file issues with us](https://github.com/dortania/OpenCore-Legacy-Patcher/issues)
|
||||
|
||||
* For users who are less experienced, we recommend asking on the [OpenCore Patcher Paradise Discord Server](https://discord.gg/rqdPgH8xSN) for help.
|
||||
|
||||
## Debugging yourself
|
||||
|
||||
The easiest way to debug yourself is via Patcher Settings. Here there are many different settings however the 3 main options that will help are:
|
||||
|
||||
* "Enable Verbose Mode"
|
||||
* "Enable OpenCore DEBUG"
|
||||
* "Enable Kext DEBUG"
|
||||
|
||||
When you've enabled these 3 options, rebuild OpenCore and install to your drive. This will provide much greater debug information as well as write logs to the EFI Partition.
|
||||
|
||||
## 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):
|
||||
|
||||

|
||||
|
||||
Once you've mounted the EFI Partition of the drive you have macOS on, you should see some nice logs:
|
||||
|
||||

|
||||
|
||||
## Obtaining Kernel logs from macOS
|
||||
|
||||
With "Enable Kext DEBUG" set, every boot will now have much more detailed logs stored in the OS. To get these logs, simply run the below command:
|
||||
|
||||
```sh
|
||||
sudo dmesg > ~/Desktop/DMESG.txt
|
||||
```
|
||||
|
||||
From there, you'll have a log on your desktop.
|
||||
|
||||
## Filing an issue with us
|
||||
|
||||
Now that you have proper logs, you can now [file issues with us](https://github.com/dortania/OpenCore-Legacy-Patcher/issues). Reminder we want the following info:
|
||||
|
||||
* Model patching for (ie. MacBookPro10,1)
|
||||
* Target OS (ie. macOS 11.2.3)
|
||||
* Host OS (ie. macOS 10.15.7)
|
||||
* Upload of your OpenCore Build Folder
|
||||
* Upload of your OpenCore 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.
|
||||
35
docs/DONATE.md
Normal file
@@ -0,0 +1,35 @@
|
||||
# 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.
|
||||
|
||||
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.
|
||||
|
||||
Main sections of help we'd appreciate:
|
||||
|
||||
* Donating any Mac you own
|
||||
* Does require SSE4,1 CPU to test on Sierra and newer however
|
||||
* Donating any spare SATA SSDs
|
||||
* Having extra SSDs on hand allows us to quickly and easily test specific builds of macOS without having to wipe drives and reinstall as much
|
||||
* Aiding by buying items in our Amazon Wishlist
|
||||
* Currently we have a few members within Dortania testing so we recommend messaging the email listed below to see which member at the time would require something purchased the most
|
||||
|
||||
Additionally, hardware info dumps are greatly beneficial for us to determine what patches a machine might need:
|
||||
|
||||
* [IORegistryExplorer](https://github.com/khronokernel/IORegistryClone/blob/master/ioreg-210.zip?raw=true)
|
||||
* `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
|
||||
|
||||
If you have any legacy hardware you're willing to donate or what to buy us something, please contact us at the following email:
|
||||
|
||||
* khronokernel@icloud.com
|
||||
|
||||
Current hardware we own:
|
||||
|
||||
| Model | CPU | GPU | Owner | Notes |
|
||||
| :--- | :--- | :--- | :--- | :--- |
|
||||
| MacBook7,1 | Penryn | GT320M | Dhinak | N/A |
|
||||
| MacBook7,1 | Penryn | GT320M | Mykola | N/A |
|
||||
| MacBookPro5,3 | Penryn | 9400M + 9600M | Dhinak | Display's partially broken |
|
||||
| Macmini4,1 | Penryn | GT320M | Dhinak | N/A |
|
||||
| iMac11,2 | Clarksdale | HD4670 | Mykola | N/A |
|
||||
| MacPro3,1 | Penryn | HD5770, RX570, GT710 | Mykola | N/A |
|
||||
9
docs/HOW.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# 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.
|
||||
|
||||
## 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:
|
||||
|
||||

|
||||
103
docs/ICNS.md
Normal file
@@ -0,0 +1,103 @@
|
||||
# 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.
|
||||
|
||||
* [Custom OpenCore icons](#custom-opencore-icons)
|
||||
* [Custom Mac Boot Picker icons](#custom-mac-boot-picker-icons)
|
||||
* [Installing updated icons](#installing-updated-icons)
|
||||
|
||||
# Custom OpenCore icons
|
||||
|
||||
To generate custom OpenCore icons, you'll need the following:
|
||||
|
||||
* Images in PNG format
|
||||
* Each image, with the following res:
|
||||
* Cursor — Mouse cursor (mandatory, up to 144x144).
|
||||
* Selected — Selected item (mandatory, 144x144).
|
||||
* Selector — Selecting item (mandatory, up to 144x40).
|
||||
* Left — Scrolling left (mandatory, 40x40).
|
||||
* Right — Scrolling right (mandatory, 40x40).
|
||||
* HardDrive — Generic OS (mandatory, 128x128).
|
||||
* Background — Centred background image. (Recommended max size 1920x1080)
|
||||
* Apple — Apple OS (128x128).
|
||||
* AppleRecv — Apple Recovery OS (128x128).
|
||||
* AppleTM — Apple Time Machine (128x128).
|
||||
* Windows — Windows (128x128).
|
||||
* Other — Custom entry (see [Entries](https://dortania.github.io/docs/latest/Configuration.html), 128x128).
|
||||
* ResetNVRAM — Reset NVRAM system action or tool (128x128).
|
||||
* Shell — Entry with UEFI Shell name for e.g. OpenShell (128x128).
|
||||
* Tool — Any other tool (128x128).
|
||||
|
||||
Note, for each image we recommend having one of double the size. This ensures that icons are scaled correctly since .icns support dedicated images depending on HiDPI or not.
|
||||
|
||||
Once you have a custom image you want to use(for example, as a background), download the [latest release of OpenCorePkg](https://github.com/acidanthera/OpenCorePkg/releases) and enter the `Utilities/icnspack/` folder:
|
||||
|
||||

|
||||
|
||||
Now `cd` this folder in terminal and run the following:
|
||||
|
||||
```sh
|
||||
./icnspack Background.icns <insert_x1_image> <insert_x2_image>
|
||||
```
|
||||
|
||||
Once done, you'll see your custom icon generated in `icnspack`'s folder:
|
||||
|
||||

|
||||
|
||||
# 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.
|
||||
|
||||
To generate legacy icons, you'll need the following:
|
||||
|
||||
* A machine running macOS 10.4 through 10.11
|
||||
* Icon Composer.app (Requires Apple Developer Account for official download)
|
||||
* Users without the developer account can find a mirrors here:
|
||||
* [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)
|
||||
* PNG Image you wish to convert
|
||||
|
||||
Head to [developer.apple's More Downloads page](https://developer.apple.com/download/more/) and search for `Graphics Tools` that is supported by your OS(note for 10.6 and older, the app is hidden inside `Developer Tools`):
|
||||
|
||||

|
||||
|
||||
Once downloaded, open the disk image and you'll find Icon Composer.app:
|
||||
|
||||

|
||||
|
||||
Now run the app and simply drag the images to each section as so:
|
||||
|
||||

|
||||
|
||||
Now save and export the new icns
|
||||
|
||||
# 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.
|
||||
|
||||
* <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:
|
||||
|
||||

|
||||
|
||||
Select the drive you installed OpenCore to and mount it.
|
||||
|
||||
* [Updating OpenCore icons](#updating-opencore-icons)
|
||||
* [Updating Mac Boot Picker icons](#updating-mac-boot-picker-icons)
|
||||
|
||||
### Updating OpenCore icons
|
||||
|
||||
Head to `EFI/OC/Resources/Image/` on your drive and you'll see all the custom icons. For Background.icns, we need to ensure the file matches the theme OpenCore has set so we add the prefix `Modern` to it:
|
||||
|
||||

|
||||
|
||||
Now reboot and you should see your updated icon(s)!
|
||||
|
||||
### 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`
|
||||
|
||||

|
||||
|
||||
Now reboot and you'll see the new icon!
|
||||
59
docs/INSTALLER.md
Normal file
@@ -0,0 +1,59 @@
|
||||
# Download and build macOS Installers
|
||||
|
||||
* [Downloading](#downloading)
|
||||
* [Building](#building)
|
||||
|
||||
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.
|
||||
|
||||
* Note: 16GB+ USB will be required for the installer
|
||||
|
||||
## Downloading
|
||||
|
||||
The simplest way to download macOS installs would be to use installinstallmacos:
|
||||
|
||||
```sh
|
||||
[ ! -d ~/macOS-installer/ ] && mkdir ~/macOS-installer; cd ~/macOS-installer; [ ! -f ~/macOS-installer/installinstallmacos.py ] && curl -O https://raw.githubusercontent.com/munki/macadmin-scripts/main/installinstallmacos.py ; sudo python installinstallmacos.py
|
||||
```
|
||||
|
||||
* Note: On El Capitan (10.11) and older, you'll need to specify a catalog at the end of the command:
|
||||
|
||||
```
|
||||
--catalogurl https://swscan.apple.com/content/catalogs/others/index-11-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog
|
||||
```
|
||||
|
||||

|
||||
|
||||
As you can see, we get a nice list of macOS installers. If you need a particular versions of macOS, you can select it by typing the number next to it. For this example we'll choose 10:
|
||||
|
||||

|
||||
|
||||
This is going to take a while as we're downloading the entire 12GB+ macOS installer.
|
||||
|
||||
Once finished, you'll find in your `~/macOS-Installer/` folder a DMG containing the macOS Installer, called `Install_macOS_11.1-20C69.dmg` for example. Mount it and you'll find the installer application.
|
||||
|
||||
* Note: We recommend to move the Install macOS.app into the `/Applications` folder, as we'll be executing commands from there.
|
||||
* Note 2: Running Cmd+Shift+G in Finder will allow you to easily jump to `~/macOS-installer`
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## Building
|
||||
|
||||
Now we'll be formatting the USB to prep for both the macOS installer and OpenCore. We'll want to use macOS Extended (HFS+) with a GUID partition map(Using GUID is important for the patcher). This will create two partitions: the main `MyVolume` and a second called `EFI` which is used as a boot partition where your Mac's firmware will check for boot files. `EFI` partitions will be hidden by default, so don't worry if you don't immediately see them.
|
||||
|
||||
* Note: By default, Disk Utility only shows partitions – press Cmd/Win+2 to show all devices (alternatively you can press the View button)
|
||||
|
||||

|
||||
|
||||
Next run the `createinstallmedia` command provided by [Apple](https://support.apple.com/en-us/HT201372). Note that the command is made for USB's formatted with the name `MyVolume`:
|
||||
|
||||
```sh
|
||||
sudo /Applications/Install\ macOS\ Big\ Sur.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume
|
||||
```
|
||||
|
||||
* Note: You can also replace the `createinstallmedia` path with that of where your installer's located (same idea with the drive name).
|
||||
|
||||

|
||||
|
||||
# Once finished, head to [Building and installing OpenCore](./BUILD.md)
|
||||
BIN
docs/Icon-Composer-10.11.zip
Normal file
BIN
docs/Icon-Composer-10.6.zip
Normal file
21
docs/LICENSE.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# OpenCore Legacy Patcher Licence
|
||||
|
||||
This patcher is made of multiple external applications from different people and organizations. See each program for their licensing:
|
||||
|
||||
* BSD 3-Clause "New" or "Revised" License
|
||||
* [OpenCorePkg](https://github.com/acidanthera/OpenCorePkg/blob/master/LICENSE.txt)
|
||||
* [Lilu](https://github.com/acidanthera/Lilu/blob/master/LICENSE.txt)
|
||||
* [WhateverGreen](https://github.com/acidanthera/WhateverGreen/blob/master/LICENSE.txt)
|
||||
* [AirportBrcmFixup](https://github.com/acidanthera/AirportBrcmFixup/blob/master/LICENSE.txt)
|
||||
* [CPUFriend](https://github.com/acidanthera/CPUFriend/blob/master/LICENSE)
|
||||
* [RestrictEvents](https://github.com/acidanthera/RestrictEvents/blob/master/LICENSE.txt)
|
||||
* [FeatureUnlock](https://github.com/acidanthera/FeatureUnlock/blob/master/LICENSE.txt)
|
||||
* [Innie](https://github.com/cdf/Innie/blob/master/LICENSE.txt)
|
||||
* GPL 2.0
|
||||
* [NVMeFix](https://github.com/acidanthera/NVMeFix/blob/master/LICENSE.txt)
|
||||
* All rights reserved to respective authors
|
||||
* [AAAMouSSE](https://forums.macrumors.com/threads/mp3-1-others-sse-4-2-emulation-to-enable-amd-metal-driver.2206682/) - Syncretic
|
||||
* [telemetrap](https://forums.macrumors.com/threads/mp3-1-others-sse-4-2-emulation-to-enable-amd-metal-driver.2206682/post-28447707) - Syncretic
|
||||
* Apple Binaries - Apple Inc.
|
||||
|
||||
Remaining files within OpenCore Legacy Patcher are copyrighted 2020-2021 Mykola Grymalyuk & Dhinak G. For integration into other projects, please request written permission.
|
||||
148
docs/MODELS.md
Normal file
@@ -0,0 +1,148 @@
|
||||
# Supported Models
|
||||
|
||||
Any hardware supporting SSE4.1 CPU and 64-Bit firmware work on this patcher. To check your hardware model, run the below command on the applicable machine in terminal:
|
||||
|
||||
```bash
|
||||
system_profiler SPHardwareDataType | grep 'Model Identifier'
|
||||
```
|
||||
|
||||
The below table will list all supported and unsupported functions of the patcher currently:
|
||||
|
||||
* [MacBook](#macbook)
|
||||
* [MacBook Air](#macbook-air)
|
||||
* [MacBook Pro](#macbook-pro)
|
||||
* [Mac mini](#mac-mini)
|
||||
* [iMac](#imac)
|
||||
* [Mac Pro](#mac-pro)
|
||||
* [Xserve](#xserve)
|
||||
|
||||
Regarding OS support, see below:
|
||||
|
||||
| Support Entry | Supported OSes | Description | Comment |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| HostOS | macOS 10.9 - macOS 11 | 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.command` located in the repo |
|
||||
| TargetOS | macOS 11 | 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 Monterey support is currently in beta and is not recommended for everyday users. The below page is meant to represent macOS Big Sur support and may not correctly reflect Monterey's support on each model
|
||||
* Recommend looking at the [macOS Monterey Support page](./MONTEREY-DROP.md) for a better idea of Monterey's current status
|
||||
|
||||
### MacBook
|
||||
|
||||
| SMBIOS | Year | Supported | Comment |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| MacBook1,1 | Mid-2006 | <span style="color:red"> NO </span> | 32-Bit CPU limitation |
|
||||
| MacBook2,1 | Late 2006 | ^^ | 32-Bit Firmware limitation |
|
||||
| MacBook3,1 | Late 2007 | ^^ | ^^ |
|
||||
| MacBook4,1 | Early 2008 | <span style="color:#30BCD5"> YES </span> | - No GPU Acceleration in Mavericks and newer<br/>- No Keyboard and Trackpad<br/>- No USB |
|
||||
| MacBook5,1 | Late 2008 | ^^ | - GPU Acceleration in Public Beta, see current issues ([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))<br/> |
|
||||
| MacBook5,2 | Early 2009 | ^^ | - GPU Acceleration in Public Beta, see current issues ([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))<br/>- Trackpad is recognized as mouse<br/>- Brightness control partially supported |
|
||||
| MacBook6,1 | Late 2009 | ^^ | - GPU Acceleration in Public Beta, see current issues ([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))<br/> |
|
||||
| MacBook7,1 | Mid-2010 | ^^ | ^^ |
|
||||
| MacBook8,1 | Mid-2015 | ^^ | <span style="color:green"> Everything is supported</span> |
|
||||
|
||||
### MacBook Air
|
||||
|
||||
| SMBIOS | Year | Supported | Comment |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| MacBookAir1,1 | Early 2008 | <span style="color:red"> NO </span> | Requires SSE4.1 CPU |
|
||||
| MacBookAir2,1 | Late 2008 |<span style="color:#30BCD5"> YES </span> | GPU Acceleration in Public Beta, see current issues ([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108)) |
|
||||
| MacBookAir3,1 | Late 2010 | ^^ | ^^ |
|
||||
| MacBookAir3,2 | ^^ | ^^ | ^^ |
|
||||
| MacBookAir4,1 | Mid-2011 | ^^ | ^^ |
|
||||
| MacBookAir4,2 | ^^ | ^^ | ^^ |
|
||||
| MacBookAir5,1 | Mid-2012 |^^ | <span style="color:green"> Everything is supported</span> |
|
||||
| MacBookAir5,2 | ^^ | ^^ | ^^ |
|
||||
| MacBookAir6,1 | Mid-2013, Early 2014 | ^^ | ^^ |
|
||||
| MacBookAir6,2 | ^^ | ^^ | ^^ |
|
||||
|
||||
### MacBook Pro
|
||||
|
||||
| SMBIOS | Year | Supported | Comment |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| MacBookPro1,1 | Early 2006 | <span style="color:red"> NO </span> | 32-Bit CPU limitation |
|
||||
| MacBookPro1,2 | ^^ | ^^ | ^^ |
|
||||
| MacBookPro2,1 | Late 2006 | ^^ | 32-Bit Firmware limitation |
|
||||
| MacBookPro2,2 | Late 2006 | ^^ | ^^ |
|
||||
| MacBookPro3,1 | Mid-2007 | ^^ | Requires SSE4.1 CPU |
|
||||
| MacBookPro4,1 | Early 2008 | <span style="color:#30BCD5"> YES </span> | GPU Acceleration in Public Beta, see current issues ([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108)) |
|
||||
| MacBookPro5,1 | Late 2008 | ^^ | ^^ |
|
||||
| MacBookPro5,2 | Early 2009 | ^^ | ^^ |
|
||||
| MacBookPro5,3 | Mid-2009 | ^^ | ^^ |
|
||||
| MacBookPro5,4 | ^^ | ^^ | ^^ |
|
||||
| MacBookPro5,5 | ^^ | ^^ | ^^ |
|
||||
| MacBookPro6,1 | Mid-2010 | ^^ | ^^ |
|
||||
| MacBookPro6,2 | ^^ | ^^ | ^^ |
|
||||
| MacBookPro7,1 | ^^ | ^^ | ^^ |
|
||||
| MacBookPro8,1 | Early 2011 | ^^ | ^^ |
|
||||
| MacBookPro8,2 | ^^ | ^^ | ^^ |
|
||||
| MacBookPro8,3 | ^^ | ^^ | ^^ |
|
||||
| MacBookPro9,1 | Mid-2012 | ^^ | <span style="color:green"> Everything is supported</span> |
|
||||
| MacBookPro9,2 | ^^ | ^^ | ^^ |
|
||||
| MacBookPro10,1 | Mid-2012, Early 2013 | ^^ | ^^ |
|
||||
| MacBookPro10,2 | Late 2012, Early 2013 | ^^ | ^^ |
|
||||
| MacBookPro11,1 | Late 2013, Mid-2014 | ^^ | ^^ |
|
||||
| MacBookPro11,2 | ^^ | ^^ | ^^ |
|
||||
| MacBookPro11,3 | ^^ | ^^ | ^^ |
|
||||
|
||||
### Mac mini
|
||||
|
||||
| SMBIOS | Year | Supported | Comment |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| Macmini1,1 | Early 2006 | <span style="color:red"> NO </span> | 32-Bit CPU limitation |
|
||||
| Macmini2,1 | Mid-2007 | ^^ | 32-Bit Firmware limitation |
|
||||
| Macmini3,1 | Early 2009 | <span style="color:#30BCD5"> YES </span> | GPU Acceleration in Public Beta, see current issues ([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108)) |
|
||||
| Macmini4,1 | Mid-2010 | ^^ | ^^ |
|
||||
| Macmini5,1 | Mid-2011 | ^^ | ^^ |
|
||||
| Macmini5,2 | ^^ | ^^ | ^^ |
|
||||
| Macmini5,3 | ^^ | ^^ | ^^ |
|
||||
| Macmini6,1 | Late 2012 | ^^ | <span style="color:green"> Everything is supported</span> |
|
||||
| Macmini6,2 | ^^ | ^^ | ^^ |
|
||||
|
||||
### iMac
|
||||
|
||||
| SMBIOS | Year | Supported | Comment |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| iMac4,1 | Early 2006 | <span style="color:red"> NO </span> | 32-Bit CPU limitation |
|
||||
| iMac4,2 | Mid-2006 | ^^ | ^^ |
|
||||
| iMac5,1 | Late 2006 | ^^ | 32-Bit Firmware limitation |
|
||||
| iMac5,2 | ^^ | ^^ | ^^ |
|
||||
| iMac6,1 | ^^ | ^^ | ^^ |
|
||||
| iMac7,1 | Mid-2007 | <span style="color:#30BCD5"> YES </span> | - Requires an [SSE4.1 CPU Upgrade](https://lowendmac.com/2018/penryn-t9300-9500-cpu-upgrades-for-the-2007-imac/)<br/>- GPU Acceleration in Public Beta, see current issues ([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108))<br/>- Brightness control partially supported on Nvidia GPUs, AMD unsupported<br/>- Stock Bluetooth 2.0 card non-functional |
|
||||
| iMac8,1 | Early 2008 | ^^ | - GPU Acceleration in Public Beta, see current issues ([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108)))<br/>- Brightness control partially supported on Nvidia GPUs, AMD unsupported |
|
||||
| iMac9,1 | Early 2009 | ^^ | ^^ |
|
||||
| iMac10,1 | Late 2009 | ^^ | - GPU is socketed, [recommend upgrading to Metal GPU](https://forums.macrumors.com/threads/2011-imac-graphics-card-upgrade.1596614/?post=17425857#post-17425857) <br/>- GPU Acceleration in Public Beta, see current issues ([#108](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108)) |
|
||||
| iMac11,1 | ^^ | ^^ | ^^ |
|
||||
| iMac11,2 | Mid-2010 | ^^ | ^^ |
|
||||
| iMac11,3 | ^^ | ^^ | ^^ |
|
||||
| iMac12,1 | Mid-2011 | ^^ | ^^ |
|
||||
| iMac12,2 | ^^ | ^^ | ^^ |
|
||||
| iMac13,1 | Late 2012 | ^^ | <span style="color:green"> Everything is supported</span> |
|
||||
| iMac13,2 | ^^ | ^^ | ^^ |
|
||||
| iMac13,3 | ^^ | ^^ | ^^ |
|
||||
| iMac14,1 | Late 2013 | ^^ | ^^ |
|
||||
| iMac14,2 | ^^ | ^^ | ^^ |
|
||||
| iMac14,3 | ^^ | ^^ | ^^ |
|
||||
| iMac14,4 | Mid-2014 | ^^ | ^^ |
|
||||
| iMac15,1 | Late 2014, Mid-2015 | ^^ | [Display will output to 4k instead of 5k](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/359) |
|
||||
|
||||
* For iMac10,1 through iMac12,x, we highly recommend users upgrade the GPU to a Metal supported model. See here for more information: [iMac late 2009 to mid-2011 Graphics Card Upgrade Guide](https://forums.macrumors.com/threads/2011-imac-graphics-card-upgrade.1596614/?post=17425857#post-17425857)
|
||||
|
||||
### Mac Pro
|
||||
|
||||
| SMBIOS | Year | Supported | Comment |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| MacPro1,1 | Mid-2006 | <span style="color:red"> NO </span> | 32-Bit Firmware limitation |
|
||||
| MacPro2,1 | Mid-2007 | ^^ | ^^ |
|
||||
| MacPro3,1 | Early 2008 | <span style="color:#30BCD5"> YES </span> | - Potential boot issues with built-in USB 1.1 ports (recommend using a USB 2.0 hub or dedicated USB PCIe controller)<br/>- Potential boot issues with stock Bluetooth card, recommend removing to avoid kernel panics |
|
||||
| MacPro4,1 | Early 2009 | ^^ | <span style="color:green"> Everything is supported as long as GPU is Metal capable </span> |
|
||||
| MacPro5,1 | Mid-2010, Mid-2012 | ^^ | ^^ |
|
||||
|
||||
### Xserve
|
||||
|
||||
| SMBIOS | Year | Supported | Comment |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| Xserve1,1 | Mid-2006 | <span style="color:red"> NO </span> | 32-Bit Firmware limitation |
|
||||
| Xserve2,1 | Early 2008 | <span style="color:#30BCD5"> YES </span> | <span style="color:green"> Everything is supported as long as GPU is Metal capable </span> |
|
||||
| Xserve3,1 | Early 2009 | ^^ | ^^ |
|
||||
|
||||
# Once you've verified your hardware is supported, head to [Download and build macOS Installers](./INSTALLER.md)
|
||||
122
docs/MONTEREY-DROP.md
Normal file
@@ -0,0 +1,122 @@
|
||||
# macOS Monterey Support
|
||||
|
||||
With OpenCore Legacy Patcher v0.1.7 and newer, we've implemented beta macOS Monterey support for users. Please note that Apple has dropped a lot of hardware with this release as well as broken many of our previous patch sets. This page will be used to inform users regarding current issues and will be updated as new patch sets are developed and added to our patcher.
|
||||
|
||||
## Newly dropped hardware
|
||||
|
||||
With Monterey, Apple continues their their somewhat ruthless march of dropping Intel hardware. This release saw the removal, and thus addition into OpenCore Legacy Patcher, of the following models:
|
||||
|
||||
* iMac14,4
|
||||
* iMac15,1
|
||||
* MacBook8,1
|
||||
* MacBookAir6,1
|
||||
* MacBookAir6,2
|
||||
* MacBookPro11,1
|
||||
* MacBookPro11,2
|
||||
* MacBookPro11,3
|
||||
|
||||
All of these models now have support in OpenCore Legacy Patcher. Note iMac15,1 does have [an unfortunate firmware bug preventing resolutions above 4k](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/359) with OpenCore Legacy Patcher
|
||||
|
||||
## Current Hardware Drawbacks:
|
||||
|
||||
### macOS 12.0 Beta 4 issue on 2012 to early 2013 machines
|
||||
|
||||
Currently in macOS 12.0 Beta 4, many Ivy Bridge Macs have experienced Bluetooth issues relating to their BCM20702 chipset. Currently the exact issue is unknown however is assumed to be a bug on Apple's end. Recommend downgrading to macOS 12.0 Beta 3 till resolved:
|
||||
|
||||
* [12.0 Beta 3 (21A5284e) InstallAssistant (Direct)](http://swcdn.apple.com/content/downloads/02/08/071-63739-A_G5RYVW5JHT/dfz5gp3s0jm9vl7m30oewq141zkpv8edr8/InstallAssistant.pkg)
|
||||
* [12.0 Beta 3 (21A5284e) InstallAssistant (archive.org)](https://archive.org/details/12.0-21a5284e-beta-3)
|
||||
|
||||
A temporary fix is to restart the BlueTool and bluetoothd process with each boot, note it may not work for all users:
|
||||
|
||||
```sh
|
||||
sudo killall -9 BlueTool bluetoothd
|
||||
```
|
||||
|
||||
## Previously Broken Hardware
|
||||
|
||||
::: details Wireless Support Dropped (Resolved in 0.2.5 and newer)
|
||||
|
||||
* Broadcom BCM94328, BCM94322 and Atheros Wireless Chipsets lost support
|
||||
|
||||
The following models lost Bluetooth support in macOS Monterey due to their legacy Wireless chipset:
|
||||
|
||||
* iMac12,x and older
|
||||
* Macmini3,1 and older
|
||||
* MacBook5,x and older
|
||||
* MacBookAir2,1 and older
|
||||
* MacBookPro7,1 and older
|
||||
* MacPro5,1 and older
|
||||
|
||||
Note: BCM943224, BCM94331, BCM94360 and BCM943602 are still fully support by OpenCore Legacy Patcher
|
||||
|
||||
:::
|
||||
|
||||
::: details Bluetooth Support Dropped (Resolved in 0.2.5 and newer)
|
||||
|
||||
* BRCM2046 and BRCM2070 Bluetooth Chipsets lost support
|
||||
|
||||
The following models lost Bluetooth support in macOS Monterey due to their legacy Bluetooth chipset:
|
||||
|
||||
* iMac12,x and older
|
||||
* Macmini5,1 and older
|
||||
* MacBook7,1 and older
|
||||
* MacBookAir4,1 and older
|
||||
* MacBookPro8,1 and older
|
||||
* MacPro5,1 and older
|
||||
|
||||
Note: Native BRCM20702 and BRCM20703 are still fully support by OpenCore Legacy Patcher
|
||||
|
||||
::: details Dropped Firmwares
|
||||
|
||||
Here are the firmwares macOS Monterey Dropped (previously located within IOBluetoothUSBDFU.kext):
|
||||
|
||||
* 2046_820F.dfu
|
||||
* 2046_8210.dfu
|
||||
* 2046_8213.dfu
|
||||
* 2046_8215.dfu
|
||||
* 2046_8216.dfu
|
||||
* 2046_8217.dfu
|
||||
* 2070_821A.dfu
|
||||
* 2070_821B.dfu
|
||||
* 2070_8218.dfu
|
||||
* 20702_821D.dfu
|
||||
* 20702_821F.dfu
|
||||
* 20702_828A.dfu
|
||||
* 20702_828B.dfu
|
||||
* 20702_828C.dfu
|
||||
* 20702_8281.dfu
|
||||
* 20702_8286.dfu
|
||||
|
||||
:::
|
||||
|
||||
::: details Ivy Bridge iGPU Acceleration (Resolved in 0.1.7 and newer)
|
||||
|
||||
* Intel HD4000 iGPUs lost support
|
||||
|
||||
By default these machines require root volume patches to gain graphics acceleration in Monterey. OpenCore Legacy Patcher supports readding support however SIP can no longer be enabled due to root patching:
|
||||
|
||||
* Macmini6,x
|
||||
* MacBookAir5,x
|
||||
* MacBookPro9,x
|
||||
* MacBookPro10,x
|
||||
|
||||
:::
|
||||
|
||||
::: details Non-Metal Acceleration (Resolved in 0.2.5 and newer)
|
||||
|
||||
* Non-Metal GPUs no longer have working acceleration patches:
|
||||
* Intel Ironlake and Sandy Bridge iGPUs
|
||||
* Nvidia Tesla and Fermi GPUs
|
||||
* AMD TeraScale 1 and 2 GPUs
|
||||
|
||||
The following machines cannot gain graphics acceleration at all in Monterey, only basic framebuffer and brightness control (iMac8,1/9,1 and MacBook5,2 excluded):
|
||||
|
||||
* iMac12,x and older
|
||||
* Macmini5,x and older
|
||||
* MacBook7,1 and older
|
||||
* MacBookAir4,x and older
|
||||
* MacBookPro8,x and older
|
||||
|
||||
Note: iMac10,1 through iMac12,x can be upgraded with Metal GPUs, [see here for more info](https://forums.macrumors.com/threads/2011-imac-graphics-card-upgrade.1596614/)
|
||||
|
||||
:::
|
||||
301
docs/PATCHEXPLAIN.md
Normal file
@@ -0,0 +1,301 @@
|
||||
# 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.
|
||||
|
||||
* [OpenCore Settings](#opencore-settings)
|
||||
* [Injected Kexts](#injected-kexts)
|
||||
* [On-Disk Patches](#on-disk-patches)
|
||||
|
||||
## OpenCore Settings
|
||||
|
||||
Below is a run down of the main logic OpenCore Legacy Patcher uses to gain native support in macOS. Note OpenCore's configuration is documented within [OpenCorePkg](https://github.com/acidanthera/OpenCorePkg) as well as an online version provided by us:
|
||||
|
||||
* [OpenCorePkg Online Docs](https://dortania.github.io/docs/latest/Configuration.html)
|
||||
|
||||
::: details Configuration Explanation
|
||||
|
||||
### ACPI -> Patch
|
||||
|
||||
* EHCx and XHC1 Patches
|
||||
* Reason: Required for proper USB operation
|
||||
* Logic: Avoids USB maps of newer models attaching and breaking USB port functionality
|
||||
* Models: All models require
|
||||
|
||||
### Booter -> Quirks
|
||||
|
||||
* ForceBooterSignature
|
||||
* Reason: Required to ensure Hibernation support
|
||||
* Logic: Tricks boot.efi into thinking OpenCore is Apple's firmware
|
||||
* Models: All models require
|
||||
|
||||
### DeviceProperties -> Add
|
||||
|
||||
* `PciRoot(0x0)/Pci(0x15,0x0)/Pci(0x0,0x0)`
|
||||
* `PciRoot(0x0)/Pci(0x1C,0x4)/Pci(0x0,0x0)`
|
||||
* `PciRoot(0x0)/Pci(0x1C,0x3)/Pci(0x0,0x0)`
|
||||
* `PciRoot(0x0)/Pci(0x1C,0x5)/Pci(0x0,0x0)`
|
||||
* `PciRoot(0x0)/Pci(0x1C,0x1)/Pci(0x0,0x0)`
|
||||
* Reason: Required to ensure Wifi works with full, native support
|
||||
* Logic: Tricks AirPortBrcmNIC.kext into thinking our device is a BCM94360 (`14e4,43ba`)
|
||||
* Models: Machines with BCM943224 and BCM94331 chipsets
|
||||
* `PciRoot(0x0)/Pci(0x3,0x0)/Pci(0x0,0x0)`
|
||||
* `PciRoot(0x0)/Pci(0x1,0x0)/Pci(0x0,0x0)`
|
||||
* Reason: Required to ensure Brightness Control works on upgraded iMacs
|
||||
* Logic: Sets AppleBackLight properties
|
||||
* Models: iMac11,x and iMac12,x with upgraded Nvidia Metal GPUs
|
||||
* `PciRoot(0x0)/Pci(0x2,0x0)`
|
||||
* Reason: Disables internal GPU to fix sleep issues on upgrades iMacs
|
||||
* Logic: Tricks macOS into thinking iGPU is a generic PCI device
|
||||
* Models: iMac12,x with upgraded Metal GPUs
|
||||
|
||||
### Kernel -> Patch
|
||||
|
||||
* SMC Patch
|
||||
* Reason: Required to avoid SMC Firmware updates
|
||||
* Logic: Patches out `smc-version` in AppleSMC.kext, requires SMC-Spoof.kext for full functionality
|
||||
* Models: All models require
|
||||
* IOHIDFamily Patch
|
||||
* Reason: Required for HID peripheral support in macOS on older hardware
|
||||
* Logic: Tricks IOHIDFamily into thinking it's always booting recovery
|
||||
* Models: [2010 and older](https://github.com/dortania/OpenCore-Legacy-Patcher/blob/79ab028b0a039e97a528e0b99c876d95d9c2d41d/Resources/ModelArray.py#L310-L332)
|
||||
|
||||
### Kernel -> Quirks
|
||||
|
||||
* ThridPartyDrives
|
||||
* Reason: Required to avoid Hibernation wake issues on 3rd party drives
|
||||
* Logic: Patches AppleAHCIPort.kext into support
|
||||
* Models: All models with standard SATA ports
|
||||
* PanicNoKextDump
|
||||
* Reason: Avoids kext dump on kernel panics, easier kernel debugging
|
||||
* Logic: Patches Kernel to not dump dump unnecessary info
|
||||
* Models: Only set when Verbose Boot is enabled by the user
|
||||
|
||||
### Misc -> Security
|
||||
|
||||
* SecureBootModel
|
||||
* Reason: Required to ensure seamless OS updates with Big Sur
|
||||
* Logic: Sets iMacPro1,1's Secure Enclave Identifier (j137)
|
||||
* Models: All models require
|
||||
|
||||
### NVRAM -> Add
|
||||
|
||||
* `-v debug=0x100`
|
||||
* Reason: Used to see debug info of macOS's kernel and kexts, and avoids reboots on panic
|
||||
* Logic: Adds args to NVRAM
|
||||
* Models: Only set when Verbose Boot is enabled by the user
|
||||
* `-liludbgall`
|
||||
* Reason: Enables Lilu and plugin debug logging
|
||||
* Logic: Adds args to NVRAM
|
||||
* Models: Only set when Kext DEBUG is enabled by the user
|
||||
* `msgbuf=1048576`
|
||||
* Reason: Sets message buffer size to 1MB, ensures boot logs are retained
|
||||
* Logic: Adds args to NVRAM
|
||||
* Models: Only set when Kext DEBUG is enabled by the user
|
||||
* `agdpmod=pikera`
|
||||
* Reason: Fixes GPU switching on MacBookPro9,x
|
||||
* Logic: Adds args to NVRAM
|
||||
* Models: MacBookPro9,x
|
||||
* `shikigva=80 unfairgva=1`
|
||||
* `shikigva=128 unfairgva=1 -wegtree`
|
||||
* Reason: Fixes DRM support on models with upgraded AMD Metal GPUs
|
||||
* Logic: Adds args to NVRAM
|
||||
* Models: Models with upgraded AMD Metal GPUs
|
||||
|
||||
### UEFI -> ProtocolOverrides
|
||||
|
||||
* GopPassThrough
|
||||
* Reason: Used for proper output on machines with UGA firmware but GOP GPU
|
||||
* Logic: Provide GOP protocol instances on top of UGA protocol instances
|
||||
* Models: MacPro3,1, MacBook4,1 iMac7,1-8,1
|
||||
|
||||
:::
|
||||
|
||||
## Injected Kext
|
||||
|
||||
Below is an explanation of what Kexts OpenCore Legacy Patcher will inject into memory on boot-up.
|
||||
|
||||
::: details Injected Kext Explanation
|
||||
|
||||
### Acidanthera
|
||||
|
||||
* Lilu
|
||||
* Reason: Patching engine for other kexts
|
||||
* Models: All models require
|
||||
* WhateverGreen
|
||||
* Reason: Patches GPU Frameworks and kext to ensure proper support
|
||||
* Models: All models require
|
||||
* CPUFriend
|
||||
* Reason: Patches IOx86PlatformPlugin to restore previous CPU profiles
|
||||
* Models: 2012 and newer models
|
||||
* AirportBrcmFixup
|
||||
* Reason: Patches IO80211 and co to fix networking support for unsupported cards
|
||||
* Models: BCM943224 and BCM94331
|
||||
* RestrictEvents
|
||||
* Reason: Disables memory errors on MacPro7,1
|
||||
* Models: Mac Pros and Xserves
|
||||
|
||||
### Ethernet
|
||||
|
||||
* nForceEthernet
|
||||
* Reason: Inject old Nvidia Ethernet kext to resolve networking in Catalina and newer
|
||||
* Models: 2010 and older Nvidia Ethernet require
|
||||
* MarvelYukonEthernet
|
||||
* Reason: Inject old Marvel Ethernet kext to resolve networking in Catalina and newer
|
||||
* Models: 2008 and older Marvel Ethernet require
|
||||
* CatalinaBCM5701Ethernet
|
||||
* Reason: Inject old Broadcom Ethernet kext to resolve networking in Big Sur
|
||||
* Logic: Patch out conflicting symbols to not colide existing BCM5701Ethernet
|
||||
* Models: 2011 and older Broadcom Ethernet require
|
||||
|
||||
### Maps
|
||||
|
||||
* USBMap
|
||||
* Reason: Inject old USB map profiles to fix USB
|
||||
* Models: All models require
|
||||
|
||||
### SSE
|
||||
|
||||
* AAMouSSE
|
||||
* Reason: Translates SSE4.2 instructions to compatible code for SSE4,1 CPUs, required for AMD Metal drives
|
||||
* Models: MacPro3,1
|
||||
* telemetrap
|
||||
* Reason: Ensures temelemtry.plugin doesn't run, required for SSE4,1 CPUs
|
||||
* Models: Penryn CPUs
|
||||
|
||||
### Wifi
|
||||
|
||||
* IO80211HighSierra
|
||||
* Reason: Re-inject Atheros wifi drivers from High Sierra
|
||||
* Logic: Patch out conflicting symbols to not colide existing IO80211Family
|
||||
* Models: Atheros cards
|
||||
* IO80211Mojave
|
||||
* Reason: Re-inject Broadcom wifi drivers from Mojave
|
||||
* Logic: Patch out conflicting symbols to not colide existing IO80211Family
|
||||
* Models: BCM94322
|
||||
|
||||
### Misc
|
||||
|
||||
* AppleBackLightFixup
|
||||
* Reason: Patch AppleBacklight for iMacs with Nvidia Metal GPU upgrades
|
||||
* Models: iMac11,x, iMac12,x with upgraded Nvidia Metal GPUs
|
||||
* AppleIntelPIIXATA
|
||||
* Reason: Fix IDE support on MacPro3,1
|
||||
* Models: MacPro3,1
|
||||
* AppleIntelMCEDisabler
|
||||
* Reason: Fix dual socket support in Catalina and newer
|
||||
* Models: Mac Pros and Xserves
|
||||
* NightShiftEnabler
|
||||
* Reason: Enables NightShift support on unsupported models
|
||||
* Models: 2011 and older, MacBookPro9,x included
|
||||
* SMC-Spoof
|
||||
* Reason: Spoofs SMC version to 9.9999
|
||||
* Models: All models require
|
||||
:::
|
||||
|
||||
## On-Disk Patches
|
||||
|
||||
Unfortunately certain on-disk patches are required to achieve full functionality. Below is a breakdown of patches supported
|
||||
|
||||
Note, GPU Acceleration Patches are not public yet, the below section is simply documentation for easier research with new aids.
|
||||
|
||||
::: details Audio Patches
|
||||
|
||||
### Extensions
|
||||
|
||||
* AppleHDA
|
||||
* Reason: Re-add High Sierra's AppleHDA to achieve audio support
|
||||
* Models: 2011 and older Macs (excluding MacPro4,1+)
|
||||
|
||||
:::
|
||||
|
||||
::: details Acceleration Patches
|
||||
|
||||
### Extensions
|
||||
|
||||
#### General Patches
|
||||
|
||||
* IOSurface.kext
|
||||
* Reason: Fixes immediate logout on login
|
||||
* Logic: Downgrade to Catalina IOSurface
|
||||
* Note: For AMD and Intel, additional `addMemoryRegion/removeMemoryRegion` patch added changing the first conditional jump to non conditional jump
|
||||
* At Offset `0xdb52` and `0xdbc6`, replace following bytes with `0xeb`
|
||||
|
||||
#### Dropped Acceleration Binaries
|
||||
|
||||
* Nvidia Binaries
|
||||
* GeForceGA.bundle
|
||||
* GeForceTesla.kext
|
||||
* Skip IOFree Panic - Mojave+
|
||||
* At Offset `0x5CF9A` replace following bytes with `0xEB`
|
||||
* Avoids `addMemoryRegion/removeMemoryRegion` calls
|
||||
* At Offset `0x5527` and `0x77993`, replace following bytes with `0x909090909090`
|
||||
* GeForceTeslaGLDriver.bundle
|
||||
* GeForceTeslaVADriver.bundle
|
||||
* NVDANV50HalTesla.kext
|
||||
* NVDAResmanTesla.kext
|
||||
* 0x1ea59a - 0x1ea5b3: nop
|
||||
* Replace VSLGestalt to IOLockLock or any other known symbol of the same length.
|
||||
|
||||
* AMD/ATI Binaries
|
||||
* AMD2400Controller.kext
|
||||
* AMD2600Controller.kext
|
||||
* AMD3800Controller.kext
|
||||
* AMD4600Controller.kext
|
||||
* AMD4800Controller.kext
|
||||
* AMD5000Controller.kext
|
||||
* AMD6000Controller.kext
|
||||
* AMDFramebuffer.kext
|
||||
* AMDLegacyFramebuffer.kext
|
||||
* AMDLegacySupport.kext
|
||||
* AMDRadeonVADriver.bundle
|
||||
* AMDRadeonVADriver2.bundle
|
||||
* AMDRadeonX3000.kext
|
||||
* AMDRadeonX3000GLDriver.bundle
|
||||
* AMDShared.bundle
|
||||
* AMDSupport.kext
|
||||
* ATIRadeonX2000.kext
|
||||
* ATIRadeonX2000GA.plugin
|
||||
* ATIRadeonX2000GLDriver.bundle
|
||||
* ATIRadeonX2000VADriver.bundle
|
||||
|
||||
* Intel 5th Gen Binaries
|
||||
* AppleIntelFramebufferAzul.kext
|
||||
* AppleIntelFramebufferCapri.kext
|
||||
* AppleIntelHDGraphics.kext
|
||||
* AppleIntelHDGraphicsFB.kext
|
||||
* AppleIntelHDGraphicsGA.plugin
|
||||
* AppleIntelHDGraphicsGLDriver.bundle
|
||||
* AppleIntelHDGraphicsVADriver.bundle
|
||||
|
||||
* Intel 6th Gen Binaries
|
||||
* AppleIntelHD3000Graphics.kext
|
||||
* AppleIntelHD3000GraphicsGA.plugin
|
||||
* AppleIntelHD3000GraphicsGLDriver.bundle
|
||||
* AppleIntelHD3000GraphicsVADriver.bundle
|
||||
* AppleIntelSNBGraphicsFB.kext
|
||||
* Board ID Patch
|
||||
* Replace original Board ID with updated model
|
||||
* AppleIntelSNBVA.bundle
|
||||
|
||||
### Frameworks
|
||||
|
||||
* CoreDisplay.framework
|
||||
* Logic: Copied from Mojave, heavy modifications/shims
|
||||
* IOSurface.framework
|
||||
* OpenGL.framework
|
||||
* Logic: Copied from Mojave
|
||||
|
||||
### PrivateFrameworks
|
||||
|
||||
* GPUSupport.framework
|
||||
* Logic: Copied from Mojave
|
||||
* SkyLight.framework
|
||||
* Logic: Copied from Mojave, heavy modifications/shims
|
||||
|
||||
### LaunchDaemons
|
||||
|
||||
* HiddHack.plist
|
||||
* Reason: Fixes unresponsive input when patching Skylight
|
||||
* Logic: Forces `hidd` to register events, as Skylight handles them by default in Big Sur
|
||||
|
||||
:::
|
||||
56
docs/POST-INSTALL.md
Normal file
@@ -0,0 +1,56 @@
|
||||
# Post-Installation
|
||||
|
||||
* [Booting without USB drive](#booting-without-usb-drive)
|
||||
* [Booting seamlessly without Verbose or OpenCore Picker](#booting-seamlessly-without-verbose-or-opencore-picker)
|
||||
* [Applying Post Install Volume Patches](#applying-post-install-volume-patches)
|
||||
|
||||
## Booting without USB drive
|
||||
|
||||
Once you've installed macOS through OpenCore, you can boot up and go through the regular install process. To boot without the USB drive plugged in is quite simple:
|
||||
|
||||
* Download OpenCore Legacy Patcher
|
||||
* Change Patcher settings as you'd like
|
||||
* Build OpenCore again
|
||||
* Install OpenCore to internal drive
|
||||
* Reboot holding Option, and select the internal EFI
|
||||
|
||||
And voila! No more USB drive required
|
||||
|
||||
## Booting seamlessly without Verbose or OpenCore Picker
|
||||
|
||||
To do this, run the OpenCore Patcher and head to Patcher Settings:
|
||||
|
||||

|
||||
|
||||
Here you can change different patcher settings, however the main interest is:
|
||||
|
||||
* Set ShowPicker Mode
|
||||
|
||||
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, then you can release the "ESC" key when you see the cursor arrow at the top left.
|
||||
|
||||
## Enabling SIP
|
||||
|
||||
For many users, SIP will be enabled by default on build. For Intel HD 4000 users, you may have noticed that SIP is 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 with non-Metal GPUs cannot enable SIP in Big Sur either due to patched root volume
|
||||
|
||||
Note 2: NVRAM may need to be reset to ensure SIP is correctly re-enabled
|
||||
|
||||
## Applying Post Install Volume Patches
|
||||
|
||||
**Note**: For users who need Post-Install Volume patches for legacy video acceleration support, you **must** disable the following settings in "Patcher Settings" when building and installing your new OpenCore:
|
||||
|
||||
* SIP: Disabled
|
||||
* SecureBootModel: Disabled
|
||||
|
||||
Once set, rebuild OpenCore, install to drive and reboot. Then, Post-Install Volume patches will run just fine
|
||||
|
||||
To apply the Post-Install Volume patches [to test out the Beta Graphics Acceleration Patches system](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108), select option #3 as shown below:
|
||||
|
||||

|
||||
|
||||
And go ahead to option #1 and let the OCLP patcher apply the needed legacy video patches.
|
||||
|
||||

|
||||
|
||||
Reboot your system and check out the now working graphics acceleration on your legacy system. This is still Beta software.
|
||||
20
docs/README.md
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
home: true
|
||||
heroImage: /homepage.png
|
||||
heroText: OpenCore Legacy Patcher
|
||||
actionText: Getting Started→
|
||||
actionLink: START.md
|
||||
|
||||
meta:
|
||||
- name: description
|
||||
content: Experience macOS just like before
|
||||
|
||||
features:
|
||||
- title: Built with security in mind
|
||||
details: Supporting System Integrity Protection(SIP), FileVault 2, .im4m Secure Boot and Vaulting. You're just as secure as a supported Mac
|
||||
- title: Native OTA updates
|
||||
details: Install updates the moment they come out just like on a supported Mac, and no more 12GB+ updates.
|
||||
- title: Zero firmware patching
|
||||
details: No need to patch APFS ROM support, all protocol upgrades are done in memory and never permanent.
|
||||
footer: Copyright © Dortania 2020-2021
|
||||
---
|
||||
BIN
docs/ResXtreme.zip
Normal file
31
docs/START.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# What is OpenCore?
|
||||
|
||||
This is a sophisticated boot loader used to inject and patch data in memory, instead of on disk. This means we're able to get near-native experience on many unsupported Macs with Metal GPUs. This includes many of the long desired features of other patchers such as:
|
||||
|
||||
* System Integrity Protection, FileVault 2, .im4m Secure Boot and Vaulting
|
||||
* Native OTA OS DELTA updates on all Macs
|
||||
* Recovery OS, Safe Mode and Single-user Mode booting
|
||||
* WPA Wifi and Personal Hotspot support
|
||||
|
||||
While many PC users from the Hackintosh community are familiar with OpenCore, OpenCore was designed as Mac and PC agnostic ensuring both platforms can use it easily. And with OpenCore Legacy Patcher, we help automate the process making running with OpenCore that much easier.
|
||||
|
||||
For advanced troubleshooting, we highly recommend users check out the [OpenCore Patcher Paradise Discord Server](https://discord.gg/rqdPgH8xSN) as this is generally the quickest way to get a hold of us developers and get help from the community.
|
||||
|
||||
For those who wish to support this patcher, please see the [Supporting the Patcher page](./DONATE.md)
|
||||
|
||||
## Patcher Warnings
|
||||
|
||||
Since this patcher tricks macOS into thinking you're running a newer Mac, certain functionality may be broken:
|
||||
|
||||
* Boot Camp Assistant.app
|
||||
* We recommend following our [guide on getting a UEFI Windows Install working](./WINDOWS.md). Legacy MBR Based installs won't show up in OpenCore
|
||||
|
||||
## How do I get started?
|
||||
|
||||
1. The first step of ensuring whether your model is support is checking here:
|
||||
|
||||
* [Supported Models](./MODELS.md)
|
||||
|
||||
2. [Download and build macOS Installer](./INSTALLER.md)
|
||||
3. [Run the `OpenCore-Patcher.app`](./BUILD.md)
|
||||
4. [Reboot and boot OpenCore](./BOOT.md)
|
||||
39
docs/TERMS.md
Normal file
@@ -0,0 +1,39 @@
|
||||
# OpenCore Patcher Terminology
|
||||
|
||||
With OpenCore Legacy Patcher, we use a lot of different terms to refer to hardware including `SSE4.1`, `32-Bit Firmware`, etc. This page is to help users understand what all these confusing words mean.
|
||||
|
||||
# Terminology
|
||||
|
||||
Term | Description
|
||||
--- | ---
|
||||
**macOS** | Apple's own UNIX based OS used for Mac machines and "What makes a Mac a Mac".
|
||||
**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.
|
||||
**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.
|
||||
**Boot Manager** | Piece of software that manages bootloaders – we have many of these: Clover, systemd-boot, OpenCore, rEFInd, rEFIt... These are generally seen as prepping the system for the actual boot loader.
|
||||
---
|
||||
Term | Description
|
||||
--- | ---
|
||||
**OpenCore** | The new hotness on the scene, made with security in mind by the [Acidanthera team](https://github.com/acidanthera), has faster booting and lighter weight than previous boot managers. Supports many native Mac features such as SIP, FileVault, Secure Boot, etc
|
||||
**ACPI** | Tables defined in your firmware defining your hardware and different methods, tied directly to how IOKit/IOService handles device setup
|
||||
**NVRAM** | Non-volitile storage, where many variables are stored including default boot options, Hibernation keys, Secure Boot information, etc
|
||||
---
|
||||
Term | Description
|
||||
--- | ---
|
||||
**XNU** | Also known as **X** is **N**ot **U**nix, XNU is referred to as macOS's "kernel" and the heart of what makes macOS tick
|
||||
**Kexts** | Also known as **K**ernel **Ext**ensions, are macOS's drivers. They're used to perform different tasks like device drivers or for a different purpose (in this patcher) like patching the OS, injecting information or running tasks.
|
||||
**KernelCollection** | Also known as the ImmutableKernel and PrelinkedKernel, this is a bundle of the kernel(XNU) and kernel extensions(Kexts) that we use to boot macOS. This is also what OpenCore patches in memory to allow us to have a seamless experience <br/>- PrelinkedKernel: Default caching system since 10.7 <br/>- ImmutableKernel: Secure Boot based caching system since 10.13 <br/>- KernelCollection: Merge of both Prelinked and ImmutableKernel's since macOS 11, Big Sur
|
||||
**IOKit** | Backbone of how Kernel Extentions (Kexts) probe and attach onto hardware, starts quickly after kernel initates
|
||||
**WindowServer** | Backbone of the GUI interface in macOS, one of the first userfacing userspace programs to kick-in
|
||||
**OTA** | Short for **O**ver **T**he **A**ir, refers to native OS updates via System Preferences like a supported Mac
|
||||
**DELTA** | Often used with OTA, refers to OS updates that much smaller than full installers (generally ~3GB), note Deltas require the root volume to be unmodified otherwise ~12GB updates will occur.
|
||||
---
|
||||
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.
|
||||
**HFS+** | Also known as MacOS Journaled, this was the default macOS drive format up until macOS 10.13, format 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.
|
||||
**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.
|
||||
**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
|
||||
---
|
||||
118
docs/TESTED.md
Normal file
@@ -0,0 +1,118 @@
|
||||
# Tested Models on OpenCore Legacy Patcher
|
||||
|
||||
To aid users in troubleshooting, we've compiled a list of users who've reported success with OpenCore Legacy patcher as well as the version used. This should aid users in verifying whether issues with the patcher are regression-related with newer versions.
|
||||
|
||||
### MacBook
|
||||
|
||||
| SMBIOS | Tested | Tester | Comment |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| MacBook4,1 | <span style="color:#30BCD5"> YES </span> | Mami | - Stock Model<br/>- Couldn't install due to broke USB support |
|
||||
| MacBook5,1 | ^^ | air.man | - Stock Model<br/>- Patcher version 0.0.19 |
|
||||
| MacBook5,2 | ^^ | Finder352 | ^^ |
|
||||
| MacBook6,1 | ^^ | Finder352 | ^^ |
|
||||
| MacBook7,1 | ^^ | MykolaG | ^^ |
|
||||
| ^^ | ^^ | Jazzzny | ^^ |
|
||||
| ^^ | ^^ | AlexSakha67 | - Stock Model<br/>- Patcher version 0.0.20 |
|
||||
|
||||
### MacBook Air
|
||||
|
||||
| SMBIOS | Tested | Tester | Comment |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| MacBookAir2,1 | No reports | N/A | N/A |
|
||||
| MacBookAir3,1 | ^^ | ^^ | ^^ |
|
||||
| MacBookAir3,2 | <span style="color:#30BCD5"> YES </span> | houser42 | - Stock model <br/>- Patcher version unknown |
|
||||
| MacBookAir4,1 | No reports | N/A | N/A |
|
||||
| MacBookAir4,2 | ^^ | ^^ | ^^ |
|
||||
| MacBookAir5,1 | <span style="color:#30BCD5"> YES </span> | Ausdauersportler | - Stock Model<br/>- Patcher version 0.0.9 |
|
||||
| ^^ | ^^ | webg3 | Stock Model |
|
||||
| MacBookAir5,2 | ^^ | Bab-droid | - Stock Model<br/>- Patcher version 0.0.19 |
|
||||
| ^^ | ^^ | K-Hobert | - Stock model <br/>- Patcher version unknown |
|
||||
| ^^ | ^^ | cboukouv | - Stock model <br/>- Patcher version 0.0.21 |
|
||||
|
||||
### MacBook Pro
|
||||
|
||||
| SMBIOS | Tested | Tester | Comment |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| MacBookPro4,1 | <span style="color:#30BCD5"> YES </span> | cboukouv | - Stock model <br/>- Patcher version 0.0.19 |
|
||||
| MacBookPro5,1 | ^^ | GURU_Jasho#5736 | - Stock model <br/>- Patcher version 0.0.21 |
|
||||
| MacBookPro5,2 | ^^ | hvds | ^^ |
|
||||
| MacBookPro5,3 | ^^ | kommtzeitkonrad | - Stock model <br/>- Patcher version 0.0.22 |
|
||||
| MacBookPro5,4 | No reports | N/A | N/A |
|
||||
| MacBookPro5,5 | ^^ | ^^ | ^^ |
|
||||
| MacBookPro6,1 | ^^ | ^^ | ^^ |
|
||||
| MacBookPro6,2 | <span style="color:#30BCD5"> YES </span> | Jakeluke | - Stock model, dGPU broken <br/>- Patcher version unknown |
|
||||
| MacBookPro7,1 | ^^ | fussel132 | - Stock model <br/>-Patcher version v0.1.2 |
|
||||
| MacBookPro8,1 | ^^ | AvaQueen | - Stock model <br/>- Patcher version 0.0.19 |
|
||||
| MacBookPro8,2 | ^^ | air.man | - Stock model, dGPU disabled <br/>- Patcher version 0.0.22 |
|
||||
| ^^ | ^^ | cboukouv | - Stock model <br/>- Patcher version 0.0.19 |
|
||||
| MacBookPro8,3 | ^^ | lulujyc | - Stock model, dGPU disabled <br/>- Patcher version 0.1.4 |
|
||||
| MacBookPro9,1 | <span style="color:#30BCD5"> YES </span> | jbdamiano | - Stock model <br/>- Patcher version 0.0.19 |
|
||||
| ^^ | ^^ | dennes544 | ^^|
|
||||
| ^^ | ^^ | cgrazy | ^^ |
|
||||
| ^^ | ^^ | LIPA85 | ^^ |
|
||||
| MacBookPro9,2 | ^^ | alexx17xx | - Stock model <br/>- Patcher version 0.0.19 |
|
||||
| ^^ | ^^ | Arvxistanx | ^^ |
|
||||
| ^^ | ^^ | CyberDroid1 | - Stock model<br/>- Patcher version 0.0.16 |
|
||||
| ^^ | ^^ | woefi | - BCM94331CAX upgrade<br/>- Patcher version 0.0.13 |
|
||||
| ^^ | ^^ | whgmkeller | - Stock model<br/>- Patcher version 0.0.11 |
|
||||
| ^^ | ^^ | vinaypundith | - Patcher version 0.0.7 |
|
||||
| MacBookPro10,1 | ^^ | traviswparker | - Stock model <br/>- Patcher version 0.0.14 |
|
||||
| ^^ | ^^ | il-rollino | - Upgraded BCM94360CSAX <br/>- Patcher version 0.0.21 |
|
||||
| MacBookPro10,2 | No reports | N/A | N/A |
|
||||
|
||||
### Mac mini
|
||||
|
||||
| SMBIOS | Tested | Tester | Comment |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| Macmini3,1 | No reports | N/A | N/A |
|
||||
| Macmini4,1 | ^^ | ^^ | ^^ |
|
||||
| Macmini5,1 | ^^ | ^^ | ^^ |
|
||||
| Macmini5,2 | ^^ | ^^ | ^^ |
|
||||
| Macmini5,3 | ^^ | ^^ | ^^ |
|
||||
| Macmini6,1 | <span style="color:#30BCD5"> YES </span> | cicofz | - Stock model <br/>- Patcher version 0.0.21 |
|
||||
| ^^ | ^^ | Stig124 | - Stock model <br/>- Patcher version 0.0.19 |
|
||||
| ^^ | ^^ | mwidjaya | - Stock model <br/>- Patcher version 0.0.18 |
|
||||
| Macmini6,2 | ^^ | Shelbs | - Stock model <br/>- Patcher version 0.0.16 |
|
||||
|
||||
### iMac
|
||||
|
||||
| SMBIOS | Tested | Tester | Comment |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| iMac7,1 | No reports | N/A | N/A |
|
||||
| iMac8,1 | <span style="color:#30BCD5"> YES </span> | EduCovas | - Stock Model<br/>- Patcher version 0.0.21 |
|
||||
| iMac9,1 | ^^ | Allanrfox | ^^ |
|
||||
| ^^ | ^^ | Jakeluke | ^^ |
|
||||
| iMac10,1 | ^^ | Ausdauersportler | - Upgraded with WX4150 |
|
||||
| iMac11,1 | ^^ | internetzel | - Upgraded with RX580 mobile |
|
||||
| iMac11,2 | ^^ | MykolaG | - Stock Model<br/>- Patcher version 0.0.21 |
|
||||
| ^^ | ^^ | iMac-iPad | - Stock Model<br/>- Patcher version 0.0.21 |
|
||||
| ^^ | ^^ | vinaypundith | - Patcher version 0.0.19 |
|
||||
| iMac11,3 | ^^ | Ausdauersportler | - Upgraded with Polaris GPU<br/>- Upgraded BCM943602CDP<br/>- Patcher version 0.0.21 |
|
||||
| iMac12,1 | ^^ | shnockdu | - Upgraded with Kepler GPU<br/>- Patcher version 0.0.21 |
|
||||
| ^^ | ^^ | StephN999 | - Upgraded WX4150 GPU<br/>- Upgraded BCM94360CD<br/>- Patcher version 0.0.21 |
|
||||
| iMac12,2 | ^^ | Ausdauersportler | - Upgraded with Polaris GPU<br/>- Upgraded BCM943602CDP<br/>- Patcher version 0.0.21 |
|
||||
| iMac13,1 | ^^ | alexx17xx | - Stock Model<br/>- Patcher version 0.0.19 |
|
||||
| iMac13,2 | ^^ | Alain13 | ^^ |
|
||||
| ^^ | ^^ | algernonpule | - Stock Model<br/>- Patcher version 0.0.19 |
|
||||
| iMac13,3 | No reports | N/A | N/A |
|
||||
| iMac14,1 | <span style="color:#30BCD5"> YES </span> | woefi | - Upgraded NVMe<br/>- Patcher version 0.0.21 |
|
||||
| ^^ | ^^ | mikeboss | - Stock Model<br/>- Patcher version 0.0.19 |
|
||||
| iMac14,2 | ^^ | OKonnel | - Stock Model<br/>- Patcher version 0.0.22 |
|
||||
| ^^ | ^^ | mibaxx | - Stock Model<br/>- Patcher version 0.0.21 |
|
||||
| iMac14,3 | No reports | N/A | N/A |
|
||||
|
||||
### Mac Pro
|
||||
|
||||
| SMBIOS | Tested | Tester | Comment |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| MacPro3,1 | <span style="color:#30BCD5"> YES </span> | MykolaG | - Upgraded with RX 470 and BCM94360CD<br/>- Stock Bluetooth card removed<br/>- Patcher version 0.1.6 |
|
||||
| ^^ | ^^ | christiann | - Upgraded with RX 560 and BCM94322<br/>- Stock Bluetooth card removed<br/>- Patcher version 0.0.21 |
|
||||
| ^^ | ^^ | gw463 | - Upgraded GTX 680<br/>- Upgraded BCM94360<br/>- Patcher version 0.0.22 |
|
||||
| ^^ | ^^ | AlexSakha67 | - Upgraded R9 280<br/>- Patcher version 0.0.20 |
|
||||
| ^^ | ^^ | nekton1 | - Upgraded GTX 680<br/>- Patcher version 0.0.20 |
|
||||
| ^^ | ^^ | Pri-est | - Patcher version 0.0.9 |
|
||||
| ^^ | ^^ | vinaypundith | - Upgraded GTX 680<br/>- Upgraded BCM94360CD<br/>- Patcher version 0.0.6 |
|
||||
| MacPro4,1 | ^^ | ^^ | - Patcher version 0.0.9 |
|
||||
| MacPro5,1 | ^^ | woefi | - Upgraded with RX 580<br/>- Patcher version 0.0.21 |
|
||||
| ^^ | ^^ | Mabrouk Oscar | - Patcher version 0.0.21 |
|
||||
| ^^ | ^^ | astuffedtiger | - MacPro4,1 flashed to 5,1<br/>- Patcher version 0.0.18 |
|
||||
70
docs/TROUBLESHOOTING.md
Normal file
@@ -0,0 +1,70 @@
|
||||
# Troubleshooting
|
||||
|
||||
Here are some common errors users may experience while using this patcher:
|
||||
|
||||
* [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)
|
||||
* [Cannot boot macOS without the USB](#cannot-boot-macos-without-the-usb)
|
||||
* [Infinite Recovery OS Booting](#infinite-recovery-os-reboot)
|
||||
* [Reboot when entering Hibernation (`Sleep Wake Failure`)](#reboot-when-entering-hibernation-sleep-wake-failure)
|
||||
* [Booting with a non-flashed GPU](#booting-with-a-non-flashed-gpu)
|
||||
* [How to Boot Big Sur Recovery](#how-to-boot-big-sur-recovery)
|
||||
* [Stuck on "Your Mac needs a firmware update"](#stuck-on-your-mac-needs-a-firmware-update)
|
||||
* [No Brightness Control](#no-brightness-control)
|
||||
|
||||
## Stuck on `This version of Mac OS X is not supported on this platform`
|
||||
|
||||
This means macOS has detected a SMBIOS it does not support, to resolve this ensure you're booting OpenCore **before** the macOS installer in the boot picker. Reminder the option will be called `EFI Boot`
|
||||
|
||||
Once you've booted OpenCore at least once, your hardware should now auto boot it until either NVRAM reset or you remove the drive with OpenCore installed.
|
||||
|
||||
## Cannot boot macOS without the USB
|
||||
|
||||
By default, the OpenCore Patcher won't install OpenCore onto the internal drive itself during installs. Instead, you'll need to either [manually transfer](https://dortania.github.io/OpenCore-Post-Install/universal/oc2hdd.html) OpenCore to the internal drive's EFI or run this patcher's Option 2 again but select your internal drive.
|
||||
|
||||
Reminder that once this is done, you'll need to select OpenCore in the boot picker again for your hardware to remember this entry and auto boot from then on.
|
||||
|
||||
## Infinite Recovery OS Booting
|
||||
|
||||
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, simply uninstall OpenCore and [reset NVRAM](https://support.apple.com/en-mide/HT201255).
|
||||
|
||||
* Note: Machines with modded root volumes will also result in infinite recovery until integrity is restored
|
||||
|
||||
## Reboot when entering Hibernation (`Sleep Wake Failure`)
|
||||
|
||||
[Known issue on some models](https://github.com/dortania/Opencore-Legacy-Patcher/issues/72), temporary fix is to disable Hibernation:
|
||||
|
||||
```
|
||||
sudo pmset -a hibernatemode 0
|
||||
```
|
||||
|
||||
## Booting with a non-flashed GPU
|
||||
|
||||
For Mac Pro, Xserve and iMac users with non-flashed GPUs, you can still easily boot OpenCore and view the entire boot process. To do so, make sure SIP is disabled(to allow NVRAM write access) and run the following:
|
||||
|
||||
```sh
|
||||
sudo bless --verbose --file /Volumes/VOLNAME/EFI/OC/OpenCore.efi --folder /Volumes/VOLNAME/EFI/OC --setBoot
|
||||
```
|
||||
|
||||
* Note you will need to replace `VOLNAME` with the Volume name of your USB or hard drive with OpenCore
|
||||
* Note 2: Once done, you can re-enable SIP
|
||||
* Note 3: The EFI partition OpenCore was installed on must be mounted, if it's unmounted simply rerun "Install OpenCore to drive"
|
||||
|
||||
Once you boot OpenCore for the first time, LauncherOption will install itself as the top boot priority making OpenCore always launch. Combined with `RequestBootVar`, all boot options must go through OpenCore ensuring seamless usage even with OS installation and updates.
|
||||
|
||||
## How to Boot Big Sur Recovery
|
||||
|
||||
By default, the patcher will try to hide extra boot options such as recovery from the user. To make them appear, simply press the "Spacebar" inside OpenCore's Picker to list all boot options.
|
||||
|
||||
## Stuck on "Your Mac needs a firmware update"
|
||||
|
||||
Full error: "Your Mac needs a firmware update in order to install to this Volume. Please select a Mac OS Extended (Journaled) volume instead."
|
||||
|
||||
This error occurs when macOS determines the firmware to not have full APFS support. To resolve is quite simple, when building OpenCore head to "Patcher Settings" and enable "Moderate SMBIOS Patching" or higher. This will ensure that the firmware reported will show as supporting full APFS capabilities.
|
||||
|
||||
## No Brightness Control
|
||||
|
||||
With OCLP v0.0.22, we've added support for brightness control on many models. However some users may have noticed that their brightness keys do not work.
|
||||
|
||||
To work-around, we recommend user try out the below app:
|
||||
|
||||
* [Brightness Slider](https://actproductions.net/free-apps/brightness-slider/)
|
||||
15
docs/UNINSTALL.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# Uninstalling OpenCore
|
||||
|
||||
To remove OpenCore is actually quite simply:
|
||||
|
||||
1. Remove OpenCore either from the USB or internal drive
|
||||
|
||||
* You'll need to mount the drive's EFI partition, and delete the EFI/OC folder as well as the System folder
|
||||
* Note **do not** delete the entire EFI folder, this will likely break any existing Windows and Linux installations
|
||||
* [See here for example how to mount](https://dortania.github.io/OpenCore-Post-Install/universal/oc2hdd.html)
|
||||
|
||||
2. Reset NVRAM
|
||||
|
||||
* [Reset NVRAM or PRAM on your Mac](https://support.apple.com/HT204063)
|
||||
|
||||
Know that if you are on Big Sur when you remove the EFI folder, your Mac will no longer boot and show the prohibited symbol. Be ready to install an older version of macOS before you uninstall OpenCore.
|
||||
22
docs/UPDATE.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# Updating OpenCore and Co
|
||||
|
||||
With OpenCore Legacy Patcher, generally there's very little reason for users to update the OpenCore installed on their machine unless you feel there's a benefit with new versions for your setup.
|
||||
|
||||
For those who do wish to update, it's actually quite easy. Simply [download the latest release](https://github.com/dortania/OpenCore-Legacy-Patcher/releases) and rerun the patcher:
|
||||
|
||||

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

|
||||
|
||||
From this, we can see we're running a RELEASE version of OpenCore 0.6.8 built on March 27th, 2021 with Patcher Version 0.0.20!
|
||||
88
docs/WINDOWS.md
Normal file
@@ -0,0 +1,88 @@
|
||||
# Installing UEFI Windows 10
|
||||
|
||||
* Guide based off of [cdf's Mac Pro Thread](https://forums.macrumors.com/threads/opencore-on-the-mac-pro.2207814/)
|
||||
|
||||
To install UEFI is actually super simple! All it requires is to boot Windows' Installer through OpenCore to force a UEFI setup. Here we'll be going a bit more step by step in the process including partitioning and such.
|
||||
|
||||
* Note: UEFI Windows is generally quite usable for Arrendale and newer models, however machines with Penryn CPUs may experience issues
|
||||
* Recommended Models:
|
||||
* MacBookAir4,x and newer
|
||||
* MacBookPro8,x and newer
|
||||
* Macmini5,x and newer
|
||||
* iMac11,x and newer
|
||||
* MacPro4,1 and newer
|
||||
* Xserve3,1 and newer
|
||||
|
||||
Once you know your model is supported, you're good to go with the rest of this guide
|
||||
|
||||
## Disk Formatting
|
||||
|
||||
To start off, we'll need the following:
|
||||
|
||||
* An 8GB USB drive for the Windows Installer
|
||||
* Minimum of 30GB of free space on whatever drive you want to install Windows too
|
||||
|
||||
First, lets format out drives as follows:
|
||||
|
||||
### USB Drive Formatting
|
||||
|
||||
Open Disk Utility in macOS and format the USB Drive as ExFat with MBR Scheme:
|
||||
|
||||

|
||||
|
||||
### Disk Formatting
|
||||
|
||||
Next, grab the drive you wish to install Windows on and partition it as ExFat (If formatting entire drive, ensure it's GUID Partition Table):
|
||||
|
||||

|
||||
|
||||
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
|
||||
|
||||
* Note: 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
|
||||
|
||||

|
||||
|
||||
## Creating the Installer
|
||||
|
||||
First up, lets grab Windows's Installer at the below link:
|
||||
|
||||
* [Download Windows 10 Disc Image (ISO File)](https://www.microsoft.com/en-ca/software-download/windows10ISO)
|
||||
|
||||
Next, mount the Windows 10 ISO:
|
||||
|
||||

|
||||
|
||||
The 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):
|
||||
|
||||
```
|
||||
rsync -r -P /Volumes/CCCOMA_X64/ /Volumes/W10USB
|
||||
```
|
||||
|
||||

|
||||
|
||||
Command will take some time, so sit back and get some coffee. Once finished, the root of the USB drive should look as follows:
|
||||
|
||||
* Ensure that these folders and files are on the root, otherwise the USB will not boot
|
||||
|
||||

|
||||
|
||||
Once done, lets reboot into OpenCore's Menu and you'll see a new Windows' entry:
|
||||
|
||||
* 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
|
||||
|
||||

|
||||
|
||||
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 Wifi and such are functioning correctly. This can be downloaded from the BootCamp Assistant app in macOS
|
||||
|
||||

|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### iMac12,x Bluescreen after driver installation
|
||||
|
||||
Currently Intel's iGPU drivers for the HD 3000 series do not support UEFI booting in Windows. Recommended solution is to simply disable: [iMac 12,1 Windows 10 Boot Loop – Fix Intel Graphics issue](https://zzq.org/?p=39)
|
||||
12795
docs/package-lock.json
generated
Normal file
51
docs/package.json
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"name": "OpenCore-Legacy-Patcher",
|
||||
"version": "0.0.1",
|
||||
"description": "Guide to put macOS on unsupported devices",
|
||||
"main": "",
|
||||
"author": {
|
||||
"name": "Dortania",
|
||||
"url": "https://github.com/dortania"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/dortania/OpenCore-Legacy-Patcher.git"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "vuepress dev",
|
||||
"build": "vuepress build",
|
||||
"fix-lint": "run-script-os",
|
||||
"fix-lint:default": "(echo Attempting to fix lint... && markdownlint -c .markdownlint.json -p .markdownlintignore '**/*.md' -f && echo Fixed successfully, please commit.) || (echo Fix failed! && exit 1)",
|
||||
"fix-lint:win32": "(echo Attempting to fix lint... && markdownlint -c .markdownlint.json -p .markdownlintignore **/*.md -f && echo Fixed successfully, please commit.) || (echo Fix failed! && exit 1)",
|
||||
"lint": "run-script-os",
|
||||
"lint:default": "(echo Linting... && markdownlint -c .markdownlint.json -p .markdownlintignore '**/*.md' && echo Lint passed.) || (echo Lint failed! Please review and fix errors. && exit 1)",
|
||||
"lint:win32": "(echo Linting... && markdownlint -c .markdownlint.json -p .markdownlintignore **/*.md && echo Lint passed.) || (echo Lint failed! Please review and fix errors. && exit 1)",
|
||||
"lint-ci": "run-script-os",
|
||||
"lint-ci:default": "(echo Linting... && markdownlint -c .markdownlint.json -p .markdownlintignore '**/*.md' && echo Lint passed.) || ((echo Lint failed, attempting fix... && markdownlint -c .markdownlint.json -p .markdownlintignore '**/*.md' -f && echo Fix generated successfully. Please apply the following diff using git apply && git diff) || echo Fix failed! && exit 1)",
|
||||
"lint-ci:win32": "(echo Linting... && markdownlint -c .markdownlint.json -p .markdownlintignore **/*.md && echo Lint passed.) || ((echo Lint failed, attempting fix... && markdownlint -c .markdownlint.json -p .markdownlintignore **/*.md -f && echo Fix generated successfully. Please apply the following diff using git apply && git diff) || echo Fix failed! && exit 1)",
|
||||
"sort-dict": "node ./scripts/sortDict.js",
|
||||
"spellcheck": "run-script-os",
|
||||
"spellcheck:default": "(spellchecker --plugins spell indefinite-article repeated-words syntax-urls --dictionaries dictionary/dictionary.txt dictionary/opencorekeys.txt --files '**/*.md' && echo Spellcheck passed.) || (echo Spellcheck failed! Please review and fix errors/add words to dictionary as needed. && exit 1)",
|
||||
"spellcheck:win32": "(spellchecker --plugins spell indefinite-article repeated-words syntax-urls --dictionaries dictionary/dictionary.txt dictionary/opencorekeys.txt --files **/*.md && echo Spellcheck passed.) || (echo Spellcheck failed! Please review and fix errors/add words to dictionary as needed. && exit 1)",
|
||||
"test": "run-script-os",
|
||||
"test:default": "npm run lint --silent; npm run spellcheck --silent",
|
||||
"test:win32": "npm run lint --silent & npm run spellcheck --silent"
|
||||
},
|
||||
"license": "CC-BY-NC-SA-4.0",
|
||||
"devDependencies": {
|
||||
"@vuepress/plugin-back-to-top": "^1.7.1",
|
||||
"markdown-it-multimd-table": "^4.0.3",
|
||||
"markdown-link-check": "^3.8.5",
|
||||
"markdownlint-cli": "^0.26.0",
|
||||
"run-script-os": "^1.1.4",
|
||||
"spellchecker-cli": "^4.4.0",
|
||||
"vuepress": "^1.7.1",
|
||||
"vuepress-plugin-medium-zoom": "^1.1.9",
|
||||
"vuepress-plugin-zooming": "^1.1.8",
|
||||
"vuepress-theme-book": "0.0.5",
|
||||
"vuepress-theme-dark-new": "^0.1.2",
|
||||
"vuepress-theme-succinct": "^1.6.4",
|
||||
"vuepress-theme-yuu": "^2.3.0"
|
||||
},
|
||||
"homepage": "https://dortania.github.io/OpenCore-Legacy-Patcher/"
|
||||
}
|
||||
9
docs/scripts/linkcheck.py
Normal file
@@ -0,0 +1,9 @@
|
||||
from pathlib import Path
|
||||
import subprocess
|
||||
|
||||
for i in [i for i in list(Path().resolve().glob("**/*.md")) if "node_modules" not in str(i.parent) and "_book" not in str(i.parent)]:
|
||||
#bert = subprocess.run(['npx', 'markdown-link-check', '"' + str(i) + '"', '-c', '.markdownlinkcheck.json'], capture_output=True, shell=True, cwd=Path().resolve())
|
||||
bert = subprocess.run('npx markdown-link-check "' + str(i) + '"', stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True, cwd=Path().resolve())
|
||||
outpot = bert.stdout.decode().replace("\r", "").split("\n")
|
||||
outpot = [i for i in outpot if ("FILE: " in i or " → Status: " in i) and " → Status: 429" not in i]
|
||||
[print(i) for i in outpot]
|
||||
26
docs/scripts/sortDict.js
Normal file
@@ -0,0 +1,26 @@
|
||||
const fs = require("fs");
|
||||
|
||||
process.chdir(__dirname);
|
||||
|
||||
console.log("Reading dictionary.txt");
|
||||
let dictionary = fs.readFileSync("../dictionary/dictionary.txt", { encoding: "UTF8" })
|
||||
.replace("\r", "").split("\n");
|
||||
|
||||
let ocDictionary = fs.readFileSync("../dictionary/opencorekeys.txt", { encoding: "UTF8" })
|
||||
.replace("\r", "").split("\n");
|
||||
|
||||
dictionary = dictionary.filter(string => string != "");
|
||||
ocDictionary = ocDictionary.filter(string => string != "");
|
||||
|
||||
dictionary = dictionary.filter((string, index) => dictionary.indexOf(string) == index);
|
||||
ocDictionary = ocDictionary.filter((string, index) => ocDictionary.indexOf(string) == index);
|
||||
|
||||
dictionary = dictionary.filter(string => !ocDictionary.includes(string));
|
||||
|
||||
console.log("Sorting...");
|
||||
dictionary.sort();
|
||||
ocDictionary.sort();
|
||||
|
||||
console.log("Writing dictionary.txt");
|
||||
fs.writeFileSync("../dictionary/dictionary.txt", dictionary.join("\n"));
|
||||
fs.writeFileSync("../dictionary/opencorekeys.txt", ocDictionary.join("\n"));
|
||||
10
entitlements.plist
Normal file
@@ -0,0 +1,10 @@
|
||||
<?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>com.apple.security.cs.disable-library-validation</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.disable-executable-page-protection</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
images/OC-Build.png
Normal file
|
After Width: | Height: | Size: 99 KiB |
BIN
images/OC-Patcher.png
Normal file
|
After Width: | Height: | Size: 270 KiB |
BIN
images/OC-Picker-External.png
Normal file
|
After Width: | Height: | Size: 129 KiB |
BIN
images/OC-Picker-Internal.png
Normal file
|
After Width: | Height: | Size: 141 KiB |
BIN
images/OC-Picker-SD.png
Normal file
|
After Width: | Height: | Size: 79 KiB |
BIN
images/OC-Picker-SSD.png
Normal file
|
After Width: | Height: | Size: 62 KiB |
BIN
images/background-moved.png
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
images/build-efi.png
Normal file
|
After Width: | Height: | Size: 370 KiB |
BIN
images/createinstallmedia.png
Normal file
|
After Width: | Height: | Size: 292 KiB |
BIN
images/disk-efi.png
Normal file
|
After Width: | Height: | Size: 435 KiB |
BIN
images/disk-start.png
Normal file
|
After Width: | Height: | Size: 404 KiB |
BIN
images/efi-boot.png
Normal file
|
After Width: | Height: | Size: 68 KiB |
BIN
images/first-run.png
Normal file
|
After Width: | Height: | Size: 304 KiB |
BIN
images/format-usb.png
Normal file
|
After Width: | Height: | Size: 706 KiB |
BIN
images/graphics-download.png
Normal file
|
After Width: | Height: | Size: 374 KiB |
BIN
images/graphics-open.png
Normal file
|
After Width: | Height: | Size: 514 KiB |
BIN
images/icns-sl-save.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
images/icnspack-done.png
Normal file
|
After Width: | Height: | Size: 505 KiB |
BIN
images/icnspack-folder.png
Normal file
|
After Width: | Height: | Size: 493 KiB |
BIN
images/icon-SL.png
Normal file
|
After Width: | Height: | Size: 232 KiB |
BIN
images/logs-efi.png
Normal file
|
After Width: | Height: | Size: 453 KiB |
BIN
images/mac-icns-drive.png
Normal file
|
After Width: | Height: | Size: 394 KiB |
BIN
images/mountefi.png
Normal file
|
After Width: | Height: | Size: 99 KiB |
BIN
images/munki-dmg.png
Normal file
|
After Width: | Height: | Size: 349 KiB |
BIN
images/munki-done-2.png
Normal file
|
After Width: | Height: | Size: 392 KiB |
BIN
images/munki-process.png
Normal file
|
After Width: | Height: | Size: 791 KiB |
BIN
images/munki.png
Normal file
|
After Width: | Height: | Size: 291 KiB |
BIN
images/oc-boot.png
Normal file
|
After Width: | Height: | Size: 77 KiB |