From 5e0354531a481e0307c4362e0d0da95f79b0cd4e Mon Sep 17 00:00:00 2001
From: educovas <44532297+educovas@users.noreply.github.com>
Date: Sat, 16 Oct 2021 15:53:02 -0300
Subject: [PATCH 01/13] Monterey legacy WiFi workaround
---
docs/TROUBLESHOOTING.md | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/docs/TROUBLESHOOTING.md b/docs/TROUBLESHOOTING.md
index fdc3a1866..395aa4e40 100644
--- a/docs/TROUBLESHOOTING.md
+++ b/docs/TROUBLESHOOTING.md
@@ -10,6 +10,7 @@ Here are some common errors users may experience while using this patcher:
* [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)
+* [Cannot connect Wi-Fi on Monterey with legacy cards](#Cannot-conect-to-Wi-Fi-on-Monterey-with-legacy-cards)
## Stuck on `This version of Mac OS X is not supported on this platform`
@@ -68,3 +69,9 @@ With OCLP v0.0.22, we've added support for brightness control on many models. Ho
To work-around, we recommend user try out the below app:
* [Brightness Slider](https://actproductions.net/free-apps/brightness-slider/)
+
+## Cannot connect Wi-Fi on Monterey with legacy cards
+
+With OCLP v0.2.5, we've added support for legacy Wi-Fi on Monterey. However some users may have noticed that they can't connect to wireless networks.
+
+To work-around, we recommend users to manually connect using the "other" option on the Wi-Fi menu bar or manually adding the network on the "Network" preference pane.
From 978d2fda260cfd79762d1e6052617141128238a4 Mon Sep 17 00:00:00 2001
From: educovas <44532297+educovas@users.noreply.github.com>
Date: Sat, 16 Oct 2021 15:58:51 -0300
Subject: [PATCH 02/13] Fix typo
---
docs/TROUBLESHOOTING.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/TROUBLESHOOTING.md b/docs/TROUBLESHOOTING.md
index 395aa4e40..b754141b5 100644
--- a/docs/TROUBLESHOOTING.md
+++ b/docs/TROUBLESHOOTING.md
@@ -10,7 +10,7 @@ Here are some common errors users may experience while using this patcher:
* [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)
-* [Cannot connect Wi-Fi on Monterey with legacy cards](#Cannot-conect-to-Wi-Fi-on-Monterey-with-legacy-cards)
+* [Cannot connect Wi-Fi on Monterey with legacy cards](#Cannot-connect-Wi-Fi-on-Monterey-with-legacy-cards)
## Stuck on `This version of Mac OS X is not supported on this platform`
From 729feba2ba7c7928c7e00905ea5fbd642b07b5fc Mon Sep 17 00:00:00 2001
From: educovas <44532297+educovas@users.noreply.github.com>
Date: Sat, 16 Oct 2021 16:04:12 -0300
Subject: [PATCH 03/13] Update host and target OS
---
docs/MODELS.md | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/docs/MODELS.md b/docs/MODELS.md
index 8b1a8abd5..7a2c3da39 100644
--- a/docs/MODELS.md
+++ b/docs/MODELS.md
@@ -20,10 +20,10 @@ 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. |
+| HostOS | macOS 10.9 - macOS 12 | 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 - macOS 12 | 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
+* macOS Monterey support is currently in beta and is not recommended for everyday users.
* Recommend looking at the [macOS Monterey Support page](./MONTEREY-DROP.md) for a better idea of Monterey's current status
### MacBook
From 8c138658e23086353ddcdca2a607a1e3caa62c50 Mon Sep 17 00:00:00 2001
From: educovas <44532297+educovas@users.noreply.github.com>
Date: Sat, 16 Oct 2021 16:06:32 -0300
Subject: [PATCH 04/13] Update supported Ones
---
docs/BENIFITS.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/BENIFITS.md b/docs/BENIFITS.md
index 06120d8b5..a06a8d6fb 100644
--- a/docs/BENIFITS.md
+++ b/docs/BENIFITS.md
@@ -11,7 +11,7 @@ With OpenCore Legacy Patcher we recommend users go through the below table to un
| System Integrity Protection | Fully enabled on Metal GPUs | Disabled for early 2013 and older during the patching process and first boot afterwards, otherwise enabled |
| APFS Snapshots | Fully enabled | Disabled |
| User facing | TUI interface | SwiftUI interface, more user friendly |
-| Supported OSes | 10.7-11 | 10.15-11 |
+| Supported OSes | 10.7-12 | 10.15-11 |
| Firmware Patching | None required | Required for models without native APFS support |
| BootCamp Switching | Requires EFI Conversion for Start Disk support, otherwise still supported | Native |
| Non-Metal GPU Acceleration | In active development, see Acceleration Progress Tracker: [Link](https://github.com/dortania/OpenCore-Legacy-Patcher/issues/108) | Currently not researching |
From d1fbeba50f6e9d9e91fc9f6e728344f7d86e1cc3 Mon Sep 17 00:00:00 2001
From: educovas <44532297+educovas@users.noreply.github.com>
Date: Sat, 16 Oct 2021 16:20:32 -0300
Subject: [PATCH 05/13] Add Safari extensions workaround / +
---
docs/ACCEL.md | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/docs/ACCEL.md b/docs/ACCEL.md
index 9bafe433c..a5a45e4e1 100644
--- a/docs/ACCEL.md
+++ b/docs/ACCEL.md
@@ -9,8 +9,9 @@
* [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)
+* [Unable to allow Safari Extensions](#Unable-to-allow-Safari-Extensions)
-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:
+The below page is for users experiencing issues with their overall usage of macOS Big Sur / macOS Monterey 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
@@ -106,6 +107,8 @@ Due to the Metal Backend, the enhanced color output of these apps seems to heavi
To work around this, simply press Tab to hover over and press spacebar to simulate a click.
+Note: This work-around doesn't seem to work in macOS 11.3 and newer
+
## 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
@@ -135,4 +138,12 @@ Due to an odd bug with ATI's TeraScale 2 GPUs, many users will experience errati
Applications that can set color depth are:
* [SwitchResX](https://www.madrau.com)
-* [ResXtreme](https://macdownload.informer.com/resxtreme/)
\ No newline at end of file
+* [ResXtreme](https://macdownload.informer.com/resxtreme/)
+
+## Unable to allow Safari Extensions
+
+Due to an bug on the legacy acceleration patches, users won't be able to enable Safari Extensions
+
+This tool can be used to work-around this issue:
+
+* [Non-Metal Safari Extensions](https://github.com/moosethegoose2213/Non-Metal-Safari-Extensions/)
From f4e487c64808ee72979b95915c1c469b99aeb6f7 Mon Sep 17 00:00:00 2001
From: educovas <44532297+educovas@users.noreply.github.com>
Date: Sat, 16 Oct 2021 16:24:59 -0300
Subject: [PATCH 06/13] More changes
---
docs/ACCEL.md | 18 +-----------------
1 file changed, 1 insertion(+), 17 deletions(-)
diff --git a/docs/ACCEL.md b/docs/ACCEL.md
index a5a45e4e1..0f6367b44 100644
--- a/docs/ACCEL.md
+++ b/docs/ACCEL.md
@@ -11,7 +11,7 @@
* [Erratic Colours on ATI TeraScale 2 GPUs (HD5000/HD6000)](#erratic-colours-on-ati-terascale-2-gpus-hd5000-hd6000)
* [Unable to allow Safari Extensions](#Unable-to-allow-Safari-Extensions)
-The below page is for users experiencing issues with their overall usage of macOS Big Sur / macOS Monterey and the Legacy Graphics Acceleration patches. Note that the following GPUs currently do not have acceleration support in Big Sur:
+The below page is for users experiencing issues with their overall usage of macOS Big Sur / macOS Monterey and the Legacy Graphics Acceleration patches. Note that the following GPUs currently do not have acceleration support in Big Sur / Monterey:
* Intel 3rd and 4th Gen - GMA series
@@ -34,22 +34,6 @@ For those unfamiliar with what is considered a non-Metal GPU, see below chart:
:::
-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.
From 5e91ea181b5cdaccefc90c9fe8bd9fcbaa03dfc1 Mon Sep 17 00:00:00 2001
From: educovas <44532297+educovas@users.noreply.github.com>
Date: Sat, 16 Oct 2021 16:47:39 -0300
Subject: [PATCH 07/13] typo
---
docs/ACCEL.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/ACCEL.md b/docs/ACCEL.md
index 0f6367b44..fd99d5a5b 100644
--- a/docs/ACCEL.md
+++ b/docs/ACCEL.md
@@ -9,7 +9,7 @@
* [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)
-* [Unable to allow Safari Extensions](#Unable-to-allow-Safari-Extensions)
+* [Unable to allow Safari Extensions](#unable-to-allow-Safari-Extensions)
The below page is for users experiencing issues with their overall usage of macOS Big Sur / macOS Monterey and the Legacy Graphics Acceleration patches. Note that the following GPUs currently do not have acceleration support in Big Sur / Monterey:
From 16a666e8365f6643f48f10a196e6aa5cd34ac650 Mon Sep 17 00:00:00 2001
From: educovas <44532297+educovas@users.noreply.github.com>
Date: Sat, 16 Oct 2021 16:48:04 -0300
Subject: [PATCH 08/13] 2
---
docs/TROUBLESHOOTING.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/TROUBLESHOOTING.md b/docs/TROUBLESHOOTING.md
index b754141b5..93093c0ea 100644
--- a/docs/TROUBLESHOOTING.md
+++ b/docs/TROUBLESHOOTING.md
@@ -10,7 +10,7 @@ Here are some common errors users may experience while using this patcher:
* [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)
-* [Cannot connect Wi-Fi on Monterey with legacy cards](#Cannot-connect-Wi-Fi-on-Monterey-with-legacy-cards)
+* [Cannot connect Wi-Fi on Monterey with legacy cards](#cannot-connect-Wi-Fi-on-Monterey-with-legacy-cards)
## Stuck on `This version of Mac OS X is not supported on this platform`
From eaa686e0453f455b054f75edbc2aed9bd7029660 Mon Sep 17 00:00:00 2001
From: Mykola Grymalyuk
Date: Sat, 16 Oct 2021 21:51:55 -0600
Subject: [PATCH 09/13] Add saftey check for Vault configurations
---
resources/build.py | 11 +++++++++--
resources/utilities.py | 8 ++++++++
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/resources/build.py b/resources/build.py
index 39a54c776..ca8d5ab3b 100644
--- a/resources/build.py
+++ b/resources/build.py
@@ -1002,8 +1002,15 @@ class BuildOpenCore:
def sign_files(self):
if self.constants.vault is True:
- print("- Vaulting EFI")
- subprocess.run([str(self.constants.vault_path), f"{self.constants.oc_folder}/"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+ if utilities.check_command_line_tools() is True:
+ # sign.command checks for the existance of '/usr/bin/strings' however does not verify whether it's executable
+ # sign.command will continue to run and create an unbootable OpenCore.efi due to the missing strings binary
+ # macOS has dummy binaries that just reroute to the actual binaries after you install Xcode's Command Line Tools
+ print("- Vaulting EFI")
+ subprocess.run([str(self.constants.vault_path), f"{self.constants.oc_folder}/"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+ else:
+ print("- Missing Command Line tools, skipping Vault for saftey reasons")
+ print("- Install via 'xcode-select --install' and rerun OCLP if you wish to vault this config")
def build_opencore(self):
self.build_efi()
diff --git a/resources/utilities.py b/resources/utilities.py
index 2f8e8d7d9..6d1d4b2ea 100644
--- a/resources/utilities.py
+++ b/resources/utilities.py
@@ -238,6 +238,14 @@ def cls():
else:
print("\u001Bc")
+def check_command_line_tools():
+ # Determine whether Command Line Tools exist
+ # xcode-select -p
+ xcode_select = subprocess.run("xcode-select -p".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+ if xcode_select.returncode == 0:
+ return True
+ else:
+ return False
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
From 69e50aeb6d40298430686aea92398bf45f1f3276 Mon Sep 17 00:00:00 2001
From: Mykola Grymalyuk
Date: Sat, 16 Oct 2021 23:21:29 -0600
Subject: [PATCH 10/13] Fix incorrectly parsing SecureBootModel status
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/581
---
resources/utilities.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/resources/utilities.py b/resources/utilities.py
index 6d1d4b2ea..fb0aaf80f 100644
--- a/resources/utilities.py
+++ b/resources/utilities.py
@@ -196,10 +196,10 @@ def patching_status(os_sip, os):
# Catalina and older supports individually disabling Library Validation
amfi_enabled = False
- if (
- get_nvram("HardwareModel", "94B73556-2197-4702-82A8-3E1337DAFBFB", decode=False)
- and get_nvram("HardwareModel", "94B73556-2197-4702-82A8-3E1337DAFBFB", decode=False) not in constants.Constants().sbm_values
- ):
+ if get_nvram("HardwareModel", "94B73556-2197-4702-82A8-3E1337DAFBFB", decode=False):
+ if get_nvram("HardwareModel", "94B73556-2197-4702-82A8-3E1337DAFBFB", decode=False) not in constants.Constants().sbm_values:
+ sbm_enabled = False
+ else:
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:
From db617db1fd0936c8b809d1be5470d29dc66af959 Mon Sep 17 00:00:00 2001
From: Mykola Grymalyuk
Date: Sun, 17 Oct 2021 00:13:49 -0600
Subject: [PATCH 11/13] Allow for setting custom SIP values via TUI
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/516
---
CHANGELOG.md | 1 +
resources/build.py | 7 ++++++-
resources/cli_menu.py | 30 ++++++++++++++++++++++++++++--
resources/constants.py | 1 +
4 files changed, 36 insertions(+), 3 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index dc63eaa0c..824c68424 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,7 @@
# OpenCore Legacy Patcher changelog
## 0.3.1
+- Allow for setting custom SIP values via TUI
## 0.3.0
- Fix Nvidia Tesla Acceleration in Monterey Beta 7+
diff --git a/resources/build.py b/resources/build.py
index ca8d5ab3b..a8c3fbc75 100644
--- a/resources/build.py
+++ b/resources/build.py
@@ -692,7 +692,12 @@ class BuildOpenCore:
print("- Setting Vault configuration")
self.config["Misc"]["Security"]["Vault"] = "Secure"
self.get_efi_binary_by_path("OpenShell.efi", "Misc", "Tools")["Enabled"] = False
- if self.constants.sip_status is False:
+ if self.constants.custom_sip_value:
+ print(f"- Setting SIP value to: {self.constants.custom_sip_value}")
+ sip = self.constants.custom_sip_value.lstrip("0x")
+ # Ensure SIP is 8 characters long
+ self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["csr-active-config"] = utilities.string_to_hex(self.constants.custom_sip_value)
+ elif self.constants.sip_status is False:
print("- Disabling SIP")
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["csr-active-config"] = binascii.unhexlify("030E0000")
# if self.constants.amfi_status is False:
diff --git a/resources/cli_menu.py b/resources/cli_menu.py
index 4e03ca249..f878b2259 100644
--- a/resources/cli_menu.py
+++ b/resources/cli_menu.py
@@ -160,7 +160,7 @@ Note: For security reasons, OpenShell will be disabled when Vault is set.
utilities.cls()
utilities.header(["Set System Integrity protection"])
print(
- """SIP is used to ensure proper secuirty measures are set,
+ f"""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 = 0xE03
@@ -168,6 +168,7 @@ Valid options:
1. Enable SIP
2. Disable SIP
+3. Set Custom SIP value {self.constants.custom_sip_value}
Q. Return to previous menu
"""
@@ -177,6 +178,8 @@ Q. Return to previous menu
self.constants.sip_status = True
elif change_menu == "2":
self.constants.sip_status = False
+ elif change_menu == "3":
+ self.set_custom_sip_value()
elif change_menu in {"q", "Q", "Quit", "quit"}:
print("Returning to previous menu")
else:
@@ -763,6 +766,29 @@ the event there's issues.
print("Returning to previous menu")
else:
self.set_surplus()
+
+ def set_custom_sip_value(self):
+ utilities.cls()
+ utilities.header(["Set Custom SIP Value"])
+ print(
+ """
+By default OCLP will use the SIP value of 0x00 as the enabled and
+0xE03 for machines that require root patching. For users who wish
+to flip additional bits in SIP may use this option.
+
+To disable SIP outright, set it to 0xFEF
+ """
+ )
+ change_menu = input("Set Custom SIP Value (0xFEF): ")
+ try:
+ # Verify whether input is a valid hex value
+ int(change_menu, 16)
+ # Convert to binary hex
+ self.constants.custom_sip_value = change_menu
+ except ValueError:
+ print("Invalid input, returning to previous menu")
+ self.set_custom_sip_value()
+
def credits(self):
utilities.TUIOnlyPrint(
@@ -911,7 +937,7 @@ system_profiler SPHardwareDataType | grep 'Model Identifier'
# MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).set_amfi,
# ],
[
- f"Set System Integrity Protection (SIP):\tCurrently {self.constants.sip_status}",
+ f"Set System Integrity Protection (SIP):\tCurrently {self.constants.custom_sip_value or self.constants.sip_status}",
MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).change_sip,
],
[
diff --git a/resources/constants.py b/resources/constants.py
index e3491615b..9c5efd00b 100644
--- a/resources/constants.py
+++ b/resources/constants.py
@@ -157,6 +157,7 @@ class Constants:
self.force_latest_psp = False # Force latest PatcherSupportPkg
self.disable_msr_power_ctl = False # Disable MSR Power Control (missing battery throttling)
self.software_demux = False # Enable Software Demux patch set
+ self.custom_sip_value = None # Set custom SIP value
# OS Versions
## Based off Major Kernel Version
From a153b500b9589c914d1429b0bcf027952ab7e4f1 Mon Sep 17 00:00:00 2001
From: Mykola Grymalyuk
Date: Sun, 17 Oct 2021 00:14:32 -0600
Subject: [PATCH 12/13] Remove garbage
---
resources/build.py | 2 --
1 file changed, 2 deletions(-)
diff --git a/resources/build.py b/resources/build.py
index a8c3fbc75..519f3b915 100644
--- a/resources/build.py
+++ b/resources/build.py
@@ -694,8 +694,6 @@ class BuildOpenCore:
self.get_efi_binary_by_path("OpenShell.efi", "Misc", "Tools")["Enabled"] = False
if self.constants.custom_sip_value:
print(f"- Setting SIP value to: {self.constants.custom_sip_value}")
- sip = self.constants.custom_sip_value.lstrip("0x")
- # Ensure SIP is 8 characters long
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["csr-active-config"] = utilities.string_to_hex(self.constants.custom_sip_value)
elif self.constants.sip_status is False:
print("- Disabling SIP")
From 0ff6a18e83dda3d754dc80c31def03999322b2e2 Mon Sep 17 00:00:00 2001
From: Mykola Grymalyuk
Date: Sun, 17 Oct 2021 10:10:40 -0600
Subject: [PATCH 13/13] Avoid erroring on odd length values
---
resources/build.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/resources/build.py b/resources/build.py
index 519f3b915..1ee5d051b 100644
--- a/resources/build.py
+++ b/resources/build.py
@@ -694,7 +694,7 @@ class BuildOpenCore:
self.get_efi_binary_by_path("OpenShell.efi", "Misc", "Tools")["Enabled"] = False
if self.constants.custom_sip_value:
print(f"- Setting SIP value to: {self.constants.custom_sip_value}")
- self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["csr-active-config"] = utilities.string_to_hex(self.constants.custom_sip_value)
+ self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["csr-active-config"] = utilities.string_to_hex(self.constants.custom_sip_value.lstrip("0x"))
elif self.constants.sip_status is False:
print("- Disabling SIP")
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["csr-active-config"] = binascii.unhexlify("030E0000")