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)
fix the x60/t60 flashing instructions 01c11b27d97d581f6e62b7059c986dec65254182 Leah Rowe 2024-02-27 18:17:49
oversight ef8c2a7e59449f41bbf88b5cb57c22b0a8fbf756 Leah Rowe 2024-02-25 20:52:36
more context ad4e593dbfa759ab91da4ed71dcfbbb815b3d407 Leah Rowe 2024-02-25 20:31:39
remove unnecessary information 0a9bf4aa84eba77a728d42b6f6fbc3b7e3c4dd9b Leah Rowe 2024-02-25 20:27:57
correction d4886e608d6de0898b53543413985e751dcc9ea2 Leah Rowe 2024-02-25 19:42:08
oversight e2ce9110fbec611f0138a72a634f5bb1927ec1d5 Leah Rowe 2024-02-25 19:20:49
Libreboot 20240225 a12f3efde70dc6f3fc4eebf966c3d32de1a3067f Leah Rowe 2024-02-25 19:14:34
fix inaccuracy 8cc24220ecdee12c5b455fa7773011f65d6c82e9 Leah Rowe 2024-02-25 08:44:06
even better wording 7efde767824d13dc390aea34b09b605dfd01b61b Leah Rowe 2024-02-23 10:01:05
better wording 9b4e4362144e8023b34ce85758a6b52076985cb5 Leah Rowe 2024-02-23 10:00:09
remove redundant sentence 0081c6057a4358213c1ad773478419c21ef8fdb3 Leah Rowe 2024-02-23 09:59:27
9020sff/mt: say how to get graphics cards working c619e583b9ed51482053ab82e7ad85f28baac43c Leah Rowe 2024-02-23 05:21:14
notes about rk3588 on the todo page 05036a5171a0785945946589e103fc610034e430 Leah Rowe 2024-02-22 13:22:00
add missing plug b9bfa323b9bc72429a8dbc92c7bfc2d715532323 Leah Rowe 2024-02-22 13:13:18
note about dell xe2 (thanks go to mate kukri) 035468136aae7c184ae1d2449dd71be6ffbc2c12 Leah Rowe 2024-02-22 12:14:08
credit cbac0dd6ea8bd775aee829579847851d5951cd55 Leah Rowe 2024-02-22 03:54:29
remove confusing section 4847e31bfa7f24eb9ec3eade078875f7e9464310 Leah Rowe 2024-02-21 21:33:51
clarify a9c4cfb2f6cdcc9d3832b93707eccc64763ccc4b Leah Rowe 2024-02-21 21:33:17
actually say what libreboot is, in the post 94eff325ad212dc01683fd25741698ac075785f7 Leah Rowe 2024-02-21 21:29:39
remove redundant information 62b45c4eb6b283652fb08efa589a4c1a95cd28b5 Leah Rowe 2024-02-21 21:07:44
Commit 01c11b27d97d581f6e62b7059c986dec65254182 - fix the x60/t60 flashing instructions
Signed-off-by: Leah Rowe <info@minifree.org>
Author: Leah Rowe
Author date (UTC): 2024-02-27 18:17
Committer name: Leah Rowe
Committer date (UTC): 2024-02-27 18:17
Parent(s): ef8c2a7e59449f41bbf88b5cb57c22b0a8fbf756
Signer:
Signing key:
Signing status: N
Tree: 0b2c1d5486a22c57d51a20e0ae2452aafacb24ac
File Lines added Lines deleted
site/docs/install/index.md 39 24
site/tasks/index.md 5 0
File site/docs/install/index.md changed (mode: 100644) (index 607f9e5..1a98f70)
... ... example of the push pin as a proof of concept:
455 455
456 456 [You must flash it externally](spi.md) [You must flash it externally](spi.md)
457 457
458 #### ThinkPad X60/X60S/X60T/T60 with Lenovo BIOS {#flashprog_lenovobios}
458 #### ThinkPad X60/X60S/X60T/T60 with Lenovo BIOS {#flashrom_lenovobios}
459 459
460 460 **WARNING: Libreboot 20231021 and likely older 2023 releases do not have the **WARNING: Libreboot 20231021 and likely older 2023 releases do not have the
461 461 bootblock copied in release ROMs, so the bucts trick below will actually cause bootblock copied in release ROMs, so the bucts trick below will actually cause
 
