build: Add APFS Trim configuration

This commit is contained in:
Mykola Grymalyuk
2023-01-20 17:10:59 -07:00
parent 79f4ba17d9
commit 99a145e7cb
4 changed files with 28 additions and 3 deletions
+8 -1
View File
@@ -20,6 +20,7 @@ class build_storage:
self.pata_handling()
self.misc_handling()
self.pcie_handling()
self.trim_handling()
def ahci_handling(self):
# MacBookAir6,x ship with an AHCI over PCIe SSD model 'APPLE SSD TS0128F' and 'APPLE SSD TS0256F'
@@ -126,4 +127,10 @@ class build_storage:
# However pre-Ivy Bridge don't support this feature
if smbios_data.smbios_dictionary[self.model]["CPU Generation"] <= cpu_data.cpu_data.sandy_bridge.value:
if (self.constants.computer.sdxc_controller and not self.constants.custom_model) or (self.model.startswith("MacBookPro8") or self.model.startswith("Macmini5")):
support.build_support(self.model, self.constants, self.config).enable_kext("BigSurSDXC.kext", self.constants.bigsursdxc_version, self.constants.bigsursdxc_path)
support.build_support(self.model, self.constants, self.config).enable_kext("BigSurSDXC.kext", self.constants.bigsursdxc_version, self.constants.bigsursdxc_path)
def trim_handling(self):
if self.constants.apfs_trim_timeout is False:
print(f"- Disabling APFS TRIM timeout")
self.config["Kernel"]["Quirks"]["SetApfsTrimTimeout"] = 0