Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jan 5, 2013, 02:48 AM   #1
digory
macrumors newbie
 
Join Date: Jan 2013
Can't get started with kext development

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>
digory is offline   0 Reply With Quote
Old Jan 5, 2013, 09:15 AM   #2
digory
Thread Starter
macrumors newbie
 
Join Date: Jan 2013
Problem solved. In case you wonder, look here:
http://stackoverflow.com/questions/1...72816#14172816
digory is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
AppleHWSensor.kext harrymatic PowerPC Macs 2 May 4, 2014 10:27 AM
Made a Kext Installer... ifrit05 PowerPC Macs 13 Jan 21, 2014 01:55 AM
new laptop needed for web development/game design/app development olup Web Design and Development 6 Oct 2, 2013 03:09 PM
Passing a string(in user mode) to kernel kext(kext have a dynamic buffer) mehdies Mac Programming 0 Apr 28, 2013 01:22 AM
Please compile this kext. rabidz7 Mac Programming 7 Apr 18, 2013 07:13 PM

Forum Jump

All times are GMT -5. The time now is 12:25 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC