Thank you for reminding me of the obvious. Actually I did that in the meantime. Assuming I find a patched Kext, how to apply it then?
thanks,
Ludwig
Well, you can install it with Kext Wizard and see if it works. Be prepared to recover from a KP at boot, because you must realize whatever you find could be done improperly or for an old version of the OS. So hopefully you still have your Unibeast USB, such that you can boot into the OS X installer, get to Terminal, and remove it if it causes a problem (the boot with "-f" after removing).
If it was me, I'd do some initial checks on the kext:
- what is the version? Use Get Info in Finder or examine the Info.plist in AppleHDA.kext/Contents/Info.plist
- what files do you see in AppleHDA.kext/Contents/Resources? Do you see Platforms.xml or Platforms.xml.zlib. If it is Platforms.xml, then it is probably quite old and patched from a Lion kext. If it is Platforms.xml.lib, then it is at least from ML.
- What layout files do you see in Resources? Hopefully only one. Does the layout match the layout-id in your DSDT?
If it checks out, you can try it.
And if it works, then you can create a patch script to patch the current AppleHDA borrowing certain files and certain sections of the Info.plists.
I use this script, combined with bcc9's AppleHDA binary patcher for the 4x30s, as an example:
Code:
# patch AppleHDA.kext for 4x30s
unpatched=./unpatched
rm -Rf patched
mkdir patched
echo !!! Patching AppleHDA 4x30s !!!
mkdir ./patched/4x30s
cp -R $unpatched/AppleHDA.kext ./patched/4x30s
cd patchhda.1.1
perl ./patch-hda.pl 'IDT 76d1' -s ../patched/4x30s
cd ..
rm ./patched/4x30s/AppleHDA.kext/Contents/Resources/layout*
cp ./Resources-4x30s/* ./patched/4x30s/AppleHDA.kext/Contents/Resources/
plist=./patched/4x30s/AppleHDA.kext/Contents/PlugIns/AppleHDAHardwareConfigDriver.kext/Contents/Info.plist
/usr/libexec/plistbuddy -c "Delete ':IOKitPersonalities:HDA Hardware Config Resource:HDAConfigDefault'" $plist
/usr/libexec/plistbuddy -c "Delete ':IOKitPersonalities:HDA Hardware Config Resource:PostConstructionInitialization'" $plist
/usr/libexec/plistbuddy -c "Merge 4x30s.plist ':IOKitPersonalities:HDA Hardware Config Resource'" $plist
The 4x30s.plist is built by stealing parts of AppleHDA.kext/Contents/PlugIns/AppleHDAHardwareConfigDriver.kext/Contents/Info.plist from the patched kext:
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>HDAConfigDefault</key>
<array>
<dict>
<key>CodecID</key>
<integer>287143633</integer>
<key>ConfigData</key>
<data>
AMcegQDHHwM=
</data>
<key>FuncGroup</key>
<integer>1</integer>
<key>LayoutID</key>
<integer>12</integer>
</dict>
</array>
</dict>
</plist>