ThinkPad T420 clover引导安装黑苹果(x220和T520也适用)

原文链接:http://www.insanelymac.com/forum/topic/285678-lenovo-thinkpad-t420-with-uefi-only/page-25#entry1952283

原文作者:tluck

 

说明:本文以Lenovo T420作为原型,可以支持x220/t420/t520,另有额外的t420s提供扩展支持。

(这是原始教程,翻译下来很吃力,很多东西我自己也没办法解释,辅助翻译也是乱七八糟的,如果你成功安装了,参照我的简化版操作一下就行

简要理解就是:

(1).从github下载T420所需的文件,然后使用其中的EFI文件,选择适合你屏幕分辨率的config.plist文件,重命名为config.plist.

(2)恢复bios默认设置,系统更改为仅UEFI引导.

(3)制作USB安装盘,使用下载的EFI文件替换原有的Clover.

(4)使用引导安装系统,(安装盘的ESP分区剩余容量必须大于200M,否则格式化磁盘的时候会提示空间不足,格式化失败)

(5)安装完成后继续把EFI文件复制到本地硬盘的ESP,这时你的系统已经可以正常引导和运行

(6)这时候的系统可能没办法调整屏幕亮度和没有声音输出,再看看对应的部分修复一下

(7)至于其他的,自己慢慢了解之后再去看吧,需要积累一定的知识)

 

Lenovo T420 Clover 指导2017716日更新

  • 更新Clover r4115,文件存储于:https://github.com/tluck/Lenovo-T420-Clover/releases/tag/v2107.07.16
  • 主题和EFI文件支持到High Sieera(beta)
  • 切换AppleHDA_20672Lilu+AppleALC(以T420为模型)

