How to patch/inject PCI ID to a stock Kext using OpenCore?

I'll try to describe this question more accurately ... I have installed a Big Sur system using OpenCore 0.6.6. The system works, all is well. There is one small thing I could use help with.

The system has an add-on (PCI) Intel NIC, in addition to the onboard motherboard NIC. The onboard NIC works fine. I would like the add-on NIC to work as well, although it's not critical.

The PCI NIC is supported by Intel 82574L.kext which is included as part of IONetworkingFamily.kext. But to make the Mac recognize the NIC I need to change the PCI ID in the kext.

I know this trick works from doing it on a previous system, but on that system, I directly modified the stock kext in S/L/E. This required disabling SIP and basically is not the "right" way to do things.

What is the best way to do this on an OpenCore system? Again, the kext itself is included in MacOS, so it's already in S/L/E, not in the EFI. I tried simply copying the kext from S/L/E to the EFI and modifying it there, but in copying it, permissions were messed up (lost extended permissions) and it hung on boot.

Is there any way to tell OpenCore to somehow change or add the right PCI ID at boot time?

submitted by /u/beagle72
[link] [comments]