jwise / x2100-ec

Patches for 51nb X2100 Embedded Controller firmware
17 stars 4 forks source link

Patches don't seem to work #5

Closed ieure closed 3 years ago

ieure commented 3 years ago

Hi, I'm not sure if I'm doing something wrong or stupid or what, but I applied these patches:

...and I notice no difference. My X2100 isn't bricked or anything, but all three of those issues are still present.

After I flashed the ROM and rebooted, I re-dumped it to compare. The whole BIOS ROM differs from both the original one I dumped and the patched one I generated. I extracted the ec.bin from that, and compared it, and it's identical to the patched one.

Any suggestions welcomed, I'm not sure why it wouldn't be working for me.

Original files from my untouched X2100:

b64cb6aa28cfd859a95ac62e8995ceff76e842a4  x2100-current-internal-flashrom-1.bin
dec6f7d860fcda1a81cf0c5b648027a89deca656  ec-orig.bin

Patched:

72b50e0bd9a82c7d628a84604251e0b806476e17  x2100-patched.bin
06d403b23c3d7de958dc8969bbd09f0f2a3a0135  ec-patched.bin

Current state of the hardware, still exhibiting the brightness & battery problems:

6bafe30a409fcf8dd7e59671dc786b24a9742305  verify-firmware-3.bin
06d403b23c3d7de958dc8969bbd09f0f2a3a0135  verify-ec-3.bin

Diff of the original vs. patched EC:

--- ec-orig.bin.orig    2021-01-19 18:08:03.370930431 -0800
+++ ec-patched.bin.new  2021-01-19 18:08:03.370930431 -0800
@@ -1,5 +1,5 @@
 00000000  78 16 00 00 4e 00 00 00  ec 0b 02 01 00 00 09 03  |x...N...........|
-00000010  48 7f 00 00 00 01 02 00  c7 63 00 00 00 00 00 00  |H........c......|
+00000010  48 7f 00 00 00 01 02 00  00 65 00 00 00 00 00 00  |H........e......|
 00000020  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
 *
 00000040  d6 03 00 00 2f c7 3a 00  ff ff ff ff 00 00 00 00  |..../.:.........|
@@ -780,7 +780,7 @@
 00003140  13 00 00 71 56 00 1e 03  12 00 00 71 56 00 a0 50  |...qV......qV..P|
 00003150  00 08 ee 0a 12 00 00 71  84 00 10 20 00 5d ee 0a  |.......q... .]..|
 00003160  87 01 05 01 72 b0 12 00  10 71 84 00 97 50 0f 10  |....r....q...P..|
-00003170  13 00 00 31 24 01 b0 58  f0 ff 13 00 00 71 87 00  |...1$..X.....q..|
+00003170  10 00 e0 00 00 98 b0 58  f0 ff 13 00 00 71 87 00  |.......X.....q..|
 00003180  b1 24 40 00 13 00 10 71  84 00 eb 11 b1 20 be ff  |.$@....q..... ..|
 00003190  13 00 10 71 84 00 02 58  ff c0 0f ff ff c0 ad ff  |...q...X........|
 000031a0  00 50 04 10 12 58 ff c0  81 ff 03 5a b2 5a 13 11  |.P...X.....Z.Z..|
@@ -817,7 +817,7 @@
 00003390  5d 01 90 50 05 10 10 30  13 00 00 71 5d 01 12 00  |]..P...0...q]...|
 000033a0  00 71 56 01 10 50 b9 11  12 00 00 31 56 01 12 00  |.qV..P.....1V...|
 000033b0  00 71 87 00 90 50 15 10  72 00 02 00 bc b2 e7 10  |.q...P..r.......|
