BIOS chip flashing
|Warning:||The procedure described below is a risky operation reserved to people that know what they are doing. Do it only if you're really sure and you've tried every other method.|
If the board becomes unusable due to a bad BIOS upgrade (e.g. if the wrong BIOS image was used, or if the flashing step was interrupted), and you cannot re-flash it with the regular bios update the BIOS chip can still be re-flashed with an EEPROM programmer with the correct image.
This document is a guide for a known working re-flashing procedure.
- BIOS image file for the UP board (available from the Downloads section)
This image is exactly 8388608 bytes in size. In UP board BIOS update releases, it is a .bin file.
- SPI programmer
The Dediprog SF-100 is known to work, but any SPI programmer should do.
- SOIC-8 test clip
- flashrom (version 0.9.9 or newer for Dediprog support)
- First, shut down the board and unplug any sources of current (DC jack, USB and GPIO pins).
- Locate the BIOS chip on the back of the board. It is a Winbond 25Q64FW in a SOIC-8 package.
- Connect the test clip to your programmer, ensuring that the pins are correctly mapped to the 25Q64FW pinout.
For the Dediprog SF-100, we added wiring between the pin and programmer to get this mapping:
Clip pin Programmer pin 1 CS 2 MISO 3 - 4 GND 5 MOSI 6 CLK 7 - 8 Vcc
- Carefully clamp the chip legs with the clip, making sure there is good contact and the clip stays in place. Pin 1 from the clip (usually marked and attached to a red cable) should match pin 1 on the chip (next to the circular mark).
- Connect the programmer to your system. At this point, our setup looks like this:
- Run flashrom as root. It's a good idea to save a copy of the current flash contents first:
$ sudo flashrom --programmer dediprog --read up-bios-backup.bin flashrom v0.9.8-r1931 on Linux 4.4.3-1-ARCH (x86_64) flashrom is free software, get the source code at https://flashrom.org Calibrating delay loop... OK. Found Winbond flash chip "W25Q64.W" (8192 kB, SPI) on dediprog. Reading flash... done.
If the contact with the chip is bad, or the wiring is incorrect, you may get instead:
No EEPROM/flash device found. Note: flashrom can never write if the flash chip isn't found automatically.
- If everything has worked correctly so far, it's time to flash the new image (let's suppose we want version UPC1BM0R):
$ sudo flashrom --programmer dediprog --write UPC1BM0R.bin flashrom v0.9.8-r1931 on Linux 4.4.3-1-ARCH (x86_64) flashrom is free software, get the source code at https://flashrom.org Calibrating delay loop... OK. Found Winbond flash chip "W25Q64.W" (8192 kB, SPI) on dediprog. Reading old flash chip contents... done. Erasing and writing flash chip... Erase/write done.
- Wait for all programmer activity to stop first, then release the clip.