Skip to content

Commit 50b536b

Browse files
authored
Merge pull request #174 from notgivenby/t480-guide
add T480 flashing guide
2 parents 682ff7d + 94e94bb commit 50b536b

File tree

10 files changed

+148
-0
lines changed

10 files changed

+148
-0
lines changed
Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
---
2+
layout: default
3+
title: Lenovo T480 Maximized
4+
permalink: /T480-maximized-flashing/
5+
nav_order: 1
6+
parent: Step 2 - Flashing Guides
7+
grand_parent: Installing and configuring
8+
---
9+
10+
Lenovo T480 (Maximized)
11+
===
12+
13+
[T480 Hardware Maintenance Manual](https://download.lenovo.com/pccbbs/mobiles_pdf/t480_hmm_en.pdf)
14+
15+
Accessing and flashing the BIOS chip on a T-series machine has never been easier. The process is straightforward and takes approximately 10 minutes.
16+
17+
The ThinkPad T480 has two SPI flash chips important for the port. The first chip holds the BIOS, ME, etc., while the second holds the Thunderbolt firmware. To access these chips, you only need to remove the back panel, which is secured by six screws.
18+
19+
For whole procedure you will need:
20+
- A Phillips screwdriver +1 (PH1), which is standard for most laptop screws.
21+
- An assembled Raspberry Pi or CH341A SPI programmer. You should use a CH341A revision 1.6 or later (e.g., 1.6, 1.7, etc.) because these versions have a properly implemented and enforced voltage regulator, ensuring stable 3.3V operation (3.3V is important!) (e.g. [Modified CH341A SPI programmer](https://novacustom.com/product/modded-ch341a-bios-firmware-programmer-3v/) by Novacustom) or [open-source Tigard tool](https://github.com/tigard-tools/tigard). Using Raspberry Pi pico is described in the [Libreboot flash guide](https://libreboot.org/docs/install/spi.html).
22+
- Other laptop/PC with a Linux-based OS installed.
23+
- Optional: A plastic guitar pick or an old credit card to help detach the bottom case from the clips holding it in place. Otherwise, it can be difficult to remove, increasing the risk of breaking the tabs or the top part of the bottom case above the battery connector.
24+
25+
There is still debate over which programmer and software should be used (flashprog vs. flashrom). Before following this guide, make sure you read [README.md](https://github.com/linuxboot/heads/tree/master/blobs/xx80/README.md) and the related information.
26+
27+
Some ThinkPad T480 units on the used market are affected by an Intel bug in the Thunderbolt firmware. In short, the flash chip becomes full, causing Thunderbolt fast charging to stop working, though slow charging still functions. This issue can also affect the USB-C port. For convenience, Heads provides a fixed and padded Thunderbolt firmware that resolves the "charging problem" if your laptop is affected. Board testers did not encounter this issue, and it is unlikely to occur if your laptop was in use for more than 12 months before flashing. If you do experience the "charging bug," it is possible to fix it with external flashing. Also, the update is possible prior flashing heads using [fwupd from a Linux distribution](https://www.reddit.com/r/thinkpad/comments/12tf6xv/psa_t480_thunderbolt_controller_v23_is_now_on/?rdt=44850)
28+
29+
Please note that as of March 2025, Thunderbolt data transfer is not supported upstream by [coreboot](https://review.coreboot.org/c/coreboot/+/83274). However, video output through Thunderbolt and charging still work. This means only the USB-C charging port can be used for data transfer.
30+
31+
## Flashing Heads
32+
33+
First, remove the battery and disconnect the power cable from your device. Removing the screws will allow you to remove the back panel. A guitar pick or an old credit card can be helpful for detaching the panel.
34+
35+
![Back view]({{ site.baseurl }}/images/T480/1_screws.jpg)
36+
37+
The back panel and the battery are removed. Important, ensure that all batteries, including the CMOS battery, are disconnected. Arrows indicate the direction you should pull the connectors. Pull the plastic part, not the wires, as the wires are thin and can be damaged.
38+
39+
![Battery]({{ site.baseurl }}/images/T480/2_battery.jpg)
40+
41+
The top-right chip corresponds to the Thunderbolt SPI flash chip (1 MB). The chip located in the middle of the board corresponds to the BIOS (16 MB) chip, respectively.
42+
43+
The chip located in the middle of the board contains the [Intel Management Engine (ME)](https://www.flashrom.org/ME) firmware.
44+
45+
![Chips]({{ site.baseurl }}/images/T480/3_chips.jpg)
46+
47+
First [download]({{ site.baseurl }}/Downloading) or build (please see [general building]({{ site.baseurl }}/{{ site.baseurl }}/x230-maximized-building/) / [building x230]({{ site.baseurl }}/x230-maximized-building/)) the board rom for this board and verify its hash value.
48+
49+
Try to read the name of the SPI flash chip. The dot on the chip helps to identify the correct clip orientation.
50+
51+
![SPI BIOS flash chip closed view]({{ site.baseurl }}/images/T480/4_bios_chip_orientation.jpg)
52+
53+
First, connect the clip of the CH341A programmer to the chip. Next, connect the programmer to the USB port of your other Linux-based computer with flashrom installed. In my setup, the red wire should be where the dot is (the dot indicates pin 1). Here, please also see the flashing guide for the T430.
54+
55+
Use flashrom to check the chip you are connected to:
56+
57+
```shell
58+
sudo flashrom -p ch341a_spi
59+
```
60+
61+
Here is my output.
62+
63+
![output bios chip]({{ site.baseurl }}/images/T480/5_chip_name.jpg)
64+
65+
Read from the chip twice (where the name of the flash chip is `YYY`):
66+
67+
```shell
68+
sudo flashrom -r ~/t480_original_bios.bin --programmer ch341a_spi -c YYY
69+
```
70+
71+
First output can be seen here.
72+
![1-st read]({{ site.baseurl }}/images/T480/6_lenovo_bios.jpg)
73+
74+
```shell
75+
sudo flashrom -r ~/t480_original_bios_1.bin --programmer ch341a_spi -c YYY
76+
```
77+
Second output can be seen here.
78+
![2-nd read]({{ site.baseurl }}/images/T480/7_lenovo_bios_1.jpg)
79+
80+
Make sure that the dump matches the chip content. If this is the case, the output of the following command will state `Verifying flash... VERIFIED`
81+
82+
```shell
83+
sudo flashrom -v ~/t480_original_bios.bin --programmer ch341a_spi -c YYY
84+
```
85+
Make sure that files do not differ.
86+
87+
```shell
88+
sha256sum t480_original_bios.bin
89+
sha256sum t480_original_bios_1.bin
90+
```
91+
92+
My dumps were the same.
93+
![Comparison]({{ site.baseurl }}/images/T480/8_sha256.jpg)
94+
95+
Alternative comparison is bit-by-bit. If the files are the same, there should be no output of this command. Otherwise, you will see a bit-by-bit difference between the files.
96+
97+
```shell
98+
diff <(hexdump -C t480_original_bios.bin) <(hexdump -C t480_original_bios_1.bin)
99+
```
100+
101+
If the files differ or the chip content does not match the dump, try reconnecting your programmer to the SPI flash chip and make sure your flashrom/flashprog software is up-to-date.
102+
103+
104+
If they are the same, then write `T480-hotp-maximized.rom` to the SPI flash chip:
105+
106+
```shell
107+
sudo flashrom -p ch341a_spi -c YYY -w ~/heads/build/x86/T480-hotp-maximized/T480-hotp-maximized.rom
108+
```
109+
110+
Here is a successful attempt. Be patient, it may take a while.
111+
![erase/write done]({{ site.baseurl }}/images/T480/9_flash.jpg)
112+
113+
If all goes, well you can connect the battery, press the power button and you should see the keyboard LED flash. After that, Heads will boot into its GUI.
114+
115+
Two reboots are sometimes needed after flashing. Force a power off by holding the power button for 10 seconds. Since the memory training data was wiped by the content of the fully flashed ROM, this is normal.
116+
117+
You should then follow through with [configuring keys]({{ site.baseurl }}/Configuring-Keys/).
118+
119+
## Flash Thunderbolt firmware
120+
Important, ensure that power supply and all batteries, including the CMOS battery, are disconnected. After connecting the clip to the Thunderbolt chip as shown in the figure above read from the chip, making sure the connection is stable. The procedure is similar to the flashing Heads on the SPI chip. Therefore, comments are skipped.
121+
122+
```shell
123+
sudo flashrom -r ~/t480_original_tb.bin --programmer ch341a_spi -c YYY
124+
```
125+
126+
```shell
127+
sudo flashrom -r ~/t480_original_tb_1.bin --programmer ch341a_spi -c YYY
128+
```
129+
130+
```shell
131+
sudo flashrom -v ~/t480_original_tb.bin --programmer ch341a_spi -c YYY
132+
```
133+
134+
```shell
135+
sha256sum t480_original_tb.bin
136+
sha256sum t480_original_tb_1.bin
137+
```
138+
139+
```shell
140+
diff <(hexdump -C t480_original_tb.bin) <(hexdump -C t480_original_tb_1.bin)
141+
```
142+
143+
Flash the padded Thunderbolt firmware. The firmware file tb.bin is located in the blobs folder after you build the Heads locally, or in the CircleCI artifacts.
144+
145+
```shell
146+
sudo flashrom -p ch341a_spi -c YYY -w ~/tb.bin
147+
```
148+
Done.

images/T480/1_screws.jpg

142 KB
Loading

images/T480/2_battery.jpg

232 KB
Loading

images/T480/3_chips.jpg

236 KB
Loading
205 KB
Loading

images/T480/5_chip_name.jpg

92.1 KB
Loading

images/T480/6_lenovo_bios.jpg

92.4 KB
Loading

images/T480/7_lenovo_bios_1.jpg

88.5 KB
Loading

images/T480/8_sha256.jpg

43.7 KB
Loading

images/T480/9_flash.jpg

106 KB
Loading

0 commit comments

Comments
 (0)