build.py: Add WhateverGreen for Web Driver configs

This commit is contained in:
Mykola Grymalyuk
2022-05-25 19:06:54 -06:00
parent 8f7df604af
commit a2858a1ecf
2 changed files with 4 additions and 2 deletions
+4
View File
@@ -694,6 +694,8 @@ class BuildOpenCore:
self.config["DeviceProperties"]["Add"][device.pci_path].update({"disable-metal": 1, "force-compat": 1})
if "nvda_drv_vrl=1" not in self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"]:
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " nvda_drv_vrl=1"
if self.get_kext_by_bundle_path("WhateverGreen.kext")["Enabled"] is False:
self.enable_kext("WhateverGreen.kext", self.constants.whatevergreen_version, self.constants.whatevergreen_path)
else:
print(f"- Failed to find Device path for dGPU {i + 1}")
@@ -715,6 +717,8 @@ class BuildOpenCore:
if "ngfxgl=1 ngfxcompat=1 nvda_drv_vrl=1" not in self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"]:
print("- Adding Web Driver Patches")
self.config["NVRAM"]["Add"]["7C436110-AB2A-4BBB-A880-FE41995C9F82"]["boot-args"] += " ngfxgl=1 ngfxcompat=1 nvda_drv_vrl=1"
if self.get_kext_by_bundle_path("WhateverGreen.kext")["Enabled"] is False:
self.enable_kext("WhateverGreen.kext", self.constants.whatevergreen_version, self.constants.whatevergreen_path)
if not self.computer.gpus:
print("- No socketed dGPU found")
-2
View File
@@ -66,8 +66,6 @@ def validate(settings):
host_os_float = float(f"{major_kernel}.{minor_kernel}")
for patch_subject in patchset:
for patch_core in patchset[patch_subject]:
if patch_core == "Nvidia Web Drivers":
continue
patch_os_min_float = float(f'{patchset[patch_subject][patch_core]["OS Support"]["Minimum OS Support"]["OS Major"]}.{patchset[patch_subject][patch_core]["OS Support"]["Minimum OS Support"]["OS Minor"]}')
patch_os_max_float = float(f'{patchset[patch_subject][patch_core]["OS Support"]["Maximum OS Support"]["OS Major"]}.{patchset[patch_subject][patch_core]["OS Support"]["Maximum OS Support"]["OS Minor"]}')
if (host_os_float < patch_os_min_float or host_os_float > patch_os_max_float):