Skip to content

Commit 0b171f4

Browse files
committed
Add patchsets for Tahoe
1 parent 52ea2be commit 0b171f4

File tree

7 files changed

+59
-143
lines changed

7 files changed

+59
-143
lines changed

oclp_r/constants.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,6 @@ def __init__(self) -> None:
266266
###https://github.moeyy.xyz
267267
###https://gitapi.simplehac.top
268268
self.github_mirror: str = ""
269-
# Open Intel Wireless
270-
self.intel_wireless_tahoe: bool = False
271269
self.api_link()
272270

273271
def api_link(self):

oclp_r/sys_patch/patchsets/detect.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
from .hardware.networking import (
3636
legacy_wireless,
3737
modern_wireless,
38-
intel_wireless_tahoe,
3938
)
4039
from .hardware.misc import (
4140
display_backlight,
@@ -122,22 +121,17 @@ def __init__(self, constants: constants.Constants,
122121
intel_haswell.IntelHaswell,
123122
intel_broadwell.IntelBroadwell,
124123
intel_skylake.IntelSkylake,
125-
126124
nvidia_tesla.NvidiaTesla,
127125
nvidia_kepler.NvidiaKepler,
128126
nvidia_webdriver.NvidiaWebDriver,
129-
130127
amd_terascale_1.AMDTeraScale1,
131128
amd_terascale_2.AMDTeraScale2,
132129
amd_legacy_gcn.AMDLegacyGCN,
133130
amd_polaris.AMDPolaris,
134131
amd_vega.AMDVega,
135-
136132
legacy_wireless.LegacyWireless,
137133
modern_wireless.ModernWireless,
138-
intel_wireless_tahoe.IntelWireless,
139134
legacy_audio.LegacyAudio,
140-
intel_wireless_tahoe.IntelWireless,
141135
modern_audio.ModernAudio,
142136
apfs_aligned.APFSP,
143137
voodoo_audio.VoodooAudio,

oclp_r/sys_patch/patchsets/hardware/audio/modern_audio.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
from .....datasets.os_data import os_data
1212

13-
from .....support import utilities
13+
from .....support import utilities
1414

1515

1616
class ModernAudio(BaseHardware):
@@ -24,25 +24,27 @@ def required_amfi_level(self) -> AmfiConfigDetectLevel:
2424
Currently defaulted to AMFI needing to be disabled
2525
"""
2626
return AmfiConfigDetectLevel.NO_CHECK
27+
2728
def name(self) -> str:
2829
"""
2930
Display name for end users
3031
"""
3132
return f"{self.hardware_variant()}: Modern Audio"
3233

33-
3434
def present(self) -> bool:
3535
"""
3636
AppleHDA was outright removed in macOS 26, so this patch set is always present if OS requires it
3737
"""
38-
if utilities.check_kext_loaded("org.voodoo.driver.VoodooHDA") !="" and self._constants.audio_type!="AppleHDA":
39-
self._constants.audio_type="AppleHDA"
40-
return self._constants.audio_type=="AppleHDA" and utilities.check_kext_loaded("as.vit9696.AppleALC") !=""
38+
if utilities.check_kext_loaded("org.voodoo.driver.VoodooHDA") != "" and self._constants.audio_type != "AppleHDA":
39+
self._constants.audio_type = "AppleHDA"
40+
return self._constants.audio_type == "AppleHDA" and utilities.check_kext_loaded("as.vit9696.AppleALC") != ""
41+
4142
def requires_kernel_debug_kit(self) -> bool:
4243
"""
4344
Apple no longer provides standalone kexts in the base OS
4445
"""
4546
return True
47+
4648
def native_os(self) -> bool:
4749
"""
4850
- Everything before macOS Tahoe 26 is considered native
@@ -51,19 +53,17 @@ def native_os(self) -> bool:
5153
return True
5254

5355
# Technically, macOS Tahoe Beta 1 is also native, so return True
54-
if self._os_build == "25A5279m" and self._constants.applehda_version=="26.0 Beta 1":
56+
if self._os_build == "25A5279m" and self._constants.applehda_version == "26.0 Beta 1":
5557
return True
5658

5759
return False
5860

59-
6061
def hardware_variant(self) -> HardwareVariant:
6162
"""
6263
Type of hardware variant
6364
"""
6465
return HardwareVariant.AUDIO
6566

66-
6767
def _modern_audio_patches(self) -> dict:
6868
"""
6969
Patches for Modern Audio
@@ -75,16 +75,16 @@ def _modern_audio_patches(self) -> dict:
7575
"AppleHDA.kext": f"{self._constants.applehda_version}",
7676
},
7777
},
78-
PatchType.REMOVE_SYSTEM_VOLUME:{
79-
"/Library/Extensions":[
78+
79+
PatchType.REMOVE_SYSTEM_VOLUME: {
80+
"/Library/Extensions": [
8081
"AppleHDADisabler.kext" ,
8182
"VoodooHDA.kext",
8283
],
8384
},
8485
},
8586
}
8687

87-
8888
def patches(self) -> dict:
8989
"""
9090
Patches for modern audio

oclp_r/sys_patch/patchsets/hardware/networking/intel_wireless_tahoe.py

Lines changed: 0 additions & 84 deletions
This file was deleted.

oclp_r/sys_patch/patchsets/hardware/networking/legacy_wireless.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,12 @@ class LegacyWireless(BaseHardware):
1919
def __init__(self, xnu_major, xnu_minor, os_build, global_constants: Constants) -> None:
2020
super().__init__(xnu_major, xnu_minor, os_build, global_constants)
2121

22-
2322
def name(self) -> str:
2423
"""
2524
Display name for end users
2625
"""
2726
return f"{self.hardware_variant()}: Legacy Wireless"
2827

29-
3028
def present(self) -> bool:
3129
"""
3230
Targeting Legacy Wireless
@@ -45,21 +43,18 @@ def present(self) -> bool:
4543

4644
return False
4745

48-
4946
def native_os(self) -> bool:
5047
"""
5148
Dropped support with macOS 12, Monterey
5249
"""
5350
return self._xnu_major < os_data.monterey.value or self._xnu_major >= os_data.tahoe.value
5451

55-
5652
def hardware_variant(self) -> HardwareVariant:
5753
"""
5854
Type of hardware variant
5955
"""
6056
return HardwareVariant.NETWORKING
6157

62-
6358
def _affected_by_cve_2024_23227(self) -> bool:
6459
""" 14.4
6560
CVE-2024-23227 broke our airportd patches for 12.7.4, 13.6.5 and
@@ -82,7 +77,6 @@ def _affected_by_cve_2024_23227(self) -> bool:
8277

8378
return False
8479

85-
8680
def _base_patch(self) -> dict:
8781
"""
8882
Base patches for Legacy Wireless
@@ -106,7 +100,6 @@ def _base_patch(self) -> dict:
106100
},
107101
}
108102

109-
110103
def _extended_patch(self) -> dict:
111104
"""
112105
Extended patches for Legacy Wireless
@@ -135,7 +128,6 @@ def _extended_patch(self) -> dict:
135128
},
136129
}
137130