在过去6个月的各种更新情况

  • Release v2017.05.14 Clover r4070 x  on GitHub
    • 修复DualLink的一些问题
    • 修改 config.plist 为新的new plist EDID格式
    • 添加 RehabMan's AppleBacklightInjector方法控制LCD品目亮度 (for 10.12.4 or later)
    • 移除 IntelBackLight.kext (option for 10.12.3 或者更早的版本)
  • Release v2017.04.03 Clover r4052 on GitHub 
  • 更新 FakeSMC.kext HWMonitor installer.pkg
  • 更新 VoodooPS2Trackpad kext Info.plist - setting to ignore larger bogus jumps.
  • 修订 _kext-install.command 脚本
  • 修订 VoodooPS2Controller kext- 修复冷启动可能出现TrackPoint无法使用的问题- 一个基于Jakibaki's cut/paste + TrackPoint Scroll.
  • RGB only-mode 修复:- 更新 config.plist 1600x900 EDID to be RGB mode only- 更新 the DSDT with an EDID with new RGB EDID- 更新 DisplayOverides to matchFakeSMC and HWMonitor kexts/app 更新到最新版本 - see Utilities folder for full installation tool.
  • 修订可选 DSDT温度和风扇控制:  dsdt.heat-step.aml (v3)
  • 匹配ACPIPolller.kext 支持 DSDT "heat-step" 的方法
  • 添加 config.plist 区分10.11 and 10.12 kext patches
  • 1363x768 config.plist移除EDID
  • 更新 VoodooPS2Controller kext with a common version at the 1.8.25 revision level.-- to use "Multi-Pad" PrefPane setting for Sierra-- 修复TrackPad空白 - keyboard set to ANSII layout-- smooth scrolling implemented - thanks to Michael Belyaev-- 修复大写锁定 -- remove cut/paste (middle mouse) so scrolling with TrackPoint works-- 移除自定义键盘映射for F1-F15 for Sierra
  • 更新 IntelMausiEthernet kext到最新版本
  • 改变Bluetooth.kext注入方式替代原有的注入方式 - 没有特殊的版本限制
  • 修订 ThinkPad 主题 - new banner etc
  • 增加 DSDT for "heat-step" - An optional DSDT that needs ACPIPoller.kext or HWMonitor ACPISensors.kext for polling of ACPI to change fan speed as function of Temperature. 
  • 清理 PNLF device in DSDT
  • 更新 DisplayOverride文件和添加FHD (1920x1080) option for 1600x900 screens.
  • 更新 theme plist file (removes F1:help text from lower left corner)
  • 改变 Clover config.plist CsrActiveConfig setting to 0x43 - to fix HD3000 glitches
  • 更新 AppleHDA_20672.kext  for 10.11.4+ and later changes
  • 添加 OsxAptioFixDrv-64.efi driver as option (默认禁用)
  • Put explicit Model MBP8,1 definition in config.plist
  • Dropping testing on Mavericks 10.9.x
  • 更新 iasl tool
  • 重命名 .bash files to .command (can run from Finder or command line)
  • 添加 VoodooPS2Daemon in Utility folder
  • DSDT mods - 添加 Fn+End and Fn+Home another way to control screen brightness - other misc 修复 to remove PRW Methods to fix sleep
  • Changes in support of El Capitan - _kext-install.command and _post_install_network_reset.command -- these put custom kexts in /Library/Extensions vs /System/Library/Extensions
  • 修订 config.plist to remove 添加 security (SIP) in El Capitan
  • 自定义或者额外kexts独立(except BroadcomBluetooth) and 添加到 /Library/Extensions 
  • 更新 to use IntelBacklight.kext instead of ACPIBacklight.kext  - Thanks to RehabMan
  • Switched to Mieze's modern Intel LAN Ethernet Kext (IntelMausiEthernet.kext v2) - replaces older v2 AppleIntelE1000e.kext - Thank you!!!
  • Switched to OsxApioFix2Drv-64.efi since it allows hibernation and works fine.
  • 添加 ACID SMC key in FakeSMC.kext Info.plist for AC power support for T420 on 10.10 and later - A custom install pkg is included - see the Utility folder in the Zip.
  • 添加 universal time registry fix for dual boot with Windows for consistent time.
  • Tweaked _kext-install.command 脚本 to fix/recreate symbolic links for custom kexts.
  • Using VBoxHfs-64.efi instead of HFSPlus-64.efi
  • 添加 a DSDT for T420s vs T420 (provided by pokenguyen)
  • Consolidated kexts into the Other directory vs specific version (10.11 10.10 ) since most kexts are not version specific.
  • ThinkPad Theme - minor tweaks to add Yosemite and El Capitan icons.  This theme 修订 and committed to Clover addition kext source tree.
  • Tweaked config to actually use NVRAM boot drive selection on startup. (Can specify startup disk in System Prefs and restart will use it.)
  • Recompiled RehabMan's VoodooPS2Controller.kext with 添加 Lenovo T420 sections for Keyboard/TouchPad/TrackPoint
  • 添加 Platforms.xml file for use with Docking Station (and No-Dock default) option in AppleHDA_20672.kext
  • New custom kexts AppleHDA_20672.kext and BroadcomBluetooth_T420.kext are 添加. Huge thanks to vladichimescu for showing me this kext method.
  • New Clover config.plist files for on-the-fly HDA kext patching. No need to replace any kexts after updates anymore.
  • Removed EmuVariableUefi-64.efi driver to use native NVRAM (vs /nvram.plist) - see note below on how to migrate.
  • Removed drop MCFG table from config.plist files. Use at your own discretion to get Nvidia/Optimus working.
  • 添加 drop table DMAR so VT-d does not have to be disabled in bios

 

安装概述

这个zip文件是完整的ESP/kext pack Lenovo T420使用Clover 引导macOS

 

  • 这个文件支持Sierra and El Capitan. I 我只在当前系统稳定版本测试(并不能保证测试版能正常使用).
    • 完整的EFI文件配置:定制config.plist + 定制kexts + 自定义DSDT
    • 完整的EFI文件通过github发布,发布地址: GitHub
  • EFI文件内提供两个不同屏幕分辨率的配置文件:
    • for high-res LCD (1600x900) (has EDID patch)
    • for low-res LCD  (1366x768)
  • Non-maintained Mountain Lion Kext Bundles for 10.8.4 are in post #241 and 10.8.5 in post #397
  • L420 Guide kosakgroove提供并维护

怎样选择Clover vs Chameleon?

  • 本机UEFI引导支持macOS GPT磁盘上(Windows).
  • 支持Macos安装和从App Store升级
  • 支持Recovery HD for system recovery, iMessage, Find My Mac, etc.
  • 动态 DSDT and Kext patching.

警告:  

我的系统是 Lenovo T420,屏幕是分辨率为1600x900 LCD Intel HD 3000 Graphics.,没有独立显卡,这个EFI文件仅支持我的机型。

