ocvalidate
====================
Utility to validate whether a `config.plist` matches requirements and conventions imposed by OpenCore.
## Usage
- Pass one single path to `config.plist` to verify it.
- Pass `--version` for current supported OpenCore version.
## Technical background
### At a glance
- ocvalidate firstly calls `OcSerializeLib` which performs fundamental checks in terms of syntax and semantics. After that, the following will be checked.
- The error message `<OCS: No schema for xxx>` complained by `OcSerializeLib` indicates unknown keys that can be deprecated in new versions of OpenCore. Such keys should be ***removed*** in order to avoid undefined behaviours.
- Under active development, newer versions of OpenCore hardly have backward compatibility at this moment. As a result, please first run `ocvalidate --version` to check which version of OpenCore is supported, and thus please only use the specific version.
### Global Rules
- All entries must be set once only. Duplication is strictly prohibited.
- All strings (fields with plist `String` format) throughout the whole config only accept ASCII printable characters at most. Stricter rules may apply. For instance, some fields only accept specified values, as indicated in [Configuration.pdf](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/Configuration.pdf).
- All the paths relative to OpenCore root must be less than or equal to 128 bytes (`OC_STORAGE_SAFE_PATH_MAX`) in total including '\0' terminator.
- Most binary patches must have `Find`, `Replace`, `Mask` (if used), and `ReplaceMask` (if used) identical size set. Also, `Find` requires `Mask` (or `Replace` requires `ReplaceMask`) to be active (set to non-zero) for corresponding bits.
- `MinKernel` and `MaxKernel` entries should follow conventions specified in [Configuration.pdf](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/Configuration.pdf). (TODO: Bring decent checks for this)
- `MinKernel` cannot be a value that is below macOS 10.4 (Darwin version 8).
- Entries taking file system path only accept `0-9, A-Z, a-z, '_', '-', '.', '/', and '\'`.
- Device Paths (e.g. `PciRoot(0x0)/Pci(0x1b,0x0)`) only accept strings in canonic string format.
- Paths of UEFI Drivers only accept `0-9, A-Z, a-z, '_', '-', '.', and '/'`.
- Entries requiring bitwise operations (e.g. `ConsoleAttributes`, `PickerAttributes`, or `ScanPolicy`) only allow known bits stated in [Configuration.pdf](https://github.com/acidanthera/OpenCorePkg/blob/master/Docs/Configuration.pdf) to be set.
- Entries involving GUID (mainly in Section `NVRAM`) must have correct format set.
### ACPI
#### Add
- Entry[N]->Path: Only `.aml` and `.bin` filename suffix are accepted.
### Booter
#### MmioWhitelist
- Entry[N]->Enabled: When at least one entry is enabled, `DevirtualiseMmio` in `Booter->Quirks` should be enabled.
#### Patch
- Entry[N]->Arch: Only `Any`, `i386`, or `x86_64` are accepted.
- Entry[N]->Identifier: Only `Any`, `Apple`, or a specified bootloader with `.efi` sufffix, are accepted.
#### Quirks
- When `AllowRelocationBlock` is enabled, `ProvideCustomSlide` should be enabled altogether.
- When `EnableSafeModeSlide` is enabled, `ProvideCustomSlide` should be enabled altogether.
- If `ProvideMaxSlide` is set to a number greater than zero, `ProvideCustomSlide` should be enabled altogether.
- `ResizeAppleGpuBars` must be set to `0` or `-1`.
- When `DisableVariableWrite`, `EnableWriteUnprotector`, or `ProvideCustomSlide` is enabled, `OpenRuntime.efi` should be loaded in `UEFI->Drivers`.
### DeviceProperties
- Requirements here all follow Global Rules.
### Kernel
#### Add
- Entry[N]->Arch: Only `Any`, `i386`, or `x86_64` are accepted.
- Entry[N]->BundlePath: Filename should have `.kext` suffix.
- Entry[N]->PlistPath: Filename should have `.plist` suffix.
- Entry[N]: If `Lilu.kext` is used, `DisableLinkeditJettison` should be enabled in `Kernel->Quirks`.
- For some known kexts, their `BundlePath`, `ExecutablePath`, and `PlistPath` must match against each other. Current list of rules can be found [here](https://github.com/acidanthera/OpenCorePkg/blob/master/Utilities/ocvalidate/KextInfo.c).
- Plugin kext must be placed after parent kext. For example, [plugins of Lilu](https://github.com/acidanthera/Lilu/blob/master/KnownPlugins.md) must be placed after `Lilu.kext`.
#### Delete
- Entry[N]->Arch: Only `Any`, `i386`, or `x86_64` are accepted.
- Entry[N]->Identifier: At least one dot (`.`) should exist, because any identifier looks like a domain sequence (`vendor.product`).
#### Quirks
- `CustomSMBIOSGuid` requires `PlatformInfo->UpdateSMBIOSMode` set to `Custom`.
- `SetApfsTrimTimeout` cannot be a value that is greater than `MAX_UINT32`, or less than `-1`.
#### Scheme
- KernelArch: Only `Auto`, `i386`, `i386-user32`, or `x86_64` are accepted.
- KernelCache: Only `Auto`, `Cacheless`, `Mkext`, or `Prelinked` are accepted.
### Misc
#### BlessOverride
- Entries cannot be `\EFI\Microsoft\Boot\bootmgfw.efi` or `\System\Library\CoreServices\boot.efi` since OpenCore knows these paths.
#### Boot
- HibernateMode: Only `None`, `Auto`, `RTC`, or `NVRAM` are accepted.
- PickerMode: Only `Builtin`, `External`, or `Apple` are accepted.
- `PickerAudioAssist` requires `AudioSupport` in `UEFI->Audio` to be enabled.
- LauncherOption: Only `Disabled`, `Full`, or `Short` are accepted.
- `LauncherPath` cannot be empty string.
#### Security
- AuthRestart: If enabled, `VirtualSMC.kext` should be present in `Kernel->Add`.
- DmgLoading: Only `Disabled`, `Signed`, or `Any` are accepted.
- Vault: Only `Optional`, `Basic`, or `Secure` are accepted.
- SecureBootModel: Only `Default`, `Disabled`, `j137`, `j680`, `j132`, `j174`, `j140k`, `j780`, `j213`, `j140a`, `j152f`, `j160`, `j230k`, `j214k`, `j223`, `j215`, `j185`, `j185f`, or `x86legacy` are accepted.
### NVRAM
- Requirements here all follow Global Rules. In addition, the following keys and values are checked:
#### gAppleBootVariableGuid (`7C436110-AB2A-4BBB-A880-FE41995C9F82`)
- `nvda_drv` must have type `Plist Data` with the value of `0x30` or `0x31`.
- `boot-args` must be an ASCII string (thus `Plist String`) without trailing `\0`.
- `bootercfg` must be an ASCII string (thus `Plist String`) without trailing `\0`.
- `csr-active-config` must have type `Plist Data` and have length of 4 bytes.
- `StartupMute` must have type `Plist Data` and have length of 1 byte.
- `SystemAudioVolume` must have type `Plist Data` and have length of 1 byte.
#### gAppleVendorVariableGuid (`4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14`)
- `UIScale` must have type `Plist Data` with the value of `0x01` or `0x02`.
- `FirmwareFeatures` must have type `Plist Data` and have length of 4 bytes.
- `ExtendedFirmwareFeatures` must have type `Plist Data` and have length of 8 bytes.
- `FirmwareFeaturesMask` must have type `Plist Data` and have length of 4 bytes.
- `ExtendedFirmwareFeatures` must have type `Plist Data` and have length of 8 bytes.
- `DefaultBackgroundColor` must have type `Plist Data` and have length of 4 bytes. Also, its last byte must be `0x00`.
### PlatformInfo
- UpdateSMBIOSMode: Only `TryOverwrite`, `Create`, `Overwrite`, or `Custom` are accepted.
#### Generic
- SystemProductName: Only real Mac models are accepted.
- SystemMemoryStatus: Only `Auto`, `Upgradable`, or `Soldered` are accepted.
- SystemUUID: Only empty string, `OEM` or valid UUID are accepted.
- ProcessorType: Only known first byte can be set.
### UEFI
#### APFS
- When `EnableJumpstart` is enabled, `ScanPolicy` in `Misc->Security` should have `OC_SCAN_ALLOW_FS_APFS` (bit 8) set, together with `OC_SCAN_FILE_SYSTEM_LOCK` (bit 0) set. Or `ScanPolicy` should be `0` (failsafe value).
#### Audio
- When `AudioSupport` is enabled, `AudioDevice` must be either empty or a valid path.
- When `AudioSupport` is enabled, `AudioOutMask` must be non-zero.
#### Quirks
- When `RequestBootVarRouting` is enabled, `OpenRuntime.efi` should be loaded in `UEFI->Drivers`.
- `ResizeGpuBars` must be set to an int
没有合适的资源?快使用搜索试试~ 我知道了~
资源详情
资源评论
资源推荐
收起资源包目录
黑果OC引导OpenCore_v0.7.9_RELEASE.zip (151个子文件)
acdtinfo 35KB
ACPIe 436KB
SSDT-PLUG-ALT.aml 4KB
SSDT-HV-CPU.aml 2KB
SSDT-PNLF.aml 1KB
SSDT-PLUG.aml 900B
SSDT-EC-USBX.aml 306B
SSDT-SBUS-MCHC.aml 252B
SSDT-HV-VMBUS.aml 230B
SSDT-RTC0-RANGE.aml 172B
SSDT-PMC.aml 143B
SSDT-RTC0.aml 142B
SSDT-ALS0.aml 132B
SSDT-EC.aml 125B
SSDT-HV-PLUG.aml 114B
SSDT-EHCx-DISABLE.aml 109B
SSDT-IMEI.aml 108B
SSDT-BRG0.aml 108B
SSDT-UNC.aml 98B
SSDT-AWAC-DISABLE.aml 78B
boot0 512B
boot1f32 512B
bootIA32 232KB
bootX64 244KB
sign.command 3KB
QemuBuild.command 2KB
LogoutHook.command 1KB
.contentFlavour 8B
.contentFlavour 8B
.contentFlavour 8B
.contentFlavour 8B
disklabel 35KB
SSDT-PLUG-ALT.dsl 29KB
SSDT-HV-CPU.dsl 14KB
SSDT-PNLF.dsl 11KB
SSDT-PLUG.dsl 4KB
SSDT-RTC0-RANGE.dsl 4KB
SSDT-EC-USBX.dsl 3KB
SSDT-EC.dsl 2KB
SSDT-PMC.dsl 2KB
SSDT-SBUS-MCHC.dsl 2KB
SSDT-EHCx-DISABLE.dsl 1KB
SSDT-RTC0.dsl 1KB
SSDT-HV-VMBUS.dsl 1KB
SSDT-ALS0.dsl 1KB
SSDT-UNC.dsl 1016B
SSDT-BRG0.dsl 1010B
SSDT-AWAC-DISABLE.dsl 979B
SSDT-IMEI.dsl 719B
SSDT-HV-PLUG.dsl 664B
OpenShell.efi 1.05MB
OpenShell.efi 1.02MB
OpenCore.efi 580KB
OpenCore.efi 572KB
AudioDxe.efi 116KB
AudioDxe.efi 108KB
HiiDatabase.efi 100KB
OpenCanopy.efi 100KB
HiiDatabase.efi 96KB
OpenCanopy.efi 92KB
OpenLinuxBoot.efi 60KB
CrScreenshotDxe.efi 52KB
OpenLinuxBoot.efi 48KB
CrScreenshotDxe.efi 48KB
MmapDump.efi 48KB
XhciDxe.efi 44KB
CsrUtil.efi 44KB
MmapDump.efi 44KB
OpenHfsPlus.efi 40KB
OpenPartitionDxe.efi 40KB
NvmExpressDxe.efi 40KB
XhciDxe.efi 40KB
OpenHfsPlus.efi 40KB
NvmExpressDxe.efi 40KB
OpenPartitionDxe.efi 36KB
BootKicker.efi 36KB
CleanNvram.efi 36KB
ControlMsrE2.efi 32KB
ControlMsrE2.efi 32KB
CsrUtil.efi 28KB
Ps2KeyboardDxe.efi 28KB
OpenUsbKbDxe.efi 28KB
BiosVideo.efi 28KB
BootKicker.efi 28KB
CleanNvram.efi 28KB
BiosVideo.efi 28KB
OpenUsbKbDxe.efi 28KB
Ps2KeyboardDxe.efi 28KB
OpenControl.efi 24KB
BOOTIA32.efi 24KB
GopStop.efi 24KB
TpmInfo.efi 24KB
RtcRw.efi 24KB
OpenRuntime.efi 24KB
ChipTune.efi 24KB
ResetSystem.efi 24KB
ChipTune.efi 24KB
RtcRw.efi 24KB
OpenControl.efi 24KB
ResetSystem.efi 24KB
共 151 条
- 1
- 2
LCG元
- 粉丝: 23
- 资源: 473
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0