BlueRoseNote/07-Other/MAC/黑苹果配置笔记.md

17 KiB
Raw Blame History

概念

EFI:

BIOS是个程序存储在BIOS芯片中而现在的新式电脑用的基本都是UEFI启动早期的过渡电脑用的都是EFI启动。EFI或UEFI的一部分也是存储在一个芯片中。

SSDT&DSDT

ssdt里信息都是电源管理与显卡相关信息其他设备基本都在dsdt里。

相关资料

相关软件

参考:https://forum.amd-osx.com/threads/asus-x670e-gene-efi-adaptable-to-other-x670-x670e-b650-and-b650e-boards.4160/post-27008

完美黑苹果(Win&Mac 双系统)安装流程

如果电脑已经存在EFI分区即你已经先安装了macOS此时安装Win10会破坏之前的EFI引导所以建议先安装Win10之后安装macOS。

  1. Win 【Windows&macOS】完美双系统系列教程第2集Windows环境下配置OC引导
    1. 安装Win10系统。
    2. Win系统中的所有的硬盘名称改成英文。可选
    3. 定制USB。参考全新的定制USB教程
    4. 运行SSDTTime.bat生成所需的SSDT文件。
    5. OCAT感觉可以直接使用论坛上分享的x670e EFI文件
      1. 升级OCAT。
      2. 点击数据库图标双击Sample.plist创建案例EFI文件夹。
      3. 进行文件整理。
        1. 删除EFI/OC/ACPI下的文件并使用这个视频提供的SSDT文件替换。
        2. 删除EFI/OC/Drivers下的文件仅保留视频中的3个文件。
      4. 配置OCAT的各个选项。
    6. 使用balenaEtcher-Setup制作安装盘。
    7. 使用DiskGenius删除安装盘中的EFI文件并且使用自己的配置的EFI替换。
  2. BIOS 【Windows&macOS】完美双系统系列教程第3集安装macOS
  3. macOS该过程中不能登录AppleID以防被Ban
    1. 安装macOS。
    2. 安装OCC。
    3. 使用OCC挂载 U盘与本地磁盘的EFI分区并且将内部的EFI文件复制到 本地EFI分区。
    4. 拔掉安装U盘重启并且手动选择从安装macOS的硬盘启动。
    5. 进行相关的macOS偏好设置。
    6. 下载Hackintool完成macOS的USB定制。
    7. 打开主板的页面查询自己主板的声卡型号之后到github.com/acidanthera/AppleALC查找声卡型号并且用OCC修改并且测试声卡参数。
  4. 解决AppleID登录问题【Windows&macOS】完美双系统系列教程第4集登录Apple ID
    1. 使用OCC打开本地硬盘的EFI并且检查序列号有效性。如果显示返回无法查看就可以了。
    2. 检查NVRAM是否正常运行。
      1. sudo nvram myvar=test
      2. nvram -p | grep -i myvar

AMD OS X 作业

很可惜,第一个无法进入安装界面。而第二个只需要修改显卡型号就可以进入。

以下为第一个作业的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****但您可以将其更改为您所在的区域

步骤记录:

  1. 打开OCAT切换升级镜像目前默认的升级镜像站点挂了并升级到0.91版本作业是0.91版本)。
  2. 按照网卡修改对应的plist我板载网卡是Inter所以使用config-Intel-M.2-WiFi-BT.plist),并将其重命名为config.plist
    1. 按照CPU核心数修改Kernel -> Patch 中的带有cpuid_set_infoalgrey - Force cpuid_cores_per_package XX.X+ 项的Replace数据中的BA0800000000的 08改成你使用的CPU的核心数。7700x 8核7950x 16核所以改成BA1600000000
      1. 修改PlatformInfo -> ProcessorType 为 3841 超出8核心
      2. 修改NVRAM -> 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102 -> revcpuname CPU名称。
    2. 修改PlatformInfo -> Memory部分需要查询一下内存序列号因为我是32 x 2所以改成32768 F5-6000J3040G32GX2-TZ5NR
    3. 修改语言为中文,NVRAM -> 7C436110-AB2A-4BBB-A880-FE41995C9F82 -> prev-lang:kbdstring zh-Hans:252
    4. 修改系统序列号与UUIDPI -> Generic【Windows&macOS】完美双系统系列教程第2集Windows环境下配置OC引导】 【精准空降到 07:12】
    5. 修改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
      1. SSDT法 https://zhuanlan.zhihu.com/p/436460948
      2. NVRAM法 https://imacos.top/2022/01/03/0807/
      3. 路径可以在设备管理器 -> 显卡属性 -> 详细信息 -> 位置路径找到。 https://www.reddit.com/r/hackintosh/comments/yetoec/pci_device_paths_without_gfxutil_or_macos_using/
      4. 屏蔽N卡 PciRoot(0x0)/Pci(0x1,0x1)/Pci(0x0,0x0) |disable-gpu|Boolean|True| https://dortania.github.io/OpenCore-Install-Guide/extras/spoof.html
  3. 修改MMIO白名单
  4. 可选修改
    1. 为了EXPO关闭雷电4接口。(Bios中操作可能需要禁用)
    2. USBToolBox 定制

Debug操作

  • debug 3 -> 67MISC - 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 查询确认即可。

找到型号后将型号头尾调换后填入OpenCore中即可。

BIOS问题

参考 https://github.com/dortania/oc-laptop-guide-legacy/blob/master/before-you-start/bios-configuration.md

  • 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)
  1. SVM虚拟机
  2. CSM
  3. 快速启动
  4. 安全启动
  5. 为了EXPO关闭雷电4接口

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 |
  • Booter
    • MMIO WhiteList
      • Row 5 Address 36507222016 -> 70866960384
  • 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
  • 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
  • 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
    • Delete
      • 4D1FDA02-38C7-4A6A-9CC6-4BCCA8B30102 (Remove)
        • revcpu
        • revcpuname
        • opencore-version
        • UIScale
      • 7C436110-AB2A-4BBB-A880-FE41995C9F82 (Remove)
        • csr-active-config
        • SystemAudioVolume
        • SystemAudioVolumeDB
        • UIScale
    • LegacySchema
      • 7C436110-AB2A-4BBB-A880-FE41995C9F82
      • 8BE4DF61-93CA-11D2-AA0D-00E098032B8C
  • 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 |