I don't add the driver to System/Library/Extensions. Its immediately upon loading the kext.
sudo kextload -verbose 6 AppleSamplePCI.kext
The debug boot-args are being utilized in leui of a kext-signing credential.
After the driver is built, it is copied with root permissions to /tmp :
sudo cp -R AppleSamplePCI.kext /tmp
And utilizing...
sudo kextutil -verbose 6 AppleSamplePCI.kext
...provides the diagnostic information, and immidiately recreates the same crashing condition of the driver load. The stdout from this command doesn't reflect any dependency issues or errors with the kext file.
Basically, we're trying to set this reference driver, which *should* be a tested and validated starting point to talk to a PCI signal and data acquisition device connected via Thunderbolt to an Atikio enclosure.
We remove the matching components from the info.plist that the driver comes with, and instead assign:
IOPCIPrimaryMatch
to the vid/pid of the target device. We also add:
IOPCITunnelCompatible=true
and:
IOKitDebug=65535
It seems
IOPCIPrimaryMatch
to be the cause of the black screen of death.
We've tried it both with the hardware connected (where it should match) and disconnected (where at the worst, it should provide an error message - not a system crash).
I can provide the trace from the sudo dmesg after the system returns as well as the plist if you have any pointers.
Thanks!