From 5f7b8363306742987d59463f4deee0c0bb1e0e72 Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk <48863253+khronokernel@users.noreply.github.com> Date: Fri, 18 Jun 2021 07:42:21 -0600 Subject: [PATCH] Fix set_defaults incorrectly disabling SIP --- OpenCore-Patcher.command | 60 ++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/OpenCore-Patcher.command b/OpenCore-Patcher.command index 654038072..6ac20bcae 100755 --- a/OpenCore-Patcher.command +++ b/OpenCore-Patcher.command @@ -38,36 +38,36 @@ class OpenCoreLegacyPatcher: self.constants.secure_status = False # Default false for Monterey self.constants.disable_amfi = False - if ( - model in ModelArray.LegacyGPU - and host_is_target - and self.computer.dgpu.arch - in [ - device_probe.AMD.Archs.Legacy_GCN, - device_probe.AMD.Archs.Polaris, - device_probe.AMD.Archs.Vega, - device_probe.AMD.Archs.Navi, - device_probe.NVIDIA.Archs.Kepler, - ] - ): - # Building on device and we have a native, supported GPU - self.constants.sip_status = True - # self.constants.secure_status = True # Monterey - self.constants.disable_amfi = False - else: - self.constants.sip_status = False # Unsigned kexts - self.constants.secure_status = False # Root volume modified - self.constants.disable_amfi = True # Unsigned binaries - - if model in ModelArray.ModernGPU and host_is_target and model in ["iMac13,1", "iMac13,3"] and self.computer.dgpu: - # Some models have a supported dGPU, others don't - self.constants.sip_status = True - # self.constants.secure_status = True # Monterey - self.constants.disable_amfi = False - else: - self.constants.sip_status = False # Unsigned kexts - self.constants.secure_status = False # Modified root volume - self.constants.disable_amfi = False # Signed bundles + if model in ModelArray.LegacyGPU: + if ( + host_is_target + and self.computer.dgpu.arch + in [ + device_probe.AMD.Archs.Legacy_GCN, + device_probe.AMD.Archs.Polaris, + device_probe.AMD.Archs.Vega, + device_probe.AMD.Archs.Navi, + device_probe.NVIDIA.Archs.Kepler, + ] + ): + # Building on device and we have a native, supported GPU + self.constants.sip_status = True + # self.constants.secure_status = True # Monterey + self.constants.disable_amfi = False + else: + self.constants.sip_status = False # Unsigned kexts + self.constants.secure_status = False # Root volume modified + self.constants.disable_amfi = True # Unsigned binaries + if model in ModelArray.ModernGPU: + if host_is_target and model in ["iMac13,1", "iMac13,3"] and self.computer.dgpu: + # Some models have a supported dGPU, others don't + self.constants.sip_status = True + # self.constants.secure_status = True # Monterey + #self.constants.disable_amfi = False # Signed bundles, Don't need to explicitly set currently + else: + self.constants.sip_status = False # Unsigned kexts + self.constants.secure_status = False # Modified root volume + #self.constants.disable_amfi = False # Signed bundles, Don't need to explicitly set currently def build_opencore(self): Build.BuildOpenCore(self.constants.custom_model or self.constants.computer.real_model, self.constants).build_opencore()