Created
April 23, 2017 21:20
-
-
Save EugenMayer/0053f5ad70d8aaa4c7f720eefa29c983 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
# compile | |
echo compiling ACPI tables | |
cd ./ACPI-Tables && iasl -dl -da SS*.aml DSDT.aml && cd .. | |
# patch 1 - DSDT name | |
# patch 2 - rename XHCI to XHC | |
# patch 3 - KBD device | |
# patch 4 - nolonger needed: -e's/\\_SB.PCI0.LPC.EC.HWAC/B1B2(\\_SB.PCI0.LPC.EC.WAC0,\\_SB.PCI0.LPC.EC.WAC1)/' | |
rm -f result/* && mkdir -p result | |
cat ACPI-Tables/DSDT.dsl | sed \ | |
-e's/DSDT-or/DSDT/' \ | |
-e's/XHCI/XHC/g' \ | |
-e's/KBD/PS2K/g' -e's/WPS2K/WKBD/g' -e's/PPS2K/PKBD/g' \ | |
> result/origin_DSDT.dsl | |
########################################## | |
./patchmatic_auto_patch.bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
#mount esp | |
if [ ! -d /Volumes/ESP ]; then | |
echo please mount your OSX EFI partition into /Volumes/ESP | |
exit 3 | |
fi | |
#compile | |
iasl -ve *.dsl | |
#find product name | |
s=$( ioreg -c FakeSMCKeyStore | grep product-name | sed -e's/"//g' ) #"product-name" = "41786UU" | |
productname=${s#* = } | |
if [[ -e /Volumes/ESP/EFI/CLOVER/OEM/$productname ]] ;then | |
rm /Volumes/ESP/EFI/CLOVER/OEM/$productname/ACPI/patched/* | |
cp ss* SS* DS* /Volumes/ESP/EFI/CLOVER/OEM/$productname/ACPI/patched/ | |
else | |
rm -f /Volumes/ESP/EFI/CLOVER/ACPI/patched/* | |
ls | grep SS && cp SS* /Volumes/ESP/EFI/CLOVER/ACPI/patched/ | |
echo copying DSDT.* to /Volumes/ESP/EFI/CLOVER/ACPI/patched/ | |
cp DSDT*.aml /Volumes/ESP/EFI/CLOVER/ACPI/patched/ | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment