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 |