From 8cdcfc3e3a3e23db70db97672c110b18b2122af3 Mon Sep 17 00:00:00 2001 From: Hoang Hong Quan Date: Thu, 1 Aug 2024 07:12:47 +0700 Subject: [PATCH] Update SMBIOS options for AMD systems and check for the presence of NVMe SSD --- Scripts/efi_builder.py | 4 ++-- Scripts/kext_maestro.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Scripts/efi_builder.py b/Scripts/efi_builder.py index 37ce26d..53f23d9 100755 --- a/Scripts/efi_builder.py +++ b/Scripts/efi_builder.py @@ -255,7 +255,7 @@ class builder: def system_product_info(self, platform, cpu_manufacturer, processor_name, cpu_codename, cpu_cores, discrete_gpu, igpu_props, macos_version): product_name = "iMacPro1,1" if macos_version < 19 or self.utils.contains_any(cpu_data.IntelCPUGenerations, cpu_codename, start=12) else "MacPro7,1" - if "AMD" in cpu_manufacturer: + if "AMD" in cpu_manufacturer and not discrete_gpu: product_name = "MacBookPro16,3" if "Laptop" in platform else "iMacPro1,1" if igpu_props: @@ -394,7 +394,7 @@ class builder: hardware_shorc["CPU Codename"] = hardware["CPU"].get("CPU Codename") hardware_shorc["Integrated GPU"] = list(hardware.get("GPU").items())[-1][1] if "Integrated GPU" in list(hardware.get("GPU").items())[-1][1]["Device Type"] else {} hardware_shorc["Integrated GPU Name"] = list(hardware.get("GPU").keys())[-1] if hardware_shorc["Integrated GPU"] else "" - hardware_shorc["Discrete GPU"] = list(hardware.get("GPU").items())[0][1] if "Discrete GPU" in list(hardware.get("GPU").items())[0][1]["Device Type"] else {} + hardware_shorc["Discrete GPU"] = list(hardware.get("GPU").items())[0][1].copy() if "Discrete GPU" in list(hardware.get("GPU").items())[0][1]["Device Type"] else {} if hardware_shorc["Discrete GPU"]: hardware_shorc["Discrete GPU"]["GPU Name"] = list(hardware.get("GPU").keys())[0] hardware_shorc["Ethernet (PCI)"] = [] diff --git a/Scripts/kext_maestro.py b/Scripts/kext_maestro.py index 9f96ba4..7c6d098 100755 --- a/Scripts/kext_maestro.py +++ b/Scripts/kext_maestro.py @@ -691,7 +691,7 @@ class KextMaestro: kexts.extend(["RealtekCardReader", "RealtekCardReaderFriend"]) for controller_name, controller_props in storage_controllers.items(): - if "NVMe" in controller_name or "NVM Express" in controller_props.get("Device Description"): + if "NVMe" in controller_name + controller_props.get("Device Description") or "NVM Express" in controller_name + controller_props.get("Device Description"): kexts.append("NVMeFix") else: if controller_props.get("Device ID") in pci_data.UnsupportedSATAControllerIDs and not "AHCI" in controller_name: