0

USBHIDデバイスにKEXTを実装してみます。ターミナルをチェックしている場合KEXTをロードできます。つまり
、Newtok:Desktop Rasheed $ kextutil-ntSampleKextDriver.kextカーネルファイルが指定されていません。リンクに実行中のカーネルを使用します。SampleKextDriver.kextはロード可能であるように見えます(ディスク上のライブラリのリンケージを含む)。
しかし残念ながら、私は上記のメッセージを受け取りました。私のplistファイルは

<?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>

どこが間違っていたのかわかりません。MacOSXの開発経験はあまりありません。誰でも最高のドキュメントやアイデアを提案できますか

あなたの情報をありがとう...

4

1 に答える 1

0

1.Kextをロードするときに-nオプションを使用しないでください。kextutil
の-nオプションは、シンボルファイルのみを生成するために使用されているようです。kextutil の-tオプションは、エラーが発生したときに失敗した理由を出力します。kextutil の詳細については、ターミナルでmankextutilと入力する必要があります。

2.ターミナルを開き、followコマンドを入力して、ドライバーが依存するKextのバージョンを確認することをお勧めします。(もちろん、ドライバーがサポートする必要のあるシステムの最低バージョンを指定する必要があります。)

kextstat | grep com.apple.iokit.IOHIDFamily
kextstat | grep com.apple.kpi.iokit
kextstat | grep com.apple.kpi.libkern

次に、ドライバーのinfo.plistのOSBundleLibrariesディクショナリを更新します。

3.これがuに役立つことを願っています。良い一日を過ごしてください!

于 2011-10-26T16:28:07.183 に答える