| 1 |
=================== |
| 2 |
Board Testing HOWTO |
| 3 |
=================== |
| 4 |
|
| 5 |
**Note the document below was migrated from old website and the content >10yrs old** |
| 6 |
Patches to add/update documentation are very much appreciated. |
| 7 |
|
| 8 |
This page gives you mainly hints on how to test flashrom support on mainboards. |
| 9 |
Testing for graphics / network / SATA cards and external programmer devices is similar but less dangerous. |
| 10 |
|
| 11 |
.. container:: danger, admonition |
| 12 |
|
| 13 |
Important information |
| 14 |
|
| 15 |
DO NOT ATTEMPT TO FOLLOW THESE INSTRUCTIONS UNLESS YOU KNOW WHAT YOU ARE DOING! |
| 16 |
THIS CAN RENDER YOUR MAINBOARD TOTALLY UNUSABLE! YOU HAVE BEEN WARNED! |
| 17 |
|
| 18 |
* If you have a laptop/notebook/netbook, please do NOT try flashrom because interactions |
| 19 |
with the EC on these machines might crash your machine during flashing. |
| 20 |
flashrom tries to detect if a machine is a laptop, but not all laptops follow the standard, |
| 21 |
so this is not 100% reliable. |
| 22 |
|
| 23 |
* To check whether flashrom knows about your chipset and ROM chip, run ``flashrom -p internal``. |
| 24 |
|
| 25 |
* If it says ``"Found chipset CHIPSETNAME..."`` and ``"CHIPNAME found at..."`` that's a good first sign. |
| 26 |
|
| 27 |
* To check if you can read the existing BIOS image from the chip, run ``flashrom -p internal -r backup.bin``. |
| 28 |
Make sure that backup.bin contains a useful BIOS image (some chipsets will return 0xff for large areas |
| 29 |
of flash without any error messages, but there might be actually large areas of 0xff in the original image as well). |
| 30 |
|
| 31 |
* Now the really important part, checking if *writing* an image on the chip works: |
| 32 |
|
| 33 |
* First, if the board has a flash socket and you have spare chips, |
| 34 |
make sure you have a backup chip containing the original BIOS. |
| 35 |
Also, you should have verified that it actually boots your system successfully. |
| 36 |
Put away that backup chip somewhere safe and insert a chip which you can safely |
| 37 |
overwrite (e.g. an empty one you bought). |
| 38 |
|
| 39 |
* If that is not possible make sure you have some other way for complete recovery, |
| 40 |
e.g. an external programmer that can do :doc:`/user_docs/in_system` on the board in question. |
| 41 |
|
| 42 |
* Then write an image onto the chip, which is different from what's on the chip right now: |
| 43 |
``flashrom -p internal -w new.bin``. If the image is equal you will get a notice since r1680. |
| 44 |
If this works and flashrom reports "VERIFIED" your board is supported by flashrom. |
| 45 |
|
| 46 |
* If not, you might try to enable the "Enable BIOS Update" or "Write-protect BIOS" |
| 47 |
or similar options in your BIOS menu first, or set a jumper on your board |
| 48 |
(this is highly board-dependent). Also, you might have to use the flashrom --mainboard |
| 49 |
switch for some boards. |
| 50 |
|
| 51 |
* If none of the above helps (but flashrom still *does* detect your chipset and ROM chip), |
| 52 |
there's quite likely a board-specific initialization required in flashrom, |
| 53 |
which is non-trivial to add (e.g. toggling certain custom GPIO lines etc). |
| 54 |
In that case, contact us as we may be able to help. |
| 55 |
|
| 56 |
* If you can't risk a write on a given chip and if the chip is SPI, the following guidelines may help: |
| 57 |
|
| 58 |
* Try probing. |
| 59 |
|
| 60 |
* For ICH/VIA SPI, lockdown can mean probe works, but write/erase or even read doesn't. |
| 61 |
It can also mean that probe does not work, but write/read/erase (or any subset thereof) would work. |
| 62 |
For all other SPI chipsets, there is no such lockdown, so you can issue any erase/write/read command. |
| 63 |
|
| 64 |
* However, some SPI chips have a WP# pin which causes the block protection bits to become readonly. |
| 65 |
Now if flashrom has a generic block protection checker for your chip, we're able to figure out |
| 66 |
if write/erase is possible. Basically, you can check if you need a board enable |
| 67 |
by setting all block protection bits, then unsetting them. If either of the operations fail, |
| 68 |
you need a board enable. If they succeed, erase and write are guaranteed to work. |
| 69 |
|
| 70 |
Please tell us about your results by sending the output of flashrom commands you ran, |
| 71 |
the exact board manufacturer and model name, and all of your observations and test results |
| 72 |
to the flashrom :ref:`mailing list`. |