From a3208acbfe566b634858ebbed44e3d4f5ccb1680 Mon Sep 17 00:00:00 2001
From: Mykola Grymalyuk <48863253+khronokernel@users.noreply.github.com>
Date: Wed, 22 Sep 2021 19:04:01 -0600
Subject: [PATCH] Add iMac7,1 USB map
---
CHANGELOG.md | 1 +
Resources/Build.py | 10 +++++-----
Resources/SysPatch.py | 3 +--
payloads/Config/config.plist | 2 +-
payloads/Kexts/Plists/AppleUSBMaps/Info.plist | 18 +++++++++---------
5 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5beba8939..6be957b36 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -45,6 +45,7 @@
- Add Kepler Accleration Patches for Monterey Beta 7 and newer
- Add FirmwareFeature upgrading to all Models
- Fixes Monterey Beta 7 installation issues
+- Add iMac7,1 USB map
## 0.2.4
diff --git a/Resources/Build.py b/Resources/Build.py
index 5f8d2242a..ecad0b42e 100644
--- a/Resources/Build.py
+++ b/Resources/Build.py
@@ -67,7 +67,7 @@ class BuildOpenCore:
# Adjust FirmwareFeature to support everything macOS requires
# APFS Bit (19/20): 10.13+ (OSInstall)
# Large BaseSystem Bit (35): 12.0 B7+ (patchd)
- # https://github.com/acidanthera/OpenCorePkg/blob/0.6.9/Include/Apple/IndustryStandard/AppleFeatures.h
+ # https://github.com/acidanthera/OpenCorePkg/tree/2f76673546ac3e32d2e2d528095fddcd66ad6a23/Include/Apple/IndustryStandard/AppleFeatures.h
if not self.constants.custom_model:
firmwarefeature = Utilities.get_rom("firmware-features")
if not firmwarefeature:
@@ -346,7 +346,7 @@ class BuildOpenCore:
if (
usb_map_path.exists()
and self.constants.allow_oc_everywhere is False
- and self.model not in ["iMac7,1", "Xserve2,1", "Dortania1,1"]
+ and self.model not in ["Xserve2,1", "Dortania1,1"]
and (self.model in ModelArray.Missing_USB_Map or self.constants.serial_settings in ["Moderate", "Advanced"])
):
print("- Adding USB-Map.kext")
@@ -682,7 +682,7 @@ class BuildOpenCore:
if self.constants.disable_cs_lv is True:
print("- Disabling Library Validation")
self.get_item_by_kv(self.config["Kernel"]["Patch"], "Comment", "Disable Library Validation Enforcement")["Enabled"] = True
- self.config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["OCLP-Settings"] += "-allow_amfi"
+ self.config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["OCLP-Settings"] += " -allow_amfi"
if self.constants.secure_status is False:
print("- Disabling SecureBootModel")
self.config["Misc"]["Security"]["SecureBootModel"] = "Disabled"
@@ -718,7 +718,7 @@ class BuildOpenCore:
print("- Allowing FileVault on Root Patched systems")
self.get_item_by_kv(self.config["Kernel"]["Patch"], "Identifier", "com.apple.filesystems.apfs")["Enabled"] = True
# Lets us check in SysPatch.py if config supports FileVault
- self.config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["OCLP-Settings"] += "-allow_fv"
+ self.config["NVRAM"]["Add"]["4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102"]["OCLP-Settings"] += " -allow_fv"
def set_smbios(self):
spoofed_model = self.model
@@ -798,7 +798,7 @@ class BuildOpenCore:
# USB Map and CPUFriend Patching
if (
self.constants.allow_oc_everywhere is False
- and self.model not in ["iMac7,1", "Xserve2,1", "Dortania1,1"]
+ and self.model not in ["Xserve2,1", "Dortania1,1"]
and (self.model in ModelArray.Missing_USB_Map or self.constants.serial_settings in ["Moderate", "Advanced"])
):
new_map_ls = Path(self.constants.map_contents_folder) / Path("Info.plist")
diff --git a/Resources/SysPatch.py b/Resources/SysPatch.py
index bc21327e0..c3e29e865 100644
--- a/Resources/SysPatch.py
+++ b/Resources/SysPatch.py
@@ -431,8 +431,7 @@ set million colour before rebooting"""
)
Utilities.process_status(self.elevated(["chmod", "755", f"{self.mount_lauchd}/IOHID-Fixup.plist"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
Utilities.process_status(self.elevated(["chown", "root:wheel", f"{self.mount_lauchd}/IOHID-Fixup.plist"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
- elif Utilities.check_filevault_skip() is False:
- # Assume non-OCLP Macs don't have _cs_require_lv
+ else:
print("- Disabling Library Validation")
Utilities.process_status(
self.elevated(
diff --git a/payloads/Config/config.plist b/payloads/Config/config.plist
index 19eede463..d27afa770 100644
--- a/payloads/Config/config.plist
+++ b/payloads/Config/config.plist
@@ -1084,7 +1084,7 @@
MaxKernel
MinKernel
- 18.0.0
+ 20.0.0
Replace
uAAAAADD
ReplaceMask
diff --git a/payloads/Kexts/Plists/AppleUSBMaps/Info.plist b/payloads/Kexts/Plists/AppleUSBMaps/Info.plist
index 58ab23cae..dcd8d97dd 100644
--- a/payloads/Kexts/Plists/AppleUSBMaps/Info.plist
+++ b/payloads/Kexts/Plists/AppleUSBMaps/Info.plist
@@ -764,7 +764,7 @@
model
XXerve3,1
- #iMac7,1
+ iMac7,1
CFBundleIdentifier
com.apple.driver.AppleUSBHostMergeProperties
@@ -3527,14 +3527,14 @@
Tunnel Endpoint Device Vendor ID
AQAAAA==
- #iMac7,1-EHC1
+ iMac7,1-EHC1
CFBundleIdentifier
com.apple.driver.AppleUSBHostMergeProperties
IOClass
AppleUSBHostMergeProperties
IONameMatch
- EH01
+ EHC1
IOProviderClass
AppleUSBEHCIPCI
IOProviderMergeProperties
@@ -3590,14 +3590,14 @@
model
iXac7,1
- #iMac7,1-EHC2
+ iMac7,1-EHC2
CFBundleIdentifier
com.apple.driver.AppleUSBHostMergeProperties
IOClass
AppleUSBHostMergeProperties
IONameMatch
- EH02
+ EHC2
IOProviderClass
AppleUSBEHCIPCI
IOProviderMergeProperties
@@ -5461,7 +5461,7 @@
model
Xacmini4,1
- #iMac7,1-OHC1
+ iMac7,1-OHC1
CFBundleIdentifier
com.apple.driver.AppleUSBHostMergeProperties
@@ -5501,9 +5501,9 @@
model
- iXac9,1
+ iXac7,1
- #iMac7,1-OHC2
+ iMac7,1-OHC2
CFBundleIdentifier
com.apple.driver.AppleUSBHostMergeProperties
@@ -5543,7 +5543,7 @@
model
- iXac9,1
+ iXac7,1
iMac8,1-OHC1