Skip to content

Commit

Permalink
Complete Configs conversion!
Browse files Browse the repository at this point in the history
  • Loading branch information
royalgraphx committed Jun 26, 2023
1 parent 6407de0 commit 83c1506
Show file tree
Hide file tree
Showing 11 changed files with 386 additions and 11 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -803,14 +803,14 @@ Mainly relevant for Virtual Machines, legacy Macs and FileVault users. leave eve

<h2 align="center"><b><span style="color:gold">Quirks</span></b></h2>

Relating to quirks with the UEFI environment, leave everything here as default as we have no use for these quirks:
Relating to quirks with the UEFI environment, leave everything here as default as we have no use for these quirks.

<h2 align="center"><b>ReservedMemory</b></h2>

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. We also won't be needing it anyways, safely ignore.

<br>
<h2 align="center">Congratulations! You've built your EFI image!</h2>
<h2 align="center">Congratulations! You've configured your Config.plist!</h2>
<p align="center">
<img src="./Assets/OpenCoreEFIComplete.png">
</p>
Expand Down
22 changes: 21 additions & 1 deletion docs/docs/04-Configs/01-VMCascadeLake/00-Introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,24 @@ nav_order: 1

<p align="center">
<img width="650" height="200" src="../../../assets/HeaderCascadeLake.png">
</p>
</p>

# Introduction / Overview
#### Download the following tools needed for modifications.

