diff --git a/OpenCore-Patcher.command b/OpenCore-Patcher.command index b21cd748b..f1ff770f8 100755 --- a/OpenCore-Patcher.command +++ b/OpenCore-Patcher.command @@ -129,6 +129,10 @@ system_profiler SPHardwareDataType | grep 'Model Identifier' f"Allow OpenCore on native Models:\tCurrently {self.constants.allow_oc_everywhere}", CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).allow_native_models, ], + #[ + # f"Latebloom settings:\t\t\tDelay {self.constants.latebloom_delay}, Range {self.constants.latebloom_range}, Debug {self.constants.latebloom_debug}", + # CliMenu.MenuOptions(self.constants.custom_model or self.computer.real_model, self.constants).latebloom_settings, + #], ["Advanced Patch Settings, for developers only", self.advanced_patcher_settings], ] diff --git a/Resources/CliMenu.py b/Resources/CliMenu.py index b6b13d22b..b02582397 100644 --- a/Resources/CliMenu.py +++ b/Resources/CliMenu.py @@ -525,3 +525,39 @@ Note 2: This setting only affects iMac13,x with dGPUs self.constants.allow_ivy_igpu = False else: print("Invalid option") + + + def latebloom_settings(self): + Utilities.cls() + Utilities.header(["Set latebloom properties"]) + print( + f""" +Set latebloom properties, useful for debugging boot stalls on +pre-Sandy Bridge Macs. + +Valid options: + +1. Set delay (currently: {self.constants.latebloom_delay}) +2. Set range (currently: {self.constants.latebloom_range}) +3. Set debug (currently: {self.constants.latebloom_debug}) + """ + ) + + change_menu = input("Set latebloom properties: ") + if change_menu == "1": + try: + self.constants.latebloom_delay = int(input("Set delay: ")) + except ValueError: + input("Invalid value, press [ENTER] to continue") + elif change_menu == "2": + try: + self.constants.latebloom_range = int(input("Set range: ")) + except ValueError: + input("Invalid value, press [ENTER] to continue") + elif change_menu == "3": + try: + self.constants.latebloom_debug = int(input("Set debug: ")) + except ValueError: + input("Invalid value, press [ENTER] to continue") + else: + print("Invalid option") diff --git a/Resources/Constants.py b/Resources/Constants.py index 3eed9d789..6a950006e 100644 --- a/Resources/Constants.py +++ b/Resources/Constants.py @@ -42,7 +42,7 @@ class Constants: self.debugenhancer_version = "1.0.3" self.innie_version = "1.3.0" self.fw_kext = "1.0.0" - self.latebloom_version = "0.17" + self.latebloom_version = "0.19" self.disk = "" self.patch_disk = "" self.patcher_support_pkg_version = "0.0.14" # PatcherSupportPkg diff --git a/Resources/Utilities.py b/Resources/Utilities.py index 3adb7f3ed..d5460df42 100644 --- a/Resources/Utilities.py +++ b/Resources/Utilities.py @@ -57,7 +57,7 @@ def latebloom_detection(model): else: lb_delay = "100" lb_range = "1" - lb_debug = "0" + lb_debug = "1" if get_nvram("boot-args", decode=False): if "latebloom=" in get_nvram("boot-args", decode=False): lb_delay = re.search(r"(?:[, ])latebloom=(\d+)", get_nvram("boot-args", decode=False)) @@ -68,7 +68,7 @@ def latebloom_detection(model): if "lb_debug=" in get_nvram("boot-args", decode=False): lb_debug = re.search(r"(?:[, ])lb_debug=(\d+)", get_nvram("boot-args", decode=False)) lb_debug = lb_debug[1] - return int(lb_range), int(lb_range), int(lb_debug) + return int(lb_delay), int(lb_range), int(lb_debug) def csr_decode(csr_active_config, os_sip): diff --git a/payloads/Kexts/Misc/latebloom-v0.17.zip b/payloads/Kexts/Misc/latebloom-v0.17.zip deleted file mode 100644 index 62f88be2f..000000000 Binary files a/payloads/Kexts/Misc/latebloom-v0.17.zip and /dev/null differ diff --git a/payloads/Kexts/Misc/latebloom-v0.19.zip b/payloads/Kexts/Misc/latebloom-v0.19.zip new file mode 100644 index 000000000..4663677f2 Binary files /dev/null and b/payloads/Kexts/Misc/latebloom-v0.19.zip differ