-000033c0  b0 50 f0 ff 1e 10 72 00  02 00 9c b2 00 c0 40 04  |.P....r.......@.|
+000033c0  b0 50 f0 ff 1e 10 72 00  02 00 00 c9 00 c0 40 04  |.P....r.......@.|
 000033d0  13 00 00 71 87 00 e5 10  10 30 13 00 00 71 56 01  |...q.....0...qV.|
 000033e0  12 00 00 71 84 00 60 06  90 18 46 01 b0 20 bf ff  |...q..`...F.. ..|
 000033f0  13 00 00 71 84 00 03 5a  b2 58 09 00 00 c0 d6 1d  |...q...Z.X......|
@@ -826,7 +826,7 @@
 00003420  12 53 ad 11 12 00 00 f1  38 01 01 53 b5 10 17 d4  |.S......8..S....|
 00003430  07 83 07 00 ee 10 01 53  1c 10 12 00 00 71 37 01  |.......S.....q7.|
 00003440  a0 50 b5 10 11 00 00 b1  30 01 e3 10 10 30 07 f7  |.P......0....0..|
-00003450  13 00 20 f1 26 01 11 00  10 b1 30 01 12 00 00 f1  |.. .&.....0.....|
+00003450  00 2c 00 2c 00 2c 11 00  10 b1 30 01 12 00 00 f1  |.,.,.,....0.....|
 00003460  30 01 00 06 91 12 42 58  ff c0 bf fc 12 00 00 f1  |0.....BX........|
 00003470  32 01 f0 49 b2 5a 7b 14  20 63 10 5b f0 49 b0 66  |2..I.Z{. c.[.I.f|
 00003480  31 00 12 00 10 f1 26 01  10 53 41 11 12 00 00 f1  |1.....&..SA.....|
@@ -836,7 +836,7 @@
 000034c0  20 f1 26 01 00 c0 dc 02  12 00 00 71 36 01 b0 50  | .&........q6..P|
 000034d0  1e 00 b7 11 12 00 30 f1  40 01 b0 5a cd cc 30 63  |......0.@..Z..0c|
 000034e0  d1 49 10 5b 70 66 12 00  20 f1 26 01 20 53 a5 10  |.I.[pf.. .&. S..|
-000034f0  10 5b d0 66 20 53 57 10  13 00 30 f1 26 01 e3 10  |.[.f SW...0.&...|
+000034f0  10 5b d0 66 20 53 57 10  00 2c 00 2c 00 2c e3 10  |.[.f SW..,.,.,..|
 00003500  10 30 07 f6 22 58 ff c0  a1 fb 12 00 00 71 84 00  |.0.."X.......q..|
 00003510  00 06 89 10 10 24 13 00  00 71 84 00 03 5a b2 5a  |.....$...q...Z.Z|
 00003520  13 11 e4 10 03 5a b2 5a  14 11 00 c0 6a 78 00 c0  |.....Z.Z....jx..|
@@ -3092,8 +3092,8 @@
 0000c290  30 2e 30 38 00 31 30 2f  31 34 2f 30 36 00 30 30  |0.08.10/14/06.00|
 0000c2a0  30 30 00 00 dd 88 4b 42  43 20 4f 45 4d 20 00 30  |00....KBC OEM .0|
 0000c2b0  2e 30 30 2e 30 31 00 30  33 2f 30 31 2f 31 33 00  |.00.01.03/01/13.|
-0000c2c0  32 30 30 34 00 00 14 14  18 18 1c 1c 20 20 24 24  |2004........  $$|
-0000c2d0  28 28 2c 2c 30 30 37 37  3c 3c 41 41 46 46 4e 4b  |((,,0077<<AAFFNK|
+0000c2c0  32 30 30 34 00 00 01 01  02 02 04 04 08 08 10 10  |2004............|
+0000c2d0  20 20 2c 2c 30 30 37 37  3c 3c 41 41 46 46 4e 4b  |  ,,0077<<AAFFNK|
 0000c2e0  56 50 5e 55 63 5a 00 07  0e 09 1c 1b 12 15 38 3f  |VP^UcZ........8?|
 0000c2f0  36 31 24 23 2a 2d 70 77  7e 79 6c 6b 62 65 48 4f  |61$#*-pw~ylkbeHO|
 0000c300  46 41 54 53 5a 5d e0 e7  ee e9 fc fb f2 f5 d8 df  |FATSZ]..........|
@@ -3183,4 +3183,13 @@
 0000c880  2f 00 2a 00 06 04 05 03  01 02 d8 20 c7 90 ff ff  |/.*........ ....|
 0000c890  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
 *
+0000c900  16 00 00 00 b0 18 01 00  09 03 00 00 28 01 01 00  |............(...|
+0000c910  0f 03 00 00 26 01 01 00  0b 03 00 00 00 0b 01 00  |....&...........|
+0000c920  00 ff 00 00 00 00 00 00  ff ff ff ff ff ff ff ff  |................|
+0000c930  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
+*
+0000c970  12 00 00 f1 00 0b f0 06  94 10 b0 2a ff ff 10 32  |...........*...2|
+0000c980  13 00 00 f1 24 01 10 00  ef 0f f1 67 ff ff ff ff  |....$......g....|
+0000c990  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
+*
 00010000
speccy48 commented 3 years ago

Hi

Got mine recently and applied the patch 2 days ago, worked fine for me.

What I did (per https://www.xyte.ch/software/51nb-x210-x2100-software-support/):

  1. Checked that I already have v25 BIOS (so I skipped that step).

  2. Cloned flashrom from GitHub

  3. Downloaded the layout file: https://www.xyte.ch/wp-content/uploads/2020/12/layout.txt

  4. Downloaded the EC patch pre-configured by XY Tech: https://www.xyte.ch/wp-content/uploads/2020/10/X2100_2020_09_04.zip

  5. sudo flashrom -p internal -l layout.txt -i ec -w bios.bin

  6. Turned off the laptop, disconnected the battery and power cord.

  7. In a few minutes connected back the battery and the power cord and turned on the laptop.

ieure commented 3 years ago

Thanks, that worked!