类似的机型 - 比如 T420s, T420i, T520 and W520 family - 可能需要修改 config.plist DSDT. In the DSDT (.dsl)文件这些改变需要根据自己的机型修改,如果你的机型和我的一样,这份EFI文件也适合引导你的电脑。这个指南包括2个部分:(1)如何创建一个USB安装程序和安装macOS (2)如何完成操作系统安装运行macOS

新安装步骤和细节

   

BIOS 设置:

- 建议使用 BIOS v1.46 (现在也支持v1.48 and v1.49 mods)- 推荐: reset to defaults(重置BIOS设置为默认值). 大部分设置按照默认设置即可:- 设置 Config / Serial ATA (SATA) / SATA = AHCI - 设置 Security / Memory Protection / Execution Prevention = Enabled- 禁用 Nvidia/Optimus (use integrated HD 3000 only - unless you really know what you are doing!) 

术语:

GPT = GUID分区表MBR = 主引导记录ESP = EFI系统分区, the ESP is created automatically as the first (hidden) partition by the Disk Utility when the GPT option is selected for partitioning a disk. Note: 自定义DSDT is 基于BIOS v1.46 (flashed with whitelist mod or original)

 

系统安装

   

这个过程需要一个新的 macOS USB安装程序, 如果你从一个旧版本macOS升级 (say from El Capitan to Sierra) 在你的电脑上已经存在 Recovery HD分区, 你可以跳过步骤2和步骤4来更新ESP分区. 在你升级系统之前,你需要先更新EFI/CLOVER文件为最新,保证EFI文件和新版系统兼容。 重新运行_kext-install.command脚本将新的kext文件安装到L/E分区.

 

  • 从这里下载最新的EFI文件: GitHub Lenovo T420 Clover Latest Release.解压文件,这个文件将为USB安装盘和系统正常运行提供UEFI引导。 
  • App Store 下载最新系统- they are freely available可以从"App Store"下载的镜像制作一个标准的MacOS USB安装引导.下载的EFI文件为USB安装盘提供UEFI引导 
  • 安装MacOS系统到GPT格式磁盘, macOS.app Apple Store下载.

创建一个macOS USB安装程序

  • 容量大于8GB USB盘,格式化为GUID Partition Table (GPT)- 使用Partition Options... 从菜单里面选择将MBR分区更改为GPT分区- 名字建议命名为USB - 这可以使用下面的命令直接制作USB安装盘.- 使用格式: Mac OS Extended (Journaled) (formerly OS X Extended)

注意: 如果你的U盘比较大 (say 16GB) ,你可以尝试分成两个分区使用 
  • 运行下面这个命令复制镜像到U:注意:如果使用旧版本的macOS,替换为相应的应用程序名称。
  • sudo /Applications/Install\ macOS\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/USB --applicationpath /Applications/Install\ macOS\ Sierra.app --nointeraction

安装Clover U

    安装CloverU    a ) 手动挂载(mount) the ESP of the USB    b ) 如果没有完成,下载的EFI文件并解压,存储目录不用更改 ~/Downloads/Lenovo-T420-Clover-YYYY.MM.DD (this file set is the Zip)

Lenovo-T420-Clover-日期,把其中的日期更改为YYYY.MM.DD,例如Lenovo-T420-Clover-2017.07.16文件夹,重命名为Lenovo-T420-Clover-YYYY.MM.DD,路径不变,方便直接使用命令,必要时自己变通一下。    c ) 复制EFI 文件夹到USBESP分区

    例如, 你的USB分区是disk1:(仅仅是示例)    sudo mkdir /Volumes/ESP-USB

    sudo mount -t msdos /dev/disk1s1 /Volumes/ESP-USB

    cp -a ~/Downloads/Lenovo-T420-Clover-YYYY.MM.DD/EFI/ /Volumes/ESP-USB/EFI    Note: 运行"diskutil list" 确定你的USB分区的分区标识       

    根据你的机型的屏幕分辨率的config.plist文件复制到Clover目录下,重命名为config.plist /Volumes/ESP-USB/EFI/CLOVER:Rename the configuration file config.1600x900.plist to config.plist or rename config.1366x768.plist to config.plist.

    例如1600x900 LCD:

    cd /Volumes/ESP-USB/EFI/CLOVER

    mv config.1600x900.plist config.plist

使用CloverUSB安装盘引导安装MacOS

  • 格式化安装macOS 分区为GPT分区

