Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
btwise
OpenCorePKG_MOD
提交
39b2b573
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,发现更多精彩内容 >>
提交
39b2b573
编写于
9月 05, 2021
作者:
M
MikeBeaton
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
OpenLinuxBoot: Add scan of /boot/loader/entries for when /boot is not separate volume
上级
987b6372
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
71 addition
and
13 deletion
+71
-13
Platform/OpenLinuxBoot/Autodetect.c
Platform/OpenLinuxBoot/Autodetect.c
+20
-1
Platform/OpenLinuxBoot/LoaderEntry.c
Platform/OpenLinuxBoot/LoaderEntry.c
+51
-4
Platform/OpenLinuxBoot/OpenLinuxBoot.c
Platform/OpenLinuxBoot/OpenLinuxBoot.c
+0
-8
未找到文件。
Platform/OpenLinuxBoot/Autodetect.c
浏览文件 @
39b2b573
...
...
@@ -600,8 +600,9 @@ GenerateEntriesForVmlinuzFiles (
return
EFI_SUCCESS
;
}
STATIC
EFI_STATUS
AutodetectLinux
(
Internal
AutodetectLinux
(
IN
EFI_FILE_PROTOCOL
*
RootDirectory
,
OUT
OC_PICKER_ENTRY
**
Entries
,
OUT
UINTN
*
NumEntries
...
...
@@ -691,3 +692,21 @@ AutodetectLinux (
VmlinuzDirectory
->
Close
(
VmlinuzDirectory
);
return
Status
;
}
EFI_STATUS
AutodetectLinux
(
IN
EFI_FILE_PROTOCOL
*
RootDirectory
,
OUT
OC_PICKER_ENTRY
**
Entries
,
OUT
UINTN
*
NumEntries
)
{
EFI_STATUS
Status
;
Status
=
InternalAutodetectLinux
(
RootDirectory
,
Entries
,
NumEntries
);
if
(
EFI_ERROR
(
Status
)
&&
Status
!=
EFI_NOT_FOUND
)
{
DEBUG
((
DEBUG_WARN
,
"LNX: AutodetectLinux - %r
\n
"
,
Status
));
}
return
Status
;
}
Platform/OpenLinuxBoot/LoaderEntry.c
浏览文件 @
39b2b573
...
...
@@ -22,9 +22,20 @@
#include <Protocol/OcBootEntry.h>
#define LOADER_ENTRIES_DIR L"\\loader\\entries"
#define GRUB2_GRUB_CFG L"\\grub2\\grub.cfg"
#define GRUB2_GRUBENV L"\\grub2\\grubenv"
//
// Required where the BTRFS subvolume is /boot, as this looks like a
// normal directory within EFI. Note that scanning / and then /boot
// is how blscfg behaves by default too.
//
#define ADDITIONAL_SCAN_DIR L"boot"
//
// No leading slash so they can be relative to root or
// additional scan dir.
//
#define LOADER_ENTRIES_DIR L"loader\\entries"
#define GRUB2_GRUB_CFG L"grub2\\grub.cfg"
#define GRUB2_GRUBENV L"grub2\\grubenv"
#define GRUB2_GRUBENV_SIZE SIZE_1KB
#define BLSPEC_SUFFIX_CONF L".conf"
...
...
@@ -664,8 +675,9 @@ ProcessLoaderEntry (
return
EFI_SUCCESS
;
}
STATIC
EFI_STATUS
ScanLoaderEntries
(
Internal
ScanLoaderEntries
(
IN
EFI_FILE_PROTOCOL
*
RootDirectory
,
OUT
OC_PICKER_ENTRY
**
Entries
,
OUT
UINTN
*
NumEntries
...
...
@@ -767,6 +779,41 @@ ScanLoaderEntries (
return
Status
;
}
EFI_STATUS
ScanLoaderEntries
(
IN
EFI_FILE_PROTOCOL
*
RootDirectory
,
OUT
OC_PICKER_ENTRY
**
Entries
,
OUT
UINTN
*
NumEntries
)
{
EFI_STATUS
Status
;
EFI_STATUS
TempStatus
;
EFI_FILE_PROTOCOL
*
AdditionalScanDirectory
;
Status
=
InternalScanLoaderEntries
(
RootDirectory
,
Entries
,
NumEntries
);
if
(
!
EFI_ERROR
(
Status
))
{
return
Status
;
}
if
(
Status
!=
EFI_NOT_FOUND
)
{
DEBUG
((
DEBUG_WARN
,
"LNX: ScanLoaderEntries @root - %r
\n
"
,
Status
));
}
TempStatus
=
OcSafeFileOpen
(
RootDirectory
,
&
AdditionalScanDirectory
,
ADDITIONAL_SCAN_DIR
,
EFI_FILE_MODE_READ
,
0
);
if
(
EFI_ERROR
(
TempStatus
))
{
return
Status
;
}
Status
=
InternalScanLoaderEntries
(
AdditionalScanDirectory
,
Entries
,
NumEntries
);
if
(
!
EFI_ERROR
(
Status
))
{
DEBUG
((
DEBUG_INFO
,
"LNX: ScanLoaderEntries @%s - %r
\n
"
,
ADDITIONAL_SCAN_DIR
,
Status
));
return
Status
;
}
if
(
Status
!=
EFI_NOT_FOUND
)
{
DEBUG
((
DEBUG_WARN
,
"LNX: ScanLoaderEntries @%s - %r
\n
"
,
ADDITIONAL_SCAN_DIR
,
Status
));
}
return
Status
;
}
VOID
InternalFreeNamedLoaderEntry
(
NAMED_LOADER_ENTRY
*
Entry
...
...
Platform/OpenLinuxBoot/OpenLinuxBoot.c
浏览文件 @
39b2b573
...
...
@@ -238,10 +238,6 @@ OcGetLinuxBootEntries (
// are only unusable files in there.
//
if
(
EFI_ERROR
(
Status
))
{
if
(
Status
!=
EFI_NOT_FOUND
)
{
DEBUG
((
DEBUG_WARN
,
"LNX: ScanLoaderEntries - %r
\n
"
,
Status
));
}
//
// Auto-detect vmlinuz and initrd files on own root filesystem (Debian-like).
//
...
...
@@ -251,10 +247,6 @@ OcGetLinuxBootEntries (
Entries
,
NumEntries
);
if
(
EFI_ERROR
(
Status
)
&&
Status
!=
EFI_NOT_FOUND
)
{
DEBUG
((
DEBUG_WARN
,
"LNX: AutodetectLinux - %r
\n
"
,
Status
));
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录