Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
btwise
OpenCorePKG_MOD
提交
73533f88
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,发现更多精彩内容 >>
提交
73533f88
编写于
8月 30, 2020
作者:
G
Goldfish64
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
OpenCoreKernel: Implement arch filtering for Block
上级
d5a3013d
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
30 addition
and
14 deletion
+30
-14
Changelog.md
Changelog.md
+1
-1
Include/Acidanthera/OpenCore.h
Include/Acidanthera/OpenCore.h
+1
-0
Platform/OpenCore/OpenCoreKernel.c
Platform/OpenCore/OpenCoreKernel.c
+2
-2
Platform/OpenCore/OpenCoreKernelPatch.c
Platform/OpenCore/OpenCoreKernelPatch.c
+26
-11
未找到文件。
Changelog.md
浏览文件 @
73533f88
...
...
@@ -30,7 +30,7 @@ OpenCore Changelog
-
Added
`KernelCache`
option to specify kernel caching preference for older kernels
-
Added
`Force`
section to provide support for injecting drivers in older macOS
-
Changed kernel driver injection to happen prior to kernel driver patching
-
Added
`Arch`
filtering option to
`Add`
,
`Force`
, and
`Patch`
sections
-
Added
`Arch`
filtering option to
`Add`
,
'Block
`,
`
Force
`, and `
Patch
` sections
#### v0.6.0
- Fixed sound corruption with AudioDxe
...
...
Include/Acidanthera/OpenCore.h
浏览文件 @
73533f88
...
...
@@ -154,6 +154,7 @@ VOID
OcKernelBlockKexts
(
IN
OC_GLOBAL_CONFIG
*
Config
,
IN
UINT32
DarwinVersion
,
IN
BOOLEAN
Is32Bit
,
IN
PRELINKED_CONTEXT
*
Context
);
...
...
Platform/OpenCore/OpenCoreKernel.c
浏览文件 @
73533f88
...
...
@@ -567,7 +567,7 @@ OcKernelInjectKext (
MaxKernel
=
OcParseDarwinVersion
(
OC_BLOB_GET
(
&
Kext
->
MaxKernel
));
MinKernel
=
OcParseDarwinVersion
(
OC_BLOB_GET
(
&
Kext
->
MinKernel
));
if
(
A
rch
!=
NULL
&&
A
sciiStrCmp
(
Arch
,
Is32Bit
?
"x86_64"
:
"i386"
)
==
0
)
{
if
(
AsciiStrCmp
(
Arch
,
Is32Bit
?
"x86_64"
:
"i386"
)
==
0
)
{
DEBUG
((
DEBUG_INFO
,
"OC: %a%a injection skips %a (%a) kext at %u due to arch %a != %a
\n
"
,
...
...
@@ -763,7 +763,7 @@ OcKernelProcessPrelinked (
OcKernelApplyPatches
(
Config
,
mOcCpuInfo
,
DarwinVersion
,
Is32Bit
,
CacheTypePrelinked
,
&
Context
,
NULL
,
0
);
OcKernelBlockKexts
(
Config
,
DarwinVersion
,
&
Context
);
OcKernelBlockKexts
(
Config
,
DarwinVersion
,
Is32Bit
,
&
Context
);
*
KernelSize
=
Context
.
PrelinkedSize
;
...
...
Platform/OpenCore/OpenCoreKernelPatch.c
浏览文件 @
73533f88
...
...
@@ -103,15 +103,17 @@ OcKernelApplyPatches (
for
(
Index
=
0
;
Index
<
Config
->
Kernel
.
Patch
.
Count
;
++
Index
)
{
UserPatch
=
Config
->
Kernel
.
Patch
.
Values
[
Index
];
Target
=
OC_BLOB_GET
(
&
UserPatch
->
Identifier
);
Comment
=
OC_BLOB_GET
(
&
UserPatch
->
Comment
);
if
(
!
UserPatch
->
Enabled
||
(
AsciiStrCmp
(
Target
,
"kernel"
)
==
0
)
!=
IsKernelPatch
)
{
continue
;
}
Arch
=
OC_BLOB_GET
(
&
UserPatch
->
Arch
);
Comment
=
OC_BLOB_GET
(
&
UserPatch
->
Comment
);
Arch
=
OC_BLOB_GET
(
&
UserPatch
->
Arch
);
MaxKernel
=
OcParseDarwinVersion
(
OC_BLOB_GET
(
&
UserPatch
->
MaxKernel
));
MinKernel
=
OcParseDarwinVersion
(
OC_BLOB_GET
(
&
UserPatch
->
MinKernel
));
if
(
A
rch
!=
NULL
&&
A
sciiStrCmp
(
Arch
,
Is32Bit
?
"x86_64"
:
"i386"
)
==
0
)
{
if
(
AsciiStrCmp
(
Arch
,
Is32Bit
?
"x86_64"
:
"i386"
)
==
0
)
{
DEBUG
((
DEBUG_INFO
,
"OC: Kernel patcher skips %a (%a) patch at %u due to arch %a != %a
\n
"
,
...
...
@@ -124,9 +126,6 @@ OcKernelApplyPatches (
return
;
}
MaxKernel
=
OcParseDarwinVersion
(
OC_BLOB_GET
(
&
UserPatch
->
MaxKernel
));
MinKernel
=
OcParseDarwinVersion
(
OC_BLOB_GET
(
&
UserPatch
->
MinKernel
));
if
(
!
OcMatchDarwinVersion
(
DarwinVersion
,
MinKernel
,
MaxKernel
))
{
DEBUG
((
DEBUG_INFO
,
...
...
@@ -289,6 +288,7 @@ VOID
OcKernelBlockKexts
(
IN
OC_GLOBAL_CONFIG
*
Config
,
IN
UINT32
DarwinVersion
,
IN
BOOLEAN
Is32Bit
,
IN
PRELINKED_CONTEXT
*
Context
)
{
...
...
@@ -298,20 +298,35 @@ OcKernelBlockKexts (
OC_KERNEL_BLOCK_ENTRY
*
Kext
;
CONST
CHAR8
*
Target
;
CONST
CHAR8
*
Comment
;
CONST
CHAR8
*
Arch
;
UINT32
MaxKernel
;
UINT32
MinKernel
;
for
(
Index
=
0
;
Index
<
Config
->
Kernel
.
Block
.
Count
;
++
Index
)
{
Kext
=
Config
->
Kernel
.
Block
.
Values
[
Index
];
Target
=
OC_BLOB_GET
(
&
Kext
->
Identifier
);
Comment
=
OC_BLOB_GET
(
&
Kext
->
Comment
);
Kext
=
Config
->
Kernel
.
Block
.
Values
[
Index
];
if
(
!
Kext
->
Enabled
)
{
continue
;
}
MaxKernel
=
OcParseDarwinVersion
(
OC_BLOB_GET
(
&
Kext
->
MaxKernel
));
MinKernel
=
OcParseDarwinVersion
(
OC_BLOB_GET
(
&
Kext
->
MinKernel
));
Target
=
OC_BLOB_GET
(
&
Kext
->
Identifier
);
Comment
=
OC_BLOB_GET
(
&
Kext
->
Comment
);
Arch
=
OC_BLOB_GET
(
&
Kext
->
Arch
);
MaxKernel
=
OcParseDarwinVersion
(
OC_BLOB_GET
(
&
Kext
->
MaxKernel
));
MinKernel
=
OcParseDarwinVersion
(
OC_BLOB_GET
(
&
Kext
->
MinKernel
));
if
(
AsciiStrCmp
(
Arch
,
Is32Bit
?
"x86_64"
:
"i386"
)
==
0
)
{
DEBUG
((
DEBUG_INFO
,
"OC: Prelink blocker skips %a (%a) block at %u due to arch %a != %a
\n
"
,
Target
,
Comment
,
Index
,
Arch
,
Is32Bit
?
"i386"
:
"x86_64"
));
return
;
}
if
(
!
OcMatchDarwinVersion
(
DarwinVersion
,
MinKernel
,
MaxKernel
))
{
DEBUG
((
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录