mirror of
https://github.com/acidanthera/OpenCorePkg.git
synced 2025-12-08 19:25:01 +00:00
OpenCoreMisc: Implement Apple BootPicker support
This commit is contained in:
parent
81ff10813b
commit
82cc8c65f6
@ -15,6 +15,8 @@ OpenCore Changelog
|
||||
- Added `PickerAttributes` option to colour picker
|
||||
- Added `ProtectSecureBoot` option through FwRuntimeServices
|
||||
- Replaced `RequireVault` and `RequireSignature` with `Vault`
|
||||
- Added `BootKicker` tool to support launching Apple BootPicker
|
||||
- Added BootPicker support as an external UI in OC through `PickerMode`
|
||||
|
||||
#### v0.5.5
|
||||
- Fixed CPU bus ratio calculation for Nehalem and Westmere
|
||||
|
||||
Binary file not shown.
@ -2110,7 +2110,7 @@ behaviour that does not go to any other sections
|
||||
\textbf{Failsafe}: \texttt{false}\\
|
||||
\textbf{Description}: Enable \texttt{modifier hotkey} handling in boot picker.
|
||||
|
||||
In addition to \texttt{action hotkeys}, which are partially described in \texttt{UsePicker}
|
||||
In addition to \texttt{action hotkeys}, which are partially described in \texttt{PickerMode}
|
||||
section and are normally handled by Apple BDS, there exist modifier keys, which are
|
||||
handled by operating system bootloader, namely \texttt{boot.efi}. These keys
|
||||
allow to change operating system behaviour by providing different boot modes.
|
||||
@ -2157,16 +2157,30 @@ behaviour that does not go to any other sections
|
||||
automatic booting of the default boot entry. Use 0 to disable timer.
|
||||
|
||||
\item
|
||||
\texttt{UsePicker}\\
|
||||
\texttt{PickerMode}\\
|
||||
\textbf{Type}: \texttt{plist\ boolean}\\
|
||||
\textbf{Failsafe}: \texttt{false}\\
|
||||
\textbf{Description}: Use OpenCore built-in boot picker for boot management.
|
||||
\textbf{Description}: Choose boot picker used for boot management.
|
||||
|
||||
\texttt{UsePicker} set to \texttt{false} entirely disables all boot management
|
||||
in OpenCore except policy enforcement. In this case a custom user interface may
|
||||
Picker describes underlying boot management with an optional user interface
|
||||
responsible for handling boot options. The following values are supported:
|
||||
|
||||
\begin{itemize}
|
||||
\tightlist
|
||||
\item \texttt{Builtin} --- boot management is handled by OpenCore, a simple
|
||||
text only user interface is used.
|
||||
\item \texttt{External} --- an external boot management protocol is used
|
||||
if available. Otherwise \texttt{Builtin} mode is used.
|
||||
\item \texttt{Apple} --- Apple boot management is used if available.
|
||||
Otherwise \texttt{Builtin} mode is used.
|
||||
\end{itemize}
|
||||
|
||||
|
||||
Upon success \texttt{External} mode will entirely disable all boot management
|
||||
in OpenCore except policy enforcement. In \texttt{Apple} mode it may additionally
|
||||
bypass policy enforcement. To implement \texttt{External} mode a custom user interface may
|
||||
utilise \href{https://github.com/acidanthera/OcSupportPkg}{OcSupportPkg}
|
||||
\texttt{OcBootManagementLib} to implement a user friendly boot picker oneself.
|
||||
Reference example of external graphics interface is provided in
|
||||
\texttt{OcBootManagementLib}. Reference example of external graphics interface is provided in
|
||||
\href{https://github.com/acidanthera/OcSupportPkg/tree/master/Tests/ExternalUi}{ExternalUi}
|
||||
test driver.
|
||||
|
||||
@ -2199,10 +2213,10 @@ behaviour that does not go to any other sections
|
||||
\emph{Note}: Activated \texttt{KeySupport}, \texttt{AppleUsbKbDxe}, or similar driver is required
|
||||
for key handling to work. On many firmwares it is not possible to get all the keys function.
|
||||
|
||||
In addition to \texttt{OPT} OpenCore supports \texttt{Escape} key
|
||||
\texttt{ShowPicker}. This key exists for firmwares with PS/2 keyboards that
|
||||
fail to report held \texttt{OPT} key and require continual presses of \texttt{Escape}
|
||||
key to enter the boot menu.
|
||||
In addition to \texttt{OPT} OpenCore supports \texttt{Escape} key to display picker when
|
||||
\texttt{ShowPicker} is disabled. This key exists for \texttt{Apple} picker mode and for
|
||||
firmwares with PS/2 keyboards that fail to report held \texttt{OPT} key and require continual
|
||||
presses of \texttt{Escape} key to enter the boot menu.
|
||||
|
||||
\end{enumerate}
|
||||
|
||||
@ -3686,7 +3700,7 @@ build -a X64 -b RELEASE -t XCODE5 -p MdeModulePkg/MdeModulePkg.dsc
|
||||
\hyperref[uefiinputprops]{Input Properties} section below.
|
||||
|
||||
\item
|
||||
\texttt{Input}\\
|
||||
\texttt{Output}\\
|
||||
\textbf{Type}: \texttt{plist\ dict}\\
|
||||
\textbf{Failsafe}: None\\
|
||||
\textbf{Description}: Apply individual settings designed for output (text and graphics) in
|
||||
|
||||
Binary file not shown.
@ -1,7 +1,7 @@
|
||||
\documentclass[]{article}
|
||||
%DIF LATEXDIFF DIFFERENCE FILE
|
||||
%DIF DEL PreviousConfiguration.tex Thu Feb 6 00:43:28 2020
|
||||
%DIF ADD ../Configuration.tex Sun Feb 9 01:08:55 2020
|
||||
%DIF ADD ../Configuration.tex Sun Feb 9 14:29:44 2020
|
||||
|
||||
\usepackage{lmodern}
|
||||
\usepackage{amssymb,amsmath}
|
||||
@ -2394,7 +2394,7 @@ behaviour that does not go to any other sections
|
||||
\textbf{Failsafe}: \texttt{false}\\
|
||||
\textbf{Description}: Enable \texttt{modifier hotkey} handling in boot picker.
|
||||
|
||||
In addition to \texttt{action hotkeys}, which are partially described in \texttt{UsePicker}
|
||||
In addition to \texttt{action hotkeys}, which are partially described in \texttt{\DIFdelbegin \DIFdel{UsePicker}\DIFdelend \DIFaddbegin \DIFadd{PickerMode}\DIFaddend }
|
||||
section and are normally handled by Apple BDS, there exist modifier keys, which are
|
||||
handled by operating system bootloader, namely \texttt{boot.efi}. These keys
|
||||
allow to change operating system behaviour by providing different boot modes.
|
||||
@ -2502,16 +2502,32 @@ behaviour that does not go to any other sections
|
||||
automatic booting of the default boot entry. Use 0 to disable timer.
|
||||
|
||||
\item
|
||||
\texttt{UsePicker}\\
|
||||
\texttt{\DIFdelbegin \DIFdel{UsePicker}\DIFdelend \DIFaddbegin \DIFadd{PickerMode}\DIFaddend }\\
|
||||
\textbf{Type}: \texttt{plist\ boolean}\\
|
||||
\textbf{Failsafe}: \texttt{false}\\
|
||||
\textbf{Description}: Use OpenCore built-in boot picker for boot management.
|
||||
\textbf{Description}: \DIFdelbegin \DIFdel{Use OpenCore built-in boot picker }\DIFdelend \DIFaddbegin \DIFadd{Choose boot picker used }\DIFaddend for boot management.
|
||||
|
||||
\texttt{UsePicker} set to \texttt{false} entirely disables all boot management
|
||||
in OpenCore except policy enforcement. In this case a custom user interface may
|
||||
\DIFaddbegin \DIFadd{Picker describes underlying boot management with an optional user interface
|
||||
responsible for handling boot options. The following values are supported:
|
||||
}
|
||||
|
||||
\begin{itemize}
|
||||
\tightlist
|
||||
\item \DIFaddend \texttt{\DIFdelbegin \DIFdel{UsePicker}\DIFdelend \DIFaddbegin \DIFadd{Builtin}\DIFaddend } \DIFdelbegin \DIFdel{set to }\DIFdelend \DIFaddbegin \DIFadd{--- boot management is handled by OpenCore, a simple
|
||||
text only user interface is used.
|
||||
}\item \DIFaddend \texttt{\DIFdelbegin \DIFdel{false}%DIFDELCMD < \MBLOCKRIGHTBRACE %%%
|
||||
\DIFdel{entirely disables }\DIFdelend \DIFaddbegin \DIFadd{External}} \DIFadd{--- an external boot management protocol is used
|
||||
if available. Otherwise }\texttt{\DIFadd{Builtin}} \DIFadd{mode is used.
|
||||
}\item \texttt{\DIFadd{Apple}} \DIFadd{--- Apple boot management is used if available.
|
||||
Otherwise }\texttt{\DIFadd{Builtin}} \DIFadd{mode is used.
|
||||
}\end{itemize}
|
||||
|
||||
|
||||
\DIFadd{Upon success }\texttt{\DIFadd{External}} \DIFadd{mode will entirely disable }\DIFaddend all boot management
|
||||
in OpenCore except policy enforcement. In \DIFdelbegin \DIFdel{this case }\DIFdelend \DIFaddbegin \texttt{\DIFadd{Apple}} \DIFadd{mode it may additionally
|
||||
bypass policy enforcement. To implement }\texttt{\DIFadd{External}} \DIFadd{mode }\DIFaddend a custom user interface may
|
||||
utilise \href{https://github.com/acidanthera/OcSupportPkg}{OcSupportPkg}
|
||||
\texttt{OcBootManagementLib} to implement a user friendly boot picker oneself.
|
||||
Reference example of external graphics interface is provided in
|
||||
\texttt{OcBootManagementLib}\DIFdelbegin \DIFdel{to implement a user friendly boot picker oneself}\DIFdelend . Reference example of external graphics interface is provided in
|
||||
\href{https://github.com/acidanthera/OcSupportPkg/tree/master/Tests/ExternalUi}{ExternalUi}
|
||||
test driver.
|
||||
|
||||
@ -2544,10 +2560,10 @@ behaviour that does not go to any other sections
|
||||
\emph{Note}: Activated \texttt{KeySupport}, \texttt{AppleUsbKbDxe}, or similar driver is required
|
||||
for key handling to work. On many firmwares it is not possible to get all the keys function.
|
||||
|
||||
In addition to \texttt{OPT} OpenCore supports \texttt{Escape} key
|
||||
\texttt{ShowPicker}. This key exists for firmwares with PS/2 keyboards that
|
||||
fail to report held \texttt{OPT} key and require continual presses of \texttt{Escape}
|
||||
key to enter the boot menu.
|
||||
In addition to \texttt{OPT} OpenCore supports \texttt{Escape} key \DIFaddbegin \DIFadd{to display picker when
|
||||
}\DIFaddend \texttt{ShowPicker} \DIFaddbegin \DIFadd{is disabled}\DIFaddend . This key exists for \DIFaddbegin \texttt{\DIFadd{Apple}} \DIFadd{picker mode and for
|
||||
}\DIFaddend firmwares with PS/2 keyboards that fail to report held \texttt{OPT} key and require continual
|
||||
presses of \texttt{Escape} key to enter the boot menu.
|
||||
|
||||
\end{enumerate}
|
||||
|
||||
@ -4099,7 +4115,7 @@ build -a X64 -b RELEASE -t XCODE5 -p MdeModulePkg/MdeModulePkg.dsc
|
||||
\hyperref[uefiinputprops]{Input Properties} section below.
|
||||
|
||||
\item
|
||||
\DIFaddbegin \texttt{\DIFadd{Input}}\\
|
||||
\DIFaddbegin \texttt{\DIFadd{Output}}\\
|
||||
\textbf{\DIFadd{Type}}\DIFadd{: }\texttt{\DIFadd{plist\ dict}}\\
|
||||
\textbf{\DIFadd{Failsafe}}\DIFadd{: None}\\
|
||||
\textbf{\DIFadd{Description}}\DIFadd{: Apply individual settings designed for output (text and graphics) in
|
||||
|
||||
@ -583,6 +583,8 @@
|
||||
<dict>
|
||||
<key>HibernateMode</key>
|
||||
<string>None</string>
|
||||
<key>PickerMode</key>
|
||||
<string>Builtin</string>
|
||||
<key>HideSelf</key>
|
||||
<true/>
|
||||
<key>PickerAttributes</key>
|
||||
@ -595,8 +597,6 @@
|
||||
<integer>0</integer>
|
||||
<key>Timeout</key>
|
||||
<integer>5</integer>
|
||||
<key>UsePicker</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>Debug</key>
|
||||
<dict>
|
||||
|
||||
@ -583,6 +583,8 @@
|
||||
<dict>
|
||||
<key>HibernateMode</key>
|
||||
<string>None</string>
|
||||
<key>PickerMode</key>
|
||||
<string>Builtin</string>
|
||||
<key>HideSelf</key>
|
||||
<true/>
|
||||
<key>PickerAttributes</key>
|
||||
@ -595,8 +597,6 @@
|
||||
<integer>0</integer>
|
||||
<key>Timeout</key>
|
||||
<integer>5</integer>
|
||||
<key>UsePicker</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>Debug</key>
|
||||
<dict>
|
||||
|
||||
@ -107,6 +107,7 @@
|
||||
MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
|
||||
OpenCorePkg/Application/Bootstrap/Bootstrap.inf
|
||||
OpenCorePkg/Platform/OpenCore/OpenCore.inf
|
||||
OcSupportPkg/Application/BootKicker/BootKicker.inf
|
||||
OcSupportPkg/Application/CleanNvram/CleanNvram.inf
|
||||
OcSupportPkg/Application/VerifyMsrE2/VerifyMsrE2.inf
|
||||
OcSupportPkg/Platform/AppleUsbKbDxe/UsbKbDxe.inf
|
||||
|
||||
@ -365,17 +365,32 @@ OcMiscBoot (
|
||||
EFI_STATUS Status;
|
||||
OC_PICKER_CONTEXT *Context;
|
||||
OC_PICKER_CMD PickerCommand;
|
||||
OC_PICKER_MODE PickerMode;
|
||||
UINTN ContextSize;
|
||||
UINT32 Index;
|
||||
UINT32 EntryIndex;
|
||||
OC_INTERFACE_PROTOCOL *Interface;
|
||||
UINTN BlessOverrideSize;
|
||||
CHAR16 **BlessOverride;
|
||||
CONST CHAR8 *AsciiPicker;
|
||||
|
||||
AsciiPicker = OC_BLOB_GET (&Config->Misc.Boot.PickerMode);
|
||||
|
||||
if (AsciiStrCmp (AsciiPicker, "Builtin") == 0) {
|
||||
PickerMode = OcPickerModeBuiltin;
|
||||
} else if (AsciiStrCmp (AsciiPicker, "External") == 0) {
|
||||
PickerMode = OcPickerModeExternal;
|
||||
} else if (AsciiStrCmp (AsciiPicker, "Apple") == 0) {
|
||||
PickerMode = OcPickerModeApple;
|
||||
} else {
|
||||
DEBUG ((DEBUG_WARN, "OC: Unknown PickirMode: %a, using builtin\n", AsciiPicker));
|
||||
PickerMode = OcPickerModeBuiltin;
|
||||
}
|
||||
|
||||
//
|
||||
// Do not use our boot picker unless asked.
|
||||
//
|
||||
if (!Config->Misc.Boot.UsePicker) {
|
||||
if (PickerMode == OcPickerModeExternal) {
|
||||
DEBUG ((DEBUG_INFO, "OC: Handing off to external boot controller\n"));
|
||||
|
||||
Status = gBS->LocateProtocol (
|
||||
@ -383,19 +398,19 @@ OcMiscBoot (
|
||||
NULL,
|
||||
(VOID **) &Interface
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (!EFI_ERROR (Status)) {
|
||||
if (Interface->Revision != OC_INTERFACE_REVISION) {
|
||||
DEBUG ((
|
||||
DEBUG_INFO,
|
||||
"OC: Incompatible external GUI protocol - %u vs %u\n",
|
||||
Interface->Revision,
|
||||
OC_INTERFACE_REVISION
|
||||
));
|
||||
Interface = NULL;
|
||||
}
|
||||
} else {
|
||||
DEBUG ((DEBUG_INFO, "OC: Missing external GUI protocol - %r\n", Status));
|
||||
return;
|
||||
}
|
||||
|
||||
if (Interface->Revision != OC_INTERFACE_REVISION) {
|
||||
DEBUG ((
|
||||
DEBUG_INFO,
|
||||
"OC: Incompatible external GUI protocol - %u vs %u\n",
|
||||
Interface->Revision,
|
||||
OC_INTERFACE_REVISION
|
||||
));
|
||||
return;
|
||||
Interface = NULL;
|
||||
}
|
||||
} else {
|
||||
Interface = NULL;
|
||||
@ -470,6 +485,7 @@ OcMiscBoot (
|
||||
Context->CustomRead = OcToolLoadEntry;
|
||||
Context->PrivilegeContext = Privilege;
|
||||
Context->RequestPrivilege = OcShowSimplePasswordRequest;
|
||||
Context->PickerMode = PickerMode;
|
||||
Context->ConsoleAttributes = Config->Misc.Boot.PickerAttributes;
|
||||
|
||||
if ((Config->Misc.Security.ExposeSensitiveData & OCS_EXPOSE_VERSION_UI) != 0) {
|
||||
|
||||
@ -29,6 +29,7 @@ package() {
|
||||
cp FwRuntimeServices.efi tmp/EFI/OC/Drivers/ || exit 1
|
||||
cp NvmExpressDxe.efi tmp/EFI/OC/Drivers/ || exit 1
|
||||
cp XhciDxe.efi tmp/EFI/OC/Drivers/ || exit 1
|
||||
cp BootKicker.efi tmp/EFI/OC/Tools/ || exit 1
|
||||
cp CleanNvram.efi tmp/EFI/OC/Tools/ || exit 1
|
||||
cp VerifyMsrE2.efi tmp/EFI/OC/Tools/ || exit 1
|
||||
cp "${selfdir}/Docs/Configuration.pdf" tmp/Docs/ || exit 1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user