Question

I ran kextlibs against my kext, and it told me to use:

com.apple.kpi.bsd = 12.2
com.apple.kpi.libkern = 12.2

this runs fine on my development machine (10.8). But when I run it on another machine (running 10.7) it doesn't load, saying:

Dependency Resolution Failures: 
Only incompatible kexts found for these libraries: 
    com.apple.kpi.bsd
    com.apple.kpi.libkern

How do I work out which versions to link against if I want to target a range of Mac OS versions (10.6 to 10.8)?

Was it helpful?

Solution

The KPI "bundles" (com.apple.kpi.*) are versioned by the Kernel's Darwin version number.

  • The Darwin major number is the OSX minor number plus 4 - so OSX 10.8 is Darwin 12, 10.7 is 11, 10.6 is 10, etc. (this is at least true going back to OSX 10.4, I don't have any experience with 10.3 or older)
  • The Darwin minor number is the OSX revision number - so OSX 10.8.2 is Darwin 12.2, OSX 10.6.8 is Darwin 10.8, OSX 10.7 is Darwin 11.0 etc. (An OSX/macOS revision occasionally increments by more than one Darwin minor version, for example macOS 10.14.1 is Darwin 18.2.0.)

The IOKit Families (e.g. IOPCIFamily, IOStorageFamily, etc.) have their own versioning schemes. The way to handle these is to look at the bundle version (CFBundleVersion) property in the Info.plist in the relevant kext (IOPCIFamily.kext, IOStorageFamily.kext, etc.) for the oldest OSX version you want to support. Or, just run kextlibs while running that OS version - kextlibs will always print the kext/kpi version numbers for the running version of OSX.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top