Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

digory

macrumors newbie
Original poster
Jan 2, 2013
5
0
I'm trying to do Apple's "Kernel Extension" Tutorial. I've created a project file, created the Info.plist, built it, used kextlibs to learn the dependencies, added them to the Info.plist, rebuilt, copied to /tmp, used kextutil to test it. Everything fine so far. When I try loading the kext, though, my start/stop/probe functions never seem to get called. My IOLog messages don't appear in /var/log/system.log.

In fact, system.log does not show anything. kernel.log does after I activated kext logging with sysctl -w debug.kextlog=0x0007780E. kernel.log says: "Kext ch.digorydoo.driver.XinputDevice successfully resolved dependencies." Then: "Flushing nonloaded kexts and other unused data." Maybe my class immediately gets flushed?

My class appears at the end of kextstat, but with 0 references. The same with ioclasscount. In ioreg, my class does not appear.

I've set IOProviderClass to IOResources, so it should always have a reference, right? I've properly set IOMatchCategory.

Any help?!!?! Thanks a lot!

Here's my Info.plist:

Code:
<?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>${EXECUTABLE_NAME}</string>
    <key>CFBundleName</key>
    <string>${PRODUCT_NAME}</string>
    <key>CFBundleIconFile</key>
    <string></string>
    <key>CFBundleIdentifier</key>
    <string>ch.digorydoo.driver.${PRODUCT_NAME:rfc1034identifier}</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundlePackageType</key>
    <string>KEXT</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleVersion</key>
    <string>1.0.0</string>
    <key>IOKitPersonalities</key>
    <dict>
        <key>Generic Xinput Gamepad</key>
        <dict>
            <key>CFBundleIdentifier</key>
            <string>ch.digorydoo.driver.${PRODUCT_NAME:rfc1034identifier}</string>
            <key>IOProviderClass</key>
            <string>IOResources</string>
            <key>IOMatchCategory</key>
            <string>ch_digorydoo_driver_XinputDevice</string>
            <key>IOClass</key>
            <string>ch_digorydoo_driver_XinputDevice</string>
            <key>IOKitDebug</key>
            <integer>65535</integer>
        </dict>
    </dict>
    <key>OSBundleLibraries</key>
    <dict>
        <key>com.apple.kpi.iokit</key>
        <string>10.8</string>
        <key>com.apple.kpi.libkern</key>
        <string>10.8</string>
        <key>com.apple.kpi.mach</key>
        <string>10.8</string>
    </dict>
</dict>
</plist>
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.