Page 4 of 11

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Thu May 19, 2016 7:20 am
by theamdman
Tasurinchi wrote:
hamish wrote:If you are running Linux, then the following steps run the patching correctly and spit out the patched ISO file:
Nice! Thanks a lot hamish! :thumbs-UP:

I was trying yesterday the cheapskate version of modifying a xx20 keyboard with my dremel, my intention was to patch my X230 immediately, but I couldn't figured out how... :|

I will then try to patch my X230 during this week following your instructions, it would be good if you could add those steps in the wiki page IMO.
I made a quick guide to show you how to pull it from git and flash it. https://www.reddit.com/r/thinkpad/wiki/ecmod

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Thu May 19, 2016 7:40 am
by hamish
theamdman wrote:
Tasurinchi wrote:Nice! Thanks a lot hamish! :thumbs-UP:

I was trying yesterday the cheapskate version of modifying a xx20 keyboard with my dremel, my intention was to patch my X230 immediately, but I couldn't figured out how... :|

I will then try to patch my X230 during this week following your instructions, it would be good if you could add those steps in the wiki page IMO.
I made a quick guide to show you how to pull it from git and flash it. https://www.reddit.com/r/thinkpad/wiki/ecmod
Cool, I added some of that same info to the thinkwiki today too. I'm interested in your step-8 - the image should run a batch file that does the flashing automatically, did you not find that to be the case?

I've been meaning to spend some time to add support for creating USB flash images the repo, which would remove a couple of steps, too.

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Thu May 19, 2016 7:43 am
by Tasurinchi
theamdman wrote:I made a quick guide to show you how to pull it from git and flash it. https://www.reddit.com/r/thinkpad/wiki/ecmod
Cool! Thanks a lot!

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Thu May 19, 2016 8:51 am
by nitrocaster
theamdman wrote: I made a quick guide to show you how to pull it from git and flash it. https://www.reddit.com/r/thinkpad/wiki/ecmod
Nice! Added to the OP.

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Thu May 19, 2016 10:37 am
by theamdman
hamish wrote:
theamdman wrote:
I made a quick guide to show you how to pull it from git and flash it. https://www.reddit.com/r/thinkpad/wiki/ecmod
Cool, I added some of that same info to the thinkwiki today too. I'm interested in your step-8 - the image should run a batch file that does the flashing automatically, did you not find that to be the case?

I've been meaning to spend some time to add support for creating USB flash images the repo, which would remove a couple of steps, too.
While flashing from USB it did not. This maybe due to the different format that the image creation tool uses, that of which I found here. I assume a CD would automatically flash.

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Thu May 19, 2016 11:17 am
by hamish
theamdman wrote:
hamish wrote:
Cool, I added some of that same info to the thinkwiki today too. I'm interested in your step-8 - the image should run a batch file that does the flashing automatically, did you not find that to be the case?

I've been meaning to spend some time to add support for creating USB flash images the repo, which would remove a couple of steps, too.
While flashing from USB it did not. This maybe due to the different format that the image creation tool uses, that of which I found here. I assume a CD would automatically flash.
Thats very weird - both the cdrom and usb boot up using exactly the same DOS partition, and thus are using the same autoexec.bat

I've just had a look at the image generated with your steps and cannot see anything wrong. I'll reboot on real hardware tomorrow and double-check, but right now I am stumped as to why you didnt get the automatic menu

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Thu May 19, 2016 10:44 pm
by hamish
I have updated the git repo so that it now creates bootable USB disk images. I have also re-worked the README instructions so that they are hopefully a clear step-by-step guide on how to use the repo.

Finally, for people who like to see what will happen when they boot the image (handy for testing!), I have added a set of simple commands to boot the final image in an emulator.
e.g:

Code: Select all

make patched.x230.img.test

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Fri May 20, 2016 8:02 am
by Tasurinchi
I'm afraid I have another dumb question, this time regarding the kb pins that need to be isolated.

Are we talking about applying tape to the keyboard connector on the motherboard? Or to the connector directly on the keyboard? From the drawing/picture shown in th Wiki page is not clear to me, some posts above even mention disassembling the keyboard.

A "real" life pic would me much appreciated, I know those components are tiny, but a picture is worth a thousand words they say :wink:

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Fri May 20, 2016 9:56 am
by nitrocaster
Tasurinchi wrote:I'm afraid I have another dumb question, this time regarding the kb pins that need to be isolated.

