OpenCore的plist配置文件之 Haswell平台部分


下載時建議采用Debug版本,並把日志打開。待沒問題之后再用Release版本替換,並關掉不需要的日志。

輸出全部日志的級別
Target 127
DisplayLevel 2155566591

沒翻譯完全,有不懂請留言,我有郵箱通知,會在一天內回復

聲明

待譯自 OpenCore 官方教程之Haswell
僅適用於 Haswell 和 Broadwell,其他用戶請自行看官方文檔config.plist相關平台
2020-07-14

適用於 Haswell 和 Broadwell 架構用戶,且以下每個標題都對應 config.plist 里的屬性集



前提

配置 config.plist 並沒有你想的那么難,花點時間就可以了,接下來我會告訴你一切(包括每一個選項的作用及其該填的值)。這也意味着如果出問題了那應該是你忽略了什么,請重新按本文所說的檢查一下。
關於使用 OpenCore 要注意的點:

  • 所有屬性值都必須被定義,並且是沒有恢復回默認值的說法,所以:你要記得備份,不要隨意刪除屬性沒提到的地方不要隨意改動 只需要保持原樣。
  • ** Sample.plist 文件不能直接使用**,要根據你的機子按照本文進行配置
  • 絕對不要使用 CONFIGURATORS 這個軟件, 他們很少尊重 OpenCore 的官方配置建議,甚至連 Clover 獨有的屬性也加進來(瞎J8搞)。

進入正文,我們需要的工具有:

注意:

  1. 配置時請詳細看文章內容,且確保你都配置對了。
  2. 以文字為准,因為圖片不一定是最新的。
  3. 如果有配置沒被提到,那就不修改它。

ACPI

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

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

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

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

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

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

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

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"

Apple Check Coverage page

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

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 driversHdaControllerInitPciHw(): 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.

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 ;如果還不能得到解答,可用以下論壇(需梯子):

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]


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM