下载时建议采用Debug版本,并把日志打开。待没问题之后再用Release版本替换,并关掉不需要的日志。
输出全部日志的级别 | |
---|---|
Target | 127 |
DisplayLevel | 2155566591 |
没翻译完全,有不懂请留言,我有邮箱通知,会在一天内回复
声明
待译自 OpenCore 官方教程之Haswell
仅适用于 Haswell 和 Broadwell,其他用户请自行看官方文档config.plist相关平台
2020-07-14
OC 版本号: 0.5.9
Haswell 笔记本 点我Guide
适用于 Haswell 和 Broadwell 架构用户,且以下每个标题都对应 config.plist 里的属性集
前提
配置 config.plist 并没有你想的那么难,花点时间就可以了,接下来我会告诉你一切(包括每一个选项的作用及其该填的值)。这也意味着如果出问题了那应该是你忽略了什么,请重新按本文所说的检查一下。
关于使用 OpenCore 要注意的点:
所有属性值都必须被定义,并且是没有恢复回默认值的说法,所以:你要记得备份,不要随意删除属性,没提到的地方不要随意改动 只需要保持原样。
** Sample.plist 文件不能直接使用**,要根据你的机子按照本文进行配置
绝对不要使用 CONFIGURATORS 这个软件, 他们很少尊重 OpenCore 的官方配置建议,甚至连 Clover 独有的属性也加进来(瞎J8搞)。
进入正文,我们需要的工具有:
通用的 plist 编辑器
用于生成我们的 SMBIOS 数据
附带在 OC 里, 一般在这样的路径里 “OpenCore-0.5.9-DEBUGDocsSample.plist”,更多请参阅上一节有关如何获取: config.plist Setup
注意:
配置时请详细看文章内容,且确保你都配置对了。
以文字为准,因为图片不一定是最新的。
如果有配置没被提到,那就不修改它。
ACPI
Add
此处配置的作用:指定要加到系统里的几张 SSDT 表。
这对于 booting macOS 非常重要,且有很多用途,如 USB maps, disabling unsupported GPUs and such. And with our system, its even required to boot.
如何制作SSDT请见前面章节: Getting started with ACPI
我们的 OC 需要一对 SSDTs 表,以此实现和 Clover 相同的功能:
For us we’ll need a couple of SSDTs to bring back functionality that Clover provided:
需要的_SSDTs表 | 说明 |
---|---|
SSDT-PLUG | Allows for 原生 CPU 电源管理,适用于 Haswell 或更新的平台。详见 Getting Started With ACPI Guide |
SSDT-EC | * 修复 嵌入式控制器EC (embedded controller ), 详见 Getting Started With ACPI Guide |
注意:您不应在此添加您提取的 DSDT.aml,因为它已经在您的固件里了。
因此,如果有,请在你的 config.plist 和 EFI/OC/ACPI 下删除它。
如果想更深入地改进 DSDT,提取/反编译/编译之类的,见 Getting started with ACPI **
** 编译后的 SSDTs 后缀名是.aml (即Assembled) , 编译后放进EFI/OC/ACPI
目录并在config.plist配置里 ACPI -> Add
指定即可。
Delete
这里用于阻止指定 ACPI 表的加载,对于我们来说,我们可以忽略它。
Patch
This section allows us to dynamically modify parts of the ACPI (DSDT, SSDT, etc.) via OpenCore. For us, our patches are handled by our SSDTs. This is a much cleaner solution as this will allow us to boot Windows and other OSes with OpenCore
Quirks
Settings relating to ACPI, leave everything here as default as we have no use for these quirks.
和 ACPI 相关的配置,这里我们不需要,所以不改动。
Booter
OpenRuntime 修补的 boot.efi,是 AptioMemoryFix.efi 的替代者。本部分专门讨论与 boot.efi 相关的 quirks(把quirks译成怪癖?patch译成修补),
This section is dedicated to quirks relating to boot.efi patching with OpenRuntime, 它是 AptioMemoryFix.efi 的替代者。
MmioWhitelist
默认情况下,macOS 忽略这些内存空间(spaces),而这里可以允许内存空间(spaces)传递给 macOS,和 DevirtualiseMmio
搭配使用时会很有用。
This section is allowing spaces to be passthrough to macOS that are generally ignored, useful when paired with DevirtualiseMmio
Quirks
这里的配置和 boot.efi 修补
和 固件修复
有关,用如下默认值即可。
Settings relating to boot.efi patching and firmware fixes, the default will work for us.
AvoidRuntimeDefrag: YES
Fixes UEFI runtime services like date, time, NVRAM, power control, etc
EnableWriteUnprotector: YES
是否移除 CR0 寄存器的写保护,是则移除
SetupVirtualMap: YES
Fixes SetVirtualAddresses calls to virtual addresses, Skylake 及更新平台上 不需该功能
DeviceProperties
Add
Sets device properties from a map.
PciRoot(0x0)/Pci(0x2,0x0)
This section is set up via WhateverGreen’s Framebuffer Patching Guide and is used for setting important iGPU properties.
AAPL,ig-platform-id
is what macOS uses to determine how the iGPU drivers interact with our system, and the two values choose between are as follows:
0300220D
– this is used when the Desktop Haswell iGPU is used to drive a display
04001204
– this is used when the Desktop Haswell iGPU is only used for computing tasks and doesn’t drive a display
07002216
– this is used when the Desktop Broadwell iGPU
I added another portion as well that shows a device-id
fake in case you have an HD 4400 which is unsupported in macOS.
The device-id fake is set up like so:
12040000
– this is the device id for HD 4600 which does have support in macOS
We also add 3 more properties, framebuffer-patch-enable
, framebuffer-stolenmem
and framebuffer-fbmem
. The first enables patching via WhateverGreen.kext, the second sets the min stolen memory to 19MB and third sets the framebuffer memory to 9MB. This is usually unnecessary, as this can be configured in BIOS(64MB recommended) but required when not available.
Note: Headless framebuffers(where the dGPU is the display out) do not need framebuffer-patch-enable
, framebuffer-stolenmem
and framebuffer-fbmem
Key | Type | Value |
---|---|---|
AAPL,ig-platform-id | Data | 0300220D |
framebuffer-patch-enable | Data | 01000000 |
framebuffer-stolenmem | Data | 00003001 |
framebuffer-fbmem | Data | 00009000 |
device-id | Data | 12040000 |
(This is an example for a desktop HD 4400 without a dGPU and no BIOS options for iGPU memory)
Key | Type | Value |
---|---|---|
AAPL,ig-platform-id | Data | 07002216 |
framebuffer-patch-enable | Data | 01000000 |
framebuffer-stolenmem | Data | 00003001 |
framebuffer-fbmem | Data | 00009000 |
(This is an example for a desktop Iris Pro 6200 and no BIOS options for iGPU memory)
PciRoot(0x0)/Pci(0x1b,0x0)
layout-id
Applies AppleALC audio injection, you’ll need to do your own research on which codec your motherboard has and match it with AppleALC’s layout. AppleALC Supported Codecs.
You can delete this property outright as it’s unused for us at this time
For us, we’ll be using the boot-arg alcid=xxx
instead to accomplish this. alcid
will override all other layout-IDs present. More info on this is covered in the Post-Install Page
Delete
Removes device properties from the map, for us we can ignore this
Kernel
Add
Here’s where you specify which kexts to load, order matters here so make sure Lilu.kext is always first! Other higher priority kexts come after Lilu such as VirtualSMC, AppleALC, WhateverGreen, etc. A reminder that ProperTree users can run Cmd/Ctrl + Shift + R to add all their kexts in the correct order without manually typing each kext out.
BundlePath
Name of the kext
ex: Lilu.kext
Enabled
Self-explanatory, either enables or disables the kext
ExecutablePath
Path to the actual executable is hidden within the kext, you can see what path your kext has by right-clicking and selecting Show Package Contents
. Generally, they’ll be Contents/MacOS/Kext
but some have kexts hidden within under Plugin
folder. Do note that plist only kexts do not need this filled in.
ex: Contents/MacOS/Lilu
PlistPath
Path to the info.plist
hidden within the kext
ex: Contents/Info.plist
Emulate
Needed for spoofing unsupported CPUs like Pentiums and Celerons
CpuidMask: Leave this blank
CpuidData: Leave this blank
Block
Blocks certain kexts from loading. Not relevant for us.
阻止某些 kext 加载。与我们无关。
Patch
Patches both the kernel and kexts.
对内核和 kexts 打补丁
Quirks
Settings relating to the kernel, for us we’ll be enabling AppleCpuPmCfgLock
, AppleXcpmCfgLock
, DisableIOMapper
, PanicNoKextDump
, PowerTimeoutKernelPanic
and XhciPortLimit
. Everything else should be left as default
AppleCpuPmCfgLock: YES
Only needed when CFG-Lock can’t be disabled in BIOS, Clover counterpart would be AppleIntelCPUPM. Please verify you can disable CFG-Lock, most systems won’t boot with it on so requiring use of this quirk
AppleXcpmCfgLock: YES
Only needed when CFG-Lock can’t be disabled in BIOS, Clover counterpart would be KernelPM. Please verify you can disable CFG-Lock, most systems won’t boot with it on so requiring use of this quirk
CustomSMBIOSGuid: NO
Performs GUID patching for UpdateSMBIOSMode Custom mode. Usually relevant for Dell laptops
DisableIoMapper: YES
Needed to get around VT-D if either unable to disable in BIOS or needed for other operating systems, much better alternative to dart=0
as SIP can stay on in Catalina
DisableRtcChecksum: NO
Prevents AppleRTC from writing to primary checksum (0x58-0x59), required for users who either receive BIOS reset or are sent into Safe mode after reboot/shutdown
LapicKernelPanic: NO
Disables kernel panic on AP core lapic interrupt, generally needed for HP systems. Clover equivalent is Kernel LAPIC
PanicNoKextDump: YES
Allows for reading kernel panics logs when kernel panics occur
PowerTimeoutKernelPanic: YES
Helps fix kernel panics relating to power changes with Apple drivers in macOS Catalina, most notably with digital audio.
XhciPortLimit: YES
This is actually the 15 port limit patch, don’t rely on it as it’s not a guaranteed solution for fixing USB. Please create a USB map when possible.
The reason being is that UsbInjectAll reimplements builtin macOS functionality without proper current tuning. It is much cleaner to just describe your ports in a single plist-only kext, which will not waste runtime memory and such
Misc
Boot
Settings for boot screen (Leave everything as default).
Debug
Helpful for debugging OpenCore boot issues(We’ll be changing everything but DisplayDelay
).
AppleDebug: YES
Enables boot.efi logging, useful for debugging. Note this is only supported on 10.15.4 and newer
ApplePanic: YES
Attempts to log kernel panics to disk
DisableWatchDog: YES
Disables the UEFI watchdog, can help with early boot issues
Target: 67
Shows more debug information, requires debug version of OpenCore
DisplayLevel: 2147483650
Shows even more debug information, requires debug version of OpenCore
These values are based of those calculated in OpenCore debugging
Security
Security is pretty self-explanatory, do not skip.
We’ll be changing AllowNvramReset
, AllowSetDefault
, Vault
and ScanPolicy
AllowNvramReset: YES
Allows for NVRAM reset both in the boot picker and when pressing Cmd+Opt+P+R
AllowSetDefault: YES
Allow CTRL+Enter
and CTRL+Index
to set default boot device in the picker
AuthRestart: NO
Enables Authenticated restart for FileVault 2 so password is not required on reboot. Can be considered a security risk so optional
BlacklistAppleUpdate: True
Ignores Apple’s firmware updater, recommended to enable as to avoid issues with installs and updates
BootProtect: None
Allows the use of Bootstrap.efi inside EFI/OC/Bootstrap instead of BOOTx64.efi, useful for those wanting to either boot with rEFInd or avoid BOOTx64.efi overwrites from Windows. Proper use of this quirks is not be covered in this guide
ExposeSensitiveData: 6
Shows more debug information, requires debug version of OpenCore
Vault: Optional
We won’t be dealing vaulting so we can ignore, you won’t boot with this set to Secure
This is a word, it is not optional to omit this setting. You will regret it if you don’t set it to Optional
, note that it is case-sensitive
ScanPolicy: 0
0
allows you to see all drives available, please refer to Security section for further details. Will not boot USB devices with this set to default
Tools
Used for running OC debugging tools like the shell, ProperTree’s snapshot function will add these for you. For us, we won’t be using any tools.
Name
Name shown in OpenCore
Enabled
Self-explanatory, enables or disables
Path
Path to file after the Tools
folder
ex: OpenShell.efi
Entries
Used for specifying irregular boot paths that can’t be found naturally with OpenCore.
Won’t be covered here, see 8.6 of Configuration.pdf for more info
NVRAM
Add
4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14
Booter Path, mainly used for UI Scaling
UIScale:
01
: Standard resolution(Clover equivalent is 0x28
)
02
: HiDPI (generally required for FileVault to function correctly on smaller displays, Clover equivalent is 0x2A
)
DefaultBackgroundColor: Background color used by boot.efi
00000000
: Syrah Black
BFBFBF00
: Light Gray
7C436110-AB2A-4BBB-A880-FE41995C9F82
System Integrity Protection bitmask
General Purpose boot-args:
boot-args | Description |
---|---|
-v | This enables verbose mode, which shows all the behind-the-scenes text that scrolls by as you’re booting instead of the Apple logo and progress bar. It’s invaluable to any Hackintosher, as it gives you an inside look at the boot process, and can help you identify issues, problem kexts, etc. |
debug=0x100 | This disables macOS’s watchdog which helps prevents a reboot on a kernel panic. That way you can hopefully glean some useful info and follow the breadcrumbs to get past the issues. |
keepsyms=1 | This is a companion setting to debug=0x100 that tells the OS to also print the symbols on a kernel panic. That can give some more helpful insight as to what’s causing the panic itself. |
alcid=1 | Used for setting layout-id for AppleALC, see supported codecs to figure out which layout to use for your specific system. More info on this is covered in the Post-Install Page |
GPU-Specific boot-args:
boot-args | Description |
---|---|
agdpmod=pikera | Used for disabling boardID on Navi GPUs(RX 5000 series), without this you’ll get a black screen. Don’t use if you don’t have Navi(ie. Polaris and Vega cards shouldn’t use this) |
nvda_drv_vrl=1 | Used for enabling Nvidia’s Web Drivers on Maxwell and Pascal cards in Sierra and HighSierra |
-wegnoegpu | Used for disabling all other GPUs than the integrated Intel iGPU, useful for those wanting to run newer versions of macOS where their dGPU isn’t supported |
csr-active-config: Settings for ‘System Integrity Protection’ (SIP). It is generally recommended to change this with csrutil
via the recovery partition.
csr-active-config by default is set to 00000000
which enables System Integrity Protection. You can choose a number of different values but overall we recommend keeping this enabled for best security practices. More info can be found in our troubleshooting page: Disabling SIP
prev-lang:kbd: <>
Needed for non-latin keyboards in the format of lang-COUNTRY:keyboard
, recommended to keep blank though you can specify it(Default in Sample config is Russian):
American: en-US:0
(656e2d55533a30
in HEX)
Full list can be found in AppleKeyboardLayouts.txt
Hint: prev-lang:kbd
can be changed into a String so you can input en-US:0
directly instead of converting to HEX
Key | Type | Value |
---|---|---|
prev-lang:kbd | String | en-US:0 |
Delete
Forcibly rewrites NVRAM variables, do note that Add
will not overwrite values already present in NVRAM so values like boot-args
should be left alone.
LegacyEnable: NO
Allows for NVRAM to be stored on nvram.plist, needed for systems without native NVRAM
LegacyOverwrite: NO
Permits overwriting firmware variables from nvram.plist, only needed for systems without native NVRAM
LegacySchema
Used for assigning NVRAM variables, used with LegacyEnable set to YES
WriteFlash: YES
Enables writing to flash memory for all added variables.
PlatformInfo
For setting up the SMBIOS info, we’ll use CorpNewt’s GenSMBIOS application.
For this Haswell example, we chose the iMac15,1 SMBIOS. The typical breakdown is as follows:
Haswell with only iGPU
iMac14,1
Haswell with dGPU
iMac14,2
Haswell Refresh (Devil’s Canyon)
iMac15,1
Broadwell
iMac16,1
Run GenSMBIOS, pick option 1 for downloading MacSerial and Option 3 for selecting out SMBIOS. This will give us an output similar to the following:
#######################################################
# iMac15,1 SMBIOS Info #
#######################################################
Type: iMac15,1
Serial: C02M9SYJFY10
Board Serial: C02408101J9G2Y7A8
SmUUID: 7B227BEC-660D-405F-8E60-411B3E4EF055
The Type
part gets copied to Generic -> SystemProductName.
The Serial
part gets copied to Generic -> SystemSerialNumber.
The Board Serial
part gets copied to Generic -> MLB.
The SmUUID
part gets copied to Generic -> SystemUUID.
We set Generic -> ROM to either an Apple ROM (dumped from a real Mac), your NIC MAC address, or any random MAC address (could be just 6 random bytes, for this guide we’ll use 11223300 0000
. After install follow the Fixing iServices page on how to find your real MAC Address)
Reminder that you want either an invalid serial or valid serial numbers but those not in use, you want to get a message back like: “Invalid Serial” or “Purchase Date not Validated”
Automatic: YES
Generates PlatformInfo based on Generic section instead of DataHub, NVRAM, and SMBIOS sections
Generic
SpoofVendor: YES
Swaps vendor field for Acidanthera, generally not safe to use Apple as a vendor in most case
AdviseWindows: NO
Used for when the EFI partition isn’t first on the Windows drive
UpdateDataHub: YES
Update Data Hub fields
UpdateNVRAM: YES
Update NVRAM fields
UpdateSMBIOS: YES
Updates SMBIOS fields
UpdateSMBIOSMode: Create
Replace the tables with newly allocated EfiReservedMemoryType, use Custom on Dell laptops requiring CustomSMBIOSGuid quirk
UEFI
ConnectDrivers: YES
Forces .efi drivers, change to NO will automatically connect added UEFI drivers. This can make booting slightly faster, but not all drivers connect themselves. E.g. certain file system drivers may not load.
Drivers
译:作为安装盘,只应该加载 HfsPlus.efi 和 OpenRuntime.efi
Add your .efi drivers here.
Only drivers present here should be:
HfsPlus.efi
OpenRuntime.efi
译者注:工具会自动把声卡驱动加进入,最好改一下,不要加载其他驱动,否则可能卡 UEFI启动图
或connecting drivers
或 HdaControllerInitPciHw(): controller version 0.0
,详见我另一帖子 OC卡UEFI启动图/卡connectting Drivers
APFS
Settings related to the APFS driver, leave everything here as default.
Audio
Related to AudioDxe settings, for us we’ll be ignoring(leave as default). This is unrelated to audio support in macOS.
For further use of AudioDxe and the Audio section, please see the Post Install page: Add GUI and Boot-chime
Input
Related to boot.efi keyboard passthrough used for FileVault and Hotkey support, leave everything here as default as we have no use for these quirks. See here for more details: Security and FileVault
Output
Relating to OpenCore’s visual output, leave everything here as default as we have no use for these quirks.
ProtocolOverrides
Mainly relevant for Virtual machines, legacy macs and FileVault users. See here for more details: Security and FileVault
Quirks
DeduplicateBootOrder: YES
Request fallback of some Boot prefixed variables from OC_VENDOR_VARIABLE_GUID
to EFI_GLOBAL_VARIABLE_GUID
. Used for fixing boot options.
IgnoreInvalidFlexRatio: YES
Fix for when MSR_FLEX_RATIO (0x194) can’t be disabled in the BIOS, required for all pre-Skylake based systems
RequestBootVarRouting: YES
Redirects AptioMemoryFix from EFI_GLOBAL_VARIABLE_GUID
to OC\_VENDOR\_VARIABLE\_GUID
. Needed for when firmware tries to delete boot entries and is recommended to be enabled on all systems for correct update installation, Startup Disk control panel functioning, etc.
UnblockFsConnect: NO
Some firmware block partition handles by opening them in By Driver mode, which results in File System protocols being unable to install. 主要适用于没有列出驱动器的 HP 系统
ReservedMemory
Used for exempting certain memory regions from OSes to use, mainly relevant for Sandy Bridge iGPUs or systems with faulty memory. Use of this quirk is not covered in this guide
Cleaning up
保存并放置你的 EFI 到路径 EFI/OC.
若有启动的问题,请先阅读 Troubleshooting section ;如果还不能得到解答,可用以下论坛(需梯子):
r/Hackintosh Subreddit
r/Hackintosh Discord
Sanity check:
谢谢 Ramus ,做出这么好用的工具(这工具可以验证您的配置文件,防止你错过了什么):
该工具源码: Sanity Checker Repo
英特尔 BIOS 主板设置
应该关闭的功能
Fast Boot
Secure Boot
VT-d (can be enabled if you set DisableIoMapper
to YES)
CSM
Thunderbolt(For initial install, as Thunderbolt can cause issues if not setup correctly)
Intel SGX
Intel Platform Trust
CFG Lock (MSR 0xE2 write protection)(This must be off, if you can’t find the option then enable both AppleCpuPmCfgLock
and AppleXcpmCfgLock
under Kernel -> Quirks. Your hack will not boot with CFG-Lock enabled)
应开启的功能
VT-x
Above 4G decoding
Hyper-Threading
Execute Disable Bit
EHCI/XHCI Hand-off
OS type: Windows 8.1/10 UEFI Mode
DVMT Pre-Allocated(iGPU Memory): 64MB
好了,一切就绪
请回去看下一节 [Post-install]
最新评论