Are we talking about applying tape to the keyboard connector on the motherboard? Or to the connector directly on the keyboard? From the drawing/picture shown in th Wiki page is not clear to me, some posts above even mention disassembling the keyboard.

A "real" life pic would me much appreciated, I know those components are tiny, but a picture is worth a thousand words they say :wink:
You need to disassemble the keyboard.
I got a cheapass chinese keyboard (don't buy these) and took some pictures that can help to understand the process: http://imgur.com/a/YLW83

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Fri May 20, 2016 11:09 am
by Tasurinchi
nitrocaster wrote:I got a cheapass chinese keyboard (don't buy these) and took some pictures that can help to understand the process:
Aha! Now the drawing in the Wiki makes much more sense... Thanks a lot for the pictures! Generally the instructions are getting clearer and better each day :wink:

I also have a battered down keyboard for trying to tape the pins, it survived the dremel action to get rid of the nubs so I hope it survives the disassembling.

So this isolation needs to be done, right? The feedback I read so far was not so conclusive, some users saying the keyboard overheats, some saying it doesn't.

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Fri May 20, 2016 12:04 pm
by nitrocaster
Tasurinchi wrote: So this isolation needs to be done, right?
Correct.

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Sat May 21, 2016 4:20 pm
by Frobe70
What is a cheap chinese keyboard?
Is it a cheap clone, or is there different quality genuine keyboards on eBay?

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Sat May 21, 2016 4:43 pm
by nitrocaster
Frobe70 wrote:What is a cheap chinese keyboard?
Is it a cheap clone, or is there different quality genuine keyboards on eBay?
I'm not sure if genuine or clone, but they're absolute crap. I got 2 such keyboards on AliExpress - not only they were crap quality from the very beginning, but also bent, rusty, scuffed and dirty.

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Sat May 21, 2016 5:11 pm
by brchan
nitrocaster wrote:
Frobe70 wrote:What is a cheap chinese keyboard?
Is it a cheap clone, or is there different quality genuine keyboards on eBay?
I'm not sure if genuine or clone, but they're absolute crap. I got 2 such keyboards on AliExpress - not only they were crap quality from the very beginning, but also bent, rusty, scuffed and dirty.
Out of curiosity, can you post full front and rear pics of that 'bad' keyboard? Is there even an FRU sticker? I have never seen a knockoff thinkpad keyboard before. I suspect these were actually discarded OEM parts that did not pass initial QC. Then Aliexpress picked them up and marked them as new, which I suppose is technically correct, since they were never used.

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Sat May 21, 2016 5:44 pm
by nitrocaster
brchan wrote: Out of curiosity, can you post full front and rear pics of that 'bad' keyboard? Is there even an FRU sticker? I have never seen a knockoff thinkpad keyboard before. I suspect these were actually discarded OEM parts that did not pass initial QC. Then Aliexpress picked them up and marked them as new, which I suppose is technically correct, since they were never used.
These were used - again, dirty, rusty and scuffed.
I took some pics before. The rear side is covered with black matte plastic film - genuine keyboards don't have this.
Also notice that nub rows on trackpoint cap are not 45-degree inclined. Here's how it should look like:
Image

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Mon May 23, 2016 2:21 pm
by Tasurinchi
Unfortunately the instructions to flash the BIOS are not working in my X230 :(

I tried both the set of instructions from the readme file and the reddit thread. The generation of the image files seems to work without errors, but the resulting USB drive brings two issues:

When booting I get the correct screen saying the flashing of the X230 will start, but after pressing a key I get the following message:

Code: Select all

Parameter error!
...
...
Error 105 - Command line error!
I thought the error was in the autoexec file, so I tried the manual approach from the reddit thread:
Run cd.. to go back and after you got the name of your file, you need to flash it. You are flashing the .FL2 File.(for example)
And here I see something weird, I was expecting to find a subdirectory with the X230 iso name under the flash directory. Something like

Code: Select all

/flash/g2uj23us (this is the iso file documented in the Wiki for my X230)
Instead I find

Code: Select all

/flash/g2eta6ww
I ignored this and tried anyway with the following command:
dosflash /sd /ipf ec /file g2eta6ww\$01D3000.FL2
The booting process runs and the BIOS is flashed. So far so good

But then the keys still not work, only the "End" key works. CapsLock, Del, Fn+Home, Fn+End, PgUp, PgDw and the browser keys still don't work

A feedback regarding the keyboard pins. From the Wiki link it seems that the pins that should be isolated are the ones from the "second layer" so to say. But this did not work for me, the ThinkPad would power on, but the arrow keys weren't working. I tried then isolating the pins from the first layer on the outside, but then the TP won't power on.

Finally I put the tape in the first layer, but on the inside, so the tape stays squeezed between the kb connector. Now everything works, apart from the above mentioned problems, may this be the issue why some keys don't work? Or am I missing something on the Linux side?

Thanks a lot in advance for the feedback! :thumbs-UP: :thumbs-UP:

P.S. Hopefully the above make some sense...

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Mon May 23, 2016 2:43 pm
by nitrocaster
Tasurinchi wrote: A feedback regarding the keyboard pins. From the Wiki link it seems that the pins that should be isolated are the ones from the "second layer" so to say. But this did not work for me, the ThinkPad would power on, but the arrow keys weren't working. I tried then isolating the pins from the first layer on the outside, but then the TP won't power on.
Finally I put the tape in the first layer, but on the inside, so the tape stays squeezed between the kb connector.
Could you upload some drawings or photos showing what you tried to do and what you finally did?
Tasurinchi wrote: Now everything works, apart from the above mentioned problems, may this be the issue why some keys don't work? Or am I missing something on the Linux side?
It looks like EC firmware wasn't updated. Maybe you flashed the original image? Did you plug AC adapter before flashing?

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Mon May 23, 2016 3:24 pm
by Tasurinchi
nitrocaster wrote:Could you upload some drawings or photos showing what you tried to do and what you finally did?
Sure! I'll try to take a clear picture during the next days... Things are very tiny around that area :D
nitrocaster wrote:It looks like EC firmware wasn't updated. Maybe you flashed the original image? Did you plug AC adapter before flashing?
Yes, AC adapter + a fully charged battery (old habits from flashing BIOS updates...)

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Mon May 23, 2016 4:38 pm
by Summilux
Fantastic thread! I hadn't followed the subject since 2012 (!) but now I might finally update my signature and get my hand on an X230 thanks to Zmatt, Hamish, Nitrocaster and others' efforts :bow:

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Mon May 23, 2016 8:55 pm
by hamish
Tasurinchi wrote: When booting I get the correct screen saying the flashing of the X230 will start, but after pressing a key I get the following message:

Code: Select all

Parameter error!
...
...
Error 105 - Command line error!
I thought the error was in the autoexec file, so I tried the manual approach from the reddit thread:
You are absolutely right - there is an error in the autoexec.bat, which I have now fixed.

The reason why the directory name was not the one you were expecting is that the ISO name is different to the BIOS version name (and that is in turn different to the EC version name)

So, ISO g2uj23us.iso contains BIOS G2ETA6WW and EC G2HT35WW

As to the key problems - it does sound somewhat like the EC flash did not happen. Except for the CapsLock key, all those keys are the usual ones that dont work without the EC patch applied. Are you just checking the capslock LED? Because that does not work, even with the patch

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Tue May 24, 2016 1:13 am
by Tasurinchi
hamish wrote:You are absolutely right - there is an error in the autoexec.bat, which I have now fixed.
Cool, thanks for the fix :thumbs-UP:
hamish wrote:Are you just checking the capslock LED?
Nope, also Del, Fn+Home, Fn+End, PgUp, PgDw and the browser keys don't work.

I'm thinking on trying again tonight, this time with Computrace and all the security chips settings disabled. I'll keep you guys updated...

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Tue May 24, 2016 3:03 pm
by Tasurinchi
Short update, I disabled computrace and all other security settings, but the keys still don't work.

The EC is being flashed, I can see it during boot and it also get the typical high speed fan noise.

I tried to repeat the complete process but I can't clone the git repo, I get this error message:
Failed to connect to github.com port 443: No route to host
Did anybody in this thread manage to get the keys working with a X230?

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Tue May 24, 2016 3:11 pm
by nitrocaster
Tasurinchi wrote:Short update, I disabled computrace and all other security settings, but the keys still don't work.

The EC is being flashed, I can see it during boot and it also get the typical high speed fan noise.

I tried to repeat the complete process but I can't clone the git repo, I get this error message:
Failed to connect to github.com port 443: No route to host
Did anybody in this thread manage to get the keys working with a X230?
Me and Hamish, at least. I suspect you flash stock image.

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Tue May 24, 2016 4:04 pm
by Tasurinchi
But I followed the steps few times, is there any easy way to compare the patched image with the stock image?

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Tue May 24, 2016 4:09 pm
by nitrocaster
Tasurinchi wrote:But I followed the steps few times, is there any easy way to compare the patched image with the stock image?
This?

Code: Select all

 % xxd b1 > b1.hex
 % xxd b2 > b2.hex
And then

Code: Select all

 % diff b1.hex b2.hex
or

Code: Select all

 % vimdiff b1.hex b2.hex
Another way would be using cmp or comparing the checksums/hashes.

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Tue May 24, 2016 4:14 pm
by Tasurinchi
Thanks!

I'll keep trying tomorrow...

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Tue May 24, 2016 7:20 pm
by hamish
Tasurinchi wrote:Thanks!

I'll keep trying tomorrow...
It will be a little difficult to diagnose this remotely. Perhaps if you could start with showing us the output of

Code: Select all

sudo dmidecode -t bios
and maybe a screenshot of the BIOS setup screen with all the version numbers.

Have you tried re-attaching the original keyboard? If so, can you check what a couple of the changed keys do on it - eg are Insert and Delete actually generating insert and delete

I'm still concerned about your report that capslock is not working - nothing in the firmware patch changes the capslock key, so if the capslock key does not work then there is a problem outside of the firmware update. (Note that the capslock light does not work, but the rest of the capslock function is completely unchanged between the original and the classic keyboard)

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Wed May 25, 2016 1:21 am
by Tasurinchi
hamish wrote:and maybe a screenshot of the BIOS setup screen with all the version numbers.
I'll try again tonight redoing every step, I don't remember getting errors in Linux during the patching, but I will keep an eye open and make sure I don't miss any dependencies.
hamish wrote:(Note that the capslock light does not work, but the rest of the capslock function is completely unchanged between the original and the classic keyboard
DOH! I was only focusing if the light goes on or not... I'll check it again tonight, if I remember correctly I was testing two keyboards, one of them without the pins isolated yet (I only used it to quickly test the PgUp, PgDw and so on...) I will also try to document all steps...

Thanks a lot for the help! :thumbs-UP:

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Wed May 25, 2016 1:05 pm
by Tasurinchi
SUCCESS!!! :banana:

The issue was indeed due to dependencies, when repeating the process of creating the image I saw an error I overlooked before:

Code: Select all

mec_encrypt.c:6:30: fatal error: openssl/blowfish.h: No such file or directory
 #include <openssl/blowfish.h>
                              ^
compilation terminated.
Makefile:8: recipe for target 'mec_encrypt' failed
make[1]: *** [mec_encrypt] Error 1
make[1]: Leaving directory '/home/xxxxxxx/thinkpad-ec/mec-tools'
Makefile:195: recipe for target 'mec-tools/mec_encrypt' failed
make: *** [mec-tools/mec_encrypt] Error 2
Google quickly said the solution would be this one:

Code: Select all

sudo aptitude install libssl-dev
Then I repeated the process and everything went very smooth. I forgot to mention I'm running Debian Jessie.

So now I just need to replace this battered keyboard and look for a T430 as next guinea pig...

Thanks guys again for the help! I still owe you the pictures of the keyboard mod, will do that during the weekend.

Re: Installing classic keyboard into X230 with EC firmware mod

Posted: Wed May 25, 2016 7:36 pm
by hamish
Tasurinchi wrote:SUCCESS!!! :banana:

The issue was indeed due to dependencies,

Code: Select all

mec_encrypt.c:6:30: fatal error: openssl/blowfish.h: No such file or directory
 #include <openssl/blowfish.h>
                              ^
Good news!

Do you have any idea how you ended up with a bootable install image after having a fatal error? I'm trying to find what change I need to make to guard against outputing anything useful if there was a compile error. (I've added libssl-dev to the quick-start README now too)