确保你格式化的分区已经做好备份,否则将无法恢复:   分区方案: GUID Partition Map (GPT)  分区名称: macOS   分区类型: macOS Extended (Journaled)

多引导提示:如果你打算从同一磁盘引导其他系统 - DO NOT make the 2nd partition NTFS or ExFAT with the Disk Utility app.Make them both "Mac OS Extended (Journaled)"Size the 2 partitions appropriately - but later you will delete/reformat the 2nd partition for Windows. 
  • 点击GUI 安装菜单,完成安装大概需要 30-45 minutesssd会更快,USB3.0端口也更快,但容易失败Follow these Notes and Tips:
  • 当安装程序屏幕显示:"对一个蓝牙键盘,打开它,等待你的电脑连接。(When the installer screens shows: "To pair a Bluetooth keyboard, turn it on and wait for your computer to connect to it.")可以按空格键跳过这一步. 
  • 安装程序似乎卡在第二阶段时:  "About a second remaining"不要慌张,请耐心等待10min左右,安装后继续从USB引导.只是等待安装程序重新启动电脑并继续安装.整个安装过程大约需要1个小时才能完成. 
  • 在第一次从本地硬盘启动会提醒:  "How Do You Connect?"选择:我的电脑不能连接到Interneta
  •     您可以设置网络之后kext安装网卡驱动程序。
  •     你的英特尔无线网卡不会工作,需要更换为高通或者是博通兼容版本的无线网卡,关于无线网卡的选择可以参照无线网卡兼容参考,也可以简要地概述为:A.不用刷bios白名单,这时候只能选择Lenovo拆机的ar928x,性能不是很好
  •          B.更改bios白名单(可能会有刷坏的风险,自己掌握好相关知识):这时候可以选择更换miniPCI卡,也就是半高卡,其中两天线最好的选择为BCM94352,有Lenovo版带FRU,也可以上全高卡,但未测试,如果选择BCM94360或者AR0380mac拆机卡,可能需要新增天线,请查询相关资料。

     

    安装完成之后,设置引导磁盘

     

    •         1.USB启动Clover 在启动时,安装 F12 选择USB boot -  现在选择从安装macOS的分区引导进入系统.  

