OPENCORE 0.6.0 發行版-簡易設定 COFFEE LAKE 版本

本教學採用OCC 工具軟體來編寫config引導文件的設定,對一般小白來說,圖像式的解說方式算是最快速學習的方法。各項目說明的部分將比較少,若是你想要更了解各功能的解說,可以參考我的OPENCORE 0.6-0 發行版-精闢解說 COFFEE LAKE 版本文章。

目前最新的 OpenCore 引導程序為0.6.0版,該版本修正許多系統的BUG以外,同時也支援蘋果最新的作業系統 BIG SUR,以下為V0.6.0 更新日誌。





英文版

v0.6.3

  • Added support for xml comments in plist files
  • Updated underlying EDK II package to edk2-stable202008
  • Provide fallbacks for NULL memory SMBIOS strings
  • Fixed BOOTx64.efi and BOOTIA32.efi convention
  • Fixed SMBIOS handling with multiple memory arrays
  • Fixed memory array handle assignment on empty slots
  • Fixed CPUID patching on certain versions of macOS 10.4.10 and 10.4.11
  • Fixed incorrect core/thread counts on Pentium M processors
  • Added SSDT-UNC.dsl ACPI sample to resolve X99 issues, thx @RemB
  • Updated builtin firmware versions for SMBIOS and the rest
  • Increased slide allocation reserve to 200 MB for Big Sur beta 10
  • Fixed assert when trying to enable direct renderer on blit-only GOP
  • Added support for custom memory properties
  • Fixed intermittent 32-bit prelinking failures caused by improper Mach-O expansion
  • Fixed failures in cacheless injection dependency resolution
  • Fixed detection issues with older Atom CPUs
  • Fixed ScanPolicy NVMe handling on MacPro5,1
  • Fixed I/O issues on platforms incapable of reading over 1MB at once
  • Fixed plist-only kext injection in Big Sur
  • Add ForceResolution option for enabling non-default resolutions
  • Fixed Ps2MouseDxe not properly loading under OpenDuetPkg
  • Added workaround for read-only errors on some X299 boards
  • Added support for x86legacy Secure Boot model
  • Added missing Secure Boot NVRAM variables required by 11.0
  • Added setting of system-id NVRAM variable
  • Added ForceSecureBootScheme quirk for virtual machines
  • Fixed kernel and ACPI patches failing to replace last bytes of memory

v0.6.2

  • Updated builtin firmware versions for SMBIOS and the rest
  • Added ProcessorType option to Generic allowing custom CPU names
  • Fixed UnblockFsConnect option not working with APFS JumpStart
  • Added IA32 binary variant to the release bundles
  • Fixed improper handling of cacheless kexts without an Info.plist
  • Fixed improper calculation of kext startup address for blocking
  • Added mkext 32-bit kext injection (10.4-10.6)
  • Added cacheless 32-bit kext injection (10.4-10.7)
  • Added 32-bit kernel/kext patching/blocking support
  • Fixed issues loading 10.7 EfiBoot
  • Added Type to ReservedMemory to fulfil hibernation hack needs
  • Added workaround to displaying Preboot instead of Macintosh HD
  • Added prelinkedkernel 32-bit kext injection (10.6-10.7)
  • Added SystemMemoryStatus to override memory replacement on some models
  • Added older Pentium CPU recognition in SMBIOS
  • Added ExtendBTFeatureFlags to properly set FeatureFlags for Bluetooth (which substitutes BT4LEContinuityFixup)
  • Added MinKernel/MaxKernel to CPUID emulation and DummyPowerManagement
  • Fixed -legacy not being added in KernelArch Auto mode
  • Fixed i386-user32 not forcing i386 on macOS 10.7 on X64 firmwares
  • Fixed i386-user32 being incorrectly enabled in macOS 10.4, 10.5, and 10.7
  • Disabled prelinked boot for macOS 10.4 and 10.5 in KernelCache Auto mode
  • Fixed macserial compatibility with iMac20,x serials and other models from 2020
  • Added LegacyCommpage quirk to improve pre-SSSE3 userspace compatibility
  • Fixed legacy SATA HDDs displaying as external drives in the picker