... ... And then do this:
470 470
471 471 (This was fixed in Libreboot 20231101) (This was fixed in Libreboot 20231101)
472 472
473 **NOTE: the section below pertaining to 20160907 static binaries references
474 flashrom. Libreboot recommends flashprog nowadays, but if you're using that
475 utils archive, please note that it is from a time when Libreboot used
476 flashrom. Use flashrom there as that's what included in those binaries.
477 Libreboot does not currently document how to patch flashprog for sst/macronix
478 on X60/T60, when going (in software) from lenovobios to libreboot.**
479
473 480 **NOTE: This section partially relates to `utils` release archive in **NOTE: This section partially relates to `utils` release archive in
474 481 Libreboot 20160907, which contains static compiled binaries for things like Libreboot 20160907, which contains static compiled binaries for things like
475 bucts and flashprog. It will *still* work on modern distros, and thus is
482 bucts and flashrom. It will *still* work on modern distros, and thus is
476 483 still referenced here. The `flash` script in that release can be used, with still referenced here. The `flash` script in that release can be used, with
477 484 modern Libreboot ROMs. Current Libreboot releases do not include pre-compiled modern Libreboot ROMs. Current Libreboot releases do not include pre-compiled
478 485 utilities, only ROMs.** utilities, only ROMs.**
 
... ... X60 BIOS password (Lenovo): you might find info here:
487 494 <https://bios-pw.org/> <https://bios-pw.org/>
488 495
489 496 You can just get bucts from the libreboot project, same thing for the patched You can just get bucts from the libreboot project, same thing for the patched
490 flashprog. In the Libreboot 20160907 release, there is a *utility* archive, which
497 flashrom. In the Libreboot 20160907 release, there is a *utility* archive, which
491 498 has statically compiled executables. They still work just fine on modern has statically compiled executables. They still work just fine on modern
492 499 systems, and they can be used for this purpose. systems, and they can be used for this purpose.
493 500
 
... ... Here are a list of targets:
502 509 and you will run it at 115200 baud rate. agetty/fgetty in Linux can give and you will run it at 115200 baud rate. agetty/fgetty in Linux can give
503 510 you a serial console in your OS) you a serial console in your OS)
504 511
505 Download and build flashprog, using the instructions
506 on [the Git page](../../git.md), and download the `bucts` software using the
507 notes on that very same page.
508
509 You can replace Lenovo BIOS with libreboot, using flashprog running on the host
510 CPU. However, there are some considerations.
512 You can replace Lenovo BIOS with libreboot, using flashrom running on the host
513 CPU. However, there are some considerations. NOTE: needs patching for SST
514 and macronix chips, but libreboot doesn't yet do this for flashprog. You can
515 use the old Libreboot 20160907 sources to get the modified flashrom instead,
516 which contains this patch - and static binaries are provided, for convenience;
517 they will still work, due to libs being statically linked.
511 518
512 519 Firstly, make sure that the yellow CMOS battery is installed, and functioning Firstly, make sure that the yellow CMOS battery is installed, and functioning
513 520 correctly. You could check the voltage. The battery is a CR2032 correctly. You could check the voltage. The battery is a CR2032
 
... ... load on it, which there will be. This coincell powers the real-time clock and
518 525 CMOS memory). CMOS memory).
519 526
520 527 Lenovo BIOS restricts write access, but there is a weakness in it. With a Lenovo BIOS restricts write access, but there is a weakness in it. With a
521 specially patched flashprog binary, you can easily flash it but the top 64KiB
528 specially patched flashrom binary, you can easily flash it but the top 64KiB
522 529 region of the boot flash, containing your bootblock, cannot be flashed just region of the boot flash, containing your bootblock, cannot be flashed just
523 530 yet. However, there is a register called the *Backup Control* or *BUC* register yet. However, there is a register called the *Backup Control* or *BUC* register
524 531 and in that register is a status bit called *Top Swap* or *TS*. and in that register is a status bit called *Top Swap* or *TS*.
 
... ... program referenced below.
532 539 The libreboot ROM images already have the upper 64KiB bootblock copied to the lower The libreboot ROM images already have the upper 64KiB bootblock copied to the lower
533 540 one, so you don't have to worry about copying it yourself. one, so you don't have to worry about copying it yourself.
534 541
535 If you build flashprog using the libreboot build system, there will be three
542 If you use the Libreboot 20160907 utils archive, there will be three
536 543 binaries: binaries:
537 544
538 * `flashprog`
539 * `flashprog_i945_sst`
540 * `flashprog_i945_mx`
545 * `flashrom`
546 * `flashrom_i945_sst`
547 * `flashrom_i945_mx`
541 548
542 549 It's these last two binaries that you should use. Now compile bucts (just It's these last two binaries that you should use. Now compile bucts (just
543 550 run `make` in the bucts source directory). run `make` in the bucts source directory).
 
