don't document flashrom. use flashprog instead.
Signed-off-by: Leah Rowe <info@minifree.org>master
parent
5dcba77fbe
commit
a14f320562
|
@ -180,3 +180,15 @@ example want to modify a config, e.g.:
|
||||||
|
|
||||||
Or perhaps add a new board! The maintenance manual will teach you how the
|
Or perhaps add a new board! The maintenance manual will teach you how the
|
||||||
Canoeboot build system (cbmk) works!
|
Canoeboot build system (cbmk) works!
|
||||||
|
|
||||||
|
Post-compilation steps
|
||||||
|
======================
|
||||||
|
|
||||||
|
So you compiled your Canoeboot image? Congratulations!
|
||||||
|
|
||||||
|
Before you flash, please make sure that you *dumped* two copies of the original
|
||||||
|
firmware just in case (verifying the hashes of each dump, to ensure that they
|
||||||
|
match), using the `-r` option in flashprog.
|
||||||
|
|
||||||
|
NOTE: Canoeboot standardises on [flashprog](https://flashprog.org/wiki/Flashprog)
|
||||||
|
now, as of 3 May 2024, which is a fork of flashrom.
|
||||||
|
|
|
@ -3,6 +3,9 @@ title: Modifying grub.cfg in CBFS
|
||||||
x-toc-enable: true
|
x-toc-enable: true
|
||||||
...
|
...
|
||||||
|
|
||||||
|
NOTE: Libreboot standardises on [flashprog](https://flashprog.org/wiki/Flashprog)
|
||||||
|
now, as of 3 May 2024, which is a fork of flashrom.
|
||||||
|
|
||||||
Before you follow this guide, it is advisable that you have the ability to
|
Before you follow this guide, it is advisable that you have the ability to
|
||||||
flash externally, just in case something goes wrong.
|
flash externally, just in case something goes wrong.
|
||||||
|
|
||||||
|
@ -27,7 +30,7 @@ a *soft brick* where your machine is effectively useless and, in that scenario,
|
||||||
may or may not require external flashing equipment for restoring the machine to
|
may or may not require external flashing equipment for restoring the machine to
|
||||||
a known state.
|
a known state.
|
||||||
|
|
||||||
Compile flashrom and cbfstool
|
Compile flashprog and cbfstool
|
||||||
=============================
|
=============================
|
||||||
|
|
||||||
Canoeboot does not currently distribute utilities pre-compiled. It only
|
Canoeboot does not currently distribute utilities pre-compiled. It only
|
||||||
|
@ -75,34 +78,34 @@ The `cbfstool` utility is what you shall use. It is used to manipulate CBFS
|
||||||
(coreboot file system) which is a file system contained within the coreboot
|
(coreboot file system) which is a file system contained within the coreboot
|
||||||
ROM image; as a *coreboot distribution*, Canoeboot inherits this technology.
|
ROM image; as a *coreboot distribution*, Canoeboot inherits this technology.
|
||||||
|
|
||||||
You will also want to build `flashrom` which Canoeboot recommends for reading
|
You will also want to build `flashprog` which canoeboot recommends for reading
|
||||||
from and/or writing to the boot flash. In the Canoeboot build system, you can
|
from and/or writing to the boot flash. In the canoeboot build system, you can
|
||||||
build it by running this command:
|
build it by running this command:
|
||||||
|
|
||||||
./update trees -b flashrom
|
./update trees -b flashprog
|
||||||
|
|
||||||
An executable will be available at `src/flashrom/flashrom` after you have done
|
An executable will be available at `src/flashprog/flashprog` after you have done
|
||||||
this.
|
this.
|
||||||
|
|
||||||
Dump the boot flash
|
Dump the boot flash
|
||||||
===================
|
===================
|
||||||
|
|
||||||
If you wish to modify your *existing* Canoeboot ROM, which was installed on
|
If you wish to modify your *existing* canoeboot ROM, which was installed on
|
||||||
your computer, you can use `flashrom` to acquire it.
|
your computer, you can use `flashprog` to acquire it.
|
||||||
|
|
||||||
Simply run the following, after using Canoeboot's build system to compile
|
Simply run the following, after using canoeboot's build system to compile
|
||||||
flashrom:
|
flashprog:
|
||||||
|
|
||||||
sudo ./src/flashrom/flashrom -p internal -r dump.bin
|
sudo ./src/flashprog/flashprog -p internal -r dump.bin
|
||||||
|
|
||||||
If flashrom complains about multiple flash chip definitions, do what it says to
|
If flashprog complains about multiple flash chip definitions, do what it says to
|
||||||
rectify your command and run it again.
|
rectify your command and run it again.
|
||||||
|
|
||||||
You may want to use the following, instead of `-p internal`:
|
You may want to use the following, instead of `-p internal`:
|
||||||
`-p internal:laptop=force_I_want_a_brick,boardmismatch=force`
|
`-p internal:laptop=force_I_want_a_brick,boardmismatch=force`
|
||||||
|
|
||||||
Do not let the word *brick* fools you. This merely disables the safety checks
|
Do not let the word *brick* fools you. This merely disables the safety checks
|
||||||
in flashrom, which is sometimes necessary depending on what ROM was already
|
in flashprog, which is sometimes necessary depending on what ROM was already
|
||||||
flashed, versus the new ROM image.
|
flashed, versus the new ROM image.
|
||||||
|
|
||||||
The `internal` option assumes that internal read/write is possible; this is
|
The `internal` option assumes that internal read/write is possible; this is
|
||||||
|
@ -169,17 +172,17 @@ Flash the modified ROM image
|
||||||
Your modified `dump.bin` or other modified Canoeboot ROM can then be re-flashed
|
Your modified `dump.bin` or other modified Canoeboot ROM can then be re-flashed
|
||||||
using:
|
using:
|
||||||
|
|
||||||
sudo ./flashrom -p internal -w dump.bin
|
sudo ./flashprog -p internal -w dump.bin
|
||||||
|
|
||||||
If a `-c` option is required, use it and specify a flash chip name. This is
|
If a `-c` option is required, use it and specify a flash chip name. This is
|
||||||
only useful when `flashrom` complains about multiple flash chips being
|
only useful when `flashprog` complains about multiple flash chips being
|
||||||
detected.
|
detected.
|
||||||
|
|
||||||
If flashrom complains about wrong chip/board, make sure that your ROM is for
|
If flashprog complains about wrong chip/board, make sure that your ROM is for
|
||||||
the correct system. If you're sure, you can disable the safety checks by running
|
the correct system. If you're sure, you can disable the safety checks by running
|
||||||
this instead:
|
this instead:
|
||||||
|
|
||||||
sudo ./flashrom -p internal:laptop=force_I_want_a_brick,boardmismatch=force -w dump.bin
|
sudo ./flashprog -p internal:laptop=force_I_want_a_brick,boardmismatch=force -w dump.bin
|
||||||
|
|
||||||
If you need to use external flashing equipment, see the link above to the
|
If you need to use external flashing equipment, see the link above to the
|
||||||
Raspberry Pi page.
|
Raspberry Pi page.
|
||||||
|
|
|
@ -76,9 +76,12 @@ Canoeboot, so we don't actually provide that, but if you still have
|
||||||
Lenovo BIOS then you can just run the Lenovo BIOS update utility, which
|
Lenovo BIOS then you can just run the Lenovo BIOS update utility, which
|
||||||
will update both the BIOS and EC version. See:
|
will update both the BIOS and EC version. See:
|
||||||
|
|
||||||
- [../install/#flashrom](../install/#flashrom)
|
- [../install/#flashprog](../install/#flashprog)
|
||||||
- <http://www.thinkwiki.org/wiki/BIOS_update_without_optical_disk>
|
- <http://www.thinkwiki.org/wiki/BIOS_update_without_optical_disk>
|
||||||
|
|
||||||
|
NOTE: Libreboot standardises on [flashprog](https://flashprog.org/wiki/Flashprog)
|
||||||
|
now, as of 3 May 2024, which is a fork of flashrom.
|
||||||
|
|
||||||
NOTE: this can only be done when you are using Lenovo BIOS. How to
|
NOTE: this can only be done when you are using Lenovo BIOS. How to
|
||||||
update the EC firmware while running Canoeboot is unknown. Canoeboot
|
update the EC firmware while running Canoeboot is unknown. Canoeboot
|
||||||
only replaces the BIOS firmware, not EC.
|
only replaces the BIOS firmware, not EC.
|
||||||
|
|
|
@ -64,9 +64,12 @@ x-toc-enable: true
|
||||||
|
|
||||||
建议更新到最新 EC 固件版本。[EC 固件](../../faq.md#ec-embedded-controller-firmware) 与 canoeboot 是独立的,所以我们实际上并不会提供这些固件,但如果你仍还有 Lenovo BIOS,那你可以直接运行 Lenovo BIOS 更新工具,它会同时更新 BIOS 和 EC 版本。见:
|
建议更新到最新 EC 固件版本。[EC 固件](../../faq.md#ec-embedded-controller-firmware) 与 canoeboot 是独立的,所以我们实际上并不会提供这些固件,但如果你仍还有 Lenovo BIOS,那你可以直接运行 Lenovo BIOS 更新工具,它会同时更新 BIOS 和 EC 版本。见:
|
||||||
|
|
||||||
- [../install/#flashrom](../install/#flashrom)
|
- [../install/#flashprog](../install/#flashprog)
|
||||||
- <http://www.thinkwiki.org/wiki/BIOS_update_without_optical_disk>
|
- <http://www.thinkwiki.org/wiki/BIOS_update_without_optical_disk>
|
||||||
|
|
||||||
|
NOTE: Canoeboot standardises on [flashprog](https://flashprog.org/wiki/Flashprog)
|
||||||
|
now, as of 3 May 2024, which is a fork of flashrom.
|
||||||
|
|
||||||
注意:只有在运行 Lenovo BIOS 的时候,你才能这样做。如何在运行 canoeboot 的时候更新 EC 固件尚不清楚。canoeboot 只会替换 BIOS 固件,而不会替换 EC。
|
注意:只有在运行 Lenovo BIOS 的时候,你才能这样做。如何在运行 canoeboot 的时候更新 EC 固件尚不清楚。canoeboot 只会替换 BIOS 固件,而不会替换 EC。
|
||||||
|
|
||||||
更新的 EC 固件有一些好处,例如电池管理更加好。
|
更新的 EC 固件有一些好处,例如电池管理更加好。
|
||||||
|
|
|
@ -50,7 +50,10 @@ This is a server board using AMD hardware (Fam10h). It can also be used
|
||||||
for building a high-powered workstation. Powered by Canoeboot.
|
for building a high-powered workstation. Powered by Canoeboot.
|
||||||
|
|
||||||
Flashing instructions can be found at
|
Flashing instructions can be found at
|
||||||
[../install/\#flashrom](../install/)
|
[../install/\#flashprog](../install/)
|
||||||
|
|
||||||
|
NOTE: Libreboot standardises on [flashprog](https://flashprog.org/wiki/Flashprog)
|
||||||
|
now, as of 3 May 2024, which is a fork of flashrom.
|
||||||
|
|
||||||
Form factor {#formfactor}
|
Form factor {#formfactor}
|
||||||
===========
|
===========
|
||||||
|
|
|
@ -19,7 +19,7 @@ recommend avoiding Kingston modules.*
|
||||||
*For working configurations see <https://www.coreboot.org/Board:asus/kgpe-d16>.*
|
*For working configurations see <https://www.coreboot.org/Board:asus/kgpe-d16>.*
|
||||||
|
|
||||||
Flashing instructions can be found at
|
Flashing instructions can be found at
|
||||||
[../install/\#flashrom](../install/#flashrom) - note that external
|
[../install/\#flashprog](../install/#flashprog) - note that external
|
||||||
flashing is required, if the proprietary (ASUS) firmware is
|
flashing is required, if the proprietary (ASUS) firmware is
|
||||||
currently installed. If you already have Canoeboot, by default it is
|
currently installed. If you already have Canoeboot, by default it is
|
||||||
possible to re-flash using software running in GNU+Linux on the
|
possible to re-flash using software running in GNU+Linux on the
|
||||||
|
|
|
@ -101,7 +101,10 @@ Internal flashing
|
||||||
|
|
||||||
MacBook2,1 can always be flashed internally, even if running Apple firmware:
|
MacBook2,1 can always be flashed internally, even if running Apple firmware:
|
||||||
|
|
||||||
sudo flashrom -p internal:laptop=force_I_want_a_brick,boardmismatch=force -w your.rom
|
sudo flashprog -p internal:laptop=force_I_want_a_brick,boardmismatch=force -w your.rom
|
||||||
|
|
||||||
|
NOTE: Libreboot standardises on [flashprog](https://flashprog.org/wiki/Flashprog)
|
||||||
|
now, as of 3 May 2024, which is a fork of flashrom.
|
||||||
|
|
||||||
The MacBook1,1 can't be flashed internally if running the Apple EFI firmware.
|
The MacBook1,1 can't be flashed internally if running the Apple EFI firmware.
|
||||||
You must flash externally.
|
You must flash externally.
|
||||||
|
|
|
@ -75,7 +75,10 @@ modified descriptor: see [../install/ich9utils.md](../install/ich9utils.md)*
|
||||||
(contains notes, plus instructions)
|
(contains notes, plus instructions)
|
||||||
|
|
||||||
Flashing instructions can be found at
|
Flashing instructions can be found at
|
||||||
[../install/\#flashrom](../install/#flashrom)
|
[../install/\#flashprog](../install/#flashprog)
|
||||||
|
|
||||||
|
NOTE: Libreboot standardises on [flashprog](https://flashprog.org/wiki/Flashprog)
|
||||||
|
now, as of 3 May 2024, which is a fork of flashrom.
|
||||||
|
|
||||||
EC update {#ecupdate}
|
EC update {#ecupdate}
|
||||||
=========
|
=========
|
||||||
|
@ -86,7 +89,7 @@ Canoeboot, so we don't actually provide that, but if you still have
|
||||||
Lenovo BIOS then you can just run the Lenovo BIOS update utility, which
|
Lenovo BIOS then you can just run the Lenovo BIOS update utility, which
|
||||||
will update both the BIOS and EC version. See:
|
will update both the BIOS and EC version. See:
|
||||||
|
|
||||||
- [../install/#flashrom](../install/#flashrom)
|
- [../install/#flashprog](../install/#flashprog)
|
||||||
- <http://www.thinkwiki.org/wiki/BIOS_update_without_optical_disk>
|
- <http://www.thinkwiki.org/wiki/BIOS_update_without_optical_disk>
|
||||||
|
|
||||||
NOTE: this can only be done when you are using Lenovo BIOS. How to
|
NOTE: this can only be done when you are using Lenovo BIOS. How to
|
||||||
|
|
|
@ -74,7 +74,10 @@ modified descriptor: see [../install/ich9utils.md](../install/ich9utils.md)*
|
||||||
(contains notes, plus instructions)
|
(contains notes, plus instructions)
|
||||||
|
|
||||||
Flashing instructions can be found at
|
Flashing instructions can be found at
|
||||||
[../install/\#flashrom](../install/#flashrom)
|
[../install/\#flashprog](../install/#flashprog)
|
||||||
|
|
||||||
|
NOTE: Libreboot standardises on [flashprog](https://flashprog.org/wiki/Flashprog)
|
||||||
|
now, as of 3 May 2024, which is a fork of flashrom.
|
||||||
|
|
||||||
EC update {#ecupdate}
|
EC update {#ecupdate}
|
||||||
=========
|
=========
|
||||||
|
@ -85,7 +88,7 @@ Canoeboot, so we don't actually provide that, but if you still have
|
||||||
Lenovo BIOS then you can just run the Lenovo BIOS update utility, which
|
Lenovo BIOS then you can just run the Lenovo BIOS update utility, which
|
||||||
will update both the BIOS and EC version. See:
|
will update both the BIOS and EC version. See:
|
||||||
|
|
||||||
- [../install/#flashrom](../install/#flashrom)
|
- [../install/#flashprog](../install/#flashprog)
|
||||||
- <http://www.thinkwiki.org/wiki/BIOS_update_without_optical_disk>
|
- <http://www.thinkwiki.org/wiki/BIOS_update_without_optical_disk>
|
||||||
|
|
||||||
NOTE: this can only be done when you are using Lenovo BIOS. How to
|
NOTE: this can only be done when you are using Lenovo BIOS. How to
|
||||||
|
|
|
@ -76,7 +76,10 @@ modified descriptor: see [../install/ich9utils.md](../install/ich9utils.md)*
|
||||||
(contains notes, plus instructions)
|
(contains notes, plus instructions)
|
||||||
|
|
||||||
Flashing instructions can be found at
|
Flashing instructions can be found at
|
||||||
[../install/\#flashrom](../install/#flashrom)
|
[../install/\#flashprog](../install/#flashprog)
|
||||||
|
|
||||||
|
NOTE: Libreboot standardises on [flashprog](https://flashprog.org/wiki/Flashprog)
|
||||||
|
now, as of 3 May 2024, which is a fork of flashrom.
|
||||||
|
|
||||||
EC update {#ecupdate}
|
EC update {#ecupdate}
|
||||||
=========
|
=========
|
||||||
|
@ -87,7 +90,7 @@ Canoeboot, so we don't actually provide that, but if you still have
|
||||||
Lenovo BIOS then you can just run the Lenovo BIOS update utility, which
|
Lenovo BIOS then you can just run the Lenovo BIOS update utility, which
|
||||||
will update both the BIOS and EC version. See:
|
will update both the BIOS and EC version. See:
|
||||||
|
|
||||||
- [../install/#flashrom](../install/#flashrom)
|
- [../install/#flashprog](../install/#flashprog)
|
||||||
- <http://www.thinkwiki.org/wiki/BIOS_update_without_optical_disk>
|
- <http://www.thinkwiki.org/wiki/BIOS_update_without_optical_disk>
|
||||||
|
|
||||||
NOTE: this can only be done when you are using Lenovo BIOS. How to
|
NOTE: this can only be done when you are using Lenovo BIOS. How to
|
||||||
|
|
|
@ -74,7 +74,10 @@ modified descriptor: see [../install/ich9utils.md](../install/ich9utils.md)*
|
||||||
(contains notes, plus instructions)
|
(contains notes, plus instructions)
|
||||||
|
|
||||||
Flashing instructions can be found at
|
Flashing instructions can be found at
|
||||||
[../install/\#flashrom](../install/#flashrom)
|
[../install/\#flashprog](../install/#flashprog)
|
||||||
|
|
||||||
|
NOTE: Libreboot standardises on [flashprog](https://flashprog.org/wiki/Flashprog)
|
||||||
|
now, as of 3 May 2024, which is a fork of flashrom.
|
||||||
|
|
||||||
EC update {#ecupdate}
|
EC update {#ecupdate}
|
||||||
=========
|
=========
|
||||||
|
@ -85,7 +88,7 @@ Canoeboot, so we don't actually provide that, but if you still have
|
||||||
Lenovo BIOS then you can just run the Lenovo BIOS update utility, which
|
Lenovo BIOS then you can just run the Lenovo BIOS update utility, which
|
||||||
will update both the BIOS and EC version. See:
|
will update both the BIOS and EC version. See:
|
||||||
|
|
||||||
- [../install/#flashrom](../install/#flashrom)
|
- [../install/#flashprog](../install/#flashprog)
|
||||||
- <http://www.thinkwiki.org/wiki/BIOS_update_without_optical_disk>
|
- <http://www.thinkwiki.org/wiki/BIOS_update_without_optical_disk>
|
||||||
- [X200, X200s, X200si BIOS Update](http://pcsupport.lenovo.com/au/en/products/laptops-and-netbooks/thinkpad-x-series-laptops/thinkpad-x200/downloads/ds015007)
|
- [X200, X200s, X200si BIOS Update](http://pcsupport.lenovo.com/au/en/products/laptops-and-netbooks/thinkpad-x-series-laptops/thinkpad-x200/downloads/ds015007)
|
||||||
- [X200t BIOS Update](http://pcsupport.lenovo.com/au/en/products/laptops-and-netbooks/thinkpad-x-series-tablet-laptops/thinkpad-x200-tablet/downloads/ds018814)
|
- [X200t BIOS Update](http://pcsupport.lenovo.com/au/en/products/laptops-and-netbooks/thinkpad-x-series-tablet-laptops/thinkpad-x200-tablet/downloads/ds018814)
|
||||||
|
|
|
@ -67,7 +67,10 @@ X200S та X201S; знову ж таки, це неперевірено. *Шви
|
||||||
(містить примітки та інструкції)
|
(містить примітки та інструкції)
|
||||||
|
|
||||||
Інструкції з перепрошивки можна знайти за адресою
|
Інструкції з перепрошивки можна знайти за адресою
|
||||||
[../install/\#flashrom](../install/#flashrom)
|
[../install/\#flashprog](../install/#flashprog)
|
||||||
|
|
||||||
|
NOTE: Libreboot standardises on [flashprog](https://flashprog.org/wiki/Flashprog)
|
||||||
|
now, as of 3 May 2024, which is a fork of flashrom.
|
||||||
|
|
||||||
Оновлення EC {#ecupdate}
|
Оновлення EC {#ecupdate}
|
||||||
=========
|
=========
|
||||||
|
@ -78,7 +81,7 @@ Canoeboot, тому ми її фактично не надаємо, але як
|
||||||
Lenovo BIOS, ви можете просто запустити утиліту оновлення BIOS Lenovo, яка
|
Lenovo BIOS, ви можете просто запустити утиліту оновлення BIOS Lenovo, яка
|
||||||
оновить як BIOS, так і версію EC. Дивіться:
|
оновить як BIOS, так і версію EC. Дивіться:
|
||||||
|
|
||||||
- [../install/#flashrom](../install/#flashrom)
|
- [../install/#flashprog](../install/#flashprog)
|
||||||
- <http://www.thinkwiki.org/wiki/BIOS_update_without_optical_disk>
|
- <http://www.thinkwiki.org/wiki/BIOS_update_without_optical_disk>
|
||||||
- [Оновлення BIOS X200, X200s, X200i](http://pcsupport.lenovo.com/au/en/products/laptops-and-netbooks/thinkpad-x-series-laptops/thinkpad-x200/downloads/ds015007)
|
- [Оновлення BIOS X200, X200s, X200i](http://pcsupport.lenovo.com/au/en/products/laptops-and-netbooks/thinkpad-x-series-laptops/thinkpad-x200/downloads/ds015007)
|
||||||
- [Оновлення BIOS X200t](http://pcsupport.lenovo.com/au/en/products/laptops-and-netbooks/thinkpad-x-series-tablet-laptops/thinkpad-x200-tablet/downloads/ds018814)
|
- [Оновлення BIOS X200t](http://pcsupport.lenovo.com/au/en/products/laptops-and-netbooks/thinkpad-x-series-tablet-laptops/thinkpad-x200-tablet/downloads/ds018814)
|
||||||
|
|
|
@ -23,6 +23,10 @@ A special fork of flashrom, maintained by Google, is required for flashing.
|
||||||
More information about this is present in the generic [chromebook flashing
|
More information about this is present in the generic [chromebook flashing
|
||||||
instructions](chromebooks.md).
|
instructions](chromebooks.md).
|
||||||
|
|
||||||
|
NOTE: Libreboot standardises on [flashprog](https://flashprog.org/wiki/Flashprog)
|
||||||
|
now, as of 3 May 2024, which is a fork of flashrom, but the chromium fork
|
||||||
|
is another fork of flashrom, and you should use that on chromebooks.
|
||||||
|
|
||||||
Depthcharge payload (obsolete)
|
Depthcharge payload (obsolete)
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,10 @@ Flash chip size {#flashchips}
|
||||||
|
|
||||||
Use this to find out:
|
Use this to find out:
|
||||||
|
|
||||||
flashrom -p internal
|
flashprog -p internal
|
||||||
|
|
||||||
|
NOTE: Libreboot standardises on [flashprog](https://flashprog.org/wiki/Flashprog)
|
||||||
|
now, as of 3 May 2024, which is a fork of flashrom.
|
||||||
|
|
||||||
Flashing instructions {#clip}
|
Flashing instructions {#clip}
|
||||||
=====================
|
=====================
|
||||||
|
|
|
@ -29,7 +29,7 @@ Flash chip size {#flashchips}
|
||||||
|
|
||||||
Use this to find out:
|
Use this to find out:
|
||||||
|
|
||||||
flashrom -p internal
|
flashprog -p internal
|
||||||
|
|
||||||
We believe most/all are 4MB (32Mb) flash sizes, but larger ROM images are
|
We believe most/all are 4MB (32Mb) flash sizes, but larger ROM images are
|
||||||
provided for people who wish to upgrade.
|
provided for people who wish to upgrade.
|
||||||
|
@ -75,19 +75,22 @@ BSD *boots* and works properly on these machines, but take note:
|
||||||
|
|
||||||
Nicholas's [dell-flash-unlock](https://browse.libreboot.org/lbmk.git/plain/util/dell-flash-unlock/dell_flash_unlock.c)
|
Nicholas's [dell-flash-unlock](https://browse.libreboot.org/lbmk.git/plain/util/dell-flash-unlock/dell_flash_unlock.c)
|
||||||
utility has been ported to OpenBSD, but *other* BSDs are assumed unsupported for
|
utility has been ported to OpenBSD, but *other* BSDs are assumed unsupported for
|
||||||
now. The `flashrom` software is available on BSD systems. Canoeboot's build
|
now. The `flashprog` software is available on BSD systems. Canoeboot's build
|
||||||
system has *itself* not yet been ported to the BSDs, but you can use the
|
system has *itself* not yet been ported to the BSDs, but you can use the
|
||||||
flash unlock utility.
|
flash unlock utility.
|
||||||
|
|
||||||
|
NOTE: Libreboot standardises on [flashprog](https://flashprog.org/wiki/Flashprog)
|
||||||
|
now, as of 3 May 2024, which is a fork of flashrom.
|
||||||
|
|
||||||
NOTE: BSD is mentioned above, but the only BSD tested for `dell-flash-unlock`
|
NOTE: BSD is mentioned above, but the only BSD tested for `dell-flash-unlock`
|
||||||
is OpenBSD, as of 15 October 2023.
|
is OpenBSD, as of 15 October 2023.
|
||||||
|
|
||||||
Flashing from GNU+Linux
|
Flashing from GNU+Linux
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
MAKE SURE you boot with this GNU+Linux kernel parameter: `iomem=relaxed` - this
|
MAKE SURE you boot with this Linux kernel parameter: `iomem=relaxed` - this
|
||||||
disables memory protections, permitting `/dev/mem` access needed by flashrom.
|
disables memory protections, permitting `/dev/mem` access needed by flashprog.
|
||||||
The flash is memory mapped and flashrom accesses it via `/dev/mem`.
|
The flash is memory mapped and flashprog accesses it via `/dev/mem`.
|
||||||
|
|
||||||
You can flash Canoeboot directly from the vendor (Dell) BIOS, without taking
|
You can flash Canoeboot directly from the vendor (Dell) BIOS, without taking
|
||||||
the machine apart. It can be done entirely from GNU+Linux. It will probably also
|
the machine apart. It can be done entirely from GNU+Linux. It will probably also
|
||||||
|
@ -123,18 +126,18 @@ Protected Range registers.
|
||||||
|
|
||||||
When you flash it, you can use this command:
|
When you flash it, you can use this command:
|
||||||
|
|
||||||
flashrom -p internal -w canoeboot.rom
|
flashprog -p internal -w canoeboot.rom
|
||||||
|
|
||||||
Where `canoeboot.rom` is your E6400 ROM. *Make sure* it's the right one.
|
Where `canoeboot.rom` is your E6400 ROM. *Make sure* it's the right one.
|
||||||
If flashrom complains about multiple flash chips detected, just pick one of
|
If flashprog complains about multiple flash chips detected, just pick one of
|
||||||
them (doesn't matter which one). On *most* Dell machines, the most correct
|
them (doesn't matter which one). On *most* Dell machines, the most correct
|
||||||
would probably be this option in flashrom: `-c MX25L3205D/MX25L3208D`.
|
would probably be this option in flashprog: `-c MX25L3205D/MX25L3208D`.
|
||||||
|
|
||||||
So:
|
So:
|
||||||
|
|
||||||
flashrom -p internal -w canoeboot.rom -c MX25L3205D/MX25L3208D
|
flashprog -p internal -w canoeboot.rom -c MX25L3205D/MX25L3208D
|
||||||
|
|
||||||
When you see flashrom say `VERIFIED` at the end, that means the flash was
|
When you see flashprog say `VERIFIED` at the end, that means the flash was
|
||||||
successful. If you don't see that, or you're unsure, please [contact the
|
successful. If you don't see that, or you're unsure, please [contact the
|
||||||
Canoeboot project via IRC](../../contact.md).
|
Canoeboot project via IRC](../../contact.md).
|
||||||
|
|
||||||
|
@ -144,7 +147,7 @@ BACK UP THE FACTORY BIOS
|
||||||
The `-w` option flashes `canoeboot.rom`. You may consider *backing up* the
|
The `-w` option flashes `canoeboot.rom`. You may consider *backing up* the
|
||||||
original Dell BIOS first, using the -r option:
|
original Dell BIOS first, using the -r option:
|
||||||
|
|
||||||
flashrom -p internal -r backup.rom -c MX25L3205D/MX25L3208D
|
flashprog -p internal -r backup.rom -c MX25L3205D/MX25L3208D
|
||||||
|
|
||||||
Do this while in a flashable state, after the 2nd run of `dell-flash-unlock`.
|
Do this while in a flashable state, after the 2nd run of `dell-flash-unlock`.
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ Flash chip size {#flashchips}
|
||||||
|
|
||||||
Use this to find out:
|
Use this to find out:
|
||||||
|
|
||||||
flashrom -p internal
|
flashprog -p internal
|
||||||
|
|
||||||
Flashing instructions {#clip}
|
Flashing instructions {#clip}
|
||||||
=====================
|
=====================
|
||||||
|
@ -52,11 +52,11 @@ GNU+Linux. There are 2 flash chips (one is backup).
|
||||||
|
|
||||||
Flash the first chip:
|
Flash the first chip:
|
||||||
|
|
||||||
./flashrom -p internal:dualbiosindex=0 -w canoeboot.rom
|
./flashprog -p internal:dualbiosindex=0 -w canoeboot.rom
|
||||||
|
|
||||||
Flash the second chip:
|
Flash the second chip:
|
||||||
|
|
||||||
./flashrom -p internal:dualbiosindex=1 -w canoeboot.rom
|
./flashprog -p internal:dualbiosindex=1 -w canoeboot.rom
|
||||||
|
|
||||||
NOTE: you can still boot the system with just the main flash chip
|
NOTE: you can still boot the system with just the main flash chip
|
||||||
connected, after desoldering the backup chip. This has been tested while
|
connected, after desoldering the backup chip. This has been tested while
|
||||||
|
@ -66,5 +66,5 @@ NOTE: If you don't flash both chips, the recovery program from the default
|
||||||
factory BIOS will kick in and your board will be soft bricked. Make sure that
|
factory BIOS will kick in and your board will be soft bricked. Make sure that
|
||||||
you flash both chips!
|
you flash both chips!
|
||||||
|
|
||||||
NOTE: You need the latest flashrom. Just get it on flashrom.org from
|
NOTE: Libreboot standardises on [flashprog](https://flashprog.org/wiki/Flashprog)
|
||||||
their SVN or Git repos.
|
now, as of 3 May 2024, which is a fork of flashrom.
|
||||||
|
|
|
@ -123,8 +123,8 @@ accomplish the same result of locking or unlocking a descriptor.**
|
||||||
These files contain the descriptor+GbE region and are suitable for systems
|
These files contain the descriptor+GbE region and are suitable for systems
|
||||||
that have an Intel GbE NIC present. The flash regions (as defined by the
|
that have an Intel GbE NIC present. The flash regions (as defined by the
|
||||||
Intel Flash Descriptor) are set *read-write* which means that you can also
|
Intel Flash Descriptor) are set *read-write* which means that you can also
|
||||||
re-flash using `flashrom -p internal` in your operating system running on
|
re-flash using `flashprog -p internal` in your operating system running on
|
||||||
that machine. This is the default setup used when Canoeboot's build system
|
that machine. This is the default setup used when canoeboot's build system
|
||||||
compiles ROM images.
|
compiles ROM images.
|
||||||
|
|
||||||
Alternative versions of these files are also created, which have `ro` in the
|
Alternative versions of these files are also created, which have `ro` in the
|
||||||
|
@ -181,7 +181,7 @@ a Broadcom NIC for ethernet. In descriptorless mode, ICH9M works very similarly
|
||||||
to older ICH7 chipsets.
|
to older ICH7 chipsets.
|
||||||
|
|
||||||
Your canoeboot.rom image is now ready to be flashed on the system. Refer
|
Your canoeboot.rom image is now ready to be flashed on the system. Refer
|
||||||
back to [../install/\#flashrom](../install/#flashrom) for how to flash
|
back to [../install/\#flashprog](../install/#flashprog) for how to flash
|
||||||
it.
|
it.
|
||||||
|
|
||||||
Write-protecting the flash chip
|
Write-protecting the flash chip
|
||||||
|
@ -289,7 +289,7 @@ This takes a `factory.rom` dump and disables the ME/TPM, but leaves the
|
||||||
region intact. It also sets all regions read-write. Simply put, this means
|
region intact. It also sets all regions read-write. Simply put, this means
|
||||||
that you can use the original factory firmware but without the Intel ME enabled.
|
that you can use the original factory firmware but without the Intel ME enabled.
|
||||||
|
|
||||||
The ME interferes with flash read/write in flashrom, and the default
|
The ME interferes with flash read/write in flashprog, and the default
|
||||||
descriptor locks some regions. The idea is that doing this will remove
|
descriptor locks some regions. The idea is that doing this will remove
|
||||||
all of those restrictions.
|
all of those restrictions.
|
||||||
|
|
||||||
|
|
|
@ -3,20 +3,23 @@ title: Installation instructions
|
||||||
x-toc-enable: true
|
x-toc-enable: true
|
||||||
...
|
...
|
||||||
|
|
||||||
This section relates to installing Canoeboot on supported targets.
|
**NOTE: Canoeboot standardises on [flashprog](https://flashprog.org/wiki/Flashprog)
|
||||||
|
now, as of 3 May 2024, which is a fork of flashrom.**
|
||||||
|
|
||||||
|
This section relates to installing canoeboot on supported targets.
|
||||||
|
|
||||||
FLASH ERRORS (and workarounds)
|
FLASH ERRORS (and workarounds)
|
||||||
+=======================
|
+=======================
|
||||||
|
|
||||||
Right out of the gate, some users may experience errors with flashrom when
|
Right out of the gate, some users may experience errors with flashprog when
|
||||||
using the internal programmer. They are:
|
using the internal programmer. They are:
|
||||||
|
|
||||||
/dev/mem access error
|
/dev/mem access error
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
NOTE: if running `flashrom -p internal` for software based flashing, and you
|
NOTE: if running `flashprog -p internal` for software based flashing, and you
|
||||||
get an error related to `/dev/mem` access, you should reboot with
|
get an error related to `/dev/mem` access, you should reboot with
|
||||||
`iomem=relaxed` kernel parameter before running flashrom, or use a kernel that
|
`iomem=relaxed` kernel parameter before running flashprog, or use a kernel that
|
||||||
has `CONFIG_STRICT_DEVMEM` not enabled.
|
has `CONFIG_STRICT_DEVMEM` not enabled.
|
||||||
|
|
||||||
On NetBSD and OpenBSD systems, the equivalent to `iomem=relaxed` in this case
|
On NetBSD and OpenBSD systems, the equivalent to `iomem=relaxed` in this case
|
||||||
|
@ -29,8 +32,8 @@ ERROR: Could not get I/O privileges
|
||||||
|
|
||||||
Error message: `ERROR: Could not get I/O privileges (Function not implemented)`
|
Error message: `ERROR: Could not get I/O privileges (Function not implemented)`
|
||||||
|
|
||||||
If you get this while running `flashrom -p internal -w filename.rom` (or any
|
If you get this while running `flashprog -p internal -w filename.rom` (or any
|
||||||
internal flash operation), note: flashrom heavily uses ioperm/iopl functions
|
internal flash operation), note: flashprog heavily uses ioperm/iopl functions
|
||||||
to operate the internal flasher, at least on x86 machines.
|
to operate the internal flasher, at least on x86 machines.
|
||||||
|
|
||||||
See: <https://lwn.net/Articles/804143/>
|
See: <https://lwn.net/Articles/804143/>
|
||||||
|
@ -49,7 +52,7 @@ See: [NetBSD securelevel manual](https://wiki.netbsd.org/tutorials/kernel_secure
|
||||||
and [OpenBSD securelevel manpage](https://man.openbsd.org/securelevel).
|
and [OpenBSD securelevel manpage](https://man.openbsd.org/securelevel).
|
||||||
|
|
||||||
Otherwise, if you get such errors, it may just be that you're not root. You
|
Otherwise, if you get such errors, it may just be that you're not root. You
|
||||||
must run flashrom as root, at least to use the internal flasher (using external
|
must run flashprog as root, at least to use the internal flasher (using external
|
||||||
USB flashing dongles doesn't normally require root).
|
USB flashing dongles doesn't normally require root).
|
||||||
|
|
||||||
PRECAUTIONS
|
PRECAUTIONS
|
||||||
|
@ -172,7 +175,7 @@ may be configured to restrict write privileges by the host CPU.
|
||||||
|
|
||||||
In some situations, the host CPU can rewrite/erase/dump the boot flash.
|
In some situations, the host CPU can rewrite/erase/dump the boot flash.
|
||||||
This is called *internal flashing*. This means that you will run software,
|
This is called *internal flashing*. This means that you will run software,
|
||||||
namely `flashrom`, to read/erase/write the contents of the boot flash from a
|
namely `flashprog`, to read/erase/write the contents of the boot flash from a
|
||||||
running operating system on the target device.
|
running operating system on the target device.
|
||||||
|
|
||||||
NOTE: please also read the sections further down this page. On some systems,
|
NOTE: please also read the sections further down this page. On some systems,
|
||||||
|
@ -183,11 +186,11 @@ NOTE: in some cases, external flashing is possible but special steps are
|
||||||
required. This depends on your mainboard. Again, please read this page
|
required. This depends on your mainboard. Again, please read this page
|
||||||
carefully.
|
carefully.
|
||||||
|
|
||||||
Run flashrom on host CPU
|
Run flashprog on host CPU
|
||||||
------------------------
|
------------------------
|
||||||
|
|
||||||
You can simply take any ROM image from the Canoeboot project, and flash it.
|
You can simply take any ROM image from the canoeboot project, and flash it.
|
||||||
Boot a GNU+Linux distribution on the target device, and install flashrom.
|
Boot a GNU+Linux distribution on the target device, and install flashprog.
|
||||||
|
|
||||||
In some cases, this is not possible or there are other considerations. Please
|
In some cases, this is not possible or there are other considerations. Please
|
||||||
read this section *carefully*.
|
read this section *carefully*.
|
||||||
|
@ -196,7 +199,7 @@ read this section *carefully*.
|
||||||
|
|
||||||
Use this to find out:
|
Use this to find out:
|
||||||
|
|
||||||
flashrom -p internal
|
flashprog -p internal
|
||||||
|
|
||||||
In the output will be information pertaining to your boot flash.
|
In the output will be information pertaining to your boot flash.
|
||||||
|
|
||||||
|
@ -204,14 +207,14 @@ In the output will be information pertaining to your boot flash.
|
||||||
|
|
||||||
How to read the current chip contents:
|
How to read the current chip contents:
|
||||||
|
|
||||||
sudo flashrom -p internal:laptop=force_I_want_a_brick,boardmismatch=force -r dump.bin
|
sudo flashprog -p internal:laptop=force_I_want_a_brick,boardmismatch=force -r dump.bin
|
||||||
|
|
||||||
You should still make several dumps, even if you're flashing internally, to
|
You should still make several dumps, even if you're flashing internally, to
|
||||||
ensure that you get the same checksums. Check each dump using `sha1sum`
|
ensure that you get the same checksums. Check each dump using `sha1sum`
|
||||||
|
|
||||||
How to erase and rewrite the chip contents:
|
How to erase and rewrite the chip contents:
|
||||||
|
|
||||||
sudo flashrom -p internal:laptop=force_I_want_a_brick,boardmismatch=force -w canoeboot.rom
|
sudo flashprog -p internal:laptop=force_I_want_a_brick,boardmismatch=force -w canoeboot.rom
|
||||||
|
|
||||||
If you are re-flashing a GM45+ICH9M laptop (e.g. ThinkPad X200/X200S/X200T,
|
If you are re-flashing a GM45+ICH9M laptop (e.g. ThinkPad X200/X200S/X200T,
|
||||||
T400, T500, R400, W500 etc - but not R500), you should run the ich9gen utility
|
T400, T500, R400, W500 etc - but not R500), you should run the ich9gen utility
|
||||||
|
@ -220,13 +223,13 @@ Please read the ich9utils documentation:
|
||||||
[/docs/install/ich9utils.html](/docs/install/ich9utils.html)
|
[/docs/install/ich9utils.html](/docs/install/ich9utils.html)
|
||||||
|
|
||||||
NOTE: `force_I_want_a_brick` is not scary. Do not be scared! This merely disables
|
NOTE: `force_I_want_a_brick` is not scary. Do not be scared! This merely disables
|
||||||
the safety checks in flashrom. Flashrom and coreboot change a lot, over the years,
|
the safety checks in flashprog. Flashrom and coreboot change a lot, over the years,
|
||||||
and sometimes it's necessary to use this option. If you're scared, then just
|
and sometimes it's necessary to use this option. If you're scared, then just
|
||||||
follow the above instructions, but remove that option. So, just use `-p internal`.
|
follow the above instructions, but remove that option. So, just use `-p internal`.
|
||||||
If that doesn't work, next try `-p internal:boardmismatch=force`. If that doesn't
|
If that doesn't work, next try `-p internal:boardmismatch=force`. If that doesn't
|
||||||
work, try `-p internal:boardmismatch=force,laptop=force_I_want_a_brick`. So long
|
work, try `-p internal:boardmismatch=force,laptop=force_I_want_a_brick`. So long
|
||||||
as you *ensure* you're using the correct ROM for your machine, it will be safe
|
as you *ensure* you're using the correct ROM for your machine, it will be safe
|
||||||
to run flashrom. These extra options just disable the safetyl checks in flashrom.
|
to run flashprog. These extra options just disable the safetyl checks in flashprog.
|
||||||
There is nothing to worry about.
|
There is nothing to worry about.
|
||||||
|
|
||||||
If successful, it will either say `VERIFIED` or it will say that the chip
|
If successful, it will either say `VERIFIED` or it will say that the chip
|
||||||
|
@ -305,7 +308,7 @@ example of the push pin as a proof of concept:
|
||||||
|
|
||||||
[You must flash it externally](spi.md)
|
[You must flash it externally](spi.md)
|
||||||
|
|
||||||
#### ThinkPad X60/X60S/X60T/T60 with Lenovo BIOS {#flashrom_lenovobios}
|
#### ThinkPad X60/X60S/X60T/T60 with Lenovo BIOS {#flashprog_lenovobios}
|
||||||
|
|
||||||
NOTE: If BIOS password auth is enabled, you can clear it by shorting pins on
|
NOTE: If BIOS password auth is enabled, you can clear it by shorting pins on
|
||||||
an EEPROM and then resetting the password in Lenovo BIOS, prior to flashing
|
an EEPROM and then resetting the password in Lenovo BIOS, prior to flashing
|
||||||
|
@ -316,8 +319,10 @@ Canoeboot. For T60, see:
|
||||||
X60 BIOS password (Lenovo): you might find info here:
|
X60 BIOS password (Lenovo): you might find info here:
|
||||||
<https://bios-pw.org/>
|
<https://bios-pw.org/>
|
||||||
|
|
||||||
Download bucts here:
|
You can just get bucts from the libreboot project, same thing for the patched
|
||||||
<https://notabug.org/libreboot/bucts>
|
flashrom. In the Libreboot 20160907 release, there is a *utility* archive, which
|
||||||
|
has statically compiled executables. They still work just fine on modern
|
||||||
|
systems, and they can be used for this purpose.
|
||||||
|
|
||||||
Here are a list of targets:
|
Here are a list of targets:
|
||||||
|
|
||||||
|
@ -330,11 +335,11 @@ Here are a list of targets:
|
||||||
and you will run it at 115200 baud rate. agetty/fgetty in GNU+Linux can give
|
and you will run it at 115200 baud rate. agetty/fgetty in GNU+Linux can give
|
||||||
you a serial console in your OS)
|
you a serial console in your OS)
|
||||||
|
|
||||||
Download and build flashrom, using the instructions
|
Download and build flashprog, using the instructions
|
||||||
on [the Git page](../../git.md), and download the `bucts` software using the
|
on [the Git page](../../git.md), and download the `bucts` software using the
|
||||||
notes on that very same page.
|
notes on that very same page.
|
||||||
|
|
||||||
You can replace Lenovo BIOS with Canoeboot, using flashrom running on the host
|
You can replace Lenovo BIOS with Canoeboot, using flashprog running on the host
|
||||||
CPU. However, there are some considerations.
|
CPU. However, there are some considerations.
|
||||||
|
|
||||||
Firstly, make sure that the yellow CMOS battery is installed, and functioning
|
Firstly, make sure that the yellow CMOS battery is installed, and functioning
|
||||||
|
@ -346,7 +351,7 @@ load on it, which there will be. This coincell powers the real-time clock and
|
||||||
CMOS memory).
|
CMOS memory).
|
||||||
|
|
||||||
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
|
||||||
specially patched flashrom binary, you can easily flash it but the top 64KiB
|
specially patched flashprog binary, you can easily flash it but the top 64KiB
|
||||||
region of the boot flash, containing your bootblock, cannot be flashed just
|
region of the boot flash, containing your bootblock, cannot be flashed just
|
||||||
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
|
||||||
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*.
|
||||||
|
@ -360,12 +365,12 @@ program referenced below.
|
||||||
The Canoeboot ROM images already have the upper 64KiB bootblock copied to the lower
|
The Canoeboot ROM images already have the upper 64KiB bootblock copied to the lower
|
||||||
one, so you don't have to worry about copying it yourself.
|
one, so you don't have to worry about copying it yourself.
|
||||||
|
|
||||||
If you build flashrom using the Canoeboot build system, there will be three
|
If you build flashprog using the Canoeboot build system, there will be three
|
||||||
binaries:
|
binaries:
|
||||||
|
|
||||||
* `flashrom`
|
* `flashprog`
|
||||||
* `flashrom_i945_sst`
|
* `flashprog_i945_sst`
|
||||||
* `flashrom_i945_mx`
|
* `flashprog_i945_mx`
|
||||||
|
|
||||||
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
|
||||||
run `make` in the bucts source directory).
|
run `make` in the bucts source directory).
|
||||||
|
@ -377,19 +382,19 @@ Run the bucts tool:
|
||||||
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
|
||||||
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
|
||||||
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
|
||||||
use `flashrom_i945_sst` for the SST chip, and `flashrom_i945_mx` for the
|
use `flashprog_i945_sst` for the SST chip, and `flashprog_i945_mx` for the
|
||||||
Macronix chip.
|
Macronix chip.
|
||||||
|
|
||||||
Now run flashrom (for SST):
|
Now run flashprog (for SST):
|
||||||
|
|
||||||
sudo ./flashrom_i945_sst -p internal -w coreboot.rom
|
sudo ./flashprog_i945_sst -p internal -w coreboot.rom
|
||||||
|
|
||||||
Or Macronix:
|
Or Macronix:
|
||||||
|
|
||||||
sudo ./flashrom_i945_mx -p internal -w coreboot.rom
|
sudo ./flashprog_i945_mx -p internal -w coreboot.rom
|
||||||
|
|
||||||
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
|
||||||
harmless to run both versions of flashrom. In fact, you should do so!
|
harmless to run both versions of flashprog. In fact, you should do so!
|
||||||
|
|
||||||
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:
|
||||||
|
|
||||||
|
@ -417,17 +422,17 @@ Your flash chip is in an unknown state.
|
||||||
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
|
||||||
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.
|
||||||
|
|
||||||
**WARNING: if flashrom complains about `/dev/mem` access, please
|
**WARNING: if flashprog complains about `/dev/mem` access, please
|
||||||
run `sudo ./bucts 0`. If flashrom is complaining about `/dev/mem`, it means
|
run `sudo ./bucts 0`. If flashprog is complaining about `/dev/mem`, it means
|
||||||
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
|
||||||
following kernel parameter added in your bootloader: `iomem=relaxed` and try
|
following kernel parameter added in your bootloader: `iomem=relaxed` and try
|
||||||
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
|
||||||
you see the expected flashrom output as indicated above.**
|
you see the expected flashprog output as indicated above.**
|
||||||
|
|
||||||
If you *did* run flashrom and it failed to flash, but you set bucts to 1 and
|
If you *did* run flashprog and it failed to flash, but you set bucts to 1 and
|
||||||
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
|
||||||
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
|
||||||
coin-cell and try again from scratch. In this instance, if flashrom didn't do
|
coin-cell and try again from scratch. In this instance, if flashprog didn't do
|
||||||
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
|
||||||
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
|
||||||
volatile memory, powered by that CR2032 coin-cell battery.
|
volatile memory, powered by that CR2032 coin-cell battery.
|
||||||
|
@ -435,16 +440,16 @@ volatile memory, powered by that CR2032 coin-cell battery.
|
||||||
Assuming that everything went well:
|
Assuming that everything went well:
|
||||||
|
|
||||||
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
|
||||||
64KiB bootblock is now read-write. Use the *unpatched* flashrom binary:
|
64KiB bootblock is now read-write. Use the *unpatched* flashprog binary:
|
||||||
|
|
||||||
sudo ./flashrom -p internal -w canoeboot.rom
|
sudo ./flashprog -p internal -w canoeboot.rom
|
||||||
|
|
||||||
To reset bucts, do this:
|
To reset bucts, do this:
|
||||||
|
|
||||||
sudo ./bucts 0
|
sudo ./bucts 0
|
||||||
|
|
||||||
ONLY set bucts back to 0 if you're sure that the upper 64KiB bootblock is
|
ONLY set bucts back to 0 if you're sure that the upper 64KiB bootblock is
|
||||||
flashed. It is flashed if flashrom said VERIFIED when running the above
|
flashed. It is flashed if flashprog said VERIFIED when running the above
|
||||||
command.
|
command.
|
||||||
|
|
||||||
If it said VERIFIED, shut down. If it didn't say VERIFIED, make sure bucts is
|
If it said VERIFIED, shut down. If it didn't say VERIFIED, make sure bucts is
|
||||||
|
@ -485,13 +490,13 @@ ASUS KFSN4-DRE
|
||||||
|
|
||||||
The KFSN4-DRE has an LPC chip. Most people have been flashing these
|
The KFSN4-DRE has an LPC chip. Most people have been flashing these
|
||||||
internally, hot-swapping the chip out after boot, preserving the original chip,
|
internally, hot-swapping the chip out after boot, preserving the original chip,
|
||||||
and using flashrom on a new chip as described above.
|
and using flashprog on a new chip as described above.
|
||||||
|
|
||||||
TODO: Document PLCC32 (LPC) flashing.
|
TODO: Document PLCC32 (LPC) flashing.
|
||||||
The [FlexyICE](https://www.coreboot.org/FlexyICE) has been used to flash these
|
The [FlexyICE](https://www.coreboot.org/FlexyICE) has been used to flash these
|
||||||
chips, but it is hard to find now. A custom flasher may be made such as
|
chips, but it is hard to find now. A custom flasher may be made such as
|
||||||
[flashrom serprog stm32](https://github.com/wosk/stm32-vserprog-lpc) or
|
[flashprog serprog stm32](https://github.com/wosk/stm32-vserprog-lpc) or
|
||||||
[teensy flasher](https://www.flashrom.org/Teensy_3.1_SPI_%2B_LPC/FWH_Flasher)
|
[teensy flasher](https://www.flashprog.org/Teensy_3.1_SPI_%2B_LPC/FWH_Flasher)
|
||||||
|
|
||||||
TARGET: Apple Macbook2,1, Macbook1,1 and iMac5,2 (i945 platform)
|
TARGET: Apple Macbook2,1, Macbook1,1 and iMac5,2 (i945 platform)
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
|
@ -110,23 +110,26 @@ containing your NIC's configuration. This is the part that
|
||||||
many people will struggle with, so we will dedicated an
|
many people will struggle with, so we will dedicated an
|
||||||
entire next section to it:
|
entire next section to it:
|
||||||
|
|
||||||
Use flashrom
|
Use flashprog
|
||||||
------------
|
------------
|
||||||
|
|
||||||
|
NOTE: Libreboot standardises on [flashprog](https://flashprog.org/wiki/Flashprog)
|
||||||
|
now, as of 3 May 2024, which is a fork of flashrom.
|
||||||
|
|
||||||
If you wish to operate on the GbE section that's already
|
If you wish to operate on the GbE section that's already
|
||||||
flashed, you should *dump* the current full ROM image.
|
flashed, you should *dump* the current full ROM image.
|
||||||
If you already have a ROM image, you do not need to dump
|
If you already have a ROM image, you do not need to dump
|
||||||
it, so you can skip this section.
|
it, so you can skip this section.
|
||||||
|
|
||||||
Download flashrom here:
|
Download flashprog here:
|
||||||
|
|
||||||
* <https://flashrom.org/>
|
* <https://flashprog.org/>
|
||||||
|
|
||||||
Using recent flashrom versions, you can extract this region. If
|
Using recent flashprog versions, you can extract this region. If
|
||||||
your regions are unlocked, you can run flashrom on the target
|
your regions are unlocked, you can run flashprog on the target
|
||||||
system, like so:
|
system, like so:
|
||||||
|
|
||||||
flashrom -p internal -r rom.bin
|
flashprog -p internal -r rom.bin
|
||||||
|
|
||||||
If your system has two flash chips, the GbE region is usually
|
If your system has two flash chips, the GbE region is usually
|
||||||
stored on SPI1 (not SPI2). Otherwise, it may be that you have
|
stored on SPI1 (not SPI2). Otherwise, it may be that you have
|
||||||
|
@ -142,7 +145,7 @@ project has a handy guide for this; it can be used for reading
|
||||||
from and writing to the chip. See: [spi.md](spi.md)
|
from and writing to the chip. See: [spi.md](spi.md)
|
||||||
|
|
||||||
If you're using an external programmer, the `-p internal`
|
If you're using an external programmer, the `-p internal`
|
||||||
option should be changed accordingly. Read flashrom
|
option should be changed accordingly. Read flashprog
|
||||||
documentation, and make sure you have everything
|
documentation, and make sure you have everything
|
||||||
properly configured.
|
properly configured.
|
||||||
|
|
||||||
|
@ -198,18 +201,18 @@ This will create the file `rom.bin.new`, which contains
|
||||||
your modified GbE section with the NVM images inside; this
|
your modified GbE section with the NVM images inside; this
|
||||||
includes your MAC address.
|
includes your MAC address.
|
||||||
|
|
||||||
Refer to flashrom documentation. You may flash the new ROM
|
Refer to flashprog documentation. You may flash the new ROM
|
||||||
like so, if running on the same system and the regions are
|
like so, if running on the same system and the regions are
|
||||||
read-write:
|
read-write:
|
||||||
|
|
||||||
flashrom -p internal -w rom.bin.new
|
flashprog -p internal -w rom.bin.new
|
||||||
|
|
||||||
Newer versions of flashrom support flashing just the specified
|
Newer versions of flashprog support flashing just the specified
|
||||||
region, like so:
|
region, like so:
|
||||||
|
|
||||||
flashrom -p internal --ifd -i gbe -w rom.bin.new
|
flashprog -p internal --ifd -i gbe -w rom.bin.new
|
||||||
|
|
||||||
If you're running flashrom from host CPU on the target
|
If you're running flashprog from host CPU on the target
|
||||||
system, and it's dual flash, you can just flash the
|
system, and it's dual flash, you can just flash the
|
||||||
concatenated image, which you created earlier by running
|
concatenated image, which you created earlier by running
|
||||||
the `cat` program; dual-IC flash configurations appear to
|
the `cat` program; dual-IC flash configurations appear to
|
||||||
|
|
|
@ -64,7 +64,10 @@ Flash chip size {#flashchips}
|
||||||
|
|
||||||
Use this to find out:
|
Use this to find out:
|
||||||
|
|
||||||
flashrom -p internal
|
flashprog -p internal
|
||||||
|
|
||||||
|
NOTE: Libreboot standardises on [flashprog](https://flashprog.org/wiki/Flashprog)
|
||||||
|
now, as of 3 May 2024, which is a fork of flashrom.
|
||||||
|
|
||||||
MAC address {#macaddress}
|
MAC address {#macaddress}
|
||||||
===========
|
===========
|
||||||
|
|
|
@ -3,6 +3,9 @@ title: Read/write 25XX NOR flash via SPI protocol
|
||||||
x-toc-enable: true
|
x-toc-enable: true
|
||||||
...
|
...
|
||||||
|
|
||||||
|
NOTE: Canoeboot standardises on [flashprog](https://flashprog.org/wiki/Flashprog)
|
||||||
|
now, as of 3 May 2024, which is a fork of flashrom.
|
||||||
|
|
||||||
This guide will teach you how to use various tools for externally reprogramming
|
This guide will teach you how to use various tools for externally reprogramming
|
||||||
a 25xx NOR flash via SPI protocol. This is the most common type of flash IC for
|
a 25xx NOR flash via SPI protocol. This is the most common type of flash IC for
|
||||||
computers that coreboot runs on. Almost every system currently supported by
|
computers that coreboot runs on. Almost every system currently supported by
|
||||||
|
@ -11,7 +14,7 @@ which uses LPC flash in a PLCC32 socket, which you can simply hot-swap after
|
||||||
booting the vendor firmware, and then flash internally. Simple!
|
booting the vendor firmware, and then flash internally. Simple!
|
||||||
|
|
||||||
We will be using
|
We will be using
|
||||||
the [flashrom](https://flashrom.org/Flashrom) software which is written to
|
the [flashprog](https://flashprog.org/Flashrom) software which is written to
|
||||||
dump, erase and rewrite these flash chips.
|
dump, erase and rewrite these flash chips.
|
||||||
|
|
||||||
Canoeboot currently documents how to use these SPI programmers:
|
Canoeboot currently documents how to use these SPI programmers:
|
||||||
|
@ -33,7 +36,7 @@ Canoeboot is running.
|
||||||
|
|
||||||
*Internal* flashing means that the host CPU on your system can re-program the
|
*Internal* flashing means that the host CPU on your system can re-program the
|
||||||
SPI flash, using an on-board SPI programmer (which all boards have). You do this
|
SPI flash, using an on-board SPI programmer (which all boards have). You do this
|
||||||
from GNU+Linux, with flashrom.
|
from GNU+Linux, with flashprog.
|
||||||
|
|
||||||
*This* guide that you're reading now is for using an *external* programmer. It
|
*This* guide that you're reading now is for using an *external* programmer. It
|
||||||
is called *external* because it's not the *internal* one on your mainboard.
|
is called *external* because it's not the *internal* one on your mainboard.
|
||||||
|
@ -105,7 +108,7 @@ will appear:
|
||||||
Take note of the ttyACMx. Flashrom is now usable
|
Take note of the ttyACMx. Flashrom is now usable
|
||||||
(substitute ttyACMx with what you observed earlier).
|
(substitute ttyACMx with what you observed earlier).
|
||||||
|
|
||||||
flashrom -p serprog:dev=/dev/ttyACMx,spispeed=16M
|
flashprog -p serprog:dev=/dev/ttyACMx,spispeed=16M
|
||||||
|
|
||||||
spispeed=32M usually works, but since it's not much faster it's probably
|
spispeed=32M usually works, but since it's not much faster it's probably
|
||||||
not worth it. The 12Mbps USB port is limiting the actual speed here.
|
not worth it. The 12Mbps USB port is limiting the actual speed here.
|
||||||
|
@ -264,7 +267,7 @@ BeagleBone Black (BBB)
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
SSH into your BeagleBone Black. It is assumed that you are running Debian 9 on
|
SSH into your BeagleBone Black. It is assumed that you are running Debian 9 on
|
||||||
your BBB. You will run `flashrom` from your BBB.
|
your BBB. You will run `flashprog` from your BBB.
|
||||||
|
|
||||||
NOTE: This section is out of date, because it is written for Debian 9 (running
|
NOTE: This section is out of date, because it is written for Debian 9 (running
|
||||||
on the BBB)
|
on the BBB)
|
||||||
|
@ -305,9 +308,9 @@ RemainAfterExit=yes
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
```
|
```
|
||||||
|
|
||||||
Now test flashrom:
|
Now test flashprog:
|
||||||
|
|
||||||
./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512
|
./flashprog -p linux_spi:dev=/dev/spidev1.0,spispeed=512
|
||||||
|
|
||||||
It is important to use `spispeed=512` or a lower number such as 256 or 128,
|
It is important to use `spispeed=512` or a lower number such as 256 or 128,
|
||||||
because otherwise the BBB will be quite unstable.
|
because otherwise the BBB will be quite unstable.
|
||||||
|
@ -317,7 +320,7 @@ Example output:
|
||||||
```
|
```
|
||||||
Calibrating delay loop... OK.
|
Calibrating delay loop... OK.
|
||||||
No EEPROM/flash device found.
|
No EEPROM/flash device found.
|
||||||
Note: flashrom can never write if the flash chip isn't found automatically.
|
Note: flashprog can never write if the flash chip isn't found automatically.
|
||||||
```
|
```
|
||||||
|
|
||||||
This means that it's working (the clip isn't connected to any flash
|
This means that it's working (the clip isn't connected to any flash
|
||||||
|
@ -336,7 +339,7 @@ TODO: document other SPI flashers
|
||||||
Rasberry Pi (RPi)
|
Rasberry Pi (RPi)
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
SSH into your Raspberry Pi. You will run `flashrom` from your Raspberry Pi.
|
SSH into your Raspberry Pi. You will run `flashprog` from your Raspberry Pi.
|
||||||
|
|
||||||
You must configure `spidev` on your Raspberry Pi. This is a special driver in
|
You must configure `spidev` on your Raspberry Pi. This is a special driver in
|
||||||
the GNU+Linux kernel; technically, the driver name is `spi-bcm2835`.
|
the GNU+Linux kernel; technically, the driver name is `spi-bcm2835`.
|
||||||
|
@ -444,7 +447,7 @@ Website:
|
||||||
|
|
||||||
<https://librerpi.github.io/>
|
<https://librerpi.github.io/>
|
||||||
|
|
||||||
Install flashrom
|
Install flashprog
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
If you're using a BBB or RPi, you will do this while SSH'd into those.
|
If you're using a BBB or RPi, you will do this while SSH'd into those.
|
||||||
|
@ -453,7 +456,7 @@ Flashrom is the software that you will use, for dumping, erasing and rewriting
|
||||||
the contents of your NOR flash.
|
the contents of your NOR flash.
|
||||||
|
|
||||||
In the Canoeboot build system, from the Git repository, you can download and
|
In the Canoeboot build system, from the Git repository, you can download and
|
||||||
install flashrom. Do this after downloading the
|
install flashprog. Do this after downloading the
|
||||||
[cbmk Git repository](../../git.md):
|
[cbmk Git repository](../../git.md):
|
||||||
|
|
||||||
cd cbmk
|
cd cbmk
|
||||||
|
@ -462,7 +465,7 @@ install flashrom. Do this after downloading the
|
||||||
NOTE: debian, arch or void can be written instead of ubuntu2004. the debian
|
NOTE: debian, arch or void can be written instead of ubuntu2004. the debian
|
||||||
script is also applicable to newer ubuntu versions
|
script is also applicable to newer ubuntu versions
|
||||||
|
|
||||||
./update trees -b flashrom
|
./update trees -b flashprog
|
||||||
|
|
||||||
If the `ubuntu2004` script complains about missing dependencies, just modify
|
If the `ubuntu2004` script complains about missing dependencies, just modify
|
||||||
the dependencies config to remove those dependencies. The script is located
|
the dependencies config to remove those dependencies. The script is located
|
||||||
|
@ -470,30 +473,28 @@ at `config/dependencies/ubuntu2004` and it is written for
|
||||||
Ubuntu 20.04, but it should work fine in other Linux distributions that use
|
Ubuntu 20.04, but it should work fine in other Linux distributions that use
|
||||||
the `apt-get` package manager.
|
the `apt-get` package manager.
|
||||||
|
|
||||||
A `flashrom/` directory will be present, with a `flashrom` executable inside
|
A `flashprog/` directory will be present, with a `flashprog` executable inside
|
||||||
of it. If you got an error about missing package when running the dependencies
|
of it. If you got an error about missing package when running the dependencies
|
||||||
command above, tweak `config/dependencies/ubuntu2004`. That
|
command above, tweak `config/dependencies/ubuntu2004`. That
|
||||||
script downloads and installs build dependencies in apt-get and it is intended
|
script downloads and installs build dependencies in apt-get and it is intended
|
||||||
for use on x86-64 systems running Ubuntu 20.04, but it should work in Raspbian
|
for use on x86-64 systems running Ubuntu 20.04, but it should work in Raspbian
|
||||||
on the Raspberry Pi.
|
on the Raspberry Pi.
|
||||||
|
|
||||||
Alternatively, you may download flashrom directly from upstream
|
Alternatively, you may download flashprog directly from upstream
|
||||||
at <https://flashrom.org/Flashrom>
|
at <https://flashprog.org/Flashrom>
|
||||||
|
|
||||||
If you're flashing a Macronix flashchip on a ThinkPad X200, you will want to
|
If you're flashing a Macronix flashchip on a ThinkPad X200, you will want to
|
||||||
use a special patched version of flashrom, which you can download here:
|
use a special patched version of flashprog, which you can download here:
|
||||||
<https://vimuser.org/hackrom.tar.xz> - patched source code is available, and a
|
<https://vimuser.org/hackrom.tar.xz> - patched source code is available, and a
|
||||||
binary is also available that you can simply run. Pass the `--workaround-mx`
|
binary is also available that you can simply run. Pass the `--workaround-mx`
|
||||||
argument in flashrom. This mitigates stability issues. *Another*, newer
|
argument in flashprog. This mitigates stability issues.
|
||||||
version of this is available, with the same workaround patch, but based on
|
|
||||||
flashrom 1.3: <https://codeberg.org/Riku_V/whackrom>
|
|
||||||
|
|
||||||
If you downloaded the flashrom source code directly, you can go into the
|
If you downloaded the flashprog source code directly, you can go into the
|
||||||
directory and simply type `make`. In the Canoeboot build system, build
|
directory and simply type `make`. In the canoeboot build system, build
|
||||||
dependencies are documented in configuration files located
|
dependencies are documented in configuration files located
|
||||||
at `config/dependencies/` which you can install.
|
at `config/dependencies/` which you can install.
|
||||||
|
|
||||||
How to use flashrom
|
How to use flashprog
|
||||||
===================
|
===================
|
||||||
|
|
||||||
Read past these sections, further down this page, to learn about specific chip
|
Read past these sections, further down this page, to learn about specific chip
|
||||||
|
@ -508,11 +509,11 @@ current chip contents to a file.
|
||||||
Run this command to see if 25xx flash is detected, with your RPi properly
|
Run this command to see if 25xx flash is detected, with your RPi properly
|
||||||
wired.
|
wired.
|
||||||
|
|
||||||
sudo ./flashrom -p linux_spi:dev=/dev/spidev0.0,spispeed=32768
|
sudo ./flashprog -p linux_spi:dev=/dev/spidev0.0,spispeed=32768
|
||||||
|
|
||||||
For BBB, you must use a lower speed and a different device path:
|
For BBB, you must use a lower speed and a different device path:
|
||||||
|
|
||||||
sudo ./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512
|
sudo ./flashprog -p linux_spi:dev=/dev/spidev1.0,spispeed=512
|
||||||
|
|
||||||
On BBB, never use a speed higher than `spispeed=512`. In some cases, you may
|
On BBB, never use a speed higher than `spispeed=512`. In some cases, you may
|
||||||
even need to go as low as `spispeed=128`. The BBB is highly unstable and
|
even need to go as low as `spispeed=128`. The BBB is highly unstable and
|
||||||
|
@ -530,11 +531,11 @@ or you can try flashing it with a new ROM.
|
||||||
|
|
||||||
Dump it like so (RPi):
|
Dump it like so (RPi):
|
||||||
|
|
||||||
sudo ./flashrom -p linux_spi:dev=/dev/spidev0.0,spispeed=32768 -r dump.bin
|
sudo ./flashprog -p linux_spi:dev=/dev/spidev0.0,spispeed=32768 -r dump.bin
|
||||||
|
|
||||||
For BBB, do this:
|
For BBB, do this:
|
||||||
|
|
||||||
sudo ./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -r dump.bin
|
sudo ./flashprog -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -r dump.bin
|
||||||
|
|
||||||
It is advisable to take a *2nd* dump, e.g. `dump2.bin`, and then check sha1sum:
|
It is advisable to take a *2nd* dump, e.g. `dump2.bin`, and then check sha1sum:
|
||||||
|
|
||||||
|
@ -551,11 +552,11 @@ Writing
|
||||||
|
|
||||||
Next, run this command (RPi):
|
Next, run this command (RPi):
|
||||||
|
|
||||||
sudo ./flashrom -p linux_spi:dev=/dev/spidev0.0,spispeed=32768 -w /path/to/canoeboot.rom
|
sudo ./flashprog -p linux_spi:dev=/dev/spidev0.0,spispeed=32768 -w /path/to/canoeboot.rom
|
||||||
|
|
||||||
If using BBB:
|
If using BBB:
|
||||||
|
|
||||||
sudo ./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -w /path/to/canoeboot.rom
|
sudo ./flashprog -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -w /path/to/canoeboot.rom
|
||||||
|
|
||||||
If using BBB, you may have to use a lower speed than 512. You may also have to
|
If using BBB, you may have to use a lower speed than 512. You may also have to
|
||||||
re-flash several times before it works fully.
|
re-flash several times before it works fully.
|
||||||
|
|
|
@ -5,7 +5,7 @@ x-toc-enable: true
|
||||||
|
|
||||||
本指南将教你怎样使用各种工具,通过 SPI 协议对 25xx NOR flash 进行外部再编程。这是 coreboot 所支持的计算机中,最常见的 flash IC 类型。目前 canoeboot 支持的每个系统,基本都使用这种类型的引导 flash;唯一的例外就是 ASUS KFSN4-DRE,它在 PLCC32 芯片座中使用了 LPC flash,你可以在供应商固件启动后,对其进行热切换,然后再内部刷入。十分简单!
|
本指南将教你怎样使用各种工具,通过 SPI 协议对 25xx NOR flash 进行外部再编程。这是 coreboot 所支持的计算机中,最常见的 flash IC 类型。目前 canoeboot 支持的每个系统,基本都使用这种类型的引导 flash;唯一的例外就是 ASUS KFSN4-DRE,它在 PLCC32 芯片座中使用了 LPC flash,你可以在供应商固件启动后,对其进行热切换,然后再内部刷入。十分简单!
|
||||||
|
|
||||||
我们会用到 [flashrom](https://flashrom.org/Flashrom) 软件,这个软件可以读出、擦除及重写这些 flash 芯片。
|
我们会用到 [flashprog](https://flashprog.org/Flashrom) 软件,这个软件可以读出、擦除及重写这些 flash 芯片。
|
||||||
|
|
||||||
canoeboot 目前记录了这些 SPI 编程器的使用方法:
|
canoeboot 目前记录了这些 SPI 编程器的使用方法:
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ canoeboot 目前记录了这些 SPI 编程器的使用方法:
|
||||||
|
|
||||||
大部分支持 canoeboot 机器,都需要在第一次刷写的时候,借助这里的教程或是类似教程,对其进行外部再刷写。不过,目前支持的所有机器,你都可以在 canoeboot 运行时,对其进行内部再刷写。
|
大部分支持 canoeboot 机器,都需要在第一次刷写的时候,借助这里的教程或是类似教程,对其进行外部再刷写。不过,目前支持的所有机器,你都可以在 canoeboot 运行时,对其进行内部再刷写。
|
||||||
|
|
||||||
*内部*刷写是指,主机上的 CPU 可以使用板载 SPI 编程器(每个主板都有)对 SPI flash 进行再编程。这可以在 Linux 上使用 flashrom 做到。
|
*内部*刷写是指,主机上的 CPU 可以使用板载 SPI 编程器(每个主板都有)对 SPI flash 进行再编程。这可以在 Linux 上使用 flashprog 做到。
|
||||||
|
|
||||||
你在读的*这个*教程,使用的是*外部*编程器。之所以叫*外部*,是因为用的不是主板上的*内部*编程器。
|
你在读的*这个*教程,使用的是*外部*编程器。之所以叫*外部*,是因为用的不是主板上的*内部*编程器。
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ will appear:
|
||||||
Take note of the ttyACMx. Flashrom is now usable
|
Take note of the ttyACMx. Flashrom is now usable
|
||||||
(substitute ttyACMx with what you observed earlier).
|
(substitute ttyACMx with what you observed earlier).
|
||||||
|
|
||||||
flashrom -p serprog:dev=/dev/ttyACMx,spispeed=16M
|
flashprog -p serprog:dev=/dev/ttyACMx,spispeed=16M
|
||||||
|
|
||||||
spispeed=32M usually works, but since it's not much faster it's probably
|
spispeed=32M usually works, but since it's not much faster it's probably
|
||||||
not worth it. The 12Mbps USB port is limiting the actual speed here.
|
not worth it. The 12Mbps USB port is limiting the actual speed here.
|
||||||
|
@ -171,7 +171,7 @@ DIP8
|
||||||
BeagleBone Black(BBB)
|
BeagleBone Black(BBB)
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
SSH 连接到你的 BeagleBone Black。假定你在 BBB 上用的是 Debian 9。你将在 BBB 上运行 `flashrom`。
|
SSH 连接到你的 BeagleBone Black。假定你在 BBB 上用的是 Debian 9。你将在 BBB 上运行 `flashprog`。
|
||||||
|
|
||||||
注意:该部分已过时,因为它是写给 BBB 上运行的 Debian 9 的。
|
注意:该部分已过时,因为它是写给 BBB 上运行的 Debian 9 的。
|
||||||
|
|
||||||
|
@ -210,9 +210,9 @@ RemainAfterExit=yes
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
```
|
```
|
||||||
|
|
||||||
现在测试 flashrom:
|
现在测试 flashprog:
|
||||||
|
|
||||||
./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512
|
./flashprog -p linux_spi:dev=/dev/spidev1.0,spispeed=512
|
||||||
|
|
||||||
重要的一点是,要使用 `spispeed=512` 或者更低的速度,例如 256 或 128,否则 BBB 会十分不稳定。
|
重要的一点是,要使用 `spispeed=512` 或者更低的速度,例如 256 或 128,否则 BBB 会十分不稳定。
|
||||||
|
|
||||||
|
@ -221,7 +221,7 @@ WantedBy=multi-user.target
|
||||||
```
|
```
|
||||||
Calibrating delay loop... OK.
|
Calibrating delay loop... OK.
|
||||||
No EEPROM/flash device found.
|
No EEPROM/flash device found.
|
||||||
Note: flashrom can never write if the flash chip isn't found automatically.
|
Note: flashprog can never write if the flash chip isn't found automatically.
|
||||||
```
|
```
|
||||||
|
|
||||||
这表示正常工作了(夹子没连接任何 flash 芯片,所以出错是正常的)。
|
这表示正常工作了(夹子没连接任何 flash 芯片,所以出错是正常的)。
|
||||||
|
@ -236,7 +236,7 @@ BBB 注意事项
|
||||||
Rasberry Pi(RPi)
|
Rasberry Pi(RPi)
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
SSH 连接到树莓派。你将在树莓派上运行 `flashrom`。
|
SSH 连接到树莓派。你将在树莓派上运行 `flashprog`。
|
||||||
|
|
||||||
你必须在树莓派上配置 `spidev`。这是 Linux 内核的一个特别驱动;它严谨的名字叫做 `spi-bcm2835`。
|
你必须在树莓派上配置 `spidev`。这是 Linux 内核的一个特别驱动;它严谨的名字叫做 `spi-bcm2835`。
|
||||||
|
|
||||||
|
@ -254,7 +254,7 @@ SSH 连接到树莓派。你将在树莓派上运行 `flashrom`。
|
||||||
RPi 驱动强度(Drive Strength)
|
RPi 驱动强度(Drive Strength)
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
RPi 的 flashrom 可能无法检测到一些系统的 SPI flash,即使你已经完美地连好了线并夹住了芯片。这可能是因为树莓派 GPIO 的驱动强度,它默认是 8mA。驱动强度本质上就是,在保持高电平最低电压的同时,引脚最高能输出的电流。对树莓派而言,这个电压是 3.0 V。
|
RPi 的 flashprog 可能无法检测到一些系统的 SPI flash,即使你已经完美地连好了线并夹住了芯片。这可能是因为树莓派 GPIO 的驱动强度,它默认是 8mA。驱动强度本质上就是,在保持高电平最低电压的同时,引脚最高能输出的电流。对树莓派而言,这个电压是 3.0 V。
|
||||||
|
|
||||||
类似地,也要满足一个最低电压,SPI flash 芯片才会把它当成高逻辑电平。这个值一般是 SPI flash 的 0.7*VCC,对 3.3V 的芯片而言也就是 2.31V。如果驱动强度太低了,那 flash 芯片的引脚处的电压可能会低于最低电压,导致它被视为发送了低逻辑电平,而不是高逻辑电平。
|
类似地,也要满足一个最低电压,SPI flash 芯片才会把它当成高逻辑电平。这个值一般是 SPI flash 的 0.7*VCC,对 3.3V 的芯片而言也就是 2.31V。如果驱动强度太低了,那 flash 芯片的引脚处的电压可能会低于最低电压,导致它被视为发送了低逻辑电平,而不是高逻辑电平。
|
||||||
|
|
||||||
|
@ -307,33 +307,33 @@ RPi 的自由固件
|
||||||
|
|
||||||
<https://librerpi.github.io/>
|
<https://librerpi.github.io/>
|
||||||
|
|
||||||
安装 flashrom
|
安装 flashprog
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
如果你在使用 BBB 或者 RPi,你需要在 SSH 进去之后再这么做。
|
如果你在使用 BBB 或者 RPi,你需要在 SSH 进去之后再这么做。
|
||||||
|
|
||||||
Flashrom 是用来读出、擦除、重写 NOR flash 内容的软件。
|
Flashrom 是用来读出、擦除、重写 NOR flash 内容的软件。
|
||||||
|
|
||||||
使用 Git 仓库中的 canoeboot 构建系统,你可以下载并安装 flashrom。首先下载 [lbmk Git 仓库](https://codeberg.org/libreboot/lbmk),然后执行:
|
使用 Git 仓库中的 canoeboot 构建系统,你可以下载并安装 flashprog。首先下载 [lbmk Git 仓库](https://codeberg.org/libreboot/lbmk),然后执行:
|
||||||
|
|
||||||
cd lbmk
|
cd lbmk
|
||||||
sudo ./build dependencies ubuntu2004
|
sudo ./build dependencies ubuntu2004
|
||||||
|
|
||||||
注意:你可以输入 debian、arch 或 void 来替换 ubuntu。debian 脚本也可以用于新版 ubuntu。
|
注意:你可以输入 debian、arch 或 void 来替换 ubuntu。debian 脚本也可以用于新版 ubuntu。
|
||||||
|
|
||||||
./update trees -b flashrom
|
./update trees -b flashprog
|
||||||
|
|
||||||
如果 `ubuntu2004` 报告了依赖缺失,编辑一下这个脚本,把缺失的依赖移除就行了。脚本位于 `config/dependencies/ubuntu2004`,它是写给 Ubuntu 20.04 的,但在其他使用 `apt-get` 包管理器的 Linux 发行版应该也能用。
|
如果 `ubuntu2004` 报告了依赖缺失,编辑一下这个脚本,把缺失的依赖移除就行了。脚本位于 `config/dependencies/ubuntu2004`,它是写给 Ubuntu 20.04 的,但在其他使用 `apt-get` 包管理器的 Linux 发行版应该也能用。
|
||||||
|
|
||||||
接下来,会出现一个 `flashrom/` 目录,其中有一个 `flashrom` 可执行文件。如果你在运行上面的依赖命令的时候,出现了缺失包的错误,则修改 `config/dependencies/ubuntu2004`。那个脚本会在 apt-get 中下载并安装构建依赖,它是为运行 Ubuntu 的 x86-64 系统写的,但在树莓派上的 Raspbian 应该能用。
|
接下来,会出现一个 `flashprog/` 目录,其中有一个 `flashprog` 可执行文件。如果你在运行上面的依赖命令的时候,出现了缺失包的错误,则修改 `config/dependencies/ubuntu2004`。那个脚本会在 apt-get 中下载并安装构建依赖,它是为运行 Ubuntu 的 x86-64 系统写的,但在树莓派上的 Raspbian 应该能用。
|
||||||
|
|
||||||
或者,你可以直接从上游下载 flashrom,位于:<https://flashrom.org/Flashrom>
|
或者,你可以直接从上游下载 flashprog,位于:<https://flashprog.org/Flashrom>
|
||||||
|
|
||||||
如果你是在 ThinkPad X200 上刷写 Macronix flash 芯片,则要使用一个 flashrom 的特别修改版,下载地址在这里:<https://vimuser.org/hackrom.tar.xz> —— 其中有修改版的源代码,也有可以直接运行的二进制文件。将 `--workaround-mx` 参数传给 flashrom。这会缓解稳定性问题。
|
如果你是在 ThinkPad X200 上刷写 Macronix flash 芯片,则要使用一个 flashprog 的特别修改版,下载地址在这里:<https://vimuser.org/hackrom.tar.xz> —— 其中有修改版的源代码,也有可以直接运行的二进制文件。将 `--workaround-mx` 参数传给 flashprog。这会缓解稳定性问题。
|
||||||
|
|
||||||
如果你直接下载了 flashrom 源代码,你可以进入目录并直接运行 `make`。在 canoeboot 构建系统中,`config/dependencies/` 处的脚本写明了构建依赖,你可以直接使用 `apt-get` 软件安装。
|
如果你直接下载了 flashprog 源代码,你可以进入目录并直接运行 `make`。在 canoeboot 构建系统中,`config/dependencies/` 处的脚本写明了构建依赖,你可以直接使用 `apt-get` 软件安装。
|
||||||
|
|
||||||
如何使用 flashrom
|
如何使用 flashprog
|
||||||
===================
|
===================
|
||||||
|
|
||||||
请先阅读本页更下方的部分,了解特定的芯片类型及其接线方法。
|
请先阅读本页更下方的部分,了解特定的芯片类型及其接线方法。
|
||||||
|
@ -345,11 +345,11 @@ Flashrom 是用来读出、擦除、重写 NOR flash 内容的软件。
|
||||||
|
|
||||||
树莓派正确接线后,运行这个命令来查看是否检测到 25xx flash:
|
树莓派正确接线后,运行这个命令来查看是否检测到 25xx flash:
|
||||||
|
|
||||||
sudo ./flashrom -p linux_spi:dev=/dev/spidev0.0,spispeed=32768
|
sudo ./flashprog -p linux_spi:dev=/dev/spidev0.0,spispeed=32768
|
||||||
|
|
||||||
对 BBB 而言,必须使用更慢的速度及不同的设备路径:
|
对 BBB 而言,必须使用更慢的速度及不同的设备路径:
|
||||||
|
|
||||||
sudo ./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512
|
sudo ./flashprog -p linux_spi:dev=/dev/spidev1.0,spispeed=512
|
||||||
|
|
||||||
在 BBB 上,绝对不要使用高于 `spispeed=512` 的速度。有时候,你可能还要低到 `spispeed=128` 的速度。BBB 对 SPI 刷写而言非常不稳定、不可靠。在读取的时候,要多次读出,并检查它们的 checksum 是否一致,然后再刷。你可能需要多次刷写芯片!
|
在 BBB 上,绝对不要使用高于 `spispeed=512` 的速度。有时候,你可能还要低到 `spispeed=128` 的速度。BBB 对 SPI 刷写而言非常不稳定、不可靠。在读取的时候,要多次读出,并检查它们的 checksum 是否一致,然后再刷。你可能需要多次刷写芯片!
|
||||||
|
|
||||||
|
@ -359,11 +359,11 @@ Flashrom 是用来读出、擦除、重写 NOR flash 内容的软件。
|
||||||
|
|
||||||
在 RPi 上,这样读出:
|
在 RPi 上,这样读出:
|
||||||
|
|
||||||
sudo ./flashrom -p linux_spi:dev=/dev/spidev0.0,spispeed=32768 -r dump.bin
|
sudo ./flashprog -p linux_spi:dev=/dev/spidev0.0,spispeed=32768 -r dump.bin
|
||||||
|
|
||||||
BBB 的话,这样:
|
BBB 的话,这样:
|
||||||
|
|
||||||
sudo ./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -r dump.bin
|
sudo ./flashprog -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -r dump.bin
|
||||||
|
|
||||||
建议读出*两次*,比如弄一个 `dump2.bin`,然后检查 sha1sum:
|
建议读出*两次*,比如弄一个 `dump2.bin`,然后检查 sha1sum:
|
||||||
|
|
||||||
|
@ -384,11 +384,11 @@ BBB 的话,这样:
|
||||||
|
|
||||||
接下来,运行这个命令(RPi):
|
接下来,运行这个命令(RPi):
|
||||||
|
|
||||||
sudo ./flashrom -p linux_spi:dev=/dev/spidev0.0,spispeed=32768 -w /path/to/canoeboot.rom
|
sudo ./flashprog -p linux_spi:dev=/dev/spidev0.0,spispeed=32768 -w /path/to/canoeboot.rom
|
||||||
|
|
||||||
如果用的是 BBB:
|
如果用的是 BBB:
|
||||||
|
|
||||||
sudo ./flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -w /path/to/canoeboot.rom
|
sudo ./flashprog -p linux_spi:dev=/dev/spidev1.0,spispeed=512 -w /path/to/canoeboot.rom
|
||||||
|
|
||||||
用 BBB 的时候,可能得使用低于 512 的速度。你也许还得多次重复刷写,才能完全工作。
|
用 BBB 的时候,可能得使用低于 512 的速度。你也许还得多次重复刷写,才能完全工作。
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,10 @@ title: Generic SPI Flashing Guide
|
||||||
x-toc-enable: true
|
x-toc-enable: true
|
||||||
...
|
...
|
||||||
|
|
||||||
There are a plethora of single board computers with which you can flash Canoeboot to a SOIC chip.
|
NOTE: Canoeboot standardises on [flashprog](https://flashprog.org/wiki/Flashprog)
|
||||||
|
now, as of 3 May 2024, which is a fork of flashrom.
|
||||||
|
|
||||||
|
There are a plethora of single board computers with which you can flash canoeboot to a SOIC chip.
|
||||||
Some users might be daunted by the price of a raspberry pi.
|
Some users might be daunted by the price of a raspberry pi.
|
||||||
This guide is intended to help users looking to use a programmer which is not listed in the [main guide.](spi.md)
|
This guide is intended to help users looking to use a programmer which is not listed in the [main guide.](spi.md)
|
||||||
As an example, this guide will use the [libre computer 'le potato.'](https://libre.computer/products/aml-s905x-cc/)
|
As an example, this guide will use the [libre computer 'le potato.'](https://libre.computer/products/aml-s905x-cc/)
|
||||||
|
@ -77,25 +80,25 @@ sudo ldto enable spicc spicc-spidev
|
||||||
sudo ldto merge spicc spicc-spidev
|
sudo ldto merge spicc spicc-spidev
|
||||||
```
|
```
|
||||||
|
|
||||||
Using Flashrom
|
Using Flashprog
|
||||||
==============
|
==============
|
||||||
|
|
||||||
Most linux distros will provide flashrom in their default repositories.
|
Some linux distros will provide flashprog in their default repositories.
|
||||||
|
|
||||||
```
|
```
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install flashrom
|
sudo apt install flashprog
|
||||||
```
|
```
|
||||||
|
|
||||||
Reading/writing from SPI works respectively as such:
|
Reading/writing from SPI works respectively as such:
|
||||||
|
|
||||||
```
|
```
|
||||||
sudo ./flashrom -p linux_spi:dev=/dev/spidev0.0,spispeed=32768 -r /path/to/read.bin
|
sudo ./flashprog -p linux_spi:dev=/dev/spidev0.0,spispeed=32768 -r /path/to/read.bin
|
||||||
sudo ./flashrom -p linux_spi:dev=/dev/spidev0.0,spispeed=32768 -w /path/to/canoeboot.rom
|
sudo ./flashprog -p linux_spi:dev=/dev/spidev0.0,spispeed=32768 -w /path/to/canoeboot.rom
|
||||||
```
|
```
|
||||||
|
|
||||||
Note that `spispeed` varies based on the board in question.
|
Note that `spispeed` varies based on the board in question.
|
||||||
A standard lower limit is *512.*
|
A standard lower limit is *512.*
|
||||||
For example, to read on a board with a lower SPI speed, you may try:
|
For example, to read on a board with a lower SPI speed, you may try:
|
||||||
|
|
||||||
sudo ./flashrom -p linux_spi:dev=/dev/spidev0.0,spispeed=512 -r /path/to/read.bin
|
sudo ./flashprog -p linux_spi:dev=/dev/spidev0.0,spispeed=512 -r /path/to/read.bin
|
||||||
|
|
|
@ -3,6 +3,9 @@ title: Flashing the ThinkPad T400 externally
|
||||||
x-toc-enable: true
|
x-toc-enable: true
|
||||||
...
|
...
|
||||||
|
|
||||||
|
NOTE: Libreboot standardises on [flashprog](https://flashprog.org/wiki/Flashprog)
|
||||||
|
now, as of 3 May 2024, which is a fork of flashrom.
|
||||||
|
|
||||||
Dell Latitude E6400
|
Dell Latitude E6400
|
||||||
===================
|
===================
|
||||||
|
|
||||||
|
@ -77,7 +80,7 @@ Flash chip size {#flashchips}
|
||||||
|
|
||||||
Use this to find out:
|
Use this to find out:
|
||||||
|
|
||||||
flashrom -p internal
|
flashprog -p internal
|
||||||
|
|
||||||
MAC address {#macaddress}
|
MAC address {#macaddress}
|
||||||
===========
|
===========
|
||||||
|
|
|
@ -3,6 +3,9 @@ title: ThinkPad T500 external flashing
|
||||||
x-toc-enable: true
|
x-toc-enable: true
|
||||||
...
|
...
|
||||||
|
|
||||||
|
NOTE: Libreboot standardises on [flashprog](https://flashprog.org/wiki/Flashprog)
|
||||||
|
now, as of 3 May 2024, which is a fork of flashrom.
|
||||||
|
|
||||||
**If you haven't bought a T500 yet: the [Dell Latitude
|
**If you haven't bought a T500 yet: the [Dell Latitude
|
||||||
E6400](e6400.md) is much easier to flash; no disassembly required,
|
E6400](e6400.md) is much easier to flash; no disassembly required,
|
||||||
it can be flashed entirely in software from Dell BIOS to Canoeboot. It is the
|
it can be flashed entirely in software from Dell BIOS to Canoeboot. It is the
|
||||||
|
@ -73,7 +76,7 @@ Flash chip size {#flashchips}
|
||||||
|
|
||||||
Use this to find out:
|
Use this to find out:
|
||||||
|
|
||||||
flashrom -p internal
|
flashprog -p internal
|
||||||
|
|
||||||
MAC address {#macaddress}
|
MAC address {#macaddress}
|
||||||
===========
|
===========
|
||||||
|
|
|
@ -3,6 +3,9 @@ title: ThinkPad T60 Recovery guide
|
||||||
x-toc-enable: true
|
x-toc-enable: true
|
||||||
...
|
...
|
||||||
|
|
||||||
|
NOTE: Libreboot standardises on [flashprog](https://flashprog.org/wiki/Flashprog)
|
||||||
|
now, as of 3 May 2024, which is a fork of flashrom.
|
||||||
|
|
||||||
This section documents how to recover from a bad flash that prevents
|
This section documents how to recover from a bad flash that prevents
|
||||||
your ThinkPad T60 from booting.
|
your ThinkPad T60 from booting.
|
||||||
|
|
||||||
|
@ -160,16 +163,16 @@ which all draw a lot of current, more than your flasher can provide.
|
||||||
|
|
||||||
Example command:
|
Example command:
|
||||||
|
|
||||||
sudo ./flashrom -p linux_spi:dev=/dev/spidev0.0,spispeed=4096 -w canoeboot.rom -V
|
sudo ./flashprog -p linux_spi:dev=/dev/spidev0.0,spispeed=4096 -w canoeboot.rom -V
|
||||||
|
|
||||||
If flashrom complains about multiple flash chips detected, just pass the `-c`
|
If flashprog complains about multiple flash chips detected, just pass the `-c`
|
||||||
option as it suggests, and pick any of the chips it lists. `spispeed=4096` or
|
option as it suggests, and pick any of the chips it lists. `spispeed=4096` or
|
||||||
lower (e.g. `spispeed=512`) is recommended on this board. The flashing becomes
|
lower (e.g. `spispeed=512`) is recommended on this board. The flashing becomes
|
||||||
unstable, on this machine, when you use higher speeds.
|
unstable, on this machine, when you use higher speeds.
|
||||||
|
|
||||||
Reverse the steps to re-assemble your system, after you've flashed the chip.
|
Reverse the steps to re-assemble your system, after you've flashed the chip.
|
||||||
|
|
||||||
It should be `Verifying flash... VERIFIED` at the end. If flashrom
|
It should be `Verifying flash... VERIFIED` at the end. If flashprog
|
||||||
complains about multiple flash chip definitions detected, then choose
|
complains about multiple flash chip definitions detected, then choose
|
||||||
one of them following the instructions in the output.
|
one of them following the instructions in the output.
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,9 @@ title: First-time ThinkPad X200 flashing
|
||||||
x-toc-enable: true
|
x-toc-enable: true
|
||||||
...
|
...
|
||||||
|
|
||||||
|
NOTE: Libreboot standardises on [flashprog](https://flashprog.org/wiki/Flashprog)
|
||||||
|
now, as of 3 May 2024, which is a fork of flashrom.
|
||||||
|
|
||||||
**If you haven't bought an X200 yet: the [Dell Latitude
|
**If you haven't bought an X200 yet: the [Dell Latitude
|
||||||
E6400](e6400.md) is much easier to flash; no disassembly required,
|
E6400](e6400.md) is much easier to flash; no disassembly required,
|
||||||
it can be flashed entirely in software from Dell BIOS to Canoeboot. It is the
|
it can be flashed entirely in software from Dell BIOS to Canoeboot. It is the
|
||||||
|
@ -25,7 +28,7 @@ Flash chip size
|
||||||
|
|
||||||
Run this command on x200 to find out flash chip model and its size:
|
Run this command on x200 to find out flash chip model and its size:
|
||||||
|
|
||||||
flashrom -p internal
|
flashprog -p internal
|
||||||
|
|
||||||
MAC address
|
MAC address
|
||||||
===========
|
===========
|
||||||
|
@ -106,7 +109,7 @@ Look just above the 7 in TP37 (that's GPIO33):
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
By default we would see this in lenovobios, when trying flashrom -p
|
By default we would see this in lenovobios, when trying flashprog -p
|
||||||
internal -w rom.rom:
|
internal -w rom.rom:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -147,7 +150,7 @@ that does the flashing; Lenovo BIOS then probably sees that and runs that, inste
|
||||||
of setting PRx and going for normal boot. It is theoretically possible that we
|
of setting PRx and going for normal boot. It is theoretically possible that we
|
||||||
could discover how this works, by debugging the Lenovo BIOS update utility (in
|
could discover how this works, by debugging the Lenovo BIOS update utility (in
|
||||||
Windows), and then replicate what it is doing, with some tool for GNU+Linux,
|
Windows), and then replicate what it is doing, with some tool for GNU+Linux,
|
||||||
then load a flashrom binary into memory and the ROM to flash (for the BIOS
|
then load a flashprog binary into memory and the ROM to flash (for the BIOS
|
||||||
region). You would do this with GPIO33 grounded, and the payload program would
|
region). You would do this with GPIO33 grounded, and the payload program would
|
||||||
actually flash the entire chip, with just a normal Canoeboot image.
|
actually flash the entire chip, with just a normal Canoeboot image.
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,9 @@ title: Прошивка ThinkPad X200 вперше
|
||||||
x-toc-enable: true
|
x-toc-enable: true
|
||||||
...
|
...
|
||||||
|
|
||||||
|
NOTE: Libreboot standardises on [flashprog](https://flashprog.org/wiki/Flashprog)
|
||||||
|
now, as of 3 May 2024, which is a fork of flashrom.
|
||||||
|
|
||||||
**If you haven't bought an X200 yet: the [Dell Latitude
|
**If you haven't bought an X200 yet: the [Dell Latitude
|
||||||
E6400](e6400.md) is much easier to flash; no disassembly required,
|
E6400](e6400.md) is much easier to flash; no disassembly required,
|
||||||
it can be flashed entirely in software from Dell BIOS to Canoeboot. It is the
|
it can be flashed entirely in software from Dell BIOS to Canoeboot. It is the
|
||||||
|
@ -25,7 +28,7 @@ same hardware generation (GM45), with same CPUs, video processor, etc.**
|
||||||
|
|
||||||
Виконайте цю команду на x200, щоб дізнатися модель флеш-чіпа та його розмір:
|
Виконайте цю команду на x200, щоб дізнатися модель флеш-чіпа та його розмір:
|
||||||
|
|
||||||
flashrom -p internal
|
flashprog -p internal
|
||||||
|
|
||||||
MAC адреса
|
MAC адреса
|
||||||
===========
|
===========
|
||||||
|
@ -106,7 +109,7 @@ sgsit дізнався про контакт під назвою GPIO33, яки
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Це замовчуванням ми побачимо це в lenovobios, під час спроби flashrom -p
|
Це замовчуванням ми побачимо це в lenovobios, під час спроби flashprog -p
|
||||||
internal -w rom.rom:
|
internal -w rom.rom:
|
||||||
|
|
||||||
FREG0: Warning: Flash Descriptor region (0x00000000-0x00000fff) is read-only.
|
FREG0: Warning: Flash Descriptor region (0x00000000-0x00000fff) is read-only.
|
||||||
|
@ -141,7 +144,7 @@ internal -w rom.rom:
|
||||||
встановлення PRx і переходу до нормального завантаження. Теоретично можливо, що ми
|
встановлення PRx і переходу до нормального завантаження. Теоретично можливо, що ми
|
||||||
зможемо дізнатися, як це працює, налагодивши утиліту оновлення BIOS Lenovo (у
|
зможемо дізнатися, як це працює, налагодивши утиліту оновлення BIOS Lenovo (у
|
||||||
Windows), а потім відтворивши її дії за допомогою якогось інструменту для GNU+Linux,
|
Windows), а потім відтворивши її дії за допомогою якогось інструменту для GNU+Linux,
|
||||||
а потім завантаживши двійковий файл flashrom в пам'ять та ROM для прошивки (для BIOS
|
а потім завантаживши двійковий файл flashprog в пам'ять та ROM для прошивки (для BIOS
|
||||||
регіона). Ви б зробили це з заземленням GPIO33, і програма корисного навантаження
|
регіона). Ви б зробили це з заземленням GPIO33, і програма корисного навантаження
|
||||||
фактично прошиє весь чіп, лише звичайним образом Canoeboot.
|
фактично прошиє весь чіп, лише звичайним образом Canoeboot.
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,11 @@ title: cbmk maintenance manual
|
||||||
x-toc-enable: true
|
x-toc-enable: true
|
||||||
...
|
...
|
||||||
|
|
||||||
In addition to this manual, you should also refer to [testing.md](testing.md).
|
NOTE: Canoeboot standardises on [flashprog](https://flashprog.org/wiki/Flashprog)
|
||||||
|
now, as of 3 May 2024, which is a fork of flashrom.
|
||||||
|
|
||||||
|
In addition to this manual, you should also refer to [porting.md](porting.md)
|
||||||
|
and [testing.md](testing.md).
|
||||||
|
|
||||||
Please also read about the [cbmk coding style and design](style.md). This
|
Please also read about the [cbmk coding style and design](style.md). This
|
||||||
document, and the cbmk build system, is a direct fork of *lbmk*, which is the
|
document, and the cbmk build system, is a direct fork of *lbmk*, which is the
|
||||||
|
@ -193,13 +197,13 @@ This may be less efficient on disk usage, but it simplifies the logic greatly.
|
||||||
Coreboot also uses its own toolchain called *crossgcc*, and crossgcc is in fact
|
Coreboot also uses its own toolchain called *crossgcc*, and crossgcc is in fact
|
||||||
compiled *per tree* in Canoeboot.
|
compiled *per tree* in Canoeboot.
|
||||||
|
|
||||||
src/flashrom/
|
src/flashprog/
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
Please also visit: <https://flashrom.org/>
|
Please also visit: <https://flashprog.org/>
|
||||||
|
|
||||||
Although currently unused by any part of cbmk, we provide flashrom for the
|
Although currently unused by any part of cbmk, we provide flashprog for the
|
||||||
convenience of users, and this is copied to release archives. Flashrom is the
|
convenience of users, and this is copied to release archives. Flashprog is the
|
||||||
program that you will use to read, erase and write the flash, containing
|
program that you will use to read, erase and write the flash, containing
|
||||||
coreboot firmware.
|
coreboot firmware.
|
||||||
|
|
||||||
|
|
14
site/faq.md
14
site/faq.md
|
@ -36,18 +36,18 @@ Testing involves minimal effort and really helps out the project.
|
||||||
See the [board maintainers documentation](/docs/maintain/testing.md)
|
See the [board maintainers documentation](/docs/maintain/testing.md)
|
||||||
if you are interested in testing roms before they are released.
|
if you are interested in testing roms before they are released.
|
||||||
|
|
||||||
Flashrom complains about DEVMEM access
|
Flashprog complains about DEVMEM access
|
||||||
--------------------------------------
|
--------------------------------------
|
||||||
|
|
||||||
If running `flashrom -p internal` for software based flashing, and
|
If running `flashprog -p internal` for software based flashing, and
|
||||||
you get an error related to /dev/mem access, you should reboot with
|
you get an error related to /dev/mem access, you should reboot with
|
||||||
`iomem=relaxed` kernel parameter before running flashrom, or use a kernel
|
`iomem=relaxed` kernel parameter before running flashprog, or use a kernel
|
||||||
that has `CONFIG_STRICT_DEVMEM` and `CONFIG_IO_STRICT_DEVMEM` not enabled.
|
that has `CONFIG_STRICT_DEVMEM` and `CONFIG_IO_STRICT_DEVMEM` not enabled.
|
||||||
|
|
||||||
Example flashrom output with both `CONFIG_STRICT_DEVMEM` and `CONFIG_IO_STRICT_DEVMEM` enabled:
|
Example flashprog output with both `CONFIG_STRICT_DEVMEM` and `CONFIG_IO_STRICT_DEVMEM` enabled:
|
||||||
```
|
```
|
||||||
flashrom v0.9.9-r1955 on GNU+Linux 4.11.9-1-ARCH (x86_64)
|
flashprog v0.9.9-r1955 on GNU+Linux 4.11.9-1-ARCH (x86_64)
|
||||||
flashrom is free software, get the source code at https://flashrom.org
|
flashprog is free software, get the source code at https://flashprog.org
|
||||||
|
|
||||||
Calibrating delay loop... OK.
|
Calibrating delay loop... OK.
|
||||||
Error accessing high tables, 0x100000 bytes at 0x000000007fb5d000
|
Error accessing high tables, 0x100000 bytes at 0x000000007fb5d000
|
||||||
|
@ -596,7 +596,7 @@ simply use dd(1) to extract only the non-padded portion. Continuing with the
|
||||||
examples above, in order to extract a 2MiB x86 descriptorless ROM from a
|
examples above, in order to extract a 2MiB x86 descriptorless ROM from a
|
||||||
padded 16MiB image do the following:
|
padded 16MiB image do the following:
|
||||||
|
|
||||||
dd if=flashromread.rom of=yourrom.rom ibs=14MiB skip=1
|
dd if=flashprogread.rom of=yourrom.rom ibs=14MiB skip=1
|
||||||
|
|
||||||
With padding removed cbfstool will be able to operate on the image as usual.
|
With padding removed cbfstool will be able to operate on the image as usual.
|
||||||
|
|
||||||
|
|
|
@ -30,15 +30,15 @@ x-toc-enable: true
|
||||||
Flashrom скаржиться на доступ DEVMEM
|
Flashrom скаржиться на доступ DEVMEM
|
||||||
--------------------------------------
|
--------------------------------------
|
||||||
|
|
||||||
Якщо запущено `flashrom -p internal` для програмної перепрошивки та
|
Якщо запущено `flashprog -p internal` для програмної перепрошивки та
|
||||||
ви отримуєте помилку, пов'язану з доступом до /dev/mem, вам слід перезавантажити систему з
|
ви отримуєте помилку, пов'язану з доступом до /dev/mem, вам слід перезавантажити систему з
|
||||||
параметром ядра `iomem=relaxed` перед виконанням flashrom, або використовуйте ядро,
|
параметром ядра `iomem=relaxed` перед виконанням flashprog, або використовуйте ядро,
|
||||||
для якого не ввімкнено `CONFIG_STRICT_DEVMEM` та `CONFIG_IO_STRICT_DEVMEM`.
|
для якого не ввімкнено `CONFIG_STRICT_DEVMEM` та `CONFIG_IO_STRICT_DEVMEM`.
|
||||||
|
|
||||||
Приклад виводу flashrom з обома `CONFIG_STRICT_DEVMEM` та `CONFIG_IO_STRICT_DEVMEM` ввімкненими:
|
Приклад виводу flashprog з обома `CONFIG_STRICT_DEVMEM` та `CONFIG_IO_STRICT_DEVMEM` ввімкненими:
|
||||||
```
|
```
|
||||||
flashrom v0.9.9-r1955 on GNU+Linux 4.11.9-1-ARCH (x86_64)
|
flashprog v0.9.9-r1955 on GNU+Linux 4.11.9-1-ARCH (x86_64)
|
||||||
flashrom is free software, get the source code at https://flashrom.org
|
flashprog is free software, get the source code at https://flashprog.org
|
||||||
|
|
||||||
Calibrating delay loop... OK.
|
Calibrating delay loop... OK.
|
||||||
Error accessing high tables, 0x100000 bytes at 0x000000007fb5d000
|
Error accessing high tables, 0x100000 bytes at 0x000000007fb5d000
|
||||||
|
@ -621,7 +621,7 @@ ROM та флеш-чіпом. Випадок вище, наприклад:
|
||||||
наведені вище приклади, щоб видобути ROM без дескрипторів 2 МБ x86 із доповненого
|
наведені вище приклади, щоб видобути ROM без дескрипторів 2 МБ x86 із доповненого
|
||||||
образа 16 МБ, виконайте наступне:
|
образа 16 МБ, виконайте наступне:
|
||||||
|
|
||||||
dd if=flashromread.rom of=вашrom.rom ibs=14MiB skip=1
|
dd if=flashprogread.rom of=вашrom.rom ibs=14MiB skip=1
|
||||||
|
|
||||||
Після видалення заповнення cbfstool зможе працювати із образом як зазвичай.
|
Після видалення заповнення cbfstool зможе працювати із образом як зазвичай.
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
% Canoeboot v0.1 released!
|
% Canoeboot v0.1 released!
|
||||||
% Leah Rowe in Canoe Leah Mode™
|
% Leah Rowe in Canoe Leah Mode™
|
||||||
% 27 January 2024
|
% 3 May 2024
|
||||||
|
|
||||||
**WARNING: This release lacks LUKS2 support. If you want LUKS2 with argon2,
|
**WARNING: This release lacks LUKS2 support. If you want LUKS2 with argon2,
|
||||||
please use the November 2023 release, or use a release made after 0.1. This
|
please use the November 2023 release, or use a release made after 0.1. This
|
||||||
|
|
Loading…
Reference in New Issue