v0.6.0

  • Fixed sound corruption with AudioDxe
  • Fixed icon choice for Apple FW update in OpenCanopy
  • Fixed APFS driver loading on Fusion Drive
  • Added Comet Lake HDA device code
  • Fixed audio stream position reporting on non-Intel platforms
  • Added Firmware mode to ResetSystem to reboot into preferences
  • Replaced BlacklistAppleUpdate with run-efi-updater NVRAM variable
  • Fixed reset value and detection in FadtEnableReset ACPI quirk
  • Fixed freezes during boot option expansion with PXE boot entries
  • Updated underlying EDK II package to edk2-stable202005
  • Added ProvideMaxSlide quirk to improve laptop stability, thx @zhen-zen
  • Fixed slide choice on platforms when 0 slide is unavailable, thx @zhen-zen
  • Fixed assertions caused by unaligned file path access in DEBUG builds
  • Renamed ConfigValidity utility to ocvalidate for consistency
  • Added GlobalConnect for APFS loading to workaround older firmware issues
  • Added 11.0 support for AvoidRuntimeDefrag Booter quirk
  • Fixed 11.0 lapic kernel quirk as of DP1
  • Improved boot selection scripts for macOS without NVRAM
  • Added UGA protocol compatibility in ProvideConsoleGop quirk
  • Added UgaPassThrough option to support UGA protocol over GOP
  • Added AppleFramebufferInfo protocol implementation and override
  • Fixed serial initialisation when file logging is disabled
  • Fixed FSBFrequency reporting on Meron and similar CPUs
  • Fixed incorrect volume icon dimension requirements in OpenCanopy
  • Added preview version of KernelCollection injection code
  • Fixed ACPI reset register detection in DxeIpl
  • Added MacBookPro16,4 model code
  • Updated builtin firmware versions for SMBIOS and the rest
  • Fixed OSXSAVE reporting when emulating CPUID on newer CPUs
  • Added SerialInit option to perform serial initialisation separately
  • Fixed OpenDuetPkg booting on Intel G33 with SATA controller in RAID mode
  • PlatformInfo Automatic for all models
  • Fixed 32-bit OpenDuetPkg booting on machines with over 4 GBs of RAM
  • Fixed delays with OpenDuetPkg booting with certain SATA controllers in IDE mode
  • Fixed display name for some high core count i9 CPUs like 7920X
  • Fixed SSDT-EC-USBX




中文版

v0.6.0

  • 修復了AudioDxe的聲音損壞
  • 修復了OpenCanopy中Apple FW更新的圖標選擇
  • 修復了在Fusion Drive上加載APFS驅動程序的問題
  • 添加了Comet Lake HDA設備代碼
  • 在非Intel平台上修復了音頻流位置報告
  • 添加了Firmware模式ResetSystem以重新啟動到首選項
  • 替換BlacklistAppleUpdaterun-efi-updaterNVRAM變量
  • 固定的重置值和FadtEnableResetACPI異常中的檢測
  • 修復了在使用PXE引導項擴展引導選項期間凍結的問題
  • 將基礎EDK II軟件包更新為edk2-stable202005
  • 添加了ProvideMaxSlide怪癖以提高筆記本電腦的穩定性,謝謝@ zhen-zen
  • 修復了當0張幻燈片不可用時在平台上選擇幻燈片的問題,謝謝@ zhen-zen
  • 修復了由DEBUG版本中未對齊的文件路徑訪問引起的斷言
  • ConfigValidity實用程序重命名為ocvalidate以保持一致性
  • 已添加GlobalConnect用於APFS加載以解決較舊的固件問題
  • 增加了對AvoidRuntimeDefragBooter怪癖的11.0支持
  • 自DP1起修正了11.0 Lapic內核怪癖
  • 沒有NVRAM的macOS的改進的引導選擇腳本
  • ProvideConsoleGop古怪的地方增加了UGA協議兼容性
  • 添加UgaPassThrough了通過GOP支持UGA協議的選項
  • 添加了AppleFramebufferInfo協議實現和覆蓋
  • 修復了禁用文件記錄時的串行初始化
  • 修復了在Meron和類似CPU上的FSBFrequency報告
  • 修復了OpenCanopy中不正確的體積圖標尺寸要求
  • 添加了KernelCollection注入代碼的預覽版
  • 修復了DxeIpl中的ACPI復位寄存器檢測
  • 添加了MacBookPro16,4型號代碼
  • 更新了SMBIOS和其他版本的內置固件版本
  • 修復了在較新的CPU上模擬CPUID時的OSXSAVE報告
  • 添加了SerialInit單獨執行串行初始化的選項
  • 在RAID模式下使用SATA控制器在Intel G33上修復了OpenDuetPkg引導
  • PlatformInfo Automatic 適用於所有型號
  • 在具有超過4 GB RAM的計算機上修復了32位OpenDuetPkg引導
  • 在IDE模式下使用某些SATA控制器引導OpenDuetPkg引導時的固定延遲
  • 修復了一些高核數i9 CPU(例如7920X)的顯示名稱
  • 固定的SSDT-EC-USBX


準備工作

收集文件

