Infrastructure for patching x230 and similar Thinkpad embedded controller firmware
Perl Assembly Makefile Shell
Permalink
Failed to load latest commit information.
asm Fix right-win and right-menu key definitions Jan 25, 2017
docs Add makefile helper targets for enabling and disabling patchsets, the… Jan 31, 2017
mec-tools @ 07a1b14 Update mec-tools to get a couple of fixes May 28, 2016
radare New version of radare puts project files in a slightly different spot Dec 22, 2016
t430.G1HT34WW.img.d Ensure that all battery patches have the same name Jan 31, 2017
t430.G1HT35WW.img.d Mark t430 battery patch as known working Sep 15, 2016
t430s.G7HT39WW.img.d BUG: remove extra line from patch file Jun 11, 2016
w530.G4HT39WW.img.d After testing by harryK, mark the x230 battery patch as workng. May 9, 2016
x230.G2HT35WW.img.d After testing by harryK, mark the x230 battery patch as workng. May 9, 2016
x230t.GCHT25WW.img.d Ensure that all battery patches have the same name Jan 31, 2017
.gitignore BUG: repeated failing makes could generate bad output. May 26, 2016
.gitmodules Add x230 image and infrastructure Apr 19, 2016
8duj27us.iso.orig.sha1 Use the same orig tail filename everywhere Apr 19, 2016
LICENSE Add License details Apr 23, 2016
Makefile Add makefile helper targets for enabling and disabling patchsets, the… Jan 31, 2017
README Add makefile helper targets for enabling and disabling patchsets, the… Jan 31, 2017
autoexec.bat.template Add the checksum of the built FL2 to the details shown Jun 6, 2016
fix-hdd-image-33554432.patch The t430 ISO images are slightly larger than all the other ones, so t… Jul 14, 2016
fix-hdd-image-38797312.patch The t430 ISO images are slightly larger than all the other ones, so t… Jul 14, 2016
g1uj25us.iso.orig.desc Added T430 BIOS 2.57, plus battery patch Jun 2, 2016
g1uj25us.iso.orig.sha1 Added T430 BIOS 2.57, plus battery patch Jun 2, 2016
g1uj38us.iso.orig.desc Add t430 bootable ISO Apr 27, 2016
g1uj38us.iso.orig.sha1 Add t430 downloader and extractor Apr 24, 2016
g2uj23us.iso.orig.desc FIX: forgot to add description file Apr 27, 2016
g2uj23us.iso.orig.sha1 Use the same orig tail filename everywhere Apr 19, 2016
g4uj30us.iso.orig.desc Add t530 support - this appears to share the EC firmware with the w530 Apr 27, 2016
g4uj30us.iso.orig.sha1 Add t530 support - this appears to share the EC firmware with the w530 Apr 27, 2016
g5uj28us.iso.orig.desc Add w530 ISO output Apr 27, 2016
g5uj28us.iso.orig.sha1 Add image extractor for w530 Apr 24, 2016
g7uj18us.iso.orig.desc Add t430s bootable ISO Apr 27, 2016
g7uj18us.iso.orig.sha1 Add details for downloading the t430s firmware Apr 23, 2016
g7uj19us.iso.orig.desc Update the base image of the t430 patch to use the latest lenovo rele… Jun 6, 2016
g7uj19us.iso.orig.sha1 Update the base image of the t430 patch to use the latest lenovo rele… Jun 6, 2016
gcuj24us.iso.orig.desc Add x230t support Apr 27, 2016
gcuj24us.iso.orig.sha1 Add image extractor for x230t Apr 24, 2016
geteltorito Import geteltorito from the internet May 20, 2016
hexpatch.pl Add License details Apr 23, 2016
n10ur10w.iso.orig.sha1 Have a quick look at the x250 and x260 firmware, it looks like they a… Apr 24, 2016
r02uj46d.iso.orig.sha1 Have a quick look at the x250 and x260 firmware, it looks like they a… Apr 24, 2016
slice.extract Enable generation of FL2 files - unfortunately, needs a custom rule f… Apr 24, 2016
slice.insert Enable generation of FL2 files - unfortunately, needs a custom rule f… Apr 24, 2016
t430.G1HT34WW.img.enc.slice Added T430 BIOS 2.57, plus battery patch Jun 2, 2016
t430.G1HT34WW.img.orig.sha1 Added T430 BIOS 2.57, plus battery patch Jun 2, 2016
t430.G1HT34WW.s01D2000.FL2.slice Added T430 BIOS 2.57, plus battery patch Jun 2, 2016
t430.G1HT35WW.img.enc.slice Add t430 bootable ISO Apr 27, 2016
t430.G1HT35WW.img.orig.sha1 Add t430 downloader and extractor Apr 24, 2016
t430.G1HT35WW.s01D2000.FL2.slice Add t430 bootable ISO Apr 27, 2016
t430s.G7HT39WW.img.enc.slice Add t430s bootable ISO Apr 27, 2016
t430s.G7HT39WW.img.orig.sha1 Add details for downloading the t430s firmware Apr 23, 2016
t430s.G7HT39WW.s01D8000.FL2.slice Update the base image of the t430 patch to use the latest lenovo rele… Jun 6, 2016
t530.G4HT39WW.img.d Add t530 support - this appears to share the EC firmware with the w530 Apr 27, 2016
t530.G4HT39WW.img.enc.slice Add t530 support - this appears to share the EC firmware with the w530 Apr 27, 2016
t530.G4HT39WW.img.orig.sha1 Add t530 support - this appears to share the EC firmware with the w530 Apr 27, 2016
t530.G4HT39WW.s01D5100.FL2.slice Add t530 support - this appears to share the EC firmware with the w530 Apr 27, 2016
w530.G4HT39WW.img.enc.slice Add image extractor for w530 Apr 24, 2016
w530.G4HT39WW.img.orig.sha1 Add image extractor for w530 Apr 24, 2016
w530.G4HT39WW.s01D5200.FL2.slice Add image extractor for w530 Apr 24, 2016
x220.8DHT34WW.img.enc.orig.sha1 Update slice definition for x220 reference code as it was incorrect Apr 24, 2016
x220.8DHT34WW.img.enc.slice Start extracting the FL2 files, and use that as the basis for extract… Apr 24, 2016
x220.8DHT34WW.s01CB000.FL2.orig.sha1 Start extracting the FL2 files, and use that as the basis for extract… Apr 24, 2016
x220.8DHT34WW.s01CB000.FL2.slice Start extracting the FL2 files, and use that as the basis for extract… Apr 24, 2016
x230.G2HT35WW.img.enc.slice Start extracting the FL2 files, and use that as the basis for extract… Apr 24, 2016
x230.G2HT35WW.img.orig.sha1 Ensure we have an original file left around to diff against later Apr 19, 2016
x230.G2HT35WW.s01D3000.FL2.orig.sha1 Start extracting the FL2 files, and use that as the basis for extract… Apr 24, 2016
x230.G2HT35WW.s01D3000.FL2.slice Start extracting the FL2 files, and use that as the basis for extract… Apr 24, 2016
x230t.GCHT25WW.img.enc.slice Add image extractor for x230t Apr 24, 2016
x230t.GCHT25WW.img.orig.sha1 Add x230t support Apr 27, 2016
x230t.GCHT25WW.s01DA000.FL2.slice BUG: x230t FL2 slice was wrong Apr 27, 2016
x250.N10HT17W.img.enc.slice Have a quick look at the x250 and x260 firmware, it looks like they a… Apr 24, 2016
x250.N10HT17W.s01E5000.FL2.orig.sha1 Have a quick look at the x250 and x260 firmware, it looks like they a… Apr 24, 2016
x250.N10HT17W.s01E5000.FL2.slice Have a quick look at the x250 and x260 firmware, it looks like they a… Apr 24, 2016
x260.R02HT29W.img.slice Have a quick look at the x250 and x260 firmware, it looks like they a… Apr 24, 2016
x260.R02HT29W.s0AR0200.FL2.orig.sha1 Have a quick look at the x250 and x260 firmware, it looks like they a… Apr 24, 2016
x260.R02HT29W.s0AR0200.FL2.slice Have a quick look at the x250 and x260 firmware, it looks like they a… Apr 24, 2016
xx30.encrypt Add License details Apr 23, 2016

