libreboot / lbwww (public) (License: Unspecified) (since 2023-04-11) (hash sha1)
libreboot website (markdown files). https://libreboot.org/
List of commits:
Subject Hash Author Date (UTC)
Rewrote the T480 thunderbolt flashing instructions bf443e2e4d1cb0f69ff7cbabc7a79a40aaf26736 Leah Rowe 2024-12-29 18:04:10
Notes pertaining to T480/3050 FSP licensing 19fab472018d2f8315b0236f163b7c7725f575be Leah Rowe 2024-12-29 16:56:19
also mention that they are 0201 jumpers 6447f5d1831f0b431f7f8ff824b403b4c9c73c73 Leah Rowe 2024-12-29 15:33:54
jumpers, not jumpjumpers, not jumpss 58bab1695b02f1bc5045479330f262a3e8a3a957 Leah Rowe 2024-12-29 15:15:17
thoUART t480 007136a010c4d620d381532914e0d0b60eb79b72 Leah Rowe 2024-12-29 15:12:25
update t480/3050 errata (tpm and 8254 timer) aad0b223e054d0591274dc0fcfa29618fca8933b Leah Rowe 2024-12-29 14:52:45
Random docs cleanup 2e2b6c7d52c0802c72e2805f0f924d5c447935f2 Leah Rowe 2024-12-27 01:33:55
update 3050micro notes f2dd78251c25dc748f68ca6190960512fd3c9f7e Leah Rowe 2024-12-26 18:01:17
Remove legacy "./build" command from the docs 71b502349ab488f0e91403049181102286eb35e2 Leah Rowe 2024-12-25 09:08:24
Remove legacy "./vendor" command from docs 2ac7deeefc4fdafecb4ba23a3dce271637f9a75a Leah Rowe 2024-12-25 08:59:53
Remove legacy "./update trees" command from docs 443078014dc15c9dd40b428fe245623277e23db2 Leah Rowe 2024-12-25 08:55:21
make libreboot.org text bigger 8e3508c31340feac8bb7d5afed83542dd482f518 Leah Rowe 2024-12-20 16:27:35
note about prepping t480 usb bios updater 4811a7683e1f111ca2d2611915b082bd1fe9f080 Leah Rowe 2024-12-18 06:16:24
correction 777ea30c5968796901f6993a64cb017d5928b970 Leah Rowe 2024-12-18 05:50:01
stragglers 71cc1104e0311d3869bf6182a34720aabb118b0d Leah Rowe 2024-12-18 05:45:29
t480 tb notes, plus notes about touchscreen 8576804b30485e1c1ca71b5562a366dd721f812e Leah Rowe 2024-12-18 05:40:30
context 3ed4b4f6b3523054c8a27a7b3d6208cc7b8a6d27 Leah Rowe 2024-12-17 20:02:21
clean up an errant reference ca4a6756e3e0961255814b948ef888648761d000 Leah Rowe 2024-12-17 20:00:19
move 20241206 rev notes to own page 2a4b7d594316706ccae39f2e52a4f3aa926b659e Leah Rowe 2024-12-17 19:39:05
remove one of the u-boot photos 4aea280c60a82cd95c9a822913110505d30354b3 Leah Rowe 2024-12-17 18:55:49
Commit bf443e2e4d1cb0f69ff7cbabc7a79a40aaf26736 - Rewrote the T480 thunderbolt flashing instructions
Signed-off-by: Leah Rowe <info@minifree.org>
Author: Leah Rowe
Author date (UTC): 2024-12-29 18:04
Committer name: Leah Rowe
Committer date (UTC): 2024-12-29 18:04
Parent(s): 19fab472018d2f8315b0236f163b7c7725f575be
Signer:
Signing key:
Signing status: N
Tree: 76aa0e96740e07f5f69eb8389f30c3111f8dd35c
File Lines added Lines deleted
site/docs/install/t480.md 154 38
File site/docs/install/t480.md changed (mode: 100644) (index 33d1fad..f028690)
... ... Thunderbolt issue (READ THIS BEFORE FLASHING)
177 177
178 178 The thunderbolt firmware on launch units had a bug where certain debug The thunderbolt firmware on launch units had a bug where certain debug
179 179 info is written on certain events, such as plugging in a charger to the USB-C info is written on certain events, such as plugging in a charger to the USB-C
180 connector. This logging is stored in the Thunderbolt firmware's own SPI flash,
180 connector. Log data is stored in the Thunderbolt firmware's own SPI flash,
181 181 which is separate from the main SPI flash containing the system firmware which is separate from the main SPI flash containing the system firmware
182 182 e.g. coreboot. e.g. coreboot.
183 183
184 If that flash gets full, thunderbolt (on factory firmware) stops working and
185 fast charging stops working. It can be prevented by updating the Thunderbolt
186 firmware. You can do this from Lenovo's firmware, using these instructions:
184 This photo shows that flash chip on a ThinkPad T480:
187 185
188 <https://pcsupport.lenovo.com/gb/en/products/laptops-and-netbooks/thinkpad-t-series-laptops/thinkpad-t480s-type-20l7-20l8/solutions/ht508988-critical-intel-thunderbolt-software-and-firmware-updates-thinkpad>
186 <img tabindex=1 alt="ThinkPad T480 NOR flash (thunderbolt firmware)" class="p" src="https://av.libreboot.org/t480/t480tbspi.jpg" /><span class="f"><img src="https://av.libreboot.org/t480/t480tbspi.jpg" /></span>
189 187
190 If you're already affected by the bug, you can restore it to a working state
191 by flashing the Thunderbolt firmware externally. For example this is where its
192 NOR flash is on a T480:
188 It's also present on the T480S (S model), but in a different location; on
189 the S model, the main system flash is still located somewhere near the
190 centre of the board, and the ThunderBolt flash near the edge of the board, as
191 it is on the T480, but the T480/T480s use slightly different wiring and they
192 have a slightly different board layout.
193 193
194 <img tabindex=1 alt="ThinkPad T480 NOR flash (thunderbolt firmware)" class="p" src="https://av.libreboot.org/t480/t480tbspi.jpg" /><span class="f"><img src="https://av.libreboot.org/t480/t480tbspi.jpg" /></span>
194 If that flash gets full, thunderbolt PCI-E stops working and fast charging
195 stops working, but slow charging still works. The issue can be prevented by
196 updating the firmware. See:
195 197
196 This page shows how to do that:
197
198 <https://gitlab.com/MobileAZN/lenovo-t480-thunderbolt-firmware-fixes>\
199 **WARNING! Please follow the guide PRECISELY, if you follow it, but please
200 only follow it if your ThunderBolt is already broken. If it isn't, use
201 Lenovo's software-based updater. If you do the external method, you MUST be
202 very careful; the guide there for example says to disable ThunderBolt assist.
203 It also says to erase first, then flash the `null.bin` (file with zeroes in
204 it), then BOOT, and when it boots, power off and re-connect clip again and
205 then flash the padded TBT.bin - whereas, for example, if you simply flashed
206 a padded TBT.bin and nothing else first, and boot, it will be perma-bricked,
207 in that the CPU won't come out of reset (it'll bootloop). We don't yet know
208 how to recover from this brick scenario. So all of this is to say: flashing
209 the ThunderBolt externally is EXTREMELY HAZARDOUS, and should be done with
210 the UTMOST CARE, ideally NOT AT ALL. -- ALSO: the guide only covers T480,
211 but should be similar on T480s and other ThinkPad models.**
212
213 You unbrick the Thunderbolt controller by pulling the firmware from Lenovo's
214 update, from Lenovo's update utility. Once extracted, you then pad it properly
215 so that it can be flashed manually, using a normal SPI flasher (the same one
216 that you would use to flash Libreboot).
198 <https://pcsupport.lenovo.com/gb/en/products/laptops-and-netbooks/thinkpad-t-series-laptops/thinkpad-t480s-type-20l7-20l8/solutions/ht508988-critical-intel-thunderbolt-software-and-firmware-updates-thinkpad>
199
200 If you're already affected by the bug, you can restore it to a working state
201 by flashing the Thunderbolt firmware externally. You *cannot* fix the issue
202 with Lenovo's software-based flasher, if the issue is already present, so
203 you *must* flash externally in that case; you can also flash externally, even
204 if the issue is not yet present.
205
206 The benefit of flashing it *externally* is that you would then no longer need
207 to boot Windows, because there is currently no way of doing it from Linux, and
208 Lenovo does not provide a *boot image* like they do for UEFI updates. So, to
209 use Lenovo's software-based flasher, you must install and boot Windows. We
210 always recommend using Free Software whenever possible, *so we always recommend
211 flashing the new firmware externally, as a matter of course.*
217 212
218 213 Use the [25XX NOR flashing guide](spi.md) if you need to flash this chip. It's Use the [25XX NOR flashing guide](spi.md) if you need to flash this chip. It's
219 214 the same guide that you will use for the main system flash, which is a separate the same guide that you will use for the main system flash, which is a separate
220 215 flash IC. flash IC.
221 216
222 AGAIN: This is not the Libreboot flash IC. This is separate to the system flash.
223 Read on to know how to reprogram the main system flash!
217 The firmware can be extracted from Lenovo's updater, specifically the `.exe`
218 file. For your convenience, lbmk (Libreboot's build system) can download this
219 for you. Run the following commands in lbmk:
220
221 (please install [build dependencies](../build/) first)
222
223 Commands:
224
225 ./mk -d coreboot t480s_vfsp_16mb
226 ./mk -d coreboot t480_vfsp_16mb
227
228 You will find the files at these locations in lbmk:
229
230 * `vendorfiles/t480/tb.bin`
231 * `vendorfiles/t480s/tb.bin`
232
233 These have already been padded, to the correct size of 1MB, whereas the original
234 size (within the `.exe` file) was 256KB.
235
236 These files are *also* generated, if you used the `./mk inject` command,
237 on a pre-compiled release image, as documented [here](ivy_has_common.md).
238
239 **WARNING: DO NOT FLASH IT FIRST; YOU MUST PERFORM SOME PRE-REQUISITE STEPS
240 FIRST, BEFORE FLASHING `tb.bin`**:
241
242 **Firstly, please note that this procedure has *only* been tested with Lenovo's
243 UEFI firmware installed on the main flash. Please ensure that you have also
244 switched Lenovo UEFI/EC firmware to the specific version referenced on this
245 page, for your board.** - for the rest of this, we will assume that you've not
246 yet flashed Libreboot, though there's no reason in principle why this can't
247 also work *after* you've flashed Libreboot; it's just that we only tested it
248 from Lenovo UEFI firmware.
249
250 Now, *remove* the CR2032 battery (yellow coin-cell battery). Please also ensure
251 that you've disabled *ThunderBolt Assist* in the Lenovo UEFI setup menu. You
252 should also disable the internal battery, on T480 specifically (T480s only has
253 an internal battery). You should do this with no batteries connected anyway.
254
255 Firstly, make *two dumps* of the flash, using [flashprog](spi.md) - and the
256 linked guide generally tells you how to dump/flash the chip. Make sure both
257 dumps have the same checksum, using e.g. `sha512sum`.
258
259 Now, *erase* the flash. This example command is when using a Raspberry Pi Pico,
260 assuming that the device shows up as `/dev/ttyACM0` - please adapt accordingly
261 to whatever programmer you have:
262
263 flashprog -p serprog:dev=/dev/ttyACM0 -E
264
265 Note that the `-E` argument is what specifies that the chip should be *erased*.
266
267 Now, you must create a file called `null.bin`, which contains all zeroes:
268
269 dd if=/dev/zero of=null.bin bs=1M count=1
270
271 Please ensure (in hexdump) that the file does contain all zeroes, and that it
272 is 1MB in size. You will now flash it, again adapting the command below to
273 whatever programmer you have:
274
275 flashprog -p serprog:dev=/dev/ttyACM0 -w null.bin
276
277 **NOW, REMOVE the clip. Button it back up and turn the T480 on, with both
278 the battery and the charger connected, plugging in the battery first.**
279
280 It *should* boot up and show the Lenovo boot screen. Give it a few moments.
281 When you've confirmed that it has booted the Lenovo firmware, *shut down* the
282 machine and remove the battery / power supply again. It *may take a while* to
283 boot Lenovo's firmware when doing this, so please be very patient.
284
285 After you've confirmed that the machine boots, I say again: make sure to shut
286 it down fully, removing all batteries and power supplies.
287
288 It is at this moment that you will externally flash the `tb.bin` file. Please
289 make sure to flash the correct one for your board:
290
291 * T480: `vendorfiles/t480/tb.bin`
292 * T480s: `vendorfiles/t480s/tb.bin`
293
294 Libreboot's automated build system has a lot more dependencies. If you want to
295 avoid installing them, and extract the file manually, you can. Simply download
296 the `.exe` file and do this:
297
298 innoextract filename.exe
299
300 The `innoextract` utility will probably be available in your distro's package
301 manager. You can otherwise find it here:\
302 <https://constexpr.org/innoextract/> - credit goes to Daniel Scharrer for
303 writing this excellent software.
304
305 A directory will be created with the extracted files. Inside it, you will
306 find a file named `TBT.bin`. You can pad it like so:
307
308 dd if=/dev/null of=TBT.bin bs=1 seek=1048576
309
310 Note that the `seek` variable here matching 1MB flash size. If you encounter
311 a different flash size, adapt accordingly (the same applies when creating
312 the `null.bin` file). Libreboot's build system makes this size configurable
313 per board, on the theory that we may encounter other flash sizes in the future,
314 when we add more ThinkPads of this generation to Libreboot.
315
316 Ok, so you have the file. Now you can flash it.
317
318 Example:
319
320 flashprog -p serprog:dev=/dev/ttyACM0 -w tb.bin
321
322 Adapt `tb.bin` in the command above, to the actual one that you wish to flash.
323
324 You *MUST* do it in the exact order as prescribed above. After flashing
325 the `tb.bin` image, un-clip and simply re-assemble. After you boot up, it should
326 once again show the boot screen, and USB-C / ThunderBolt will work perfectly.
327
328 You can repeat the above steps to restore the old firmware version. This is why
329 you were instructed to make a backup, on the off-chance that you may wish to do
330 so for some reason in the future.
331
332 Troubleshooting:
333
334 If you accidentally flashed an incorrect firmware image, or you didn't properly
335 erase and boot first before flashing the new image, you can simply repeat the
336 steps again; on erase/null, you then boot up and *wait* and it'll eventually
337 show the boot screen again. If it doesn't work, just keep doing it until it does.
224 338
225 **AGAIN: It is extremely easy to permanently brick the ThunderBolt controller,
226 rendering your system completely unbootable, if you use the external recovery
227 method. If you're still able to fix it with a software-based flasher like the
228 one Lenovo provides, please use that at all - or simply don't fix it at all,
229 because the machine will at least still charge while it has the ThunderBolt
230 issue, where older firmware is used.**
339 Credits go
340 to [Adam McNutt](https://gitlab.com/MobileAZN/lenovo-t480-thunderbolt-firmware-fixes)
341 who originally provided such instructions, for the ThinkPad T480. The information
342 there was adapted for *this* guide, in the Libreboot documentation. Libreboot
343 may very well support other ThinkPads from the same generation, in a future
344 release after Libreboot 20241206, and many of those have this same issue; when
345 it does, Libreboot will document this fix for those machines too, and probably
346 move these instructions to a dedicated page on the website.
231 347
232 348 Flash a ROM image (software) Flash a ROM image (software)
233 349 ----------------------- -----------------------
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/libreboot/lbwww

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/libreboot/lbwww

Clone this repository using git:
git clone git://git.rocketgit.com/user/libreboot/lbwww

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main