我們要先找出主機板所有需要的驅動(Kext)和工具軟體( Tools )。以我目前所使用的技嘉 Z390 AORUS PRO WIFI 主機板為例,本教學也適用於其他Z300系列主機板。

  • ACPI 資料夾:
    • SSDT-AWAC.aml 這是300系列RTC補丁,對於大多數B360,B365,H310,H370,Z390和某些Z370主板都是必需的,
    • SSDT-EC-USBX.aml 固定嵌入式控制器和USB電源
    • SSDT-PLUG.aml 允許在Haswell及更高版本上進行本機CPU電源管理
    • SSDT-PMC.aml 真正的300系列主板(非Z370)不會在ACPI中將FW芯片聲明為MMIO,因此XNU會忽略UEFI內存映射所聲明的MMIO區域。該SSDT帶回了NVRAM支持。
    • SSDT-UIAC.aml 自定義USB端口定制。(尚未定制者,得在Kermel->Quirks->XhciPortLimit e. 勾選)
  • KEXT :位於OC -> Kermel -> Add 資料夾。這裡是要放置主機板等周邊硬體的驅動元件。
    • AppleALC.kext 版載音效卡
    • IntelMausi.kext 版載網路卡
    • Lilu.kext 延伸核心
    • SMCProcessor.kext VirtualSMC 附屬文件
    • SMCSuperIO.kext VirtualSMC 附屬文件
    • VirtualSMC.kext 仿SMC 文件
    • USBInjectAll.kext USB 驅動
    • USBPower.kext USB 電力修正文件
    • WhateverGreen.kext 顯卡驅動
  • Drivers:位於OC -> Drivers 資料夾。這裡是要放置啟動元件。
    • CrScreenshotDxe.efi OC GUI 拍照功能(可不需)
    • HfsPlus.efi 認出HFS硬碟格式
    • OpenCanopy.efi OC GUI 啟動文件 (可不需)
    • OpenRuntime.efi OpenRuntime進行boot.efi修補有關的Quirks,它是AptioMemoryFix.efi的替代品
  • Tools:位於OC -> Miss -> Tools 資料夾。這裡是要放置OC 工具程式。
    • CFGLock.efi 解CFG 工具
    • CleanNvram.efi 清除NVRAM
    • OpenControl.efi 控制台
    • OpenShell.efi
    • ResetSystem.efi 重新啟動

文件都準備好了,大致上如下圖。

《OPENCORE 0.6.0 發行版-簡易設定 COFFEE LAKE 版本》
OC 資料夾內的文件

絕對路徑

開啟剛剛所下載的OC文件->Docs 資料夾,把Sample.plist 文件複製在EFI ->OC 的資料夾裡面,並且更名為 cinfig.plist ,接下來再把剛剛所收集好的文件(ACPI、Drivers、Kexts、Tools等資料夾),寫入在config.plit 引導文件中,並做好『絕對路徑』。





絕對路徑

先把 OC ACPI內的預設值全數刪除。

再把OC -> ACPI 資料夾所有文件圈起,直接拖拉放至再OCC ACPI 的視窗中。

同樣的方法,把kexts 內所有文件,拖拉放至再kermel 視窗中。切記內建之前五項文件不可以刪除。

加入kext 後的示意圖。

加入Tools 工具文件的示意圖

完成後 Tools 的示意圖。輔助選項要全數勾選,不然的話,OC GUI 目錄會跑出工具的圖像了。

加入Drivers 所有文件示意圖。

加入Drivers 文件後的示意圖:

這樣,所有的主板所需要的文件設定,就完成了。

編輯文件

黑蘋果若是引導成功與否,完全得靠這個 config.plist 引導文件。這個引導文件就是一部電影劇本,縱使這部影片有大咖擔任主角,若是劇本寫不好,也是一部令人做嘔的大爛片。以下的教學是根據我的OPENCORE 0.6-0 發行版-精闢解說 COFFEE LAKE 版本文章,轉換成圖像式教學,這樣讓小白更容易清楚知道如何去設定OC Quirks 值。

ACPI 篇:

ACPI -> Quirks -> NormalizeHeaders 勾選,Patch 加入EC 補丁

《OPENCORE 0.6.0 發行版-簡易設定 COFFEE LAKE 版本》
《OPENCORE 0.6.0 發行版-簡易設定 COFFEE LAKE 版本》

Booter

這裡要設定是 Quirks。這裏若是沒設定好,是無法順理引導的。

《OPENCORE 0.6.0 發行版-簡易設定 COFFEE LAKE 版本》

DeviceProperties

這裡是要設置顯示卡或是音效卡 PCIe 的路徑。如何查出音效卡或是顯示卡的PCI路徑,可以透過Hackintool 的工具來找出路徑來。透過Hackintool 工具,我的音效卡 位置是PciRoot(0x0)/Pci(0x1f,0x3),內建的值是用在舊款的主機板上,所以這裡要修改。