README

The main purpose of this software is to patch the EC on xx30 series thinkpads
to make the classic 7-row keyboards work.  There are also patches included (but
disabled by default) to disable the authentic battery validation check.

With the patches included here, you can install the classic keyboard
hardware on many xx30 series laptops and make almost every key work properly.
The only keys that are not working are Fn+F3 (Battery) and Fn+F12 (Hibernate)

* A full writeup of the hardware modifications needed can be found at:
    http://www.thinkwiki.org/wiki/Install_Classic_Keyboard_on_xx30_Series_ThinkPads

* More information for hacking on this can be found in the docs/HACKING.txt
  file.

Step-by-step instructions:
--------------------------

This software expects to be run under Linux.  For best results, ensure you
have updated your BIOS to a recent version before starting.  If there is too
large a difference between the BIOS and EC versions then the flash process
will not complete.

1. Ensure you have installed the prerequisite packages
   On debian, this can be done with:

    apt-get install build-essential git mtools libssl-dev

2. Clone a copy of this repo on to your computer:

    git clone https://github.com/hamishcoleman/thinkpad-ec

3. Change to the directory created by the clone:

    cd thinkpad-ec

4. Show the list of laptops and USB image file names:

    make list_laptops

5. Select the correct IMG name for your laptop.  E.G. "patched.x230.img" for
   the x230 laptop.

6. Make the fully patched iimage for this laptop (this will download
   the original file from Lenovo and patch it):

    make patched.x230.img

7. Insert your USB stick and determine what device name it has.
   This command should help you find the right device:

    lsblk -d -o NAME,SIZE,LABEL

8. Write the bootable patched image onto the USB stick device

   WARNING: if you do not have the right device name, you might overwrite
   your hard drive!

   sudo dd if=patched.x230.img of=/dev/sdb

Your USB stick is now ready to boot and install the patched firmware.

Notes:
------

* You can also create a bootable CDROM image for burning to a disk
  by asking for a ".iso" file instead of the ".img" in step 7 above.
  Then you can use your normal CDROM burning tools to put this image on
  a blank cd and boot it up, skipping steps 8 and 9.

* To include the battery validation patch or to make a build that
  reverts any EC changes, read the docs/CONFIG.txt and follow
  the configuration instructions in it.


Booting the stick and flashing the firmware:
--------------------------------------------

While flashing the firmware is as simple as booting the USB stick
created above, there are a couple of steps that can help the process.
This is more a list of issues that the community has discovered as the
patch was applied in different circumstances than a hard and fast set
of requirements.

* The firmware flash process generally requires you to have a charged
  battery plugged in to the laptop before it will complete.

* Ensure your BIOS has been configured to boot from "Legacy" and not
  "UEFI" before trying to boot.

* If you do normally use UEFI boot, there has been at least one case where
  the EC does not get flashed until the BIOS is switched back into UEFI
  mode - after which the EC was automatically flashed on the next reboot.

* When you boot the stick, you will be shown information about the patch,
  including which laptop type it was built for.  It pauses at this point
  for you to confirm that you wish to proceed.  It will then automatically
  flash the patched firmware.