Flashrom: Difference between revisions
(libftdi. Ubuntu. Red boxes.) |
|||
Line 1,210: | Line 1,210: | ||
* '''pciutils''' development package ('''pciutils-dev'''/'''libpci-dev'''/'''pciutils-devel''', depending on OS/distribution) | * '''pciutils''' development package ('''pciutils-dev'''/'''libpci-dev'''/'''pciutils-devel''', depending on OS/distribution) | ||
* '''zlib''' development package ('''zlib1g-dev'''/'''zlib-devel''', depending on OS/distribution) | * '''zlib''' development package ('''zlib1g-dev'''/'''zlib-devel''', depending on OS/distribution) | ||
* '''libftdi | * '''libftdi''' development package ('''libftdi-dev'''), optional support for the external FT2232SPI flasher. | ||
* '''subversion''' (if you checkout the source and build manually) | * '''subversion''' (if you checkout the source and build manually) | ||
Revision as of 23:06, 25 June 2009
flashrom is a utility for identifying, reading, writing, verifying and erasing flash chips. It's often used to flash BIOS/EFI/coreboot/firmware images.
- Supports more than 160 flash chips, 75 chipsets, 100 mainboards, and 10 PCI devices which can be used as external programmers.
- Supports parallel, LPC, FWH and SPI flash interfaces and various chip packages (DIP32, PLCC32, DIP8, SO8/SOIC8, TSOP32, TSOP40 and more)
- No physical access needed, root access is sufficient.
- No bootable floppy disk, bootable CD-ROM or other media needed.
- No keyboard or monitor needed. Simply reflash remotely via SSH.
- No instant reboot needed. Reflash your chip in a running system, verify it, be happy. The new firmware will be present next time you boot.
- Crossflashing and hotflashing is possible as long as the flash chips are electrically and logically compatible (same protocol). Great for recovery.
- Scriptability. Reflash a whole pool of identical machines at the same time from the command line. It is recommended to check flashrom output and error codes.
- Speed. flashrom is often much faster than most vendor flash tools.
- Portability. Supports Linux, FreeBSD, DragonFly BSD, Solaris, Mac OS X, and other Unix-like OSes.
Emergency help
IMPORTANT: If something went wrong during flashing, do NOT turn off/reboot your computer. Instead, let us help you recover. We can be contacted via IRC (#flashrom on irc.freenode.net) or email. Please allow for a few hours until someone responds on IRC, we're all volunteers.
Supported devices
Please do not edit these tables in the wiki directly, they are semi-automatically generated by pasting flashrom -z output.
Last update: Tue Jun 23 22:30:05 2009
(generated by flashrom 0.9.0-r626)
Supported chips
Total amount of supported chips: 191
|
|
|
Supported chipsets
Total amount of supported chipsets: 78
|
|
|
Supported mainboards
In general, it is very likely that flashrom works out of the box even if your mainboard is not listed below.
This is a list of mainboards where we have verified that they either do or do not need any special initialization to make flashrom work (given flashrom supports the respective chipset and flash chip), or that they do not yet work at all. If they do not work, support may or may not be added later.
Mainboards which don't appear in the list may or may not work (we don't know, someone has to give it a try). Please report any further verified mainboards on the mailing list.
Known good (worked out of the box)
Total amount of boards: 77
|
|
|
1 Used in the IGEL WinNET III thin client.
2 See http://www.coreboot.org/pipermail/coreboot/2007-October/026496.html.
3 See http://www.coreboot.org/pipermail/coreboot/2007-September/025281.html.
4 Used in the IGEL-316 thin client.
5 Works fine iff you remove jumper JP9 on the board and disable the flash protection BIOS option.
Known good (with write-enable code in flashrom)
Total amount of boards: 40
|
|
|
Not supported (yet)
Total amount of boards: 19
|
|
|
1 Immediately powers off if you try to hot-plug the chip. However, this does not happen if you use coreboot.
2 Interestingly flashrom does not work when the vendor BIOS is booted, but it does work flawlessly when the machine is booted with coreboot.
Supported laptops/notebooks
In general, flashing laptops is more difficult because laptops
- often use the flash chip for stuff besides the BIOS,
- often have special protection stuff which has to be handled by flashrom,
- often use flash translation circuits which need drivers in flashrom.
IMPORTANT: At this point we recommend to not use flashrom on untested laptops unless you have a means to recover from a flashing that goes wrong (a working backup flash chip and/or good soldering skills).
Known good (worked out of the box)
Total amount of boards: 1
|
Not supported (yet)
Total amount of boards: 5
|
1 See http://www.coreboot.org/pipermail/coreboot/2009-May/048041.html.
2 The laptop immediately powers off if you try to hot-swap the chip. It's not yet tested if write/erase would work on this laptop.
3 Seems to (partially) work at first, but one block/sector cannot be written which then leaves you with a bricked laptop. Maybe this can be investigated and fixed in software later.
Supported programmers
This is a list of supported PCI devices flashrom can use as programmer:
Download & InstallationIf you just want to browse the source code, please go to http://code.coreboot.org/p/flashrom/source/tree/HEAD/trunk. Requirements:
Manual Installation From Source: $ svn co svn://coreboot.org/flashrom/trunk flashrom $ cd flashrom $ make $ sudo make install Binary Packages:
UsagePlease see the flashrom(8) manpage. Fully testing flashrom chip/southbridge/mainboard supportSee this page for instructions on how to test flashrom properly (this may be risky, make sure you have a working backup flash chip). Flashrom Live CDFlash chip overviewModern mainboards store the BIOS in a reprogrammable flash chip. There are hundreds of different flash (EEPROM) chips, with variables such as memory size, speed, communication bus (Parallel, LPC, FWH, SPI) and packaging to name just a few. Packaging/housing/form factorProbably the only property of flash chips which is completely irrelevant to flashrom. The three most common packages are called DIP, PLCC and TSOP. The BIOS copyright holders often place a fancy sticker on the BIOS chip showing a name or logo, BIOS version, serial number and copyright notice. DIP32: Dual In-line Package, 32 pins
A rectangular black plastic block with 16 pins along each of the two longer sides of the package (32 pins in total). DIP32 chips can be socketed which means they are detachable from the mainboard using physical force. Since they haven't been moved in and out of the socket very much (yet, hehe) they can appear to be quite difficult to release from the socket. One way to remove a DIP32 chip from a socket is by prying a thin screwdriver in between the plastic package and the socket, along the shorter sides where there are no pins, and then gently bending the screwdriver to push the chip upwards, away from the mainboard. Alternate between the two sides to avoid bending the pins, and don't touch any of the pins with the screwdriver (see FAQ about ESD, electro-static discharge). If the chip is soldered directly to the mainboard, it has to be desoldered in order to be reprogrammed outside the mainboard. If you do this, it's a good idea to solder a socket to the mainboard instead, to ease any future experiments. PLCC32: Plastic Leaded Chip Carrier, 32 pins
Black plastic block again, but this one is much more square. PLCC32 was becoming the standard for mainboards after DIP32 chips because of it's smaller physical size. PLCC can also be socketed or soldered directly to the mainboard. Socketed PLCC32 chips can be removed using a special PLCC removal tool', or using a piece of nylon line tied in a loop around the chip and pulled swiftly straight up, or bending/prying using small screwdrivers if one is careful. PLCC32 sockets are often fragile so the screwdriver approach is not recommended. While the nylon line method sounds strange it works well. Desoldering PLCC32 can be painful without specialized desoldering equipment particularly because PLCC32 chips have leads on all four sides of the package, but it's certainly doable. DIP8: Dual In-line Package, 8 pins
SO8/SOIC8: Small-Outline Integrated Circuit, 8 pins
TSOP: Thin Small-Outline Package
TSOPs are often used in embedded systems where size is important and there is no need for replacement in the field. It is possible to (de)solder TSOPs by hand, but it's not trivial and a reasonable amount of soldering skills are required. Communication bus protocolThere are four major communication bus protocols for flash chips, each with multiple subtle variants in the command set:
Here's an attempt to create a marketing language -> chip type mapping:
SST data sheets have the following conventions:
If both are mentioned, the chip supports both. If you're not sure about whether a device is LPC or FWH, look at the read/write cycle definitions.
Generally, a parallel flash chip will not speak any other protocols. SPI flash chips also don't speak any other protocols. LPC flash chips sometimes speak FWH as well and vice versa, but they will not speak any protocols besides LPC/FWH. |