diff --git a/Resources/Build.py b/Resources/Build.py index 1f16fa3f2..3ba07925f 100644 --- a/Resources/Build.py +++ b/Resources/Build.py @@ -73,33 +73,18 @@ class BuildOpenCore: return self.model def fw_feature_detect(self, model): - # Flip bit 19 to enable APFS support + # Values based off OpenCorePkg's Firmwarefeatures and FirmwarefeaturesMask + # Additionally, APFS bit(19) flipped # https://github.com/acidanthera/OpenCorePkg/blob/0.6.9/Include/Apple/IndustryStandard/AppleFeatures.h#L136 if model == "iMac7,1": - fw_feature = 3221230599 - fw_mask = 3221233663 + fw_feature = b'\x07\x14\x08\xc0\x00\x00\x00\x00' + fw_mask = b'\xff\x1f\x08\xc0\x00\x00\x00\x00' elif model in ["MacPro4,1", "Xserve3,1"]: - fw_feature = 3758224695 - fw_mask = 3221487415 + fw_feature = b'7\xf5\t\xe0\x00\x00\x00\x00' + fw_mask = b'7\xff\x0b\xc0\x00\x00\x00\x00' else: - fw_feature = 3221230595 - fw_mask = 3221241855 - - #print(f"- Detected FirmwareFeature value: {fw_feature}") - fw_feature |= 2**19 - fw_mask |= 2**19 - #print(f"- Updated FirmwareFeatures value: {fw_feature}") - # Allow for easy usage in config.plist - fw_feature = hex(fw_feature) - fw_feature = fw_feature.replace("0x", "") - fw_feature = Utilities.hexswap(fw_feature) - fw_feature = binascii.unhexlify(fw_feature) - - fw_mask = hex(fw_mask) - fw_mask = fw_mask.replace("0x", "") - fw_mask = Utilities.hexswap(fw_mask) - fw_mask = binascii.unhexlify(fw_mask) - + fw_feature = b'\x03\x14\x08\xc0\x00\x00\x00\x00' + fw_mask = b'\xff\x3f\x08\xc0\x00\x00\x00\x00' return fw_feature, fw_mask def build_efi(self):