我正在尝试为OSX编写PCI复合视频采集卡的驱动程序。
kext构建得很好,但是当我尝试加载它时,我得到了这个:
Diagnostics for /System/Library/Extensions/Conexant878.kext:
Code Signing Failure: code signature is invalid
WARNING - Invalid signature -67030 0xFFFFFFFFFFFEFA2A for kext "/System/Library/Extensions/Conexant878.kext"
(kernel) kxld[com.akasaka.Conexant878]: The following symbols are unresolved for this kext:
(kernel) kxld[com.akasaka.Conexant878]: __ZN11IOPCIDevice22_RESERVEDIOPCIDevice16Ev
(kernel) kxld[com.akasaka.Conexant878]: __ZN11IOPCIDevice22_RESERVEDIOPCIDevice17Ev
(kernel) kxld[com.akasaka.Conexant878]: __ZN11IOPCIDevice22_RESERVEDIOPCIDevice18Ev
(kernel) kxld[com.akasaka.Conexant878]: __ZN11IOPCIDevice22_RESERVEDIOPCIDevice19Ev
(kernel) kxld[com.akasaka.Conexant878]: __ZN11IOPCIDevice22_RESERVEDIOPCIDevice20Ev
(kernel) kxld[com.akasaka.Conexant878]: __ZN11IOPCIDevice22_RESERVEDIOPCIDevice21Ev
(kernel) kxld[com.akasaka.Conexant878]: __ZN11IOPCIDevice24getDeviceMemoryWithIndexEj
(kernel) Can't load kext com.akasaka.Conexant878 - link failed.
(kernel) Failed to load executable for kext com.akasaka.Conexant878.
(kernel) Kext com.akasaka.Conexant878 failed to load (0xdc008016).
(kernel) Failed to load kext com.akasaka.Conexant878 (error 0xdc008016).
Failed to load /System/Library/Extensions/Conexant878.kext - (libkern/kext) link error.
Check library declarations for your kext with kextlibs(8).
kextlibs输出如下:
For all architectures:
com.apple.iokit.IOPCIFamily = 2.9
com.apple.kpi.iokit = 13.4
com.apple.kpi.libkern = 13.4
For x86_64:
7 symbols not found in any library kext:
__ZN11IOPCIDevice24getDeviceMemoryWithIndexEj
__ZN11IOPCIDevice22_RESERVEDIOPCIDevice16Ev
__ZN11IOPCIDevice22_RESERVEDIOPCIDevice18Ev
__ZN11IOPCIDevice22_RESERVEDIOPCIDevice20Ev
__ZN11IOPCIDevice22_RESERVEDIOPCIDevice17Ev
__ZN11IOPCIDevice22_RESERVEDIOPCIDevice19Ev
__ZN11IOPCIDevice22_RESERVEDIOPCIDevice21Ev
我的Info.plist包含我认为在这种情况下是必要的所有OSBundleLibraries,但这仍然是一个禁忌:
...
<key>IOClass</key>
<string>ConexantTuner</string>
<key>OSBundleRequired</key>
<string>Local-Root</string>
<key>IOPCIMatch</key>
<string>0x036e109e</string>
<key>IOProviderClass</key>
<string>IOPCIDevice</string>
<key>IOKitPersonalities</key>
<dict/>
<key>OSBundleLibraries</key>
<dict>
<key>com.apple.iokit.IOPCIFamily</key>
<string>1.0.0b1</string>
<key>com.apple.kpi.mach</key>
<string>8.0</string>
<key>com.apple.kpi.unsupported</key>
<string>8.0</string>
<key>com.apple.kpi.iokit</key>
<string>8.0</string>
<key>com.apple.kpi.libkern</key>
<string>8.0</string>
<key>com.apple.kpi.bsd</key>
<string>8.0</string>
</dict>
</dict>
</plist>
我还可以尝试确定我需要依赖的其他内容才能使其发挥作用?
提前致谢。
未解析符号的C ++ Filt输出:
IOPCIDevice::getDeviceMemoryWithIndex(unsigned int)
IOPCIDevice::_RESERVEDIOPCIDevice16()
IOPCIDevice::_RESERVEDIOPCIDevice18()
IOPCIDevice::_RESERVEDIOPCIDevice20()
IOPCIDevice::_RESERVEDIOPCIDevice17()
IOPCIDevice::_RESERVEDIOPCIDevice19()
IOPCIDevice::_RESERVEDIOPCIDevice21()
答案 0 :(得分:2)
听起来您正在构建的SDK版本与您尝试加载kext的OS X版本不匹配。与OS X用户空间不同,设置&#34;部署目标&#34;到驱动程序支持的最低OS X版本是不够的。出于保留虚拟功能的原因,您还必须使用与最早支持的OS X版本匹配的OS X SDK版本。
所以,例如也许您正在使用10.10或10.11 SDK进行构建,但是正在尝试在10.9上加载kext。那不会奏效。使用Xcode 6.3.2(10.9 SDK附带的最新版本),选择10.9 SDK,并使用它构建。