Declaring CFBundleExecutable is explicitly saying the kext does have code, so I'm surprised the kext was even loading before. You might want to make sure there is no executable in your built product, too. Even if it's empty of custom code, it will cause a small amount of wired memory to be consumed unnecessarily.
I don't see anything overtly wrong with the plist, but it seems odd to me that you are instantiating IOService...which doesn't do much to drive hardware. My job ends once your driver is loaded, though, so maybe this is how things are supposed to with with the I/O Kit. Maybe you just look up the node from user space?
I must ask, though, if the idProduct and idVendor are different in each of the personalities. They are otherwise identical so copying them won't have any effect. If you do have different personalities for different architectures, you can use arch-specific properties on 10.6 and later. That should be in the documentation but basically you can do IOKitPersonalities_i386 and IOKitPersonalities_x86_64 and those will only be used on the appropriate architecture (in which case the plain IOKitPersonalities won't be used at all).
Nik
On 03 Jan, 2011, at 14:16 , Rammohan Akula wrote: Thanks Nik! I didn't realize that codeless kext does not require CFBundleExecutable. After removing CFBundleExecutable and OSBundleLIbraries, it loaded without any issues. To make it work on 32 bit and 64 bit machines, I have added two more entries for 'com.apple.kernel.iokit' identifier under IOKitPersonalities.
Below is the code from modified info.plist. This is working fine on 32 bit and 64 bit machines. Please let me know if there is any better way to do it.
<?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>CFBundleIdentifier</key> <string>com.mycompany.iokit.SPOTDriverExtension</string>
<key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string></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 BSL</key> <dict>
<key>CFBundleIdentifier</key> <string>com.apple.kernel.iokit</string> <key>IOClass</key> <string>IOService</string>
<key>IOProviderClass</key> <string>IOUSBInterface</string> <key>bConfigurationValue</key> <integer>1</integer> <key>bInterfaceNumber</key>
<integer>0</integer> <key>idProduct</key> <integer>xxx</integer> <key>idVendor</key> <integer>xxxx</integer>
</dict> <key>Device Driver Firmware</key> <dict> <key>CFBundleIdentifier</key> <string>com.apple.kernel.iokit</string>
<key>IOClass</key> <string>IOService</string> <key>IOProviderClass</key> <string>IOUSBInterface</string> <key>bConfigurationValue</key>
<integer>1</integer> <key>bInterfaceNumber</key> <integer>0</integer> <key>idProduct</key> <integer>xxx</integer>
<key>idVendor</key> <integer>xxxx</integer> </dict> <key>Device Driver BSL64bit</key> <dict> <key>CFBundleIdentifier</key>
<string>com.apple.kpi.iokit</string> <key>IOClass</key> <string>IOService</string> <key>IOProviderClass</key>
<string>IOUSBInterface</string> <key>bConfigurationValue</key> <integer>1</integer> <key>bInterfaceNumber</key> <integer>0</integer>
<key>idProduct</key> <integer>xxx</integer> <key>idVendor</key> <integer>xxxx</integer> </dict>
<key>Device Driver Firmware64bit</key> <dict> <key>CFBundleIdentifier</key> <string>com.apple.kpi.iokit</string> <key>IOClass</key>
<string>IOService</string> <key>IOProviderClass</key> <string>IOUSBInterface</string> <key>bConfigurationValue</key>
<integer>1</integer> <key>bInterfaceNumber</key> <integer>0</integer> <key>idProduct</key> <integer>xxx</integer>
<key>idVendor</key> <integer>xxxx</integer> </dict> </dict> </dict> </plist>
Thanks, Ram
On Mon, Jan 3, 2011 at 1:00 PM, Nik Gervae <email@hidden> wrote:
A kext with a CFBundleExecutable cannot be codeless. Is your kext really codeless?
<key>CFBundleExecutable</key>
<string>SPOTDriverExtension</string>
Nik
On 03 Jan, 2011, at 11:37 , Rammohan Akula wrote:
Thanks Nik!
Removing OSBundledLibraries from my info.plist is throwing below error:
SPOTDriverExtension.kext is invalid; can't resolve dependencies. SPOTDriverExtension.kext is invalid; can't resolve dependencies.
SPOTDriverExtension.kext is invalid; can't resolve dependencies. SPOTDriverExtension.kext has problems: Validation Failures: Info dictionary missing required property/value: OSBundleLibraries
I even tried by removed CFBundleInfoDictionaryVersion property but it's still the same.
Below is the complete code of my info.plist (masked product and vendor ids). Can you also suggest me the best way to have only one codeless kext for 32 bit (should work on Tiger and Leopard also) and 64 bit machines.
<?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>SPOTDriverExtension</string>
<key>CFBundleIconFile</key> <string></string> <key>CFBundleIdentifier</key> <string>com.mycompany.iokit..SPOTDriverExtension</string> <key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string> <key>CFBundleName</key> <string></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 BSL</key> <dict> <key>CFBundleIdentifier</key> <string>com.apple.kpi.iokit</string> <key>IOClass</key>
<string>IOService</string> <key>IOProviderClass</key> <string>IOUSBInterface</string> <key>bConfigurationValue</key>
<integer>1</integer> <key>bInterfaceNumber</key> <integer>0</integer> <key>idProduct</key> <integer>xxx</integer>
<key>idVendor</key> <integer>xxxx</integer> </dict> <key>Device Driver Firmware</key> <dict> <key>CFBundleIdentifier</key>
<string>com.apple.kpi.iokit</string> <key>IOClass</key> <string>IOService</string> <key>IOProviderClass</key> <string>IOUSBInterface</string>
<key>bConfigurationValue</key> <integer>1</integer> <key>bInterfaceNumber</key> <integer>0</integer> <key>idProduct</key>
<integer>xxx</integer> <key>idVendor</key> <integer>xxxx</integer> </dict> </dict> <key>OSBundleRequired</key>
<string>Local-Root</string> </dict> </plist>
Thanks, Ram
On Mon, Jan 3, 2011 at 11:11 AM, Nik Gervae <email@hidden> wrote:
A codeless kext needn't declare OSBundleLibraries, as it has no code that needs linking. You should be able to just delete that property.
Nik Gervae Apple, Inc.
On 27 Dec, 2010, at 17:57 , Rammohan Akula wrote:
Hi,
I have codeless kext that loads perfectly on 32 bit machines. When I am trying to load same kext, I am getting following error:
Dependency Resolution Failures: 64-bit kexts must use com.apple.kpi.* libraries, not com.apple.kernel* libraries.
I want my codeless kext to work on both 32 bit and 64 bit machines. Can anyone suggest what is the best way to make it work on both (32 bit / 64 bit).
Following is the code snippet from my info.plist (Masked product id and vendor id values).
<dict> <key>Device Driver BSL</key> <dict> <key>CFBundleIdentifier</key> <string>com.apple.kernel.iokit</string> <key>IOClass</key>
<string>IOService</string> <key>IOProviderClass</key> <string>IOUSBInterface</string> <key>bConfigurationValue</key>
<integer>1</integer> <key>bInterfaceNumber</key> <integer>0</integer> <key>idProduct</key> <integer>xxx</integer>
<key>idVendor</key> <integer>xxx</integer> </dict>
Thanks, Ram
_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list ( email@hidden)
This email sent to email@hidden
|