build.py: Fix NVRAM GUID for OCLP storage

This commit is contained in:
Mykola Grymalyuk
2022-05-09 10:39:19 -06:00
parent 82b4d20b17
commit 64fe3be296
3 changed files with 12 additions and 10 deletions
+2
View File
@@ -1774,6 +1774,8 @@
<string>OCLP-Settings</string>
<string>revcpu</string>
<string>revcpuname</string>
<string>OCLP-Spoofed-SN</string>
<string>OCLP-Spoofed-MLB</string>
</array>
<key>7C436110-AB2A-4BBB-A880-FE41995C9F82</key>
<array>
+8 -8
View File
@@ -1033,12 +1033,12 @@ class BuildOpenCore:
self.config["PlatformInfo"]["SMBIOS"]["SystemSerialNumber"] = sn
self.config["PlatformInfo"]["DataHub"]["SystemSerialNumber"] = sn
self.config["PlatformInfo"]["PlatformNVRAM"]["SystemSerialNumber"] = sn
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["OCLP-Spoofed-SN"] = sn
self.config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["OCLP-Spoofed-SN"] = sn
# Board Serial Number
self.config["PlatformInfo"]["SMBIOS"]["BoardSerialNumber"] = mlb
self.config["PlatformInfo"]["PlatformNVRAM"]["BoardSerialNumber"] = mlb
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["OCLP-Spoofed-MLB"] = mlb
self.config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["OCLP-Spoofed-MLB"] = mlb
@@ -1049,8 +1049,8 @@ class BuildOpenCore:
print("- Adding custom serial numbers")
self.config["PlatformInfo"]["Generic"]["SystemSerialNumber"] = self.constants.custom_serial_number
self.config["PlatformInfo"]["Generic"]["MLB"] = self.constants.custom_board_serial_number
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["OCLP-Spoofed-SN"] = self.constants.custom_serial_number
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["OCLP-Spoofed-MLB"] = self.constants.custom_board_serial_number
self.config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["OCLP-Spoofed-SN"] = self.constants.custom_serial_number
self.config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["OCLP-Spoofed-MLB"] = self.constants.custom_board_serial_number
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["run-efi-updater"] = "No"
self.config["PlatformInfo"]["Automatic"] = True
self.config["PlatformInfo"]["UpdateDataHub"] = True
@@ -1081,8 +1081,8 @@ class BuildOpenCore:
self.config["PlatformInfo"]["Generic"]["SystemSerialNumber"] = sn
self.config["PlatformInfo"]["Generic"]["MLB"] = mlb
self.config["PlatformInfo"]["Generic"]["SystemUUID"] = str(uuid.uuid4()).upper()
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["OCLP-Spoofed-SN"] = sn
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["OCLP-Spoofed-MLB"] = mlb
self.config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["OCLP-Spoofed-SN"] = sn
self.config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["OCLP-Spoofed-MLB"] = mlb
if self.constants.serial_settings == "Moderate":
@@ -1117,8 +1117,8 @@ class BuildOpenCore:
self.config["UEFI"]["ProtocolOverrides"]["DataHub"] = True
self.config["PlatformInfo"]["Generic"]["SystemSerialNumber"] = self.constants.custom_serial_number
self.config["PlatformInfo"]["Generic"]["MLB"] = self.constants.custom_board_serial_number
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["OCLP-Spoofed-SN"] = self.constants.custom_serial_number
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["OCLP-Spoofed-MLB"] = self.constants.custom_board_serial_number
self.config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["OCLP-Spoofed-SN"] = self.constants.custom_serial_number
self.config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["OCLP-Spoofed-MLB"] = self.constants.custom_board_serial_number
# USB Map and CPUFriend Patching
if (
+2 -2
View File
@@ -15,8 +15,8 @@ class generate_defaults:
settings.custom_board_serial_number = ""
if host_is_target:
settings.custom_serial_number = utilities.get_nvram("OCLP-Spoofed-SN", "7C436110-AB2A-4BBB-A880-FE41995C9F82", decode=True)
settings.custom_board_serial_number = utilities.get_nvram("OCLP-Spoofed-MLB", "7C436110-AB2A-4BBB-A880-FE41995C9F82", decode=True)
settings.custom_serial_number = utilities.get_nvram("OCLP-Spoofed-SN", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102", decode=True)
settings.custom_board_serial_number = utilities.get_nvram("OCLP-Spoofed-MLB", "4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102", decode=True)
if settings.custom_serial_number is None or settings.custom_board_serial_number is None:
# If either variables are missing, we assume something is wrong with the spoofed variables and reset
settings.custom_serial_number = ""