diff --git a/Changelog.md b/Changelog.md index 848a3b1c949..5e2454be759 100644 --- a/Changelog.md +++ b/Changelog.md @@ -3,10 +3,7 @@ OpenCore Changelog #### v0.8.7 - Removed unwanted clear screen when launching non-text boot entry - Fixed TSC/FSB for AMD CPUs in ProvideCurrentCpuInfo, thx @Shaneee -- Changed `Misc` -> `Boot` -> `ShowPicker` typing to string: - - `Always` - Always show picker (equivalent to 0.8.6's ShowPicker=True) - - `Never` - Never show picker (equivalent to 0.8.6's ShowPicker=False) - - `SkipOnHibernateWake` - Don't show picker if waking from macOS hibernation +- Added `Misc` -> `Boot` -> `HibernateSkipsPicker` not to show picker if waking from macOS hibernation - Changed macrecovery to download files into `com.apple.recovery.boot` by default, thx @dreamwhite - Supported Apple builtin picker (using `BootKicker.efi` or `PickerMode` `Apple`) when running GPUs without Mac-EFI support on units such as the MacPro5,1 (thx @cdf, @tsialex) - Enabled `PickerMode` `Apple` to successfully launch selected entry diff --git a/Docs/Configuration.md5 b/Docs/Configuration.md5 index bafc1ac0ecb..1d8934197ec 100644 --- a/Docs/Configuration.md5 +++ b/Docs/Configuration.md5 @@ -1 +1 @@ -484521975a7ca94903e2affd1b4719b7 +227bc0ca27ee8c9f6f033dca38233a50 diff --git a/Docs/Configuration.pdf b/Docs/Configuration.pdf index dc44ad306e5..f3dae4b7e57 100644 Binary files a/Docs/Configuration.pdf and b/Docs/Configuration.pdf differ diff --git a/Docs/Configuration.tex b/Docs/Configuration.tex index 50bf70c0399..6413bab319e 100755 --- a/Docs/Configuration.tex +++ b/Docs/Configuration.tex @@ -3328,6 +3328,22 @@ \subsection{Boot Properties}\label{miscbootprops} \emph{Note}: If the firmware can handle hibernation itself (valid for Mac EFI firmware), then \texttt{None} should be specified to hand-off hibernation state as is to OpenCore. +\item + \texttt{HibernateSkipsPicker}\\ + \textbf{Type}: \texttt{plist\ boolean}\\ + \textbf{Failsafe}: \texttt{false}\\ + \textbf{Description}: Do not show picker if waking from macOS hibernation. + + Limitations: + \begin{itemize} + \item Only supports macOS hibernation wake, Windows and Linux are currently out of scope. + \item Should only be used on systems with reliable hibernation wake in macOS, otherwise users may not + be able to visually see boot loops that may occur. + \item Highly recommended to pair this option with \texttt{PollAppleHotKeys}, allows to enter picker in + case of issues with hibernation wake. + \item Visual indication for hibernation wake is currently out of scope. + \end{itemize} + \item \texttt{HideAuxiliary}\\ \textbf{Type}: \texttt{plist\ boolean}\\ @@ -3604,25 +3620,9 @@ \subsection{Boot Properties}\label{miscbootprops} \item \texttt{ShowPicker}\\ - \textbf{Type}: \texttt{plist\ string}\\ - \textbf{Failsafe}: \texttt{Always}\\ - \textbf{Description}: Show a simple picker to allow boot entry selection: - \begin{itemize} - \tightlist - \item \texttt{Always} --- Always show picker. - \item \texttt{Never} --- Never show picker. - \item \texttt{SkipOnHibernateWake} --- Like \texttt{Always}, however doesn't show picker if waking from macOS hibernation. - \end{itemize} - - Notes for \texttt{SkipOnHibernateWake}: - \begin{itemize} - \item Only supports macOS hibernation wake, Windows and Linux are currently out of scope. - \item Should only be used on systems with reliable hibernation wake in macOS, otherwise users may not - be able to visually see boot loops that may occur. - \item Highly recommended to pair this option with \texttt{PollAppleHotKeys}, allows to enter picker in - case of issues with hibernation wake. - \item Visual indication for hibernation wake is currently out of scope. - \end{itemize} + \textbf{Type}: \texttt{plist\ boolean}\\ + \textbf{Failsafe}: \texttt{false}\\ + \textbf{Description}: Show a simple picker to allow boot entry selection. \item \texttt{TakeoffDelay}\\ diff --git a/Docs/Differences/Differences.pdf b/Docs/Differences/Differences.pdf index 5a59b0f05a1..8853cbadd13 100644 Binary files a/Docs/Differences/Differences.pdf and b/Docs/Differences/Differences.pdf differ diff --git a/Docs/Differences/Differences.tex b/Docs/Differences/Differences.tex index 2fda2897a89..2ebce350cf4 100644 --- a/Docs/Differences/Differences.tex +++ b/Docs/Differences/Differences.tex @@ -1,7 +1,7 @@ \documentclass[]{article} %DIF LATEXDIFF DIFFERENCE FILE %DIF DEL PreviousConfiguration.tex Sun Nov 20 12:50:09 2022 -%DIF ADD ../Configuration.tex Sun Dec 4 19:13:10 2022 +%DIF ADD ../Configuration.tex Tue Dec 6 01:39:25 2022 \usepackage{lmodern} \usepackage{amssymb,amsmath} @@ -3389,7 +3389,24 @@ \subsection{Boot Properties}\label{miscbootprops} then \texttt{None} should be specified to hand-off hibernation state as is to OpenCore. \item - \texttt{HideAuxiliary}\\ + \DIFaddbegin \texttt{\DIFadd{HibernateSkipsPicker}}\\ + \textbf{\DIFadd{Type}}\DIFadd{: }\texttt{\DIFadd{plist\ boolean}}\\ + \textbf{\DIFadd{Failsafe}}\DIFadd{: }\texttt{\DIFadd{false}}\\ + \textbf{\DIFadd{Description}}\DIFadd{: Do not show picker if waking from macOS hibernation. +} + + \DIFadd{Limitations: + }\begin{itemize} + \item \DIFadd{Only supports macOS hibernation wake, Windows and Linux are currently out of scope. + }\item \DIFadd{Should only be used on systems with reliable hibernation wake in macOS, otherwise users may not + be able to visually see boot loops that may occur. + }\item \DIFadd{Highly recommended to pair this option with }\texttt{\DIFadd{PollAppleHotKeys}}\DIFadd{, allows to enter picker in + case of issues with hibernation wake. + }\item \DIFadd{Visual indication for hibernation wake is currently out of scope. + }\end{itemize} + +\item + \DIFaddend \texttt{HideAuxiliary}\\ \textbf{Type}: \texttt{plist\ boolean}\\ \textbf{Failsafe}: \texttt{false}\\ \textbf{Description}: Set to \texttt{true} to hide auxiliary entries from the picker menu. @@ -3664,30 +3681,12 @@ \subsection{Boot Properties}\label{miscbootprops} \item \texttt{ShowPicker}\\ - \textbf{Type}: \texttt{plist\ \DIFdelbegin \DIFdel{boolean}\DIFdelend \DIFaddbegin \DIFadd{string}\DIFaddend }\\ - \textbf{Failsafe}: \texttt{\DIFdelbegin \DIFdel{false}\DIFdelend \DIFaddbegin \DIFadd{Always}\DIFaddend }\\ - \textbf{Description}: Show a simple picker to allow boot entry selection\DIFdelbegin \DIFdel{. -}\DIFdelend \DIFaddbegin \DIFadd{: - }\begin{itemize} - \tightlist - \item \texttt{\DIFadd{Always}} \DIFadd{--- Always show picker. - }\item \texttt{\DIFadd{Never}} \DIFadd{--- Never show picker. - }\item \texttt{\DIFadd{SkipOnHibernateWake}} \DIFadd{--- Like }\texttt{\DIFadd{Always}}\DIFadd{, however doesn't show picker if waking from macOS hibernation. - }\end{itemize} -\DIFaddend - - \DIFaddbegin \DIFadd{Notes for }\texttt{\DIFadd{SkipOnHibernateWake}}\DIFadd{: - }\begin{itemize} - \DIFaddend \item \DIFaddbegin \DIFadd{Only supports macOS hibernation wake, Windows and Linux are currently out of scope. - }\item \DIFadd{Should only be used on systems with reliable hibernation wake in macOS, otherwise users may not - be able to visually see boot loops that may occur. - }\item \DIFadd{Highly recommended to pair this option with }\texttt{\DIFadd{PollAppleHotKeys}}\DIFadd{, allows to enter picker in - case of issues with hibernation wake. - }\item \DIFadd{Visual indication for hibernation wake is currently out of scope. - }\end{itemize} + \textbf{Type}: \texttt{plist\ boolean}\\ + \textbf{Failsafe}: \texttt{false}\\ + \textbf{Description}: Show a simple picker to allow boot entry selection. \item - \DIFaddend \texttt{TakeoffDelay}\\ + \texttt{TakeoffDelay}\\ \textbf{Type}: \texttt{plist\ integer}, 32 bit\\ \textbf{Failsafe}: \texttt{0}\\ \textbf{Description}: Delay in microseconds executed before handling diff --git a/Docs/Errata/Errata.pdf b/Docs/Errata/Errata.pdf index f9ac56647d2..2982146ca4f 100644 Binary files a/Docs/Errata/Errata.pdf and b/Docs/Errata/Errata.pdf differ diff --git a/Docs/Sample.plist b/Docs/Sample.plist index e51914d5c05..54bfbcdfb09 100644 --- a/Docs/Sample.plist +++ b/Docs/Sample.plist @@ -1060,6 +1060,8 @@ 0 HibernateMode None + HibernateSkipsPicker + HideAuxiliary LauncherOption @@ -1077,7 +1079,7 @@ PollAppleHotKeys ShowPicker - Always + TakeoffDelay 0 Timeout diff --git a/Docs/SampleCustom.plist b/Docs/SampleCustom.plist index 63daa84c4ae..657e82af7ed 100644 --- a/Docs/SampleCustom.plist +++ b/Docs/SampleCustom.plist @@ -1060,6 +1060,8 @@ 0 HibernateMode None + HibernateSkipsPicker + HideAuxiliary LauncherOption @@ -1077,7 +1079,7 @@ PollAppleHotKeys ShowPicker - Always + TakeoffDelay 0 Timeout diff --git a/Include/Acidanthera/Library/OcConfigurationLib.h b/Include/Acidanthera/Library/OcConfigurationLib.h index 48d0e30aef0..ec0d0fa3a01 100644 --- a/Include/Acidanthera/Library/OcConfigurationLib.h +++ b/Include/Acidanthera/Library/OcConfigurationLib.h @@ -342,9 +342,10 @@ OC_DECLARE (OC_MISC_BLESS_ARRAY) _(UINT32 , TakeoffDelay , , 0 , ()) \ _(UINT32 , Timeout , , 0 , ()) \ _(BOOLEAN , PickerAudioAssist , , FALSE , ()) \ + _(BOOLEAN , HibernateSkipsPicker , , FALSE , ()) \ _(BOOLEAN , HideAuxiliary , , FALSE , ()) \ _(BOOLEAN , PollAppleHotKeys , , FALSE , ()) \ - _(OC_STRING , ShowPicker , , OC_STRING_CONSTR ("Always", _, __) , OC_DESTR (OC_STRING) ) + _(BOOLEAN , ShowPicker , , FALSE , ()) OC_DECLARE (OC_MISC_BOOT) #define OC_MISC_DEBUG_FIELDS(_, __) \ diff --git a/Library/OcConfigurationLib/OcConfigurationLib.c b/Library/OcConfigurationLib/OcConfigurationLib.c index c2d06a75d15..a1a5d0ab949 100644 --- a/Library/OcConfigurationLib/OcConfigurationLib.c +++ b/Library/OcConfigurationLib/OcConfigurationLib.c @@ -405,19 +405,20 @@ OC_SCHEMA STATIC OC_SCHEMA mMiscConfigurationBootSchema[] = { - OC_SCHEMA_INTEGER_IN ("ConsoleAttributes", OC_GLOBAL_CONFIG, Misc.Boot.ConsoleAttributes), - OC_SCHEMA_STRING_IN ("HibernateMode", OC_GLOBAL_CONFIG, Misc.Boot.HibernateMode), - OC_SCHEMA_BOOLEAN_IN ("HideAuxiliary", OC_GLOBAL_CONFIG, Misc.Boot.HideAuxiliary), - OC_SCHEMA_STRING_IN ("LauncherOption", OC_GLOBAL_CONFIG, Misc.Boot.LauncherOption), - OC_SCHEMA_STRING_IN ("LauncherPath", OC_GLOBAL_CONFIG, Misc.Boot.LauncherPath), - OC_SCHEMA_INTEGER_IN ("PickerAttributes", OC_GLOBAL_CONFIG, Misc.Boot.PickerAttributes), - OC_SCHEMA_BOOLEAN_IN ("PickerAudioAssist", OC_GLOBAL_CONFIG, Misc.Boot.PickerAudioAssist), - OC_SCHEMA_STRING_IN ("PickerMode", OC_GLOBAL_CONFIG, Misc.Boot.PickerMode), - OC_SCHEMA_STRING_IN ("PickerVariant", OC_GLOBAL_CONFIG, Misc.Boot.PickerVariant), - OC_SCHEMA_BOOLEAN_IN ("PollAppleHotKeys", OC_GLOBAL_CONFIG, Misc.Boot.PollAppleHotKeys), - OC_SCHEMA_STRING_IN ("ShowPicker", OC_GLOBAL_CONFIG, Misc.Boot.ShowPicker), - OC_SCHEMA_INTEGER_IN ("TakeoffDelay", OC_GLOBAL_CONFIG, Misc.Boot.TakeoffDelay), - OC_SCHEMA_INTEGER_IN ("Timeout", OC_GLOBAL_CONFIG, Misc.Boot.Timeout), + OC_SCHEMA_INTEGER_IN ("ConsoleAttributes", OC_GLOBAL_CONFIG, Misc.Boot.ConsoleAttributes), + OC_SCHEMA_STRING_IN ("HibernateMode", OC_GLOBAL_CONFIG, Misc.Boot.HibernateMode), + OC_SCHEMA_BOOLEAN_IN ("HibernateSkipsPicker", OC_GLOBAL_CONFIG, Misc.Boot.HibernateSkipsPicker), + OC_SCHEMA_BOOLEAN_IN ("HideAuxiliary", OC_GLOBAL_CONFIG, Misc.Boot.HideAuxiliary), + OC_SCHEMA_STRING_IN ("LauncherOption", OC_GLOBAL_CONFIG, Misc.Boot.LauncherOption), + OC_SCHEMA_STRING_IN ("LauncherPath", OC_GLOBAL_CONFIG, Misc.Boot.LauncherPath), + OC_SCHEMA_INTEGER_IN ("PickerAttributes", OC_GLOBAL_CONFIG, Misc.Boot.PickerAttributes), + OC_SCHEMA_BOOLEAN_IN ("PickerAudioAssist", OC_GLOBAL_CONFIG, Misc.Boot.PickerAudioAssist), + OC_SCHEMA_STRING_IN ("PickerMode", OC_GLOBAL_CONFIG, Misc.Boot.PickerMode), + OC_SCHEMA_STRING_IN ("PickerVariant", OC_GLOBAL_CONFIG, Misc.Boot.PickerVariant), + OC_SCHEMA_BOOLEAN_IN ("PollAppleHotKeys", OC_GLOBAL_CONFIG, Misc.Boot.PollAppleHotKeys), + OC_SCHEMA_BOOLEAN_IN ("ShowPicker", OC_GLOBAL_CONFIG, Misc.Boot.ShowPicker), + OC_SCHEMA_INTEGER_IN ("TakeoffDelay", OC_GLOBAL_CONFIG, Misc.Boot.TakeoffDelay), + OC_SCHEMA_INTEGER_IN ("Timeout", OC_GLOBAL_CONFIG, Misc.Boot.Timeout), }; STATIC diff --git a/Library/OcMainLib/OpenCoreMisc.c b/Library/OcMainLib/OpenCoreMisc.c index 2867e00d9e0..26c2c14c182 100644 --- a/Library/OcMainLib/OpenCoreMisc.c +++ b/Library/OcMainLib/OpenCoreMisc.c @@ -776,7 +776,6 @@ OcMiscBoot ( CONST CHAR8 *AsciiPicker; CONST CHAR8 *AsciiPickerVariant; CONST CHAR8 *AsciiDmg; - CONST CHAR8 *ShowPicker; AsciiPicker = OC_BLOB_GET (&Config->Misc.Boot.PickerMode); @@ -930,20 +929,11 @@ OcMiscBoot ( &Context->RecoveryInitiator ); - ShowPicker = OC_BLOB_GET (&Config->Misc.Boot.ShowPicker); - if ( (AsciiStrCmp (ShowPicker, "Always") != 0) - && (AsciiStrCmp (ShowPicker, "SkipOnHibernateWake") != 0) - && (AsciiStrCmp (ShowPicker, "Never") != 0)) - { - DEBUG ((DEBUG_WARN, "OC: Unknown ShowPicker: %a, using Always\n", ShowPicker)); - ShowPicker = "Always"; - } - if (!EFI_ERROR (Status)) { Context->PickerCommand = OcPickerBootAppleRecovery; - } else if (AsciiStrCmp (ShowPicker, "Always") == 0) { + } else if (Config->Misc.Boot.ShowPicker && !Config->Misc.Boot.HibernateSkipsPicker) { Context->PickerCommand = OcPickerShowPicker; - } else if (AsciiStrCmp (ShowPicker, "SkipOnHibernateWake") == 0) { + } else if (Config->Misc.Boot.ShowPicker && Config->Misc.Boot.HibernateSkipsPicker) { if (OcIsAppleHibernateWake ()) { Context->PickerCommand = OcPickerDefault; } else { diff --git a/Utilities/ocvalidate/ValidateMisc.c b/Utilities/ocvalidate/ValidateMisc.c index adeabe563fc..c9caa77c8ce 100644 --- a/Utilities/ocvalidate/ValidateMisc.c +++ b/Utilities/ocvalidate/ValidateMisc.c @@ -200,7 +200,6 @@ CheckMiscBoot ( BOOLEAN IsAudioSupportEnabled; CONST CHAR8 *LauncherOption; CONST CHAR8 *LauncherPath; - CONST CHAR8 *ShowPicker; ErrorCount = 0; @@ -254,15 +253,6 @@ CheckMiscBoot ( ++ErrorCount; } - ShowPicker = OC_BLOB_GET (&Config->Misc.Boot.ShowPicker); - if ( (AsciiStrCmp (ShowPicker, "Always") != 0) - && (AsciiStrCmp (ShowPicker, "SkipOnHibernateWake") != 0) - && (AsciiStrCmp (ShowPicker, "Never") != 0)) - { - DEBUG ((DEBUG_WARN, "Misc->Boot->ShowPicker is borked (Can only be Always, SkipOnHibernateWake, or Never)!\n")); - ++ErrorCount; - } - // // Check the length of path relative to OC directory. //