ic005k / OCAuxiliaryTools

Cross-platform GUI management tools for OpenCore(OCAT)
MIT License
3.54k stars 328 forks source link

Adding and Updating nested kexts bugs #335

Open 1Revenger1 opened 1 year ago

1Revenger1 commented 1 year ago

OCAT seems to struggle with my EFI layout. I put most of my kexts into subfolders within EFI/OC/Kexts, as shown below: image

I can't get OCAT to update kexts. It does not find any newer versions of Lilu, VirtualSMC, etc, thus Update Kexts stays grayed out. The "Available" columns says "None" for all the kexts after checking for new versions. It does get the Current version correct though.

Additionally, when adding kexts within these subfolders, it copies the kext into the root of the Kexts folder. The expected behavior is to use the copy within EFI/OC/Kexts/*/ instead of copying them to the root (EFI/OC/Kexts/*).

Lastly, is there any chance for smarter logic when adding kexts? ProperTree when doing a snapshot will check the OSBundleIdentifier and OSBundleLibraries in Info.plist (Found under *.kext/Contents/Info.plist). This allows checking for duplicates (commonly seen with VoodooInput as it's shipped within VoodooRMI, VoodooPS2, and VoodooI2C) in addition to ordering the kexts correctly. Adding VoodooRMI and VoodooSMBus currently gives the wrong order. RMISMBus.kext (plugin of VoodooRMI) depends on both VoodooRMI and VoodooSMBus, but VoodooSMBus gets placed after RMISMBus. This is likely due to VoodooRMI and all of its children being added first, then adding VoodooSMBus afterwards. Duplicate kexts will cause panics when booting macOS, while incorrect ordering means that the kexts will not be injected.

Edit: VoodooRMI + VoodooI2C + RMII2C.kext is probably fine, as I comes before R in the alphabet. I'm not sure VoodooI2C itself is fine though. VoodooI2C depends on VoodooI2CServices, though I2CServices is shipped under the PlugIns folder within VoodooI2C.

ic005k commented 1 year ago

Sorry, OCAT does not support non-kext subfolders in the Kexts directory, which means that all Kext files must be placed under the root directory of Kexts, please note. I don't know if OC supports subfolders now, but as far as I can tell, the old OC doesn't seem to support them. What's more, OCAT never offers the ability to sort by Kexts, which you have to do yourself. This is part of the design philosophy of OCAT. OCAT gives the user plenty of freedom, but it doesn't make any decisions or things for the user. I'll stay tuned and appreciate the feedback.

1Revenger1 commented 1 year ago

Sorry, OCAT does not support non-kext subfolders in the Kexts directory, which means that all Kext files must be placed under the root directory of Kexts, please note. I don't know if OC supports subfolders now, but as far as I can tell, the old OC doesn't seem to support them.

Fair enough. Not many users use subfolders. OC does support sub folders, and has for a while. I'm not aware of a version which didn't support this. The EFI structure above is copied and pasted from my EFI partition, which I'm currently booted with.

What's more, OCAT never offers the ability to sort by Kexts, which you have to do yourself.

I thought it does? Looking through the code real quick, it looks like Lilu and VirtualSMC get placed at the top. Some clarification would be nice on this.

ic005k commented 1 year ago

Some clarification would be nice on this.

I'll highlight the issue so that more users can see it. Thank you very much for asking this question. Any further questions or suggestions are welcome.