build: Implement KDKlessWorkaround

This commit is contained in:
Mykola Grymalyuk
2022-12-16 18:18:15 -07:00
parent 6169d593c5
commit f71fcf6f58
6 changed files with 49 additions and 1 deletions

View File

@@ -15,6 +15,7 @@
- Resolve Content Caching Patch Regression
- Resolve KDK Versioning Fallback crashing when primary KDK site is down
- Resolve AirPlay to Mac support on Ventura with VMM
- Resolve WindowServer crashing on KDK-less with macOS 13.2 and Rapid Security Response updates
- Increment Binaries:
- OpenCorePkg 0.8.7 - release
- FeatureUnlock 1.1.2 - rolling (94e29ce)

View File

@@ -1527,6 +1527,24 @@
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>BundlePath</key>
<string>KDKlessWorkaround.kext</string>
<key>Comment</key>
<string>KDKlessWorkaround</string>
<key>Enabled</key>
<false/>
<key>ExecutablePath</key>
<string>Contents/MacOS/KDKlessWorkaround</string>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string>22.0.0</string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
</array>
<key>Block</key>
<array/>

Binary file not shown.

View File

@@ -33,6 +33,7 @@ class build_misc:
self.debug_handling()
self.cpu_friend_handling()
self.general_oc_handling()
self.aux_kc_workaround()
def feature_unlock_handling(self):
if self.constants.fu_status is True:
@@ -227,4 +228,24 @@ class build_misc:
if self.constants.vault is True and utilities.check_command_line_tools() is True:
print("- Setting Vault configuration")
self.config["Misc"]["Security"]["Vault"] = "Secure"
support.build_support(self.model, self.constants, self.config).get_efi_binary_by_path("OpenShell.efi", "Misc", "Tools")["Enabled"] = False
support.build_support(self.model, self.constants, self.config).get_efi_binary_by_path("OpenShell.efi", "Misc", "Tools")["Enabled"] = False
def aux_kc_workaround(self):
gpu_dict = []
if not self.constants.custom_model:
gpu_dict = self.constants.computer.gpus
else:
if self.model in smbios_data.smbios_dictionary:
gpu_dict = smbios_data.smbios_dictionary[self.model]["Stock GPUs"]
for gpu in gpu_dict:
if not self.constants.custom_model:
gpu = gpu.arch
if gpu in [
device_probe.Intel.Archs.Ivy_Bridge,
device_probe.Intel.Archs.Haswell,
device_probe.Intel.Archs.Broadwell,
device_probe.Intel.Archs.Skylake,
device_probe.NVIDIA.Archs.Kepler,
]:
support.build_support(self.model, self.constants, self.config).enable_kext("KDKlessWorkaround.kext", self.constants.kdkless_version, self.constants.kdkless_path)
break

View File

@@ -98,6 +98,10 @@ class Constants:
## https://github.com/blackgate/AMDGPUWakeHandler
self.gpu_wake_version = "1.0.0"
## flagersgit
## https://github.com/flagersgit/KDKlessWorkaround
self.kdkless_version = "1.0.0"
# Get resource path
self.current_path = Path(__file__).parent.parent.resolve()
self.payload_path = self.current_path / Path("payloads")
@@ -462,6 +466,10 @@ class Constants:
def apple_raid_path(self):
return self.payload_kexts_path / Path(f"Misc/AppleRAIDCard-v{self.apple_raid_version}.zip")
@property
def kdkless_path(self):
return self.payload_kexts_path / Path(f"Misc/KDKlessWorkaround-v{self.kdkless_version}-{self.kext_variant}.zip")
@property
def plist_folder_path(self):
return self.payload_kexts_path / Path("Plists")