mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-24 03:50:14 +10:00
Merge branch 'main' into wxPython-demo
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
- Resolves `installer` failing to extract InstallAssistant in older OSes
|
- Resolves `installer` failing to extract InstallAssistant in older OSes
|
||||||
- Resolves certain Samsung NVMe drives appearing as external on Mac Pros
|
- Resolves certain Samsung NVMe drives appearing as external on Mac Pros
|
||||||
- Add FeatureUnlock configurability
|
- Add FeatureUnlock configurability
|
||||||
|
- Add NVRAM WriteFlash configurability for degarded/fragile systems
|
||||||
|
|
||||||
## 0.3.3
|
## 0.3.3
|
||||||
- Disable Asset Caching support with spoofless approach
|
- Disable Asset Caching support with spoofless approach
|
||||||
|
|||||||
@@ -481,11 +481,13 @@ class BuildOpenCore:
|
|||||||
def check_firewire(model):
|
def check_firewire(model):
|
||||||
# MacBooks never supported FireWire
|
# MacBooks never supported FireWire
|
||||||
# Pre-Thunderbolt MacBook Airs as well
|
# Pre-Thunderbolt MacBook Airs as well
|
||||||
if model.startswith("MacBook"):
|
if model.startswith("MacBookPro"):
|
||||||
return False
|
return True
|
||||||
elif model.startswith("MacBookAir"):
|
elif model.startswith("MacBookAir"):
|
||||||
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] < cpu_data.cpu_data.sandy_bridge.value:
|
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] < cpu_data.cpu_data.sandy_bridge.value:
|
||||||
return False
|
return False
|
||||||
|
elif model.startswith("MacBook"):
|
||||||
|
return False
|
||||||
else:
|
else:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
@@ -897,6 +899,9 @@ class BuildOpenCore:
|
|||||||
if self.constants.disable_connectdrivers is True:
|
if self.constants.disable_connectdrivers is True:
|
||||||
print("- Disabling ConnectDrivers")
|
print("- Disabling ConnectDrivers")
|
||||||
self.config["UEFI"]["ConnectDrivers"] = False
|
self.config["UEFI"]["ConnectDrivers"] = False
|
||||||
|
if self.constants.nvram_write is False:
|
||||||
|
print("- Disabling Hardware NVRAM Write")
|
||||||
|
self.config["NVRAM"]["WriteFlash"] = False
|
||||||
# if self.get_item_by_kv(self.config["Kernel"]["Patch"], "Comment", "Reroute kern.hv_vmm_present patch (1)")["Enabled"] is True:
|
# if self.get_item_by_kv(self.config["Kernel"]["Patch"], "Comment", "Reroute kern.hv_vmm_present patch (1)")["Enabled"] is True:
|
||||||
# # Add Content Caching patch
|
# # Add Content Caching patch
|
||||||
# print("- Fixing Content Caching support")
|
# print("- Fixing Content Caching support")
|
||||||
|
|||||||
@@ -867,6 +867,30 @@ Supported Options:
|
|||||||
print("Invalid input, returning to previous menu")
|
print("Invalid input, returning to previous menu")
|
||||||
self.set_fu_settings()
|
self.set_fu_settings()
|
||||||
|
|
||||||
|
def set_nvram_write(self):
|
||||||
|
utilities.cls()
|
||||||
|
utilities.header(["Set NVRAM Write"])
|
||||||
|
print(
|
||||||
|
"""
|
||||||
|
By default, OpenCore will write NVRAM variables to flash. This is
|
||||||
|
recommended for majority of systems however for extremely degraded
|
||||||
|
or fragile systems, you may wish to disable this.
|
||||||
|
|
||||||
|
Supported Options:
|
||||||
|
|
||||||
|
1. Enable NVRAM Write
|
||||||
|
2. Disable NVRAM Write
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
change_menu = input("Set NVRAM Write (ie. 1): ")
|
||||||
|
if change_menu == "1":
|
||||||
|
self.constants.nvram_write = True
|
||||||
|
elif change_menu == "2":
|
||||||
|
self.constants.nvram_write = False
|
||||||
|
else:
|
||||||
|
print("Invalid input, returning to previous menu")
|
||||||
|
self.set_nvram_write()
|
||||||
|
|
||||||
def credits(self):
|
def credits(self):
|
||||||
utilities.TUIOnlyPrint(
|
utilities.TUIOnlyPrint(
|
||||||
["Credits"],
|
["Credits"],
|
||||||
@@ -1089,6 +1113,7 @@ system_profiler SPHardwareDataType | grep 'Model Identifier'
|
|||||||
[f"Disable Battery Throttling:\tCurrently {self.constants.disable_msr_power_ctl}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).set_battery_throttle],
|
[f"Disable Battery Throttling:\tCurrently {self.constants.disable_msr_power_ctl}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).set_battery_throttle],
|
||||||
[f"Set Software Demux:\tCurrently {self.constants.software_demux}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).set_software_demux],
|
[f"Set Software Demux:\tCurrently {self.constants.software_demux}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).set_software_demux],
|
||||||
[f"Set FeatureUnlock: \tCurrently {self.constants.fu_status}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).set_fu_settings],
|
[f"Set FeatureUnlock: \tCurrently {self.constants.fu_status}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).set_fu_settings],
|
||||||
|
[f"Set NVRAM Write:\t\tCurrently {self.constants.nvram_write}", MenuOptions(self.constants.custom_model or self.constants.computer.real_model, self.constants).set_nvram_write],
|
||||||
]
|
]
|
||||||
|
|
||||||
for option in options:
|
for option in options:
|
||||||
|
|||||||
@@ -108,6 +108,7 @@ class Constants:
|
|||||||
self.opencore_build = "RELEASE"
|
self.opencore_build = "RELEASE"
|
||||||
self.showpicker = True # Show or Hide OpenCore's Boot Picker
|
self.showpicker = True # Show or Hide OpenCore's Boot Picker
|
||||||
self.boot_efi = False # Use EFI/BOOT/BOOTx64.efi bootstrap
|
self.boot_efi = False # Use EFI/BOOT/BOOTx64.efi bootstrap
|
||||||
|
self.nvram_write = True # Write to hardware NVRAM
|
||||||
|
|
||||||
## Kext Settings
|
## Kext Settings
|
||||||
self.kext_debug = False # Enables Lilu debug and DebugEnhancer
|
self.kext_debug = False # Enables Lilu debug and DebugEnhancer
|
||||||
|
|||||||
Reference in New Issue
Block a user