在KEXT MAC环境中未指定内核文件错误 [英] No kernel file specified Error On KEXT MAC Environment
问题描述
我尝试为USBHID设备实现KEXT。如果我正在检查Terminal是否能够加载KEXT,即
Newtok:Desktop Rasheed $ kextutil -nt SampleKextDriver.kext
没有指定内核文件;使用正在运行的内核进行链接。
SampleKextDriver.kext似乎是可加载的(包括磁盘库的链接)。
但不幸的是,我收到了上述消息。我的plist文件是
I try implement KEXT for USBHID Device. If i am checking on Terminal It able to load KEXT ie
Newtok:Desktop Rasheed$ kextutil -nt SampleKextDriver.kext
No kernel file specified; using running kernel for linking.
SampleKextDriver.kext appears to be loadable (including linkage for on-disk libraries).
But Unfortunately I Got the above Message. My plist File is
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>SampleKextDriver</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>com.apple.dts.driver.SampleKextDriver</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Mustahfa</string>
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>IOKitPersonalities</key>
<dict>
<key>Device Driver</key>
<dict>
<key>bConfigurationValue</key>
<integer>1</integer>
<key>bInterfaceNumber</key>
<integer>0</integer>
<key>CFBundleIdentifier</key>
<string>com.apple.dts.driver.SampleKextDriver</string>
<key>IOMatchingCategory</key>
<string>com_apple_dts_driver_SampleKextDriver</string>
<key>IOProviderClass</key>
<string>IOUSBDevice</string>
<key>idProduct</key>
<integer>4389</integer>
<key>idVendor</key>
<integer>8192</integer>
<key>IOClass</key>
<string>IOService</string>
<key>IOProviderClass</key>
<string>IOUSBInterface</string>
</dict>
</dict>
<key>OSBundleLibraries</key>
<dict>
<key>com.apple.iokit.IOHIDFamily</key>
<string>1.6.4</string>
<key>com.apple.kpi.iokit</key>
<string>10.7</string>
<key>com.apple.kpi.libkern</key>
<string>10.7</string>
</dict>
</dict>
</plist>
我不知道我做错了什么,我在Mac OS X开发方面经验不足。有人可以建议最好的文档或一些想法吗?
I don't know where i Did Wrong ,I do not have much experience in Mac OS X development. Can anyone please suggest the best documents or some Idea
感谢您的信息...
推荐答案
1.U在加载kext时不应使用-n选项。
kextutil 的-n选项似乎仅用于生成符号文件。
kextutil 的-t选项在发生错误时显示失败原因。
有关 kextutil 的更多详细信息,您应该在终端中键入 man kextutil 。
1.U should not using -n option when loading your kext.
The -n option for kextutil seems used to generate the symbol file only.
The -t option for kextutil print the failed reason when error occurs.
For more details about kextutil, u should type man kextutil in the Terminal.
2。我建议u打开终端并输入以下命令来确定驱动程序所依赖的Kexts版本。 (当然,您应该指定驱动程序需要支持的最低系统版本。)
2.I suggest u to open the Terminal and type follow commands to determine the version of the Kexts your driver depends on. (Of course, u should specify the lowest version of the system your driver needs to support.)
kextstat | grep com.apple.iokit.IOHIDFamily
kextstat | grep com.apple.kpi.iokit
kextstat | grep com.apple.kpi.libkern
然后更新驱动程序的info.plist的OSBundleLibraries字典。
then update the OSBundleLibraries dictionary of your driver's info.plist.
3。希望对您有用。祝你有美好的一天!
3.Hope this is useful for u. Have a good day!
这篇关于在KEXT MAC环境中未指定内核文件错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!