Go to file
2017-06-22 20:14:43 +08:00
asm Fix right-win and right-menu key definitions 2017-01-25 19:03:13 +08:00
docs Merge pull request #29 from ypid/fix-docs 2017-06-20 15:28:55 +08:00
mec-tools@07a1b14073 Update mec-tools to get a couple of fixes 2016-05-28 17:44:01 +10:00
radare New version of radare puts project files in a slightly different spot 2016-12-22 13:59:01 +08:00
scripts Add rm-on-fail to the hexpatch script, allowing more confidence that repeated make invocations will not accidentally succeed 2017-06-20 15:58:55 +08:00
t430.G1HT34WW.img.d Disable battery_validate.patch for all supported models to match docs 2017-06-16 11:51:43 +02:00
t430.G1HT35WW.img.d Mark t430 battery patch as known working 2016-09-15 16:31:35 +08:00
t430s.G7HT39WW.img.d BUG: remove extra line from patch file 2016-06-11 14:33:49 +10:00
w530.G4HT39WW.img.d After testing by MarzEz, mark the T530 battery patch as working. 2017-03-09 16:26:29 +08:00
x230.G2HT35WW.img.d Add patch to swap caps lock and escape 2017-06-11 19:51:48 +00:00
x230t.GCHT25WW.img.d Ensure that all battery patches have the same name 2017-01-31 13:02:18 +08:00
.gitignore Merge branch 'ypid-add-txt-dl-target' 2017-06-22 20:14:43 +08:00
.gitmodules Add x230 image and infrastructure 2016-04-19 19:39:23 +10:00
autoexec.bat.template Add the checksum of the built FL2 to the details shown 2016-06-06 11:32:27 +10:00
Descriptions.txt Merge pull request #29 from ypid/fix-docs 2017-06-20 15:28:55 +08:00
fix-hdd-image-33554432.patch The t430 ISO images are slightly larger than all the other ones, so the hdd image fix does not apply. Fix this by selecting the patch to use based on the size of the hdd image 2016-07-14 11:18:45 +10:00
fix-hdd-image-38797312.patch The t430 ISO images are slightly larger than all the other ones, so the hdd image fix does not apply. Fix this by selecting the patch to use based on the size of the hdd image 2016-07-14 11:18:45 +10:00
LICENSE Add License details 2016-04-23 14:02:28 +10:00
Makefile Merge branch 'ypid-add-txt-dl-target' 2017-06-22 20:14:43 +08:00
README Make the USB stick instructions more failsafe, and add a warning about erasing the stick 2017-03-19 11:39:07 +08:00
t430.G1HT34WW.img.enc.slice Added T430 BIOS 2.57, plus battery patch 2016-06-02 22:44:14 +01:00
t430.G1HT35WW.img.enc.slice Add t430 bootable ISO 2016-04-27 12:57:53 +10:00
t430s.G7HT39WW.img.enc.slice Add t430s bootable ISO 2016-04-27 13:06:19 +10:00
t530.G4HT39WW.img.d Add t530 support - this appears to share the EC firmware with the w530 2016-04-27 18:44:21 +10:00
t530.G4HT39WW.img.enc.slice Add t530 support - this appears to share the EC firmware with the w530 2016-04-27 18:44:21 +10:00
w530.G4HT39WW.img.enc.slice Add image extractor for w530 2016-04-25 00:27:13 +10:00
x220.8DHT34WW.img.enc.slice Start extracting the FL2 files, and use that as the basis for extracting the firmware. This will allow us to update or diff against the FL2 file 2016-04-24 17:26:31 +10:00
x220.8DHT34WW.s01CB000.FL2.slice Start extracting the FL2 files, and use that as the basis for extracting the firmware. This will allow us to update or diff against the FL2 file 2016-04-24 17:26:31 +10:00
x230.G2HT35WW.img.enc.slice Start extracting the FL2 files, and use that as the basis for extracting the firmware. This will allow us to update or diff against the FL2 file 2016-04-24 17:26:31 +10:00
x230t.GCHT25WW.img.enc.slice Add image extractor for x230t 2016-04-24 23:57:04 +10:00
x250.N10HT17W.img.enc.slice Have a quick look at the x250 and x260 firmware, it looks like they are both ARC cpus with a similar layout. They both have different checksumming than the xx30 range and the x260 looks like it is not even encrypted (however there is a strange 256byte block at the top of the file - perhaps a signature) 2016-04-24 19:08:34 +10:00
x260.R02HT29W.img.slice Have a quick look at the x250 and x260 firmware, it looks like they are both ARC cpus with a similar layout. They both have different checksumming than the xx30 range and the x260 looks like it is not even encrypted (however there is a strange 256byte block at the top of the file - perhaps a signature) 2016-04-24 19:08:34 +10:00

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)

Unfortunately, it turns out that not all xx30 series thinkpads have the same
BIOS and EC arrangement - some do not have a "FL2" file in the BIOS update
image and thus the location of the EC to patch is missing.  This is known to
be the case with at least the L530.

* 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.

* A video presenting how these thinkpad laptops were hacked is online:
    https://www.youtube.com/watch?v=Fzmm87oVQ6c

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. Choose your laptop model name from the list shown.
   E.G. "patched.x230.img" for a x230 laptop.

6. Using the name chosen in the previous step, make the fully
   patched image 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.
   (Note: chose a USB stick with nothing important on it, it will
   be erased in the next step) 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 (replace
   the "sdx" in this command with the correct name for your usb stick)

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

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

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 6 above.
  Then you can use your normal CDROM burning tools to put this image on
  a blank cd and boot it up, skipping steps 7 and 8.

* 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 before running step 6.


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.