| Tool | Status | Description |
| ----- | ----- | ----- |
| [Python](https://www.python.org/downloads/) | Required | Needed as a dependency. |
| [ProperTree](https://github.com/corpnewt/ProperTree) | Required | Software that required Python, provides GUI and Tools for config.plist |
| [GenSMBIOS](https://github.com/corpnewt/GenSMBIOS) | Required | Must generate clean SMBIOS information for iServices |
| [DarwinOCPkg](https://github.com/royalgraphx/DarwinOCPkg/blob/main/Docs/Sample.plist) | Required | Need Docs/Sample.plist renamed to config.plist in OC folder. |

We'll first need a valid Python installation on our host. Don't forget to add Python to PATH. If for whatever reason you missed the option, restart the installer and select "Add to PATH". You'll then need to get your hands on ProperTree.

This will allow you to use tools like "OC Clean Snapshot" which will scan your OC folder and add the various files to your config.plist automatically and in the correct order. This is especially true when dealing with kext loading order. Essentially, you cannot load a dependency before the main Kext that needs it, is loaded... so to make sure we don't run into any issues we use the officially recommended method of OC Clean Snapshot and regular OC Snapshot when updating things in our folders.

GenSMBIOS will be very important because the Sample.plist does not contain any serial number. Meaning you cannot log into iServices until you properly generate MacPro7,1 SMBIOS information and use that on your config.plist

Of course, the repository includes a custom Sample.plist that has been cleaned up and peer-reviewed for the proper configuration needed for QEMU/KVM. There is still a Config guide you must follow for the Virtual Machine platform, but it will do the same thing as the main Dortania guide Configs: teach you what makes your hack work.

## You can now continue to the next <a href="01-ACPI.html">page</a>.
26 changes: 25 additions & 1 deletion docs/docs/04-Configs/01-VMCascadeLake/01-ACPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,28 @@ title: Part 1 - ACPI
parent: Virtual Machine Cascade Lake
grand_parent: Configs
nav_order: 2
---
---

# ACPI

<p align="center">
<img src="../../../assets/OpenCoreACPIAdd.png">
</p>

## Add

This section of the config is meant to expose the various ACPI in your OC folder. This along with many of the other sections will be auto-filled by simply going to ``File -> OC Clean Snapshot`` and going to the OC folder in your OpenCore.img mount point.

## Delete

This blocks certain ACPI tables from loading, for us, we can ignore this.

## 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 for dual or multi-boot configurations.

## Quirks

For settings relating to ACPI, leave everything here as default as we have no use for these quirks.

## You can now continue to the next <a href="02-Booter.html">page</a>.
29 changes: 28 additions & 1 deletion docs/docs/04-Configs/01-VMCascadeLake/02-Booter.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,31 @@ title: Part 2 - Booter
parent: Virtual Machine Cascade Lake
grand_parent: Configs
nav_order: 3
---
---

# Booter

<p align="center">
<img src="../../../assets/OpenCoreBooterQuirks.png">
</p>

## MmioWhitelist

This section is allowing spaces to be passthrough to macOS that are generally ignored, useful when paired with DevirtualiseMmio. We can ignore this for our Virtual Machine use cases generally.

## Patch

This contains general patches, for us, we can ignore this.

## Quirks

Don't skip over this section, we'll be changing the following:

| Quirk | Value | Description |
| ----- | ----- | ----- |
| EnableWriteUnprotector | False | This quirk and RebuildAppleMemoryMap can commonly conflict, recommended to enable the latter on newer platforms and disable this entry. |
| RebuildAppleMemoryMap | True | Rebuilds the memory map to a macOS-compatible one. |
| SetupVirtualMap | False | Fixes SetVirtualAddresses calls to virtual addresses, VMs don't require it. |
| SyncRuntimePermissions | True | Fixes MAT table alignment and required to boot Windows and Linux with MAT tables, also recommended for macOS. Mainly relevant for RebuildAppleMemoryMap users. |

## You can now continue to the next <a href="03-DeviceProperties.html">page</a>.
18 changes: 17 additions & 1 deletion docs/docs/04-Configs/01-VMCascadeLake/03-DeviceProperties.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,20 @@ title: Part 3 - Device Properties
parent: Virtual Machine Cascade Lake
grand_parent: Configs
nav_order: 4
---
---

# Device Properties

<p align="center">
<img src="../../../assets/OpenCoreDeviceProperties.png">
</p>

## Add

This allows you to add properties to various devices using its PciRoot address. For now, and in most cases we can ignore this. An example would be: overriding an ethernet controller to appear as built-in so that macOS allows iServices to work. On Virtual Machines, we rarely have to override.

## Delete

This allows you to delete properties of various devices using its PciRoot address. For now, and in most cases we can ignore this.

## You can now continue to the next <a href="04-Kernel.html">page</a>.
57 changes: 56 additions & 1 deletion docs/docs/04-Configs/01-VMCascadeLake/04-Kernel.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,59 @@ title: Part 4 - Kernel
parent: Virtual Machine Cascade Lake
grand_parent: Configs
nav_order: 5
---
---

# Kernel

<p align="center">
<img src="../../../assets/OpenCoreKernel.png">
</p>

## Add

This section of the config is meant to expose the various Kexts in your OC folder. This along with many of the other sections will be auto-filled by simply going to ``File -> OC Clean Snapshot`` and going to the OC folder in your OpenCore.img mount point.

## Block

Blocks certain Kexts from loading. Not relevant for us.

## Emulate

Needed for spoofing unsupported CPUs like Pentiums and Celerons. We are already spoofing the CPU to CascadeLake in the XML, so we won't need this.

- Cpuid1Mask: Leave this blank
- Cpuid1Data: Leave this blank

## Force

Used for loading Kexts off system volume, only relevant for older operating systems where certain kexts are not present in the cache, i.e IONetworkingFamily in 10.6.

For us, we can ignore.

## Patch

Patches both the kernel and Kexts. I've gone ahead and incorporated CaseySJ's PCI Bus Enumeration fix on KVM. For us, we can ignore this section.

## Quirks

Don't skip over this section, we'll be changing the following:

| Quirk | Value | Description |
| ----- | ----- | ----- |
| ForceSecureBootScheme | True | Forces the x86 scheme for IMG4 verification in Apple Secure Boot initialization. |
| PanicNoKextDump | True | Allows for reading kernel panics logs when kernel panics occur. |
| PowerTimeoutKernelPanic | True | Helps fix kernel panics relating to power changes with Apple drivers in macOS Catalina, most notably with digital audio. |
| ProvideCurrentCpuInfo | True | Provides current CPU info to the kernel. This quirk works differently depending on the CPU: For KVM and other hypervisors it provides precomputed MSR 35h values solving kernel panic with ``-cpu host``. |

## Scheme

Settings related to legacy booting, but we can change the following.

| Key | Type | Value |
| ----- | ----- | ----- |
| CustomKernel | Boolean | False |
| FuzzyMatch | Boolean | False |
| KernelArch | String | x86_64 |
| KernelCache | String | Prelinked |

## You can now continue to the next <a href="05-Misc.html">page</a>.
58 changes: 57 additions & 1 deletion docs/docs/04-Configs/01-VMCascadeLake/05-Misc.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,60 @@ title: Part 5 - Misc
parent: Virtual Machine Cascade Lake
grand_parent: Configs
nav_order: 6
---
---

# Misc

<p align="center">
<img src="../../../assets/OpenCoreMisc.png">
</p>

## BlessOverride

To be filled with plist string entries containing absolute UEFI paths to customised bootloaders such as \EFI\debian\grubx64.efi for the Debian bootloader. We do nothing here, nor will we ever.

## Boot

Don't skip over this section, we'll be changing the following:

| Key | Type | Value |
| ----- | ----- | ----- |
| HideAuxiliary | Boolean | True |
| PollAppleHotKeys | Boolean | True |

## Debug

Helpful for debugging OpenCore boot issues.
Don't skip over this section, we'll be changing the following:

| Key | Type | Value |
| ----- | ----- | ----- |
| Target | Number | 67 |

## Entries

Used for specifying irregular boot paths that can't be found naturally with OpenCore. We do nothing here, nor will we ever.

## Security

Security is pretty self-explanatory, <b>do not skip</b>. We'll be changing the following:

{: .warning }
Optional is a word, you must type it out. It IS case-sensitive.

| Key | Type | Value |
| ----- | ----- | ----- |
| AllowSetDefault | Boolean | True |
| ExposeSensitiveData | Number | 15 |
| ScanPolicy | Number | 0 |
| Vault | String | <span style="color:red">Optional</span> |

## Serial

Used for serial debugging (Leave everything as default).

## Tools

This section of the config is meant to expose the various Tools in your OC folder. This along with many of the other sections will be auto-filled by simply going to ``File -> OC Clean Snapshot`` and going to the OC folder in your OpenCore.img mount point.

## You can now continue to the next <a href="06-NVRAM.html">page</a>.
55 changes: 54 additions & 1 deletion docs/docs/04-Configs/01-VMCascadeLake/06-NVRAM.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,57 @@ title: Part 6 - NVRAM
parent: Virtual Machine Cascade Lake
grand_parent: Configs
nav_order: 7
---
---

# NVRAM

<p align="center">
<img src="../../../assets/OpenCoreNVRAM.png">
</p>

## Add


{: .highlight }
7C436110-AB2A-4BBB-A880-FE41995C9F82

We can use this dictionary to modify boot-args. Use the chart below for various arguments that possibly be useful later in the future. For the Recovery and Installation, before the GPU passthrough, you don't need to modify this section.

### General Boot-Args

| boot-arg | 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. |

### GPU Related Boot-Args

| boot-arg | Description |
| ----- | ----- |
| agdpmod=pikera | Used for disabling board ID checks on some Navi GPUs (RX 5000 & 6000 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) |
| -radcodec | Used for allowing officially unsupported AMD GPUs (spoofed) to use the Hardware Video Encoder |
| radpg=15 | Used for disabling some power-gating modes, helpful for properly initializing AMD Cape Verde based GPUs |
| unfairgva=1 | Used for fixing hardware DRM support on supported AMD GPUs |

## 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.

## LegacyOverwrite

For us, we can leave it to the default value of ``False``.

## LegacySchema

Used for assigning NVRAM variables, used with OpenVariableRuntimeDxe.efi. Only needed for systems without native NVRAM. The values under this can be deleted safely.

## WriteFlash

Enables writing to flash memory for all added variables.

| Key | Type | Value |
| ----- | ----- | ----- |
| WriteFlash | Boolean | True |

## You can now continue to the next <a href="07-PlatformInfo.html">page</a>.
64 changes: 63 additions & 1 deletion docs/docs/04-Configs/01-VMCascadeLake/07-PlatformInfo.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,66 @@ title: Part 7 - PlatformInfo
parent: Virtual Machine Cascade Lake
grand_parent: Configs
nav_order: 8
---
---

# Platform Info

<p align="center">
<img src="../../../assets/OpenCorePlatformInfo.png">
</p>

## Automatic

Leave as default.

## CustomMemory

Can be ignored for now. Documentation in progress.

## Generic

At this point in the guide, you'll need to open a terminal and an instance of GenSMBIOS. Select option 1 for downloading MacSerial and Option 3 for selecting SMBIOS. For this Cascade Lake example, we'll choose the MacPro7,1 SMBIOS.

This will give us output similar to the following:

```
#######################################################
# MacPro7,1 SMBIOS Info #
#######################################################
Type: MacPro7,1
Serial: F0000000000M
Board Serial: F0000000000000000F
SmUUID: 90000006-3009-4004-B001-800000000008
Apple ROM: 000000000005
Press [enter] to return...
```

To fill out the information on your config.plist, refer to the following chart to convert across.

| GenSMBIOS | config.plist |
| ----- | ----- |
| Board Serial | MLB |
| Apple ROM | ROM |
| Type | SystemProductName |
| Serial | SystemSerialNumber |
| SmUUID | SystemUUID |

## UpdateDataHub

Update Data Hub fields. We can leave this default.

## UpdateSMBIOS

Updates SMBIOS fields. We can leave this default.

## UpdateSMBIOSMode

Replace the tables with newly allocated EfiReservedMemoryType. We can leave this default.

## UseRawUuidEncoding

Use raw encoding for SMBIOS UUIDs. We can leave this default.

## You can now continue to the next <a href="08-UEFI.html">page</a>.
Loading

0 comments on commit 83c1506

Please sign in to comment.