Note: 在磁盘上你可能会看到三个引导项,而不是预期的2项, - macOS + Recovery HD - 注意确定你选择引导的项目是安装的MacOS而不是 Recovery HD. 看下面的步骤3移除逻辑卷来消除这个问题。 

        2.完成安装步骤和登录    Note: 这将从USB引导并启用Cloverkext注入功能 (for now).  

        3.将逻辑卷转换为物理卷     完整的安装程序应该使用逻辑卷, 为此我使用一个简单的命令完成这个功能.在终端执行

        sudo diskutil corestorage revert /

        4,安装Clover到硬盘分区    下载我提供的T420EFI文件到本地硬盘,本地硬盘的ESP分区和USB分区用的EFI文件完全相同

        手动挂载ESP分区,将EFI文件夹复制到硬盘的ESP分区,类似于 /Volume/ESP/EFI/CLOVER/.就像你做USB引导盘的时候一样,选择一个适合你的屏幕的config.plist文件,然后重命名为config.plist.如果你之前安装过Windows,需要将原EFI文件夹里面Microsoft文件夹复制到新的EFI文件夹内。(其实这个部分命令太麻烦,只要明白意思直接手动复制粘贴更方便,可以把原来的EFI文件夹重命名的old EFI作为备份,如果有Windows的引导,将那部分复制到新的EFI文件夹内就好)

        另外将从github下载的文件夹Lenovo-T420-Clover-2017.07.16(其他的类似,重命名为Lenovo-T420-Clover-YYYY.MM.DD,这样可以直接使用教程里面的命令,这是自己脑子转转弯)

        在终端执行如下命令:

        sudo mkdir /Volumes/ESP

        sudo mount -t msdos /dev/disk0s1 /Volumes/ESP

        cp -a ~/Downloads/Lenovo-T420-Clover-YYYY.MM.DD/EFI/ /Volumes/ESP/EFI

        cd /Volumes/ESP/EFI/CLOVER

        mv config.1600x900.plist config.plist

        5.安装Kexts到硬盘的 /Library/Extensions目录

    a ) For 10.12.4+: 创建一个自定义的 AppleBackLightInjector.kext(这是修复屏幕亮度的关键,dsdt已经给你改好了,如果不理解,多看两遍)这种方法取代了IntelBacklight.kext (仍作为一个可选的kext) 可能需要手动去删除,也可以不用管。

    现在创建一个符合你的屏幕的Backlight注入. 目前这个脚本在 ../../EFI/CLOVER/kexts/Other目录 - 将下载的zip文件解压到本地,命名为Lenovo-T420-Clover-YYYY.MM.DD后,在终端执行以下命令:

        cd ~/Downloads/Lenovo-T420-Clover-YYYY.MM.DD/Utilities/Create_AppleBacklightInjector_kext/

        sudo ./createAppleBacklightInjector.command

        b )  安装kexts到本地硬盘    安装Lenovo-T420-Clover-YYYY.MM.DD/EFI/CLOVER/kexts/目录下kexts /Library/Extensions 目录,直接运行:

        cd ~/Downloads/Lenovo-T420-Clover-YYYY.MM.DD/EFI/CLOVER/kexts/

        sudo ./_kext-install.command

        6.有线网设备安装

    这一步将启用有线网卡kext 和重置有线网设备端口为 en0 (这是登录AppStore and iMessage等所必须的)    Note:在终端运行以下命令(这一步不是很必要,可以跳过): 

        sudo kextload /Library/Extensions/IntelMausiEthernet.kext

        sleep 10

        sudo rm       /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist

        7建议选择: 安装/复制DisplayVendorID-* directories 这些都包含在zip文件内,应该复制到 /System/Library/Displays/Contents/Resources/Overrides目录下。

        sudo cp -a ~/Downloads/Lenovo-T420-Clover-YYYY.MM.DD/\:System\:Library\:Displays\:Contents\:Resources\:Overrides/DisplayVendorID-* /System/Library/Displays/Contents/Resources/Overrides/

        对于Yosemite和更早的版本, 这些文件应该复制到/System/Library/Displays/Overrides目录    Note: 这些文件提供更多的颜色矫正和伽玛曲线、以及更多尺寸的LCD屏幕选择。 

        8.移除USB,重新启动电脑,从本地Clover引导系统    Note: 第一次启动可能需要(macOS) verbose mode(基本上不需要,直接启动即可).

     

    已知问题和随机小贴士:

    • "Black" Screen(黑屏) - 点击"Pause(暂停)" (or FN ) 是增加屏幕亮度的关键(LCD brightness) - 有时nvram保存的亮度和屏幕亮度不同步(这是随机产生的) 
    • 因特尔的无线网卡在MAC下不会工作,你需要更换为联想拆机的AR928x(不需要刷白名单,性能一般),或者是更换为兼容的Broadcom or Atheros chip的无线网卡,这需要将本机BIOS移除白名单限制,二选一. 
    • Clover可能存在2个可选引导项Logical Volume vs Standard Volume. 恢复logical volume as Yosemite类似于新的引导磁盘, 所以Clover 出现多个引导项,可以执行以下命令解决:sudo diskutil corestorage revert /
    • Enable (turn on) Bluetooth so the green light is showing on the LCD bezel (do from Windows or Ubuntu).
      • Also make sure the side switch is set to green too!
    • 当使用外部耳机或扬声器,可能需要插入和拔掉12次才能识别. 
    • iMessage/Facetime 可能无法使用,你需要在config.plist里面加入本机的ROM and MLB (使用iMessageDebugV2提取).
      • 使用Cloverconfigurator生成 RtVariables -- 看其他关于iMessage的相关的教程.
    • 修复: With ACPIBacklight.kext installed, boot with lid open or LCD will be black when you open it. 
    • 安装kexts to /L/E, 有些链接AppleHDA_20672.kext 是不对的. 修复链接可使用以下脚本(注意,执行下面的命令可能提示找不到目录,你需要转到/Library/Extensions/,直接冲Finder里面前往/Library/Extensions/目录,里面有几个可能显示为文件夹,把文件后缀全部只保留.kext后缀,灵机一动的哈):
    • cd /Library/Extensions/AppleHDA_20672.kext/Contents/MacOS
    • sudo rm AppleHDA
    • sudo ln -s /System/Library/Extensions/AppleHDA.kext/Contents/MacOS/AppleHDA
    • sudo touch /System/Library/Extensions
    • 休眠使用OsxAptioFix2Drv-64.efi代替OsxAptioFixDrv-64.efi 建议你禁用休眠功能,执行以下命令:sudo pmset -a hibernatemode 0
    •         rm /var/vm/sleepimage

      如果你需要休眠功能,可以设置为模式7. 

      sudo pmset -a hibernatemode 7

      Note: 描述很怪,我也不知道怎样翻译,选择性忽略吧^_^. 

         

    • 添加启动选项darkwake=0 如果你喜欢开盖就打开电源,这可以节省你按电源键的时间. 
    • TrackPoint 在睡眠唤醒之后可能会出现无法响应的情况

     

     

    笔记定制Kexts

    下面列出的清单的kexts都包含在zip压缩包内. 如果你想自己下载最新版本,下载后建议使用kext安装脚本复制kexts /Library/Extensions 目录.

     

    • FakeSMC.kext  (v6.25.1426) - 核心机制. 使用Kozlek's version + plugins + custom FakeSMC Info.plist
      • 2个定制SMC键添加到Kozlec's原始的FakeSMC - FNum (to find the Fan) and ACID (for AC power and eliminate powerd syslog messages every 30 seconds).
      • A Custom package is included in the Utilities folder so you can install HWMonitor.app - it just selects these 2 Plugins Sensors: ACPI and CPU.
    • ACPIBatteryManager.kext (v1.70.2) - RehabMan's kext configured for v3 ACPI instructions to show/track battery info on menu bar(状态栏电池显示) 
    • AppleALC.kext (v1.1.4) 保持原始/修改的AppleHDA.kext in /S/L/E 和使用CX20672提供完整的音频支持 (same as CX20590).
    • Note: 有匹配DSDT 部分Conexant Codec.  dock端口还有Manwe150's fix/additions. 2layout-id profiles:
    •         (1)  ID 12 正常的笔记本端口和(2) ID 13 扩展坞的端口.  The "dock" version adds the second channel output called "Headphones" and a second Input which shows up as either "Line In or Built-in Microphone" - these ports are physically on the Docking Station itself. 

      - 如果你有一个dock, 请设置inject Audio ID 13Clover config.plist- 如果没有, 可以直接使用,无需做出任何改变)

    • Lilu.kext (v1.1.6) -一个kexts框架使AppleALC and NightShift etc正常运行. 
    • Bluetooth_Injector_T420.kext (1.0.0) - 增加Product ID 8575 改善BT(提供开/关功能)).  
    • AppleBackLightInjector.kext (0.9.0) - RehabMan's Injector method - 修改论坛联想T420水平增加亮度的规模为04882 (0x1312).
    • Note: 有两个模板文件: T420 T460. 创建一个标准Injector, 运行Utilities createAppleBacklightInjector脚本创建一个适合你的屏幕的亮度控制,. 并使用_kext_install.bash 脚本安装,使用如下命令:cd ~/Downloads/Lenovo-T420-Clover-YYYY.MM.DD/Utilities/Create_AppleBacklightInjector_kext/
    • sudo ./createAppleBacklightInjector.command[/size]
    • IntelMausiEthernet.kext (v.2.3.0) - Mieze's Intel LAN kext that supports TSO, EEE and other features. Put this kext in /Library/Extensions and remove or disable AppleIntelE1000e.kext 
    • IOAHCIBlockStorageInjector.kext -  configured to make just the DVD device appear internal so iDVD player works.  
    • VoodooPS2Controller.kext  (v1.8.25f) - 新定制的T420版本基于RehabMans's PS2 Keyboad/TouchPad/TrackPoint- 这个版本有T420的额外的定义信息
      • 调整启动帮助小红点
      • Jakibaki中间按钮+滚动的剪切/粘贴固定修复.
      • 如果MiddeMouseScroll设置为true滚动指点杆的工作原理.
      • Sierra PrefPane集成和其他修复(平滑和大写锁定) by usr-sse2 (see this post on GitHub)
      • 修改Info.plist(s)添加联想T420覆盖设置.
      • TrackPad pressure FingerZ value set to 47 - up from default of 30  - change to suite your touch in VoodooPS2Controller.kext/Contents/PlugIns/VoodooPS2TrackPad.kext/Contents/Info.plist
      • Various Default overrides such as MouseMultiplier X and Y for TrackPoint.
      • 注意:VoodooPS2Controller键盘映射有34个手指滑动左/右后退/前进为Safari浏览器配置和空间滑动
      • Optional Key Map: This map works in El Capitan. Since the NX keys are in a state of flux for Sierra - it is disabled by default now. If you would want to use this new map, edit the Info.plist file and rename the T420 key map entry. The F1-F15 key mappings are VoodooPS2Controller.kext/Contents/PlugIns/VoodooPS2Keyboard.kext/Contents/Info.key.plist:
        • F1 - LCD Brightness Down(亮度)
        • F2 - LCD Brightness Up(亮度)
        • F3 - Mission Control App Selector(任务控制程序选择器)
        • F4 - Launchpad
        • F5 - 
        • F6 - 
        • F7 - Mirror Displays
        • F8 - Disable/Enable TouchPad(禁用/启用触摸板)
        • F9 -
        • F10 - Mute Volume(静音)
        • F11 - Volume Down(音量)
        • F12 - Volume Up(音量)
        • PrtSc - Scan Previous Track
        • ScrLck - iTunes Play/Pause
        • Pause - Scan Next Track
        • Insert - Eject
    • AppleIntelE1000e.kext (v2.4.14) - Ethernet (gigE) - can go in /System/Library/Extensions vs Plugins so OSX re-installations or patch updates will not delete it.

    Optional:

    • IntelBacklight.kext (v1.0.10) - RehabMan's kext for smoother/enhanced LCD backlight (dimming) control. In 10.12.4 (or later) this kext does communicate with Brightness keys or System Preferences Display Slider. So remove this kext unless on a version older (less) than 10.12.4 
    • AppleHDA_20672.kext (v999.99) Keep original/unmodified AppleHDA.kext and add this kext to /L/E for full audio support for CX20672 (same as CX20590). Note: requires matching DSDT sections for Conexant Codec and layoutID 12. and Kext Patch via Clover. Also has Manwe150's fix/additions for dock ports. Credit and thanks to vladichimescu. There are 2 files in AppleHDA_20672.kext/Contents/ResourcesPlatforms.xml.zlib.dock andPlatforms.xml.zlib.nodockThe "dock" version adds the second audio output called "Headphones" and a second Input "Line In" - both of which are on the Docking Station itself.- IF you have a dock and want to use these ports - then just replace the Platforms.xml.zlib file with Platforms.xml.zlib.dock- IF you DO NOT have a dock, then use the new kext as is! (and not be confused by the extra Input/Output options!!!)(这部分翻译太头疼了,完全没办法理解,大家自己理解去吧,晕)

     

    一般笔记、修复和功能

     

    Installing Clover:

       

    如果你想直接使用Clover安装文件安装 Clover_v2.4k_rxxxx.pkg, 你需要选择Clover以下几个选项 仅安装UEFI启动版本

    安装到ESP分区

    主题默认

    Driver64UEEFI—OsxAptioFIx2Drv-64

    安装后按照步骤4替换ESP内容:

     

    • 2clover的配置文件 (config.plist) 使用自定义的DSDT和额外的Clover 修补。 a ) config.1600x900.plist - use for high-res LCD (rename to config.plist)    b ) config.1368x768.plist - use for low-res  LCD (rename to config.plist)
    • Model should be set to MacBookPro8,1 to get proper Graphics patching -  DP/HDMI/DVI/VGA FrameBuffers
    • Clover 动态修补的 4 Apple kexts:
      • Patch AppleIntelSNBGraphicsFB.kext- inserts a fix LCD brightness max level - now its the same brightness before and after sleep. Thanks to Timewalker75a (again!)- replaces the 4th port/buffer (DVI on dock) with VGA on left side. The 4 ports after patch are: LCD, DisplayPort on side, DisplayPort on dock, VGA on side. If you need DVI on the dock - then disable this patch! Or modify the edit scheme to change the 2nd or 3rd port (DP) to be the DVI if still want the VGA port.
      • Patch AppleHDA.kext to define the audio codec for the Conexant 20590/20672 chipset
      • Patch IOGraphicsFamily.kext - logo display fixes for startup phases 
      • Patch IOAHCIBlockStorage.kext - adds SSD TRIM function for a 3rd Party SSD - one can use the trimforce command now
    • Zip包含Clover文件自定义DSDT的必须的kexts以及kext安装脚本:  _kext-install.command
    • Gfx Parameter files for Displays/Overrides 更自然的伽玛曲线和颜色选项
    • Newer Thinkpad theme - adds Mavericks, Yosemite, El Capitan, Sierra Icons than in standard clover installer.
    • 特殊功能键可以使用 (without USB or Bluetooth keyboard):
      • LCD Brightness: These button pairs change brightness up/down :  Fn+Home/End, ScrLck/Pause
      • Audio: The 3 buttons above F1-F3 control volume (except mic mute)
      • Insert key is the CD/DVD eject. 
      • Blue ThinkVantage button - toggles fan to highest speed.
      • The Alt key is the Mac Command key and Microsoft flag key is the Mac Option key.
      • Fn+PgUp - turns on the light!

    DSDT Notes - Some of the DSDT tweaks (beyond manwe150's original version) are listed here:

    • DSDT includes source and binary
    • The "EDID" version of dsdt.aml should override removes infamous HD 3000 glitches and buffer hangs or so-called artifacts for 1600x.900 LCD. 
    • Added MaxBeepBootVolume to DSDT to rid AppleHDA assertion on startup
    • Shutdown fixes in DSDT  _PTS and _WAK (thanks to TimeWalker75, RehabMan and Manwe150)
    • Change/fixes to reset LEDs for proper sleep/wake status
    • Battery fixes to use native/current ACPIPlatform.kext with Rehabman's ACPIBatteryManager.kext - no need to rollback or patch AppleACPIPlatform.kext anymore.
    • PNLF additions from RehabMan provide smoother/wider LCD backlight control with IntelBacklight.kext
    • DSDT mods to KBD device - renamed to PS2K and added LENOVO OEM-ids for VoodooPS2Controller to use.
    • The PS2 Keyboard is identified as id LENOVO table-id T420 which will pickup the custom VoodooPS2Controller settings.
    • For El Capitan, removed the _PRW method from some of the devices in the DSDT 
    • DSDT for "heat-step" (dsdt.heat-step.aml) has a modified method to control the fan speed vs automatically by BIOS.

按照安装指导使用自动控制风扇转速:1) 复制dsdt.heat-step.aml替换默认dsdt.amlESP分区2) 安装Utilities文件夹下ACPIPoller.kext/Library/Extensions目录3) 重启例如(自己根据命令理解,没有这么复杂):
    •         mkdir /Volumes/ESP
    •         sudo mount -t msdos /dev/disk0s1 /Volumes/ESP
    •         cp -a /Volumes/ESP/EFI/CLOVER/ACPI/dsdt.heat-step.aml /Volumes/ESP/EFI/CLOVER/ACPI/patched/dsdt.aml
    •         cd ~/Downloads/Lenovo-T420-Clover-YYYY.MM.DD/Utilities
    •         sudo cp -a ACPIPoller.kext /Library/Extensions
    •         sudo chown -R 0:0 /Library/Extensions/ACPIPoller.kext
    •         sudo chmod -R go-w /Library/Extensions/ACPIPoller.kext
    •         sudo kextcache -i /

    可选的:创建一个自定义SSDT

    Included is a revised Pike's  SSDT generation script (sdtPRgen-clover.command) and a local copy of iasl. running the script will end with making a copy of ssdt.aml into proper ESP location when mounted. Clover can build a proper SSDT for power but if you want to play with the values this may help.

     

    • Creates P and C states to match system CPU. One can hand-edit to modify values for lower power consumption.  
    • Run the custom ssdtPRgen-clover.command script in Zip Utilities folder. It should ask you if you want copy ssdt.aml to your ESP ACPI/patched folder, otherwise copy/move ssdt.aml to the same location as your custom dsdt.aml which is: /Volumes/ESP/EFI/CLOVER/ACPI/patched 
    • Note: the script will copy the file iasl from the Utility folder to /usr/local/bin/iasl

    (身体不舒服,这段不翻译了,生成ssdt变频文件,使用在终端执行以下命令:

    cd ~/Downloads/Lenovo-T420-Clover-YYYY.MM.DD/Utilities

    ./ssdtPRGen-clover.command

    需要输入管理员密码,会提示你是否复制到EFI/Clover/ACPI/Patch目录,选择Y同意,会继续询问是否打开ssdt.dsl,N

    看看EFI/Clover/ACPI/Patch目录有没有ssdt.aml,关机重启后可以使用CPU-S查看变频是否正常)

转载于:https://my.oschina.net/y010204025/blog/1499459

你可能感兴趣的:(ThinkPad T420 clover引导安装黑苹果(x220和T520也适用))