Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
btwise
OpenCorePKG_MOD
提交
02602c8a
O
OpenCorePKG_MOD
项目概览
btwise
/
OpenCorePKG_MOD
通知
26
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
OpenCorePKG_MOD
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
02602c8a
编写于
5月 30, 2020
作者:
V
vit9696
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
OcAppleBootPolicyLib: Added first-class Windows support to bless model
上级
507f4f29
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
45 addition
and
11 deletion
+45
-11
Changelog.md
Changelog.md
+1
-0
Docs/Configuration.tex
Docs/Configuration.tex
+4
-7
Include/Microsoft/MicrosoftWindows.h
Include/Microsoft/MicrosoftWindows.h
+15
-0
Library/OcAppleBootPolicyLib/OcAppleBootPolicyLib.c
Library/OcAppleBootPolicyLib/OcAppleBootPolicyLib.c
+25
-4
未找到文件。
Changelog.md
浏览文件 @
02602c8a
...
...
@@ -39,6 +39,7 @@ OpenCore Changelog
-
Added serial port initialisation for serial debug logging
-
Disabled empty debug log file creation to avoid ESP cluttering
-
Added
`TscSyncTimeout`
quirk to workaround debug kernel assertions
-
Added first-class Windows support to bless model
#### v0.5.8
-
Fixed invalid CPU object reference in SSDT-PLUG
...
...
Docs/Configuration.tex
浏览文件 @
02602c8a
...
...
@@ -2254,10 +2254,11 @@ entry choice will update till next manual reconfiguration.
Designed to be filled with
\texttt
{
plist
\
string
}
entries containing
absolute UEFI paths to customised bootloaders, for example,
\texttt
{
\textbackslash
EFI
\textbackslash
Microsoft
\textbackslash
Boot
\textbackslash
bootmgfw
.efi
}
for
Microsoft
bootloader. This allows unusual boot paths to be automaticlly
\texttt
{
\textbackslash
EFI
\textbackslash
debian
\textbackslash
grubx64
.efi
}
for
Debian
bootloader. This allows unusual boot paths to be automaticlly
discovered by the boot picker. Designwise they are equivalent to predefined blessed path, such as
\texttt
{
\textbackslash
System
\textbackslash
Library
\textbackslash
CoreServices
\textbackslash
boot.efi
}
,
\texttt
{
\textbackslash
System
\textbackslash
Library
\textbackslash
CoreServices
\textbackslash
boot.efi
}
or
\texttt
{
\textbackslash
EFI
\textbackslash
Microsoft
\textbackslash
Boot
\textbackslash
bootmgfw.efi
}
,
but unlike predefined bless paths they have highest priority.
\item
...
...
@@ -5366,10 +5367,6 @@ functioning. Feature highlights:
\begin
{
itemize
}
\item
MBR
(
Master Boot Record
)
installations are legacy and will not be supported.
\item
To install Windows, macOS, and OpenCore on the same drive you can specify
Windows bootloader path
(
\texttt
{
\textbackslash
EFI
\textbackslash
Microsoft
\textbackslash
Boot
\textbackslash
bootmgfw.efi
}
)
in
\texttt
{
BlessOverride
}
section.
\item
All the modifications applied
(
to ACPI, NVRAM, SMBIOS, etc.
)
are supposed
to be operating system agnostic, i.e. apply equally regardless of the OS booted.
This enables Boot Camp software experience on Windows.
...
...
Include/Microsoft/MicrosoftWindows.h
0 → 100644
浏览文件 @
02602c8a
/** @file
Copyright (c) 2020, vit9696. All rights reserved.
SPDX-License-Identifier: BSD-3-Clause
**/
#ifndef MICROSOFT_WINDOWS_H
#define MICROSOFT_WINDOWS_H
///
/// Windows bootloader path.
/// REF: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/bcd-system-store-settings-for-uefi
///
#define MS_BOOTER_DEFAULT_FILE_NAME L"\\EFI\\Microsoft\\Boot\\bootmgfw.efi"
#endif // MICROSOFT_WINDOWS_H
Library/OcAppleBootPolicyLib/OcAppleBootPolicyLib.c
浏览文件 @
02602c8a
...
...
@@ -13,6 +13,7 @@
**/
#include <AppleMacEfi.h>
#include <MicrosoftWindows.h>
#include <Guid/AppleApfsInfo.h>
#include <Guid/AppleBless.h>
...
...
@@ -48,18 +49,38 @@ typedef struct {
///
/// An array of file paths to search for in case no file is blessed.
/// On Apple Macs this list includes:
/// 1. APPLE_BOOTER_DEFAULT_FILE_NAME -- \System\Library\CoreServices\boot.efi
/// 2. APPLE_REMOVABLE_MEDIA_FILE_NAME -- \EFI\APPLE\X64\BOOT.EFI
/// 3. EFI_REMOVABLE_MEDIA_FILE_NAME -- \EFI\BOOT\BOOTX64.EFI
/// 4. APPLE_BOOTER_ROOT_FILE_NAME -- \boot.efi
///
/// Since in real world only 1st and 3rd entries are used, we do not include
/// 2nd and 4th until further notice. However, we do include a custom entry
/// for Windows, for the reason OpenCore, unlike Apple EFI, may override
/// BOOTx64.efi, and this is not the case for Apple EFI. So we end up with:
/// 1. APPLE_BOOTER_DEFAULT_FILE_NAME -- \System\Library\CoreServices\boot.efi
/// 2. MS_BOOTER_DEFAULT_FILE_NAME -- \EFI\Microsoft\Boot\bootmgfw.efi
/// 3. EFI_REMOVABLE_MEDIA_FILE_NAME -- \EFI\BOOT\BOOTX64.EFI
///
/// This resolves a problem when Windows installer does not replace our BOOTx64.efi
/// file with Windows file and then NVRAM reset or Boot Camp software reboot to macOS
/// results in the removal of the Windows boot entry from NVRAM making Windows
/// disappear from the list of OpenCore entries without BlessOverride.
///
/// Linux and related entries are not present here, because they have fine working
/// software for boot management and do not use BOOTx64.efi in the first place.
///
GLOBAL_REMOVE_IF_UNREFERENCED
CONST
CHAR16
*
gAppleBootPolicyPredefinedPaths
[]
=
{
APPLE_BOOTER_DEFAULT_FILE_NAME
,
APPLE_REMOVABLE_MEDIA_FILE_NAME
,
EFI_REMOVABLE_MEDIA_FILE_NAME
,
APPLE_BOOTER_ROOT_FILE_NAME
MS_BOOTER_DEFAULT_FILE_NAME
,
EFI_REMOVABLE_MEDIA_FILE_NAME
};
GLOBAL_REMOVE_IF_UNREFERENCED
CONST
UINTN
gAppleBootPolicyNumPredefinedPaths
=
ARRAY_SIZE
(
gAppleBootPolicyPredefinedPaths
);
GLOBAL_REMOVE_IF_UNREFERENCED
CONST
UINTN
gAppleBootPolicyCoreNumPredefinedPaths
=
1
;
GLOBAL_REMOVE_IF_UNREFERENCED
CONST
UINTN
gAppleBootPolicyCoreNumPredefinedPaths
=
2
;
EFI_STATUS
EFIAPI
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录