[黑蘋果]DSDT製作紀錄 如何修補筆記本電腦的DSDT和SSDT
前言:
在製作黑蘋果筆電的過程當中我一直以來都是受到許許多多網路上的前輩指導
網路上的前輩都把他們的經驗寫得很清楚
一步一腳印的帶領著黑蘋果小白們實作
玩黑蘋果到現在,其實我還算是小白一枚XD
還有許許多多的知識還不太清楚
所以希望整理一下我有用到的資料
讓以後的後進們有一個學習的指引
教學影片:https://www.youtube.com/watch?v=hFhvLkVU_kU
參考文章:https://www.tonymacx86.com/threads/guide-patching-laptop-dsdt-ssdts.152573/
步驟:
1. 生成DSDT/SSDT檔案
首先在clover bootloader介面按下”F4”按鈕,生成DSDT/SSDT檔案(檔案會存於EFI/CLOVER/ACPI/original裡面),把他拉到桌面
並新增一個patched資料夾



2. 挑選檔案
新增一個01_original_pick資料夾,並把需要的檔案(DSDT/SSDT)挑選出來,如下圖,並存放於01_original_pick資料夾內(帶有x字樣的檔案不要)

3. 安裝iasl程式
把iasl檔案放到usr/binIasl檔案下載處:https://bitbucket.org/RehabMan/acpica/downloads/


#發現10.15.X以上對檔案管理的權限提高了
#需要對檔案使用以下程式碼做搬移
sudo cp /Users/beebreeze/Downloads/iasl /usr/bin
4. 對aml檔案進行轉檔
對資料夾01_original_pick下的aml檔案進行轉檔利用以下code把存放在桌面上的aml檔案轉成dsl檔案

iasl -dl DSDT.aml SSDT*.aml
5. 收集dsl檔案
轉換完成後新增一個02_disassembled資料夾並把轉檔好的dsl放到該資料夾下
完成如下圖

6. 編輯dsl檔案
開始編輯dsl檔案利用MaciASL編輯dsl檔案

檔案下載處:https://bitbucket.org/RehabMan/os-x-maciasl-patchmatic/downloads/
利用MaciASL對DSDT.dsl進行編輯

點擊compile進行編譯

7.除錯

錯誤一(Line4612):把錯誤code取代就好

錯誤二(Line5152):Zero錯誤 把它刪去就好了

錯誤三:"Unknown ASL Compiler Exception ID : TGPC (Integer)"
解決方法:
1.刪除External (_SB_.PCI0.PEG0.TGPC, IntObj) // (from opcode)
2.刪除External (_SB_.PCI0.RP05.TGPC, IntObj) // (from opcode)
參考資料:https://github.com/stonevil/Razer_Blade_Advanced_early_2019_Hackintosh
8.patch文本

詳細patch 的項目如下面附錄所示
9.存成dsl檔案
編輯完成之後存成dsl檔案
再把檔案放到EFI/Clover/ACPI/patched裡就大功告成了
(在製作的過程當中我有把轉成aml的檔案放進去過,但是沒有成功)
附錄
Common patches for dsdt
1. Rename _DSM methods to XDSM2. "Fix _WAK Arg0 v2"
3. "HPET Fix"
4. "SMBUS Fix"
5. "IRQ Fix"
6. "RTC Fix"
7. "OS Check Fix(windows 8)"
8. "Fix Mutex with non-zero SyncLevel"
9. Add IMEI
10. Rename GFX0 to IGPU
11. Fix _WAK IA0E
12. Rename B0D3 to HDAU
13. Fix ADBG Error
14. Fix PARSE0P_ZERO Error
Common patches for ssdt
1. Rename _DSM methods to XDSM2. Rename GFX0 to IGPU
3. Rename B0D3 to HDAU
4. Clean/Fix Errors (SSDT)
5. Remove _PSS placeholder
留言
張貼留言
歡迎留下您的心靈足跡👍