138-
139131
def patches(self) -> dict:
140132
"""
141133
Patches for Legacy Wireless
Lines changed: 48 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
"""
22
modern_wireless.py: Modern Wireless detection
33
"""
4-
54
from ..base import BaseHardware, HardwareVariant
6-
75
from ...base import PatchType
8-
9-
from .....constants import Constants
6+
from .....constants import Constants
107
from .....detections import device_probe
11-
128
from .....datasets.os_data import os_data
139

1410

@@ -23,12 +19,11 @@ def name(self) -> str:
2319
"""
2420
return f"{self.hardware_variant()}: Modern Wireless"
2521

26-
2722
def present(self) -> bool:
2823
"""
2924
Targeting Modern Wireless
3025
"""
31-
if self._xnu_major>=os_data.tahoe.value:
26+
if self._xnu_major >= os_data.tahoe.value:
3227
return False
3328
return isinstance(self._computer.wifi, device_probe.Broadcom) and (
3429
self._computer.wifi.chipset in [
@@ -37,53 +32,84 @@ def present(self) -> bool:
3732
# We don't officially support this chipset, however we'll throw a bone to hackintosh users
3833
device_probe.Broadcom.Chipsets.AirPortBrcmNICThirdParty,
3934
]
40-
) or isinstance(self._computer.wifi, device_probe.IntelWirelessCard)and(
35+
) or isinstance(self._computer.wifi, device_probe.IntelWirelessCard) and (
4136
self._computer.wifi.chipset in [
4237
device_probe.IntelWirelessCard.Chipsets.IntelWirelessIDs,
4338
]
44-
)
45-
39+
)
4640

