18 KiB
18 KiB
概念
EFI:
BIOS是个程序,存储在BIOS芯片中,而现在的新式电脑用的基本都是UEFI启动,早期的过渡电脑用的都是EFI启动。EFI或UEFI的一部分也是存储在一个芯片中。
SSDT&DSDT:
ssdt里信息都是电源管理与显卡相关信息,其他设备基本都在dsdt里。
相关资料
- OpenCore-Install-Guid
- 完美黑苹果系列教程
- USB 定制
- 其他
相关软件
- SSDTTime:用于生成ssdt文件。
- USBToolBox:用于定制usb。
- OCAT:OC编辑器。
- OCC:MAC系统中的OC编辑器。
- DiskGenius:查看EFI用。
- BalenaEtcher-Setup:写入镜像工具。
- ProperTree:
- Hackintool:
完美黑苹果(Win&Mac 双系统)安装流程
如果电脑已经存在EFI分区,即你已经先安装了macOS,此时安装Win10会破坏之前的EFI引导,所以建议先安装Win10,之后安装macOS。
- Win 【Windows&macOS】完美双系统系列教程第2集,Windows环境下配置OC引导
- 安装Win10系统。
- Win系统中的所有的硬盘名称改成英文。(可选)
- 定制USB。参考全新的定制USB教程
- 运行SSDTTime.bat,生成所需的SSDT文件。
- OCAT(感觉可以直接使用论坛上分享的x670e EFI文件)
- 升级OCAT。
- 点击数据库图标,双击Sample.plist,创建案例EFI文件夹。
- 进行文件整理。
- 删除EFI/OC/ACPI下的文件,并使用这个视频提供的SSDT文件替换。
- 删除EFI/OC/Drivers下的文件,仅保留视频中的3个文件。
- 配置OCAT的各个选项。
- 使用balenaEtcher-Setup制作安装盘。
- 使用DiskGenius,删除安装盘中的EFI文件并且使用自己的配置的EFI替换。
- BIOS 【Windows&macOS】完美双系统系列教程第3集,安装macOS
- macOS(该过程中不能登录AppleID,以防被Ban)
- 安装macOS。
- 安装OCC。
- 使用OCC挂载 U盘与本地磁盘的EFI分区,并且将内部的EFI文件复制到 本地EFI分区。
- 拔掉安装U盘,重启并且手动选择从安装macOS的硬盘启动。
- 进行相关的macOS偏好设置。
- 下载Hackintool,完成macOS的USB定制。
- 打开主板的页面查询自己主板的声卡型号,之后到github.com/acidanthera/AppleALC,查找声卡型号,并且用OCC修改并且测试声卡参数。
- 解决AppleID登录问题【Windows&macOS】完美双系统系列教程第4集,登录Apple ID
- 使用OCC打开本地硬盘的EFI,并且检查序列号有效性。如果显示返回无法查看,就可以了。
- 检查NVRAM是否正常运行。
- sudo nvram myvar=test
- nvram -p | grep -i myvar
AMD OS X 作业
- https://forum.amd-osx.com/threads/asus-x670e-gene-efi-adaptable-to-other-x670-x670e-b650-and-b650e-boards.4160/
- https://forum.amd-osx.com/threads/asus-x670e-proart-ryzen-9-7950x-radeon-rx-6950-xt-macos-ventura.4530/
很可惜,第一个无法进入安装界面。而第二个只需要修改显卡型号就可以进入。
以下为第一个作业的EFI流程笔记,为了使此EFI适应其他板,必须进行以下更改:
- _通过暂时使用OpenCore.efi_的调试版本并设置_Misc -> Target -> 67_以启用 OpenCore 日志文件,找到您的主板的 MMIO 白名单。引导系统直到出现 OpenCore Picker。这应该足以在 EFI 分区的根文件夹中生成 OpenCore 日志文件。在该日志中搜索“MMIO”,您将找到所需的条目(请参阅此 MMIO 白名单指南)
- 创建您自己的USB端口映射;该 EFI 文件夹使用 (a) SSDT 和 (b) kext 的组合来创建 USB 端口映射;如果您愿意的话,我还包含了 USBToolBox 的输出;但您仍然必须为您的特定主板创建 USB 端口映射;您可以尝试使用此 EFI 文件夹中的 USB 端口映射,但它可能适合您,也可能不适合您
- 要启用从睡眠状态一键唤醒,
SSDT-USBW.aml
必须使用系统中所有活动 USB (XHC) 控制器的 ACPI 路径进行修改 - 应为您的主板更新 DeviceProperties 部分;现有条目可以在安装 macOS 时删除并在以后创建;这些属性的目的是为 NVMe M.2 和 SATA SSD设置内置属性,以便它们在桌面上显示为内部驱动器(请参见下面的屏幕截图)
要使此 EFI 适应您的CPU、内存DIMM、 GPU和区域,必须进行以下更改**:**
- 更改内核补丁以反映处理器中物理 CPU 核心的数量;我使用的是 Ryzen 7 7700X,它有 8 个核心,因此如果您使用不同的处理器,请修改前 3 个内核补丁(请参见下面的屏幕截图)
- 更新PlatformInfo -> Memory部分,如下面的屏幕截图所述
- 还可以在PlatformInfo -> DataHub部分中复制或创建序列号,如下面的屏幕截图所示
- 如果使用 2、4 或 6 核 CPU,请将 ProcessorType 更改为 1537,如图所示
- 如果使用具有 8 个或更多核心的 CPU,请将 ProcessorType 设置为 3841,如图所示
- 在NVRAM部分中输入您的 CPU 名称,如下所示,以便它在_“关于本机”中正确显示_
- 如果使用 RX 550、560、570、580、Vega 56、Vega 64 和 Radeon VI,请删除引导参数agdpmod=pikera (请参见下面的屏幕截图)
- _在boot-args_下的 NVRAM 部分中,有一个名为prev-lang:kbd 的参数;当前设置为
en-US:0
**,**但您可以将其更改为您所在的区域
步骤记录:
- 打开OCAT,切换升级镜像(目前默认的升级镜像站点挂了)并升级到0.91版本(作业是0.91版本)。
- 按照网卡修改对应的plist(我板载网卡是Inter,所以使用config-Intel-M.2-WiFi-BT.plist),并将其重命名为config.plist。
- 按照CPU核心数修改Kernel -> Patch 中的带有cpuid_set_info 与 algrey - Force cpuid_cores_per_package XX.X+ 项的Replace数据中的BA0800000000的 08改成你使用的CPU的核心数。(7700x 8核,7950x 16核,所以改成BA1600000000)
- 修改PlatformInfo -> ProcessorType 为 3841 (超出8核心)。
- 修改NVRAM -> 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102 -> revcpuname CPU名称。
- 修改PlatformInfo -> Memory部分,需要查询一下内存序列号(因为我是32 x 2,所以改成32768 ,F5-6000J3040G32GX2-TZ5NR)
- 修改语言为中文,NVRAM -> 7C436110-AB2A-4BBB-A880-FE41995C9F82 -> prev-lang:kbd 为 string zh-Hans:252。
- 修改系统序列号与UUID,PI -> Generic。【Windows&macOS】完美双系统系列教程第2集,Windows环境下配置OC引导】 【精准空降到 07:12】
- 修改DP中硬盘PCIE、 屏蔽N卡(本人的x670e-e装了N卡与A卡,使用OpenCore引导时需要确定显示器接在A卡上,别问我是怎么知道的)实际上x670e-e与x670e gen的STAT NVMEN的控制器分布式一样的,所以不用改;https://dortania.github.io/OpenCore-Install-Guide/extras/spoof.html#windows-gpu-selection 。
- SSDT法 https://zhuanlan.zhihu.com/p/436460948
- NVRAM法 https://imacos.top/2022/01/03/0807/
- 路径可以在设备管理器 -> 显卡属性 -> 详细信息 -> 位置路径找到。 https://www.reddit.com/r/hackintosh/comments/yetoec/pci_device_paths_without_gfxutil_or_macos_using/
- 屏蔽N卡 PciRoot(0x0)/Pci(0x1,0x1)/Pci(0x0,0x0) |disable-gpu|Boolean|
True
| https://dortania.github.io/OpenCore-Install-Guide/extras/spoof.html
- 按照CPU核心数修改Kernel -> Patch 中的带有cpuid_set_info 与 algrey - Force cpuid_cores_per_package XX.X+ 项的Replace数据中的BA0800000000的 08改成你使用的CPU的核心数。(7700x 8核,7950x 16核,所以改成BA1600000000)
- 修改MMIO白名单
- 可选修改
- 为了EXPO关闭雷电4接口。(Bios中操作,可能需要禁用)
- USBToolBox 定制
Debug操作
- debug 3 -> 67,MISC - Debug -Target 设置成67,之后就可以输出Log到安装U盘根目录。
- 开启Sysreport
- 添加跑码模式,找到NVRAM---7C436110-AB2A-4BBB-A880-FE41995C9F82 ,给boot-args 添加上 -v选项。
显卡型号查询与替换
型号可以在GPU-Z中查询,前几位厂商型号,后面4位就是显卡型号。 找到之后在 https://devicehunt.com/search/type/pci/vendor/1002/device/any 查询确认即可。
比如GPU-Z显示的DeviceID是1002 73FF - 1DA2 E451。所以我的显卡型号是73FF(1002是AMD厂家代号),经过上面网站查询显示:
Navi 23 [Radeon RX 6600/6600 XT/6600M]
找到型号后将型号头尾调换后填入OpenCore中即可。
BIOS问题
- Turn off Secure Booter
- Disable it, or you won't be able to access OpenCore to boot macOS or the macOS installation media.
- Turn the TPM offload
- If your computer has a TPM chip, you'll want to turn it off. macOS can't use it anyway.
- Disable VT-D /SVM
- VT-D is Intel's hardware based IO and device offload technology. It's incompatible with macOS and can cause boot issues, and kernel panics. If you have the option, you should turn it off.
- Graphics DVMT-Prealloc
- This is the initial memory used for your Intel GPU. By default it's usually 32MB, but for macOS it should be set to 64MB. If you don't have this option in your BIOS it can be patched later.
- SATA/AHCI/RAID
- You always want your Hard Disks and SSDs to operate in AHCI mode. In any of the other modes, macOS won't see them for installation.
- Disable that dGPU!
- If you can, if not you can disable it with a patch later. You may need to boot the installation media with an extra argument (-x) to use safe mode though. This setting can also be left on if you want to use the dGPU within Windows or other operating systems.
- Enable Legacy USB support
- This is sometimes needed for your keyboard to work in OpenCore. It's always safe to set if it's available.
- Enable XHCI Handoff
- This parameter tells the computer to hand control of the XHCI (USB 3) bus to macOS, if you have it make sure it's enabled.
- Disable Fast Boot
- Fast Boot establishes a cache to boot into Windows more quickly, but that can be problematic when booting into macOS. If you have the parameter, you'll want to turn it off.
- Disable Wake on Lan
- Wake on Lan is one of the leading causes of sleep wakeups, if you have the option in your BIOS to disable it, it's recommended that you do.
- Disable Unsupported Devices
- That fingerprint and some SDCard reader won't work anyway, so turn off the ports if you can and save power! (if possible)
- SVM(虚拟机)
- CSM
- 快速启动
- 安全启动
- 为了EXPO关闭雷电4接口
- If you use USBToolBox to create a USB port map, be wary of the following:
- USBToolBox will create a kext that refers to specific pcidebug addresses, which are a combination of
Bus:Device:Function
such as0:18:0
- These addresses may change if Thunderbolt is enabled or disabled, so it's necessary to remember whether Thunderbolt was enabled or disabled when USBToolBox was used to generate the port map; the USB kext will work properly only when Thunderbolt is set to the same setting
- USBToolBox will create a kext that refers to specific pcidebug addresses, which are a combination of
- On Asus X670E Gene and possibly other Asus AM5 boards, BIOS is already configured properly, but you may want to enable AMD EXPO or XMP for full memory speed and disable USB4/Thunderbolt
- On other boards, check and set the following:
- EXPO or XMP for memory speed
- XHCI Handoff should be enabled
- Resizable BAR can be left enabled whether or not your GPU supports it
- Above 4G Decoding should be enabled
- If your BIOS has option to disable iGPU, it is not necessary to do so; we can use the supplied SSDT-DISABLE-IGPU.aml to hide iGPU from macOS (it may be necessary to change the PCI path of iGPU inside the SSDT)
CaseySJ & ovenlite1 EFI
ovenlite1相比CaseySJ
- ACPI
- Add (Remove & Replace)
- SSDT-CREATE-DP68.aml (disable)
- SSDT-EC-AMD.aml
- SSDT-SBUS-MCHC-AMD.aml
- SSDT-SBRG.aml
- SSDT-USBX.aml -> SSDT-EC-USBX.aml
- SSDT-SBUS-MCHC-AMD.aml -> SSDT-SBUS-MCHC.aml
- SSDT-DTPG.aml
- SSDT-TB3HP-ASUS-X670E-GENE.aml (disable)
- SSDT-USB-ASUS-X670E-GENE-GP17.aml
- SSDT-USB-ASUS-X670E-GENE-GPP7.aml
- SSDT-USB-ASUS-X670E-GENE-GPP7-NO-BT.aml (disable)
- SSDT-USBW.aml
- SSDT-AQUANTIA-AQC113C-PCX1.aml (disable)
- Path (Add)
- | | 0 | Replace DP68 with DP10 in AmdTable | 2 | false | 44503638 | 0 | | 416D645461626C65 | 44503130 | | 0 | 0 | 53534454 |
- Add (Remove & Replace)
- Booter
- MMIO WhiteList
- Row 5 Address 36507222016 -> 70866960384
- MMIO WhiteList
- DP (Skip)
- Kernel
- Add(Remove)
- SMCAMDProcessor.kext
- NVMeFix.kext
- USBPorts-XHC1-XHC2-XHC4.kext
- USBPorts-XHC1-XHC2-XHC4-NO-BT.kext
- USBWakeFixup.kext
- AirportItlwm-Monterey.kext
- FeatureUnlock.kext
- IntelBluetoothInjector.kext
- Force
- | com.apple.iokit.IONetworkingFamily | System/Library/Extensions/IONetworkingFamily.kext | | false | Contents/MacOS/IONetworkingFamily | Contents/Info.plist | | 13.99.99 | Any |
- Kext 标识符,以便在添加前检查是否存在,例如:
com.apple.iokit.IONetworkingFamily
。只有在缓存中找不到标识符的驱动程序才会被添加。
- Path
- Enable algrey - _cpuid_set_generic_info - Set microcode=186 - 10.13/10.14/10.15/11.0/12.0/13.0
- Disable CaseySJ - Fix PCI bus enumeration on AM5 - 13.0
- Remove CaseySJ Row 21~26 com.apple.driver.AppleEthernetAquantiaAqtion
- Emulate
- Disable DummyPowerManagement
- Quirks
- Disable CustomSMBIOSGuid
- Scheme
- KernelArch
- x86_64 -> Auto
- KernelArch
- Add(Remove)
- MISC
- Boot
- Disable PollAppleHotKeys
- Disable HibernateSkipsPicker
- PickerAttributes 153 -> 17
- PickerVariant blackosx\BsxM1 -> Acidanthera\Syrah
- Timeout 6 -> 10
- Debug(Skip)
- Security
- Disable AllowSetDefault
- Entries
- Add | CustomOS | PciRoot(0x0)/Pci(0x1,0x1)/Pci(0x0,0x0)/NVMe(0x1,11-22-33-44-55-66-77-88)/HD(1,GPT,00000000-0000-0000-0000-000000000000,0x800,0x64000)/\EFI\BOOT\BOOTX64.EFI | | false | Not signed for security reasons | false | Auto | false |
- Tools(Add)
- BootKicker.efi
- ChipTune.efi
- CleanNvram.efi
- ControlMsrE2.efi
- CsrUtil.efi
- GopStop.efi
- KeyTester.efi
- MmapDump.efi
- OpenControl.efi
- ResetSystem.efi
- RtcRw.efi
- TpmInfo.efi
- Boot
- NVRAM
- Add
- 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102 (Remove)
- revcpuname
- revcpu
- 7C436110-AB2A-4BBB-A880-FE41995C9F82 (Add)
- | #INFO (prev-lang:kbd) | String | en:252 (ABC), set 656e3a323532 |
- | ForceDisplayRotationInEFI | Number | 0 |
- boot-args keepsyms=1 revpatch=cpuname e1000=0 debug=0x100 agdpmod=pikera -> keepsyms=1 e1000=0 debug=0x100 agdpmod=pikera
- 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102 (Remove)
- Delete
- 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102 (Remove)
- revcpu
- revcpuname
- opencore-version
- UIScale
- 7C436110-AB2A-4BBB-A880-FE41995C9F82 (Remove)
- csr-active-config
- SystemAudioVolume
- SystemAudioVolumeDB
- UIScale
- 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102 (Remove)
- LegacySchema
- 7C436110-AB2A-4BBB-A880-FE41995C9F82
- 8BE4DF61-93CA-11D2-AA0D-00E098032B8C
- Add
- UEFI
- APPLEInput
- Enable GraphicsInputMirroring
- Audio
- AudioDevice
- Drivers (Remove)
- CrScreenshotDxe.efi
- OpenLinuxBoot.efi
- ext4_x64.efi
- ResetNvramEntry.efi
- ToggleSipEntry.efi
- ReservedMemory
- | 268435456 | HD3000: IGPU memory corruption errata | false | 268435456 | Reserved |
- | 569344 | Fix black screen on wake from hibernation for Lenovo Thinkpad T490 | false | 4096 | RuntimeCode |
- APPLEInput