內顯的路徑為PciRoot(0x0)/Pci(0x2,0x0),可能得加入以下數值。一般來說,可以不用設定。由於我的CPU是i5-96020K,所以我用的仿 ID 為 0300983E。如果你是其他的CPU,可以查詢黑果小兵的文章。

AAPL,ig-platform-id Comment
07009B3E 使用台式機iGPU 驅動螢幕所使用的ID
0300913E 使用台式機但iGPU 不驅動螢幕所使用的仿ID。通常這是拿來硬解使用。

注意:在macOS 10.15.5中,使用黑屏似乎存在很多問題07009B3E,如果遇到類似問題,請嘗試將其交換為00009B3E

我們還添加了2個屬性,framebuffer-patch-enableframebuffer-stolenmem。第一個通過WhateverGreen.kext啟用修補程序,第二個將最小失竊內存設置為19MB。這通常是不必要的,因為可以在BIOS中配置(建議64MB),但在不可用時需要配置。

  • :無頭的幀緩衝區(其中dGPU是顯示出來)不需要framebuffer-patch-enableframebuffer-stolenmem

對於在B360,B365,H310,H370,Z390上顯示詳細信息後出現黑屏問題的用戶,請參閱BusID iGPU修補頁面。以下是不帶dGPU且沒有iGPU內存的BIOS選項的台式機UHD 630的示例

Key Type Value
AAPL,ig-platform-id Data 07009B3E
framebuffer-patch-enable Data 01000000
framebuffer-stolenmem Data 00003001
《OPENCORE 0.6.0 發行版-簡易設定 COFFEE LAKE 版本》

Kernel

這裏是要設定 Quirks 值。若是你尚未解鎖CFG和USB 端口定制時,請將1,2,3,選項勾選。

《OPENCORE 0.6.0 發行版-簡易設定 COFFEE LAKE 版本》

Misc

這裏有二個選項要設定。
Boot:1,2 項都勾選,3為等待時間,通常我都設定 25 秒。你也可以設定為0秒,無需選項直接進入系統。4 為設定圖像式GUI 介面選項。

《OPENCORE 0.6.0 發行版-簡易設定 COFFEE LAKE 版本》

Security:1,2 項勾選,3 為Vault,請選擇 Optional ,這很重要,不然不會順利引導開機。4 項 ExposeSensitiveData 改為 3,5 項 ScanPolicy 這是掃描主機設備的功能,設置 0,通常是拿來安裝用。

《OPENCORE 0.6.0 發行版-簡易設定 COFFEE LAKE 版本》

NVRAM -> Add

這裏我們只要針對7C436110-AB2A-4BBB-A880-FE41995C9F82 這一項做設定。

  • boot-args 這是引導參數,許多小夥伴不知道引導參數的位置。例如 -V 跑代碼,使用RX5000顯卡得加入 agdpmod=pikera 觀看 Netflix 得加入 shikigva=80 igfxfw=2 (catalina 專用)
  • csr-active-config 關閉 SIP 的功能。
  • prev-lang:kbd 系統語言。若是設定為繁體中文,加入<7a682d48 616e743a 32> 即可
SystemAudioVolume Data 46
boot-args String -v keepsyms=1
bootercfg String log=0 debug=0 level=0
run-efi-updater String No
csr-active-config Data ff0f0000
prev-lang:kbd Data 7a682d48 616e743a 32
《OPENCORE 0.6.0 發行版-簡易設定 COFFEE LAKE 版本》

PlatformInfo -> Generic 選擇機型

這是要模仿蘋果電腦畸形的SMBIOS,這裏我是採用iMac19,1 做示範。請根據 CPU 找出最適合的機型值。

《OPENCORE 0.6.0 發行版-簡易設定 COFFEE LAKE 版本》

UEFI:

這裏要設定的地方不多,根據圖示來設定就可以了。

《OPENCORE 0.6.0 發行版-簡易設定 COFFEE LAKE 版本》
《OPENCORE 0.6.0 發行版-簡易設定 COFFEE LAKE 版本》
《OPENCORE 0.6.0 發行版-簡易設定 COFFEE LAKE 版本》
《OPENCORE 0.6.0 發行版-簡易設定 COFFEE LAKE 版本》

最後測試

現在,您可以把編譯好config.plist 文件,存放在EFI / OC下的EFI中測試看看摟。

檢查引導文件

因此,感謝Ramus的製作檢查工具,可以幫助你編譯好的文件驗證您的配置:

  • 檢查config.plist設定值連結

本教學檔案下載:http://u.pc.cd/Yjg7

点赞
Share