4741
def native_os(self) -> bool:
4842
"""
4943
Dropped support with macOS 14, Sonoma
5044
"""
51-
return self._xnu_major < os_data.sonoma.value or self._xnu_major >= os_data.tahoe.value
52-
45+
return self._xnu_major < os_data.sonoma.value
5346

5447
def hardware_variant(self) -> HardwareVariant:
5548
"""
5649
Type of hardware variant
5750
"""
5851
return HardwareVariant.NETWORKING
5952

60-
61-
def patches(self) -> dict:
53+
def _patches_modern_wireless_sonoma(self) -> dict:
6254
"""
63-
Patches for Modern Wireless
55+
Extended modern wireless patches
6456
"""
6557
if self.native_os() is True:
6658
return {}
59+
6760
return {
68-
"Modern Wireless": {
61+
"Modern Wireless Extended": {
6962
PatchType.OVERWRITE_SYSTEM_VOLUME: {
7063
"/usr/libexec": {
7164
"airportd": f"13.7.2-{self._xnu_major}",
72-
"wifip2pd": f"13.7.2-{self._xnu_major}",
73-
},
74-
"/System/Library/CoreServices": {
75-
**({ "WiFiAgent.app": "14.7.2" } if self._xnu_major >= os_data.sequoia else {}),
7665
},
7766
},
7867
PatchType.MERGE_SYSTEM_VOLUME: {
7968
"/System/Library/Frameworks": {
8069
"CoreWLAN.framework": f"13.7.2-{self._xnu_major}",
8170
},
8271
"/System/Library/PrivateFrameworks": {
83-
"CoreWiFi.framework": f"13.7.2-{self._xnu_major}",
72+
"CoreWiFi.framework": f"13.7.2-{self._xnu_major}",
73+
},
74+
},
75+
},
76+
}
77+
78+
def _patches_modern_wireless(self) -> dict:
79+
"""
80+
Common modern wireless patches
81+
"""
82+
if self.native_os() is True:
83+
return {}
84+
85+
return {
86+
"Modern Wireless Common": {
87+
PatchType.OVERWRITE_SYSTEM_VOLUME: {
88+
"/usr/libexec": {
89+
"wifip2pd": f"13.7.2-{self._xnu_major}",
90+
},
91+
},
92+
PatchType.MERGE_SYSTEM_VOLUME: {
93+
"/System/Library/PrivateFrameworks": {
8494
"IO80211.framework": f"13.7.2-{self._xnu_major}",
8595
"WiFiPeerToPeer.framework": f"13.7.2-{self._xnu_major}",
8696
},
87-
}
97+
},
8898
},
8999
}
100+
101+
def patches(self) -> dict:
102+
"""
103+
Dictionary of patches
104+
"""
105+
106+
_base = {
107+
**self._patches_modern_wireless(),
108+
}
109+
110+
if self._xnu_major == os_data.sonoma:
111+
_base.update({
112+
**self._patches_modern_wireless_sonoma(),
113+
})
114+
115+
return _base

0 commit comments

Comments
 (0)