... ... Run the bucts tool:
549 556 Ensure that your CMOS battery is connected too. Now you must determine whether Ensure that your CMOS battery is connected too. Now you must determine whether
550 557 you have Macronix or SST. An X60/T60 thinkpad will have either an SST or a you have Macronix or SST. An X60/T60 thinkpad will have either an SST or a
551 558 Macronix chip. The Macronix chip will have "MX" written on the chip. You will Macronix chip. The Macronix chip will have "MX" written on the chip. You will
552 use `flashprog_i945_sst` for the SST chip, and `flashprog_i945_mx` for the
559 use `flashrom_i945_sst` for the SST chip, and `flashrom_i945_mx` for the
553 560 Macronix chip. Macronix chip.
554 561
555 Now run flashprog (for SST):
562 Now run flashrom from the Libreboot 20160907 utils archive (for SST):
556 563
557 sudo ./flashprog_i945_sst -p internal -w coreboot.rom
564 sudo ./flashrom_i945_sst -p internal -w coreboot.rom
558 565
559 566 Or Macronix: Or Macronix:
560 567
561 sudo ./flashprog_i945_mx -p internal -w coreboot.rom
568 sudo ./flashrom_i945_mx -p internal -w coreboot.rom
562 569
563 570 NOTE: you *can* just run both. One of them will succeed. It is perfectly NOTE: you *can* just run both. One of them will succeed. It is perfectly
564 harmless to run both versions of flashprog. In fact, you should do so!
571 harmless to run both versions of flashrom. In fact, you should do so!
565 572
566 573 You'll see a lot of errors. This is normal. You should see something like: You'll see a lot of errors. This is normal. You should see something like:
567 574
 
... ... Your flash chip is in an unknown state.
589 596 If you see this, rejoice! It means that the flash was successful. Please do not If you see this, rejoice! It means that the flash was successful. Please do not
590 597 panic. Shut down now, and wait a few seconds, then turn back on again. panic. Shut down now, and wait a few seconds, then turn back on again.
591 598
592 **WARNING: if flashprog complains about `/dev/mem` access, please
593 run `sudo ./bucts 0`. If flashprog is complaining about `/dev/mem`, it means
599 **WARNING: if flashrom (from Libreboot 20160907 utils) complains
600 about `/dev/mem` access, please
601 run `sudo ./bucts 0`. If flashrom is complaining about `/dev/mem`, it means
594 602 that you have `CONFIG_STRICT_DEVMEM` enabled in your kernel. Reboot with the that you have `CONFIG_STRICT_DEVMEM` enabled in your kernel. Reboot with the
595 603 following kernel parameter added in your bootloader: `iomem=relaxed` and try following kernel parameter added in your bootloader: `iomem=relaxed` and try
596 604 again with the above instructions. DO NOT continue until the above works, and again with the above instructions. DO NOT continue until the above works, and
597 you see the expected flashprog output as indicated above.**
605 you see the expected flashrom output as indicated above.**
598 606
599 If you *did* run flashprog and it failed to flash, but you set bucts to 1 and
607 If you *did* run flashrom and it failed to flash, but you set bucts to 1 and
600 608 shut down, don't worry. Just remove the yellow coin-cell battery (it's underneath shut down, don't worry. Just remove the yellow coin-cell battery (it's underneath
601 609 the keyboard, connected to the mainboard), wait a minute or two, reconnect the the keyboard, connected to the mainboard), wait a minute or two, reconnect the
602 coin-cell and try again from scratch. In this instance, if flashprog didn't do
610 coin-cell and try again from scratch. In this instance, if flashrom didn't do
603 611 anything, and didn't flash anything, it means you still have Lenovo BIOS but anything, and didn't flash anything, it means you still have Lenovo BIOS but
604 612 if bucts is set to 1, you can flush it and set it back to 0. BUC.TS is stored in if bucts is set to 1, you can flush it and set it back to 0. BUC.TS is stored in
605 613 volatile memory, powered by that CR2032 coin-cell battery. volatile memory, powered by that CR2032 coin-cell battery.
606 614
607 615 Assuming that everything went well: Assuming that everything went well:
608 616
617 Switch to flashprog now! (avoid flashrom)
618 ---------------------------------------
619
609 620 Flash the ROM for a second time. For this second flashing attempt, the upper Flash the ROM for a second time. For this second flashing attempt, the upper
610 621 64KiB bootblock is now read-write. Use the *unpatched* flashprog binary: 64KiB bootblock is now read-write. Use the *unpatched* flashprog binary:
611 622
612 623 sudo ./flashprog -p internal -w libreboot.rom sudo ./flashprog -p internal -w libreboot.rom
613 624
625 NOTE: At this point, we recommend use of flashprog instead of flashrom, for
626 the reasons mentioned in the [Libreboot 20240225
627 release](../../news/libreboot20240225.md).
628
614 629 To reset bucts, do this: To reset bucts, do this:
615 630
616 631 sudo ./bucts 0 sudo ./bucts 0
File site/tasks/index.md changed (mode: 100644) (index 2c08b9c..6ef8cba)
... ... out of date, for example only goes up to Broadwell even with the out of
2418 2418 tree patches. tree patches.
2419 2419
2420 2420 Port it to skylake and above. Port it to skylake and above.
2421
2422 interesting video
2423 =================
2424
2425 <https://www.youtube.com/watch?v=5qauRh7eTNY>
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