Added support for Thinkpad L430/L530. Satisfies request in #203

Fixes documentation error.
pull/212/head
leecher1337 2 years ago
parent 3a898976cc
commit 7c30df40b3

@ -106,8 +106,27 @@ g2uj30us.iso sha1:b2ce7c604850d263ead783550ab15c517e18bc58 x230 BIOS 2.74 (G2ET
g2uj31us.iso sha1:971a9d57a179f4c368c827fd23c6fd5c86a52df7 x230 BIOS 2.75 (G2ETB5WW) EC 1.14 (G2HT35WW)
g2uj32us.iso sha1:ee434746cabdb7d8bb8077f79be1429d6dec5696 x230 BIOS 2.76 (G2ETB6WW) EC 1.14 (G2HT35WW)
g2uj33us.iso sha1:2a5ba87f9a0128ae4ae1a7f006b5a4ec515d870f x230 BIOS 2.77 (G2ETB7WW) EC 1.15 (G2HT36WW)
g3uj13us.iso sha1:433c7e88a6fd690b4aac57b473bb7baf51475d34 l430,l530 BIOS 2.54 (G3ET94WW) EC 1.14 (G3HT40WW)
g3uj14us.iso sha1:72d5b5a63354124c02f2c0a22ce35aac0dfc0012 l430,l530 BIOS 2.56 (G3ET96WW) EC 1.14 (G3HT40WW)
g3uj15us.iso sha1:c1a7f055fd2765af82b4698b388e56c2f77699b1 l430,l530 BIOS 2.57 (G3ET97WW) EC 1.14 (G3HT40WW)
g3uj16us.iso sha1:bf94a1e8e0caa99983c801d747bd4517f905b889 l430,l530 BIOS 2.58 (G3ET98WW) EC 1.14 (G3HT40WW)
g3uj17us.iso sha1:68a11ff3f3a2c04fded329312087104eda4af101 l430,l530 BIOS 2.60 (G3ETA0WW) EC 1.14 (G3HT40WW)
g3uj18us.iso sha1:8c420932ea9b4c3ced6a3b11e8022e3e165b0e9a l430,l530 BIOS 2.61 (G3ETA1WW) EC 1.14 (G3HT40WW)
g3uj19us.iso sha1:d1c39a51253a025383173669dc898ed9b3f4f389 l430,l530 BIOS 2.62 (G3ETA2WW) EC 1.14 (G3HT40WW)
g3uj20us.iso sha1:dd01d80656826779c5aba8af8c7ab07cf36753b0 l430,l530 BIOS 2.63 (G3ETA3WW) EC 1.14 (G3HT40WW)
g3uj21us.iso sha1:20a619b6aa0d22e9d7883c805e9423712ba2ed12 l430,l530 BIOS 2.64 (G3ETA4WW) EC 1.14 (G3HT40WW)
g3uj22us.iso sha1:883ef99c1c934a563a3e119449b108cd0ad35180 l430,l530 BIOS 2.65 (G3ETA5WW) EC 1.14 (G3HT40WW)
g3uj23us.iso sha1:656c8bdfb8a185b5757c15ab3a1179d323cf366f l430,l530 BIOS 2.66 (G3ETA6WW) EC 1.14 (G3HT40WW)
g3uj24us.iso sha1:f88f7b6b530ad6747405ab8a998055ff978ac9ed l430,l530 BIOS 2.67 (G3ETA7WW) EC 1.14 (G3HT40WW)
g3uj25us.iso sha256:caa5494ea71206f253027bea3ae9336c942c4d6f7f041c58f6972a54227cea6d l430,l530 BIOS 2.68 (G3ETA8WW) EC 1.14 (G3HT40WW)
g3uj26us.iso sha1:96e14347b7587f42951e49eb2f5fea3123ab56d3 l430,l530 BIOS 2.69 (G3ETA9WW) EC 1.14 (G3HT40WW)
g3uj27us.iso sha1:150d158dc6f34dc9b0a7d43faf2ee0d0fab8342e l430,l530 BIOS 2.70 (G3ETB0WW) EC 1.14 (G3HT40WW)
g3uj28us.iso sha1:529ba7a4b3d9aa1b0507c6d5dcc5a047ed82c4aa l430,l530 BIOS 2.71 (G3ETB1WW) EC 1.14 (G3HT40WW)
g3uj29us.iso sha1:34c6d9ad0f6eb394d3351495398363b907320444 l430,l530 BIOS 2.72 (G3ETB2WW) EC 1.14 (G3HT40WW)
g3uj30us.iso sha1:c51b1966ecc302b1a20a08f7f6b98064659abb2f l430,l530 BIOS 2.73 (G3ETB3WW) EC 1.14 (G3HT40WW)
g3uj31us.iso sha1:76ff99d2a5bbffa228bba98b2fc13acd4d183e48 l430,l530 BIOS 2.74 (G3ETB4WW) EC 1.14 (G3HT40WW)
g3uj32us.iso sha1:ae4bf2fc7441bfaa041ae3f1dff01a7d0d5142e6 l430,l530 BIOS 2.75 (G3ETB5WW) EC 1.14 (G3HT40WW)
g3uj33us.iso sha1:cd712f3ff97169f904ed298c1cc770f5064005a1 l430,l530 BIOS 2.76 (G3ETB6WW) EC 1.14 (G3HT40WW)
g4uj30us.iso sha1:8673a448abd5cba1a8d7d1cb2eeb7935c7a252cd t530 and t530i BIOS 2.66 (G4ETA6WW) EC 1.13 (G4HT39WW)
g4uj32us.iso sha1:f86c7402fb57038143c81aa90ced615e95369844 t530 and t530i BIOS 2.68 (G4ETA8WW) EC 1.13 (G4HT39WW)
g4uj34us.iso sha1:TODO
@ -204,7 +223,7 @@ j4uj75wd.iso sha1:3ff5025a4a5f62f461467f7726e5b2c1fa119b5b L440, L540 BIOS 1.93
# - update the tools to automatically determine the FAT_OFFSET
# The firmware files from inside the ISO images
l430.G3HT40WW.s01D4000.FL1 rule:FL2,dep:g3uj25us.iso,param:01D4000.FL1 l430 BIOS 2.68 Flash File
l430.G3HT40WW.s01D4000.FL1 rule:FL2,dep:g3uj13us.iso,depi:g3uj13us.iso.bat1,param:01D4000.FL1 l430 BIOS 2.54 Flash File
l440.J4HT27WW.s0AJ4000.FL1 rule:FL2,dep:j4uj62wd.iso,param:0AJ4000.FL1 l440 BIOS 1.73 Flash File
l440.J4HT28WW.s0AJ4000.FL1 rule:FL2,dep:j4uj64wd.iso,param:0AJ4000.FL1 l440 BIOS 1.78 Flash File
l440.J4HT29WW.s0AJ4000.FL1 rule:FL2,dep:j4uj65wd.iso,param:0AJ4000.FL1 l440 BIOS 1.81 Flash File
@ -259,7 +278,7 @@ x61.7MHT25WW.s01B2000.FL2 rule:oldISO,dep:7nuj22uc.iso,param:01B2000.FL2
# The actual EC firmware extracted from the BIOS firmware file
l430.G3HT40WW.img rule:IMGnoenc,dep:l430.G3HT40WW.s01D4000.FL1 l430 EC 1.14 (may be wrong)
l430.G3HT40WW.img rule:IMGnuvoton,dep:l430.G3HT40WW.s01D4000.FL1 l430 EC 1.14 (may be wrong)
l440.J4HT29WW.img rule:IMGnoenc,dep:l440.J4HT29WW.s0AJ4000.FL1 l440 EC 1.10
l440.J4HT30WW.img rule:IMGnoenc,dep:l440.J4HT30WW.s0AJ4000.FL1 l440 EC 1.11
p51.N1UHT24W.img rule:IMGnoenc,dep:p51.N1UHT24W.s0AN1U00.FL2 p51 EC 1.07
@ -310,3 +329,4 @@ patched.t530i.iso rule:niceISO,dep:g4uj38us.iso,suffix:0,insert:0 for patching
patched.w530.iso rule:niceISO,dep:g5uj37us.iso,suffix:0,insert:0 for patching Thinkpad W530
patched.x230.iso rule:niceISO,dep:g2uj31us.iso,suffix:0,insert:0 for patching Thinkpad X230
patched.x230t.iso rule:niceISO,dep:gcuj32us.iso,suffix:0,insert:0 for patching Thinkpad X230t
patched.l430.iso rule:niceISO,dep:g3uj13us.iso,suffix:0,insert:0 for patching Thinkpad L430, L530

@ -63,7 +63,7 @@ test.report:
# images) and any small downloads
clean:
rm -f $(CLEAN_FILES) \
patched.*.iso patched.*.img *.FL2 *.FL2.orig *.img.enc \
patched.*.iso patched.*.img *.FL? *.FL?.orig *.img.enc \
*.img.enc.orig *.img.orig *.bat *.report \
*.img \
*.txt.orig
@ -213,6 +213,10 @@ patch_disable_keyboard:
@sed -e "s%__DIR%`mdir -/ -b -i $<@@$(FAT_OFFSET) |grep FL2 |head -1|cut -d/ -f3`%; s%__FL2%`mdir -/ -b -i $<@@$(FAT_OFFSET) |grep FL2 |head -1|cut -d/ -f4`%" autoexec.bat.template >$@.tmp
@mv $@.tmp $@
%.iso.bat1: %.iso.orig autoexec.bat.template
@sed -e "s%__DIR%`mdir -/ -b -i $<@@$(FAT_OFFSET) |grep FL1 |head -1|cut -d/ -f3`%; s%__FL2%`mdir -/ -b -i $<@@$(FAT_OFFSET) |grep FL1 |head -1|cut -d/ -f4`%" autoexec.bat.template >$@.tmp
@mv $@.tmp $(subst .bat1,.bat,$@)
# helper to write the ISO onto a cdrw
%.iso.blank_burn: %.iso
wodim -eject -v speed=40 -tao gracetime=0 blank=fast $<
@ -299,6 +303,10 @@ mec-tools/mec_encrypt: mec-tools/Makefile
git submodule update
make -C mec-tools
nuvoton-tools/npce885crc:
wget -O nuvoton-tools/npce885crc.c https://raw.githubusercontent.com/leecher1337/thinkpad-Lx30-ec/main/fwpat/util/npce885crc.c
gcc -o nuvoton-tools/npce885crc nuvoton-tools/npce885crc.c
# Simple Visualisation
%.pgm: %
(echo "P5 256 $$(($(shell stat -c %s $<)/265)) 255" ; cat $< ) > $@
@ -418,6 +426,29 @@ define rule_IMGnoenc_insert
endef
rule_IMGnoenc_insert_DEPS = scripts/FL2_copyIMG
# Extract the IMG file from an FL1 file - special case, for NUVOTON controllers
#
# $@ is the IMG to create
# $< is the FL2
define rule_IMGnuvoton_extract
./scripts/FL2_copyIMG from_fl2 $< $@
endef
rule_IMGnuvoton_extract_DEPS = scripts/FL2_copyIMG
# Insert the new firmware into the FL2 file - special case, for NUVOTON controllers
#
# $@ is the FL1 to create
# $< is the IMG
define rule_IMGnuvoton_insert
./nuvoton-tools/npce885crc -o 0x8000 -u $<
cp --reflink=auto $@.orig $@.tmp
./scripts/FL2_copyIMG to_fl2 $@.tmp $<
mv $@.tmp $@
$(call buildinfo_FL2)
endef
rule_IMGnuvoton_insert_DEPS = scripts/FL2_copyIMG nuvoton-tools/npce885crc
# Extract the FL2 file from an ISO image with two FL2 files
#

@ -36,11 +36,14 @@ 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, there are a small number of thinkpads with a model number
There are a small number of thinkpads with a model number
from the "xx30" series that are using a completely different EC CPU and
a different BIOS update strategy. Thus they are not currently able to
be patched. This is known to be the case for at least the L430, L530
and E330.
a different BIOS update strategy.
The Nuvotron EC has been analyzed by the [thinkpad-Lx30-ec project](https://github.com/leecher1337/thinkpad-Lx30-ec).
This is known to be the case for at least the L430, L530 and E330.
Patches are included now, for documentation, please check the mentioned
repository.
* A full writeup of the hardware modifications needed can be found at:
http://www.thinkwiki.org/wiki/Install_Classic_Keyboard_on_xx30_Series_ThinkPads

@ -42,7 +42,7 @@ ThinkPad xx30 series:
(see discussion: http://notebook1.ru/forma1/viewtopic.php?f=70&t=109179)
The procedure for doing this is documented here: https://github.com/taglour/x230-ec-jtag
ThinkPad l430:
ThinkPad l420:
--------------
IT8511TE
@ -50,9 +50,15 @@ ThinkPad l430:
(source: schematics - http://www.informaticanapoli.it/download/SCHEMIELETTRICI/IBM-LENOVO/Lenovo%20laptop%20motherboard%20schematic%20diagram.pdf)
Thinkpad l430/l530:
-------------------
Nuvoton NPCE885G
This is a CR16C core CPU.
ThinkPad e330:
--------------
This is a 8051 core CPU, so probably a IT8511TE or similar
Nuvoton NPCE885G
(source: EC firmware similarity to the l430)

@ -0,0 +1,51 @@
--- /tmp/$01D4000.FL1.hex 2021-12-23 23:34:53.026586003 +0000
+++ /tmp/$01D4000.FL1.kb.hex 2021-12-23 23:34:53.114588324 +0000
@@ -7541,8 +7541,8 @@
0001de60 4a 9f 4c 79 45 7c 4d 7b 5a 81 4e 7b 54 81 4a 79 |J.LyE|M{Z.N{T.Jy|
0001de70 4c 7b 45 9f 4d 7c 00 00 00 00 00 00 83 00 5a 01 |L{E.M|........Z.|
0001de80 1f 01 27 01 2f 01 37 01 3f 01 5e 01 02 05 04 05 |..'./.7.?.^.....|
-0001de90 08 05 08 06 10 05 10 06 40 05 20 05 00 00 00 04 |........@. .....|
-0001dea0 01 04 84 00 7c 01 7c 03 4a 01 4a 02 70 01 70 02 |....|.|.J.J.p.p.|
+0001de90 08 05 08 06 10 05 10 06 40 05 20 05 00 00 38 01 |........@. ...8.|
+0001dea0 30 01 84 00 7c 01 7c 03 4a 01 4a 02 70 01 70 02 |0...|.|.J.J.p.p.|
0001deb0 70 03 71 01 71 02 71 03 6c 01 6c 02 6c 03 69 01 |p.q.q.q.l.l.l.i.|
0001dec0 69 02 69 03 7d 01 7d 02 7d 03 7a 01 7a 02 7a 03 |i.i.}.}.}.z.z.z.|
0001ded0 6b 01 6b 02 6b 03 75 01 75 02 75 03 72 01 72 02 |k.k.k.u.u.u.r.r.|
@@ -7651,22 +7651,22 @@
0001e590 2d 36 36 36 36 36 36 36 2a 36 36 36 36 36 36 36 |-6666666*6666666|
0001e5a0 36 36 36 36 36 36 36 36 36 00 00 00 00 00 00 00 |666666666.......|
0001e5b0 00 00 00 00 00 00 00 00 00 00 00 00 54 0e 05 0a |............T...|
-0001e5c0 2e 36 55 16 4e 18 00 a2 a1 00 00 00 8c 16 1e 26 |.6U.N..........&|
-0001e5d0 25 3d 3e 46 45 1a 1e 1c a0 a3 00 00 00 15 1d 24 |%=>FE..........$|
-0001e5e0 2d 3c 43 44 28 6a 00 04 00 00 00 00 00 0d 58 0c |-<CD(j........X.|
-0001e5f0 2c 35 5b 14 54 66 82 02 00 00 00 88 00 1c 24 23 |,5[.Tf........$#|
-0001e600 2b 3b 26 4b 4c 5d 00 00 9d 00 00 00 00 76 61 0e |+;&KL].......va.|
-0001e610 34 33 12 64 52 10 00 08 00 a7 8a 00 00 1a 22 21 |43.dR........."!|
-0001e620 2a 3a 41 49 5d 5a 00 06 a4 00 00 89 8d 67 8e 00 |*:AI]Z.......g..|
-0001e630 22 31 51 13 4a 20 a9 a8 a5 a6 8b 00 00 00 00 00 |"1Q.J ..........|
-0001e640 00 00 00 00 00 00 00 00 00 00 00 00 00 44 01 00 |.............D..|
-0001e650 07 80 04 44 04 22 04 24 05 00 04 08 01 00 00 c1 |...D.".$........|
+0001e5c0 2e 36 55 0a 4e 01 a0 a1 20 18 00 00 8c 16 1e 26 |.6U.N... ......&|
+0001e5d0 25 aa ab ac be 09 07 78 a5 16 24 00 00 15 1d 24 |%......x..$....$|
+0001e5e0 2d ad ae af bf 6a 00 04 00 00 0c 00 00 0d 58 04 |-....j........X.|
+0001e5f0 2c 35 5b 14 54 66 82 02 00 00 00 88 00 1c 1b 23 |,5[.Tf.........#|
+0001e600 2b b0 b1 b2 bd 5d 00 00 84 00 00 00 00 76 61 0e |+....].......va.|
+0001e610 34 33 12 64 52 10 00 08 00 26 8a 00 00 1a 22 21 |43.dR....&...."!|
+0001e620 2a b3 41 b4 5d 5a 00 06 91 22 00 89 8d 67 8e 00 |*.A.]Z..."...g..|
+0001e630 32 31 51 13 bc 29 1e 1c 92 1a 8b 00 00 00 00 00 |21Q..)..........|
+0001e640 00 00 00 00 00 00 00 00 00 00 00 00 00 04 18 00 |................|
+0001e650 30 00 24 40 04 00 04 24 15 00 14 00 16 00 00 c1 |0.$@...$........|
0001e660 c1 10 b0 c3 c3 30 b1 c5 c5 30 b2 c7 c7 10 b3 c9 |.....0...0......|
-0001e670 c9 30 b4 06 cb 10 c2 04 cd 10 c3 0c cf 10 c4 03 |.0..............|
-0001e680 d1 10 c5 0b d3 10 c6 80 d5 10 c7 0a d7 30 bb 01 |.............0..|
-0001e690 d9 30 bc 09 db 30 b9 78 dd 10 b8 07 df 30 ba 29 |.0...0.x.....0.)|
-0001e6a0 e1 10 b6 32 e3 10 d0 1b e5 10 d1 42 e7 10 d2 4d |...2.......B...M|
-0001e6b0 e9 10 d3 00 5c 0e 05 1e 2e 36 55 2a 4e 01 a0 a1 |....\....6U*N...|
+0001e670 c9 30 b4 06 cb 10 c3 e7 cd 10 bd 0c cf 10 c4 03 |.0..............|
+0001e680 d1 10 c5 0b d3 10 c6 80 d5 10 c7 a3 d7 30 bb a2 |.............0..|
+0001e690 d9 30 bc a6 db 30 b9 a8 dd 10 b8 a9 df 30 ba a4 |.0...0.......0..|
+0001e6a0 e1 10 b6 e9 e3 10 d0 9d e5 10 d1 a7 e8 10 d2 10 |................|
+0001e6b0 b7 10 d3 00 5c 0e 05 1e 2e 36 55 2a 4e 01 a0 a1 |....\....6U*N...|
0001e6c0 0c 1a 00 00 8c 16 1e 26 25 aa ab ac 45 09 2c 78 |.......&%...E.,x|
0001e6d0 a5 18 00 00 00 15 1d 24 2d ad ae af 4d 00 00 06 |.......$-...M...|
0001e6e0 00 00 1c 00 00 0d 58 20 2c 35 5b 28 54 66 82 04 |......X ,5[(Tf..|

@ -0,0 +1,38 @@
--- /tmp/$01D4000.FL1.hex 2021-12-23 23:34:53.026586003 +0000
+++ /tmp/$01D4000.FL1.bat.hex 2021-12-23 23:34:53.210590857 +0000
@@ -4151,13 +4151,13 @@
00010940 00 18 1e 07 70 5d 00 5f 04 55 24 4c 04 61 34 4c |....p]._.U$L.a4L|
00010950 24 00 01 00 4a 00 14 90 81 49 b1 22 1f 00 04 90 |$...J....I."....|
00010960 b0 22 e0 ff 10 27 04 d0 e0 18 f6 06 00 c0 a2 8b |."...'..........|
-00010970 00 50 00 18 ec 06 70 5d 00 5f 02 55 22 4c 02 61 |.P....p]._.U"L.a|
+00010970 00 50 e0 18 54 00 70 5d 00 5f 02 55 22 4c 02 61 |.P..T.p]._.U"L.a|
00010980 32 4c 22 00 01 00 4e 00 00 c0 84 8e 72 59 ff c0 |2L"...N.....rY..|
00010990 15 fe 00 01 10 58 00 01 72 5d 22 5f 20 55 20 4c |.....X..r]"_ U L|
000109a0 20 61 30 4c 20 00 01 00 4e 00 10 01 b5 58 11 00 | a0L ...N....X..|
000109b0 b4 58 27 00 b3 58 16 00 72 59 ff c0 cd 96 8f 60 |.X'..X..rY.....`|
000109c0 00 50 00 18 9c 06 70 5d 00 5f 02 55 22 4c 02 61 |.P....p]._.U"L.a|
-000109d0 32 4c 22 00 01 00 4a 00 02 90 b0 22 e0 ff 30 26 |2L"...J...."..0&|
+000109d0 32 4c 22 00 01 00 4a 00 02 90 b0 22 e0 ff c0 26 |2L"...J...."...&|
000109e0 e0 18 7c 06 70 5d 00 5f 02 55 22 4c 02 61 32 4c |..|.p]._.U"L.a2L|
000109f0 22 00 01 00 4a 00 b0 58 20 00 02 f3 1e 01 72 59 |"...J..X .....rY|
00010a00 ff c0 a3 fd 0f f0 72 5d 22 5f 20 55 20 4c 20 61 |......r]"_ U L a|
@@ -4182,7 +4182,7 @@
00010b30 30 05 70 5d 00 5f 02 55 22 4c 02 61 32 4c 22 00 |0.p]._.U"L.a2L".|
00010b40 01 00 4a 00 02 90 b0 22 e0 ff b0 26 09 00 e0 18 |..J...."...&....|
00010b50 0e 05 72 5d 22 5f 20 55 20 4c 20 61 30 4c 20 00 |..r]"_ U L a0L .|
-00010b60 01 00 4a 00 30 7b 02 00 80 18 f6 04 20 55 22 4c |..J.0{...... U"L|
+00010b60 01 00 4a 00 30 7b 02 00 e0 18 5a 00 20 55 22 4c |..J.0{....Z. U"L|
00010b70 02 61 32 4c 22 00 01 00 6e 00 02 b1 00 50 12 12 |.a2L"...n....P..|
00010b80 72 59 ff c0 cd f3 00 50 1d 11 70 5d 00 5f 02 55 |rY.....P..p]._.U|
00010b90 22 4c 02 61 32 4c 22 00 01 00 4a 00 02 90 b0 22 |"L.a2L"...J...."|
@@ -4190,8 +4190,8 @@
00010bb0 34 4c 24 00 01 00 6e 00 04 b1 10 30 04 f1 e0 18 |4L$...n....0....|
00010bc0 a0 04 72 5d 22 5f 20 55 20 4c 20 61 30 4c 20 00 |..r]"_ U L a0L .|
00010bd0 01 00 6e 00 00 83 01 00 72 5d 22 5f 20 55 20 4c |..n.....r]"_ U L|
-00010be0 20 61 30 4c 20 00 01 00 4a 00 60 7b 01 00 9c 11 | a0L ...J.`{....|
-00010bf0 72 5d 22 5f 20 55 20 4c 20 61 30 4c 20 00 01 00 |r]"_ U L a0L ...|
+00010be0 20 61 30 4c 20 00 01 00 4a 00 60 73 01 00 50 73 | a0L ...J.`s..Ps|
+00010bf0 01 00 e0 18 2c 00 20 4c 20 61 30 4c 20 00 01 00 |....,. L a0L ...|
00010c00 4a 00 50 7b 01 00 8c 10 20 55 22 4c 02 61 32 4c |J.P{.... U"L.a2L|
00010c10 22 00 01 00 4a 00 02 90 10 49 00 50 05 10 10 00 |"...J....I.P....|
00010c20 00 71 84 04 e4 10 10 00 00 b1 84 04 72 5d 22 5f |.q..........r]"_|
Loading…
Cancel
Save