全文參照此文檔 dortania 黑蘋果在線文檔
文檔版本:2020-07 OC版本:0.5.9
Ps. UEFI引導時,EFI 分區要>= 200 MB,否則安裝時無法抹去磁盤(無法格式化/抹除分區)! 如果是兩塊硬盤,都需要有esp分區!
OpenCore 不止可用於黑蘋果,還可以用於其他需要模擬EFI的場景。
原理
模擬EFI環境:注入驅動並重建 EFI 環境緩存,再緩存傳給 MacOS 系統。
重建緩存可用於欺騙 MacOS 的驗證(蘋果的硬件內部布線不同,因此PC在不同情況下的ACPI布局不能與Mac很好地配合。 為了解決這個問題,我們使用WhateverGreen及其配套的Lilu來修補Hackintosh的不同部分,例如重命名設備,協助幀緩沖區連接,修補音頻連接器,允許通過ACPI修改aty_config,aty_properties,cail_properties等。 )
例如 把 AptioMemoryFix 驅動從讀取 EFI_GLOBAL_VARIABLE_GUID 變量重定向到讀取 OC_VENDOR_VARIABLE_GUID 變量。
Hardware Support
硬件支持上,我准備裝的機子配置是 i3-4150
+ GA-H81M-DS2 Ver.3.0 + HD 7770
主板搭載 網卡 聲卡
- GPU
- 其中核心顯卡 HD 4400 和獨立顯卡 HD 7770 都是被支持的,並且記下了我顯卡必須的啟動參數
# AMD
radpg=15 //Fixes initilization for HD 7730/7750/7770/R7 250/R7 250X
- Wireless
我的主板沒有 WIFI 模塊,我也沒有 USB 網卡,跳過 - MotherBoard
更多原理解析,如不喜歡請直接跳到 Installation Guides (刻盤)
部分:
So if my GPU is natively supported, why do i need Lilu and WhateverGreen?
This is a question comes up quite a bit in the Hackintosh community, and for good reason as to why in the world would these GPUs work out of the box on a mac and not a Hackintosh? Well, the reason being is that PCs and Macs have different internal wiring and so the ACPI layouts in a PC don't work well with Macs in different scenarios. To get around this, we use WhateverGreen and it's companion Lilu to patch different parts of our Hackintosh like renaming devices, assisting in framebuffer connections, patching audio connectors, allowing modifications to aty_config, aty_properties, cail_properties via ACPI and so much more. With such a large feature set and developed by someone who knows what they're doing, there's no reason not to use it
譯:
即使 GPU/顯卡 在硬件上原生支持安裝 MACOS,也依然需要 Lilu 和 WhateverGreen
- 首先來看,Mac 的 GPU 和普通 GPU 的區別:
- 普通GPU和蘋果機的GPU有不同的內部布線,所以普通機的 ACPI 布局並不能直接完美工作在 MAC 上。PCs and Macs have different internal wiring and so the ACPI layouts in a PC don't work well with Macs in different scenarios.
- 解決方案:
- 用 WhateverGreen 和 Lilu 對兩者間的差異部分做一些打補丁的工作(例如 重命名設備、協助幀緩沖連接、修補音頻連接器,以此允許通過 ACPI等 修改 aty_config, aty_properties, cail_properties 之類的屬性)
有些事情我必須告訴你:
macOS does not support either SLI, Crossfire or GPUs will multiple main cores(like the Radeon Pro Duo). This may change with the release of the Radeon Pro Vega II Duo in the Mac Pro
Getting audio through HDMI/DisplayPort may require extra work with both AppleALC.kext and some other IO-REG edits
GPU Overclocking is limited to Vega 10 GPUs with PyVega
Running a supported GPU with an unsupported GPU can have weird consequences as unsupported GPUs run off VESA drivers which have the issue in which it can break sleep and other functions in macOS. Please refer to the Disabling unsupported GPUs Guide for more info
譯:
- MacOS 不支持 SLI、交火(Crossfire), 也不支持多主核的GPU(如 Radeon Pro Duo )。
- 當然在 搭載 Radeon Pro Vega II Duo 顯卡的
Mac Pro
發布后,這些情況可能會有所改善。
- 當然在 搭載 Radeon Pro Vega II Duo 顯卡的
- 通過 HDMI/DisplayPort 獲取音頻可能需要對 AppleALC.kext 和其他一些 IO-REG 參數配置進行額外的編輯
- GPU超頻僅限於使用PyVega的Vega 10 GPU
- 在兩個顯卡 (一個受支持,一個不受支持)上運行時 可能會產生奇怪的現象
- 因為不受支持的 GPU 也會從 VESA 驅動程序中運行,從而導致 macOS 的睡眠和其他功能可能會被破壞。
有關更多信息,請參閱禁用不支持的GPU指南。
- 因為不受支持的 GPU 也會從 VESA 驅動程序中運行,從而導致 macOS 的睡眠和其他功能可能會被破壞。
Kext(Kernel Extension) 內核拓展,也就是驅動
Kext Inject
at OpenCore's method:
Takes existing prelinked kernel and kexts ready to inject
Rebuilds the cache in the EFI environment with the new kexts
Adds this new cache in
Things to note with OpenCore's method is:
OS Agnostic as the prelinked kernel format as stayed the same since 10.6, far harder to break support.
This also means proper support starts at 10.7, though 10.6 can be used as well so long as it's already installed(106's installer doesn't have a prelinked kernel)
Far better stability as far less patching
譯:
Kext 注入
在 OpenCore 里是這樣工作的:
- 把已有的預鏈接內核 和 准備用於注入的 kexts
- 利用新的 kexts 重建 EFI 環境里的緩存
- 把新緩存加進去
預鏈接在 10.6 開始被支持,10.7+ 被正式支持。更多見上面英文引用。
Installation Guides (刻盤)
因為我的是台式機,所以我看的是 Installation Guides
的 OpenCore Desktop Guide
部分
OpenCore 的黑蘋果教程和工具都是三平台通用。詳見英文原文
制作安裝介質
我選擇在 Windows 下制作,以 zip 方式下載:https://github.com/corpnewt/gibMacOS
初次打開會自動下載所需的小型工具
譯者注:這個工具制作的是在線恢復盤,到時候安裝系統的時候依然是在線下載安裝。建議用完整的dmg鏡像,網上下載最新的dmg鏡像或者用虛擬機自己做一個dmg。
環境要求:Python 2或3
下載
- 右擊 gitMacOS.bat 以管理員運行,(輸入字母R回車)選擇切換恢復模式即
Toggle Recovery-Only
- 等程序索引完成,選擇你想要的且帶 FULL INSTALL 的 MACOS 版本,然后程序會幫你下載500MB左右的恢復包鏡像
RecoveryHDMetaDmg.pkg
到軟件所在路徑\gibmacos-master\macOS Downloads\publicrelease\xxx-xxxxx - 10.x.x macOS xxx
注:這是在線恢復盤,安裝時必須聯網,離線下載請見其他教程
刻盤
- 右擊管理員打開 MakeInstall.bat,然后根據列出的U盤序號輸入 數字和字母O(O代表OpenCore) 例如輸入數字1和字母O
1O
- 此時U盤會被格式化,
- 格式化完成后會提示你提供之前下載的 RecoveryHDMetaDMG.pkg 的完整路徑(按住 SHIFT 右擊文件,復制路徑,再粘貼進去即可),
- 等待,完成之后,MACOS的恢復鏡像就被寫入到你U盤的另一個分區里了。然后腳本再自動下載 OpenCore 並安裝到你 U 盤的EFI分區里了。可以看到U盤其中一個分區的卷標為
BOOT
Ps. 寫鏡像的過程會解壓鏡像到c盤用戶數據文件夾的臨時目錄里,所以請保證c盤有大於3G的空閑空間,避免失敗。
添加基本的 OpenCore 文件
下載OC並解壓到u盤的 EFI 區
這里由於 Windows 版的腳本已經自動下載 OC 並解壓到我們了,所以不用手動下載
其他平台的用戶請結合官方教程本節自行檢查。
根據情況刪除不適合自己機子的驅動
OC 所在的EFI區,在Drivers 和 Tools 目錄中附帶了一堆文件,大部分都是我們不需要的,所以進行挑選刪除。以下是文件刪除的相關建議:
Drivers 目錄中的:
OpenUsbKbDxe.efi
用於在運行DuetPkg舊系統上的OpenCore選擇器,不建議使用,在Ivy Bridge即3代u和更高版本上甚至有害UsbMouseDxe.efi
與OpenUsbKbDxe類似,僅在使用DuetPkg的舊系統上才需要NvmExpressDxe.efi
當固件未內置NVMe驅動程序時才需要,用於Haswell(4代u)及更早版本XhciDxe.efi
用於Sandy Bridge(2代u)和更早的版本,當固件未內置XHCI驅動程序時才需要這個驅動HiiDatabase.efi
用於修復GUI界面支持,如Sandy Bridge(2代u)和更早版本上的OpenShell.efiOpenCanopy.efi
這是 OC 可選的啟動GUI圖形操作界面,教程后面會講到,現在請先刪除他。Ps2KeyboardDxe.efi + Ps2MouseDxe.efi
如果你的鼠標鍵盤是PS2接口的請保留這兩個驅動文件; 如果鍵盤鼠標都是 USB 接口的,那么你不需要這個文件。
英特爾cpu代號詳見 英特爾處理器和芯片組(按平台代號分類)
Tools 目錄中的:
可以刪除該目錄的所有文件,但建議高級用戶保留 OpenShell.efi 用於排錯
我的是4代u,這是去掉不需要的驅動之后的效果圖
整合驅動文件
請參閱受支持的硬件部分,以了解macOS啟動需要什么,Clover和OpenCore之間的硬件支持非常相似。
現在,根據下文教程,把必要的固件驅動程序(.efi)放入Drivers目錄,再把Kexts / ACPI放入其各自對應的目錄里:
目錄 | 該目錄應該放置的文件 |
---|---|
Kexts 目錄 | Kexts (.kext文件) |
Drivers 目錄 | Firmware drivers固件驅動 (.efi文件) |
ACPI 目錄 | SSDTs 和 自定義的DSDTs (.aml文件) |
注意:如果你是Clover用戶那么請注意,OpenCore不支持Clover的UEFI驅動程序!(EmuVariableUEFI,AptioMemoryFix,OsxAptioFixDrv等)。 參閱Clover固件驅動程序轉換,以獲取有關支持的驅動程序以及已合並到OpenCore中的驅動程序的更多信息。
Firmware Drivers 固件驅動
這些是OpenCore使用的驅動程序,對於大多數系統,你只需要2個.efi驅動程序就可以啟動和運行。
請根據需要挑選並放在到 EFI 的 Drivers
目錄中
ApfsDriverLoader.efi
是 APFS 文件系統的相關驅動 Needed for seeing APFS volumes(ie. macOS).
從 OpenCore 0.5.8 開始已經內置, 並通過 config.plist -> UEFI -> APFS 配置;所以不用管HfsPlus.efi
是 HFS 文件系統恢復盤的相關驅動。 Needed for seeing HFS volumes(ie. macOS Installers and Recovery partitions/images).
請不要和其他HFS驅動混淆。 Do not mix other HFS driversOpenRuntime.efi
取代了 AptioMemoryFix.efi, 用作OpenCore的擴展,用於修補boot.efi以獲得NVRAM修復和更好的內存管理。Replacement for AptioMemoryFix.efi, used as an extension for OpenCore to help with patching boot.efi for NVRAM fixes and better memory management.
對於老式設備的用戶/For legacy users:
OpenUsbKbDxe.efi
用於在運行DuetPkg舊系統上的OpenCore選擇器,不建議使用,在Ivy Bridge即3代u和更高版本上甚至有害NvmExpressDxe.efi
當固件未內置NVMe驅動程序時,且在使用 NVMe 設備(如 NVMe接口的SSD)時才需要;用於Haswell(4代u)及更早版本XhciDxe.efi
用於Sandy Bridge(2代u)和更早的版本;當固件未內置XHCI驅動程序,且你在使用 USB3 拓展卡 時才需要這個驅動。HfsPlusLegacy.efi
HfsPlus的舊版變體(Legacy variant),用於缺少RDRAND指令支持的系統。 通常在Sandy Bridge(2代u)和更老的平台看到
以上HfsPlusLegacy.efi 或 HfsPlus.efi 文件請在這里下載: https://github.com/acidanthera/OcBinaryData/
有關兼容驅動程序的完整列表,請參見OpenCorePkg Docs中的11.2屬性。 這些文件將放在EFI的Drivers文件夾中
Kexts 內核驅動
kext是內核擴展(kernel extension),你可把它當作macOS的驅動程序,這些文件將放在EFI的 Kexts
目錄中
Linux和Windows用戶請注意:Kexts在這兩個系統中可能會顯示為文件夾,也就是說 xxxxx.kext 目錄 就是一個 kext,所以復制時請復制整個xxxxx.kext目錄
以下列到的所有 kext 文件,都可以在 Kext Repo 下載到最新編譯好的文件(隨commit編譯)。
必須的文件
VirtualSMC
模擬白蘋果 macOS 的SMC芯片,缺少這個文件,macOS將無法啟動。
還有另一種選擇是 FakeSMC ,它的支持可能更好也可能更差,通常只在舊版硬件上使用
Lilu
一個處理很多過程的補丁,是 AppleALC, WhateverGreen, VirtualSMC 以及其他一些 Kexts 所必須的。沒有 Lilu,它們都無法正常工作。
VirtualSMC 的插件
SMCProcessor.kext
用於監測CPU溫度,但不支持 AMD CPU 平台。SMCSuperIO.kext
用於檢測風扇速度,但不支持 AMD CPU 平台。SMCLightSensor.kext
用於筆記本電腦上的環境光傳感器,台式機請忽略。
如果你沒有環境光傳感器請不要用,否則會引發其他問題。SMCBatteryManager.kext
用於筆記本電腦的電池讀數測量,台式機請忽略。
在正確裝好電池之前,請勿使用,否則可能導致問題
顯卡
WhateverGreen
用於顯卡打補丁修補 DRM,boardID,幀緩沖區修復等,所有GPU均可從此 kext 中受益。
注意,僅筆記本電腦和一體機才需要附帶的SSDT-PNLF.dsl文件,請參閱 下一節ACPI部分
聲卡
AppleALC
用於 AppleHDA 修補,以讓你使用板載音頻。在 AMD 15h/16h 上可能有問題,而 Ryzen/Threadripper 系統很少有麥克風支持。
以太網網卡
IntelMausi
是 Intel NICs 必須的。但如果基於I211的芯片組則需要下面的 SmallTreeIntel82576 kext。 Required for Intel NICs, chipsets that are based off of I211 will need the SmallTreeIntel82576 kextSmallTreeIntel82576 kext
I211 網卡必需。該驅動已在SmallTree kext基礎上打上I211補丁。
適用於大多數運行英特爾網卡的 AMD 主板。AtherosE2200Ethernet
適用於 Atheros 和 Killer 殺手 網卡RealtekRTL8111
適用於 Realtek 千兆網卡LucyRTL8125Ethernet
適用於 Realtek 2.5Gb 網卡
USB
用於在 ACPI 中沒有定義USB端口的系統上注入 Intel USB 控制器
Skylake 6代及以上平台不需要該補丁(但AsRock很傻,確實需要這個);不支持任何 AMD CPU 平台
該補丁是非原生USB控制器(non-native USB controllers)所必須的
AMD CPU 平台不需要該補丁
一般需要該補丁的芯片組有:
H370
,B360
,H310
,
Z390
(Mojave 或更新的 macOS 版本都不需要該補丁),
X79
,X99
,
AsRock boards
(特別是在英特爾的主板上,基本上是他們所有的主板)
WiFi 無線網絡和藍牙:
用於修補非蘋果機的博通無線網卡(Broadcom),不支持 Intel, Killer, Realtek 等
用於上傳固件到博通藍牙芯片,是所有
非Apple / Fenvi Airport cards
所必需的。 Used for uploading firmware on Broadcom Bluetooth chipset, required for all non-Apple/Fenvi Airport cards.
To be paired with BrcmFirmwareData.kextBrcmPatchRAM3 用於 10.14+ (必須和 BrcmBluetoothInjector 搭配使用)
BrcmPatchRAM2 用於 10.11-10.14
BrcmPatchRAM 用於 10.10或更老的版本
Kernel -> Add
的順序必須是:
BrcmBluetoothInjector
BrcmFirmwareData
BrcmPatchRAM3
AMD CPU Specific kexts
NullCPUPowerManagment
We have a much better solution known as DummyPowerManagement found under Kernel -> Quirks in your config.plist, this will be covered in a later page
XLNCUSBFIX
USB fix for AMD FX systems, not recommended for Ryzen
VoodooHDA
Audio for FX systems and front panel Mic+Audio support for Ryzen system, do not mix with AppleALC. Audio quality is noticeably worse than AppleALC on Zen CPUs
其他部分
AppleMCEReporterDisabler
Useful starting with Catalina to disable the AppleMCEReporter kext which will cause kernel panics on AMD CPUs and dual-socket systems
Affected SMBIOS: MacPro6,1
MacPro7,1
iMacPro1,1
CpuTscSync
Needed for syncing TSC on some of Intel's HEDT and server motherboards, without this macOS may be extremely slow or even unbootable. Skylake-X should use TSCAdjustReset instead
TSCAdjustReset
On Skylake-X, many firmwares including Asus and EVGA won't write the TSC to all cores. So we'll need to reset the TSC on cold boot and wake. Compiled version can be found here: TSCAdjustReset.kext. Note that you must open up the kext(ShowPackageContents in finder, Contents -> Info.plist) and change the Info.plist -> IOKitPersonalities -> IOPropertyMatch -> IOCPUNumber to the number of CPU threads you have starting from 0(i9 7980xe 18 core would be 35 as it has 36 threads total)
NVMeFix
用於修補 非Apple NVMe上的電源管理和初始化, macOS 10.14 或更新版本所必需。
筆記本特別的部分 Laptop Specifics
VoodooPS2
Required for systems with PS2 keyboards and trackpads
Trackpad users should also pair this with VoodooInput(This must come before VoodooPS2 in your config.plist)VoodooI2C
Used for fixing I2C devices, found with some fancier touchpads and touchscreen machines
To be paired with a plugin:
VoodooI2CHID - Implements the Microsoft HID device specification.
VoodooI2CElan - Implements support for Elan proprietary devices. (does not work on ELAN1200+, use the HID instead)
VoodooI2CSynaptics - Implements support for Synaptic's proprietary devices.
VoodooI2CFTE - Implements support for the FTE1001 touchpad.
VoodooI2CUPDDEngine - Implements Touchbase driver support.
To figure out what kind of keyboard and trackpad you have, check Device Manager(設備管理器) in Windows or dmesg |grep input
in Linux
NoTouchID
Recommended for SMBIOS that include a TouchID sensor to fix auth issues
請參閱 Kexts.md 中受支持的kext的完整列表
SSDTs
- 你可以從 Windows/Linux 等操作系統上提取出來
- 也可以自己編譯 aml 源碼文件
- 下載現成的
詳情請看下節 ACPI 部分
ACPI 部分
機器翻譯:DSDT和SSDTs是什么?
答:
這些表出現在你的固件,概述硬件設備,如USB控制器,CPU線程,嵌入式控制器,系統時鍾等。
可以將DSDT(差異化系統描述表)看作是主體,其中包含大部分信息,另外還有少量信息由SSDT(輔助系統描述表)傳遞。
您可以將DSDT視為建築藍圖,而SSDTs則是列出項目額外細節的便簽
名詞解析:
- ACPI (Advanced Configuration & Power Interface,高級配置和電源接口) 其編程語言為ASL(ACPI Source Language),更多詳見 ACPI 6.3 Manual-UEFI.org
- DSDT (Differentiated System Description Table, 區分系統描述符表) 主要的表,描述了關於PCI IRQ 映射和電源管理等信息。 例如操作系統關機時,就必須找到FADT指向的 _S5 對象
- SSDT (Secondary System Description Table,輔助系統描述表?)
當您的操作系統內核啟動時,它應該解析ACPI表的內存。 然后找到DSDT(以及其他表,如SSDT),將其解碼以獲取已安裝設備的列表。--- OSDev Wiki
macOS 對於 DSDT 中存在的設備可能會非常挑剔,因此我們的工作是糾正它。 需要更正以使 macOS 正常運行的主要設備:
-
Embedded controllers(EC 嵌入式控制器)
- 所有的半現代(semi-modern)英特爾機器都有一個EC 被記錄在 DSDT 里面(EC 一般叫做 H_EC, ECDV, EC0, 等等..) , 且很多 AMD 機也有這個。這些控制器(controllers)一般都不兼容 macOS 且會導致 嚴重錯誤(panics), 所以需要隱藏它們不讓 macOS 看到。 可是 macOS Catalina 需要一個叫做 EC 設備,所以我們創建了一個虛擬(dummy) EC。
- 在筆記本上, 實際上電池和快捷鍵仍然需要EC,而重命名EC又可能導致 Winodws 上有問題,所以我們用了比較好的方案:創建一個假的EC設備但不禁用真EC設備。(the actual embedded controller still needs to be enabled for battery and hotkeys to work, and renaming the EC can additionally cause issues with windows, so creating a fake EC without disabling the real embedded controller is preferable.)
-
Plugin type (插件類型)
- 讓 XCPM 提供原生的 CPU 電源管理,僅限於 Haswell(4代u)及更高的平台,SSDT 將連接到CPU的第一線程。 但不適用於AMD
-
AWAC system clock.
- This applies to all 300 series motherboards including many Z370 boards, the specific issue is that newer boards ship with AWAC clock enabled. This is a problem because macOS cannot communicate with AWAC clocks, so this requires us to either force on the legacy RTC clock or if unavailable create a fake one for macOS to play with
-
NVRAM SSDT
- True 300 series motherboards(non-Z370) don't declare the FW chip as MMIO in ACPI and so the kernel ignores the MMIO region declared by the UEFI memory map. This SSDT brings back NVRAM support
-
Backlight SSDT
- Used for fixing backlight control support on laptops
-
GPIO SSDT
- Used for creating a stub to allow VoodooI2C to connect onto, for laptops only
-
XOSI SSDT
- Used for rerouting OSI calls to this SSDT, mainly used for tricking our hardware into thinking its booting Windows so we get better trackpad support. This is a very hacky solution known for breaking Windows boot, use the GPIO SSDT instead. Usage of XOSI will not be covered in this guide
-
IRQ SSDT and ACPI patches
- Needed for fixing IRQ conflicts within the DSDT, for laptops mainly. SSDTTime exclusive
Note Skylake and newer systems rarely have IRQ conflicts, this is mainly prevalent on Broadwell and older
- Needed for fixing IRQ conflicts within the DSDT, for laptops mainly. SSDTTime exclusive
現在進入下一頁,看看您的系統需要什么 SSDTs:
選擇 SSDTs
獲得 SSDTs 有三種途徑:
- 下載法 (Prebuilt SSDTs)
- 下載的文件當然可以用,只是不夠好用 (They work but not perfect)
- 提取生成法(Automated tools)
- 主要使用 SSDTTime 自動化工具生成,雖然不能涵蓋所有情況,但工作效果比第一種好得多 (Mainly seen with SSDTTime, work much better though can't cover all situations)
- 硬漢法 (Manually creating them)
- 自己寫代碼/修改以上獲得的反編譯源碼,結果可能會非常好。 (Will always work, be much cleaner and get to learn about the process)
有個表 https://dortania.github.io/Getting-Started-With-ACPI/ssdt-platform.html
所以我i3-4150是Haswell架構,需要 CPU、 EC 相關的兩個表描述文件: SSDT-PLUG SSDT-EC
當然用這種方法,很方便,但兼容性並不能得到保證。
我決定先采用第二種,提取法。以后有能力再考慮第三種。
下載解壓 SSDTTime.zip
我選擇用 Windows 平台提取,因為 Windows 的驅動比較好。
右擊以管理員運行 SSDTTime.bat
,如果報錯此時不應有 <。
,請看 Issues28
What are all these options?:
1. FixHPET - Patch out IRQ Conflicts
- IRQ patching, mainly needed for X79, X99 and laptop users(use option
C
to omit conflicting legacy IRQs)
- IRQ patching, mainly needed for X79, X99 and laptop users(use option
2. FakeEC - OS-aware Fake EC
- This is the SSDT-EC, required for Catalina users
3. PluginType - Sets plugin-type = 1 on CPU0/PR00
- This is the SSDT-PLUG, for Intel only
4. Dump DSDT - Automatically dump the system DSDT
- Dumps your DSDT from your firmware
先選 4
把 SSDT 提取出來,然后再提取其他的,例如我還需要 SSDT-PLUG 和 SSDT-EC ,選 3
再選2
然后這些文件都生成到了 當前腳本的 Results
目錄下
其中 .aml 是生成的二進制文件,.dsl 是反編譯的源碼文件
最后,記得把除了 DSDT.aml
之外的 .aml 二進制文件都丟到 U 盤 EFI 區的 ACPI 目錄里(如 K:\EFI\OC\ACPI)
然后下一節,我們會開始寫 配置文件
了解一下 SSDTTime 不能做的事情:
- HEDT SSDTs:
- The ACPI is odd on these platforms so manual work is required
- This includes X79, X99 and X299 systems 需要 FixHPET 的請見原文
- Prebuilt can be found here: Embedded Controller
- Laptop EC fix:
- This is because you do not want the EC powered off
- Prebuilt can be found here: Embedded Controller
- SSDT-PNLF:
- Need to be configured to your system
- SSDT-GPI0:
- Need to be configured to your system
- AWAC and RTC0 SSDTs:
- 300 series Intel boards will also need to figure this out (Z390 systems are most common for requiring this but some Gigabyte Z370 do as well)
- PMC SSDT:
- For fixing 300 series Intel NVRAM
- Prebuilt can be found here: NVRAM PMC
- USBX SSDT:
- This is included on sample SSDTs but SSDTTime only makes the SSDT-EC part, Skylake and newer users can grab a pre-built here: SSDT-USBX.aml
- RHUB SSDT:
- if you have a 10th gen CPU, you'll need to either use the prebuilt or manually create it.
For users who don't have all the options available to them in SSDTTime, you can follow the "SSDTs: The long way" section. You can still use SSDTTime for SSDTs it does support.
意味着這些可能需要我們再自己琢磨補充。
config.list 配置
檢查文件
現在你的 u 盤 EFI 區已經放好 kext efi aml 三種文件,在 macOS 上看是這樣的
Windows 里看 kext 是這樣的
ACPI 是這樣的,請不要放置 DSDT.aml 因為OC固件內置了
Driver 是這樣的
由於硬件不同,所以文件有稍許差異,只要你按前面章節做了就沒什么大問題。
放置 plist 文件
接下來用 config.list 配置文件指向它們的完整文件路徑
把之前下載的 OC 壓縮包里的 Docs 目錄里的 Sample.plist
改名為 config.plist
並放到 U 盤的\EFI\OC
目錄
配置
對於本指南的其余部分,您將需要某種形式的 plist 編輯。在我們的指南中,我們將使用以下工具自動完成一些繁瑣的工作,請先下載解壓:
- 使用 ProperTree 來編輯 plist
- 使用 GenSMBIOS 來生成 SMBIOS data
ps. plist 是一個xml文件,但不支持<!-- -->
注釋只支持#
作為注釋,因為解析器是 OC 內置的
雙擊打開 ProperTree.bat,然后看到界面
按 Ctrl + O
選擇你 U 盤上的 config.plist
,配置文件被打開后
再按 Ctrl + Shift + R
(OC Clean Snapshot) 選擇 你 U 盤的 /EFI/OC
目錄,然后會得到這樣的效果:
確保沒有 DSDT.aml,即 ADD 項的第 0 項 為 false
刪不刪 #WARNING -
是沒有任何影響的,因為它們是注釋。
好,記得保存。點 File -- Save
然后根據 CPU 平台做調整,我的是 Haswell
config.plist 之 CPU 平台相關(Haswell 4代u)
前面是自動化生成,這里是根據平台相關的指南繼續手動配置 config.plist。一般配置完 plist 最后再去主板按照OC說明的設置一下就可以了。
本節指南將告訴你如何配置一切,如果你有任何問題,請檢查以確保你的配置正確的。
使用 OpenCore 主要的注意事項:
- 所有的屬性(properties)都必須有值
- OC 沒有默認配置可以回滾,除非被明確告知,否則不要刪除任何屬性條目。如果指南沒有提到該條目選項,請將其保留為默認選項。 譯注:原文雖如此,但你可以備份文件
- there are no default OpenCore will fall back on so do not delete sections unless told explicitly so. If the guide doesn't mention the option, leave it at default.
- 示例配置文件 Sample.plist 不能直接使用
- 你必須根據需要加以配置
- 不用使用 CONFIGURATORS 這個軟件!
- 他們很少尊重 OpenCore 的配置,甚至會添加 Clover 的屬性(如Mackie),這樣會破壞 plist 的!
- these rarely respect OpenCore's configuration and even some like Mackie's will add Clover properties and corrupt plists!
由於該部分於平台息息相關的,且篇幅較大,因此我放到另一篇博文了
Haswell 用戶請轉到 OpenCore 的 plist 配置文件 之 Haswell 平台部分
不是 4代u 用戶的,請繼續看官方教程:config.plist/#selecting-your-platform
安裝 MACOS
安裝時macOS安裝程序會默認新建一個200M的EFI分區。
單硬盤多系統請見:https://hackintosh-multiboot.gitbook.io/hackintosh-multiboot/
環境必須要求:硬盤上為GPT(GUID)分區表,有 >=200MB 的 EFI 分區;
主板以UEFI方式從U盤啟動,然后開始安裝 MACOS 系統。
分區格式選 APFS (但High Sierra on HDD and all Sierra users will need to use macOS Journaled(HFS+))
安裝后的小處理
安裝 macOS 到電腦上后,我們再做一些小處理
原文Post-install
通用部分(Universal)
This section is beneficial for all, regardless of hardware:
- Correcting Audio
- Enabling FileVault and other security features
- Booting macOS without a USB
- Updating OpenCore, kexts and macOS
- Disabling OpenCore Logging
- Fixing iServices
- Fixing DRM
- Fixing Power Management
- Setting up Bootstrap.efi
- Installing BootCamp
- Fixing USB
Intel 平台
- Used for Intel's consumer line:Fixing CFG Lock
- 我的不是 HEDT series: 不需要 Emulating NVRAM
其他平台略...譯累了
其他平台用戶,結合本譯文->看官方英文文檔即可
Good
初步完成,建議從頭再快速閱讀一遍。
如果還有小問題就看官方文檔。
享受 macOS 吧!!!