Flashrom requires the pciutils and zlib and the respective development packages in order to be built. In addition, the subversion package is required to download it.
In Debian unstable these development packages are called pciutils-dev/libpci-dev, zlib1g-dev, and subversion. Most other distributions call them pciutils-devel, zlib-devel, and subversion.
$ svn co svn://coreboot.org/flashrom/trunk flashrom
$ cd flashrom
$ sudo make install
$ sudo aptitude install flashrom
$ sudo yum install flashrom
$ emerge flashrom
$ urpmi flashrom
$ yast -i coreboot-utils
For distributions older than openSUSE Factory (11.0) you find "backports" in the openSUSE Build Service.
Installation from source:
$ Emerge-Pkg flashrom
Installation of binaries:
$ mine -i flashrom-0.9.0.tar.bz2
There is a Windows port of the flashrom utility. Download the latest version at http://google-summer-of-code-2007-coresystems.googlecode.com/files/DarmawanMappatutu_Salihun.tar.gz
Detect whether flashrom knows about your chipset/mainboard/BIOS chip:
Read the current BIOS image into a file:
$ flashrom -r backup.bin
Depening on the chip driver, you may have to erase the chip before writing:
$ flashrom -E
Write a BIOS image (proprietary or coreboot) on the ROM chip:
$ flashrom -wv newbios.bin
WARNING: This will overwrite your current BIOS! Make sure you know what you're doing!
For more documentation please see the flashrom README or the man page.
Fully testing flashrom chip/southbridge/mainboard support
See this page for instructions on how to test flashrom properly (this may be risky, make sure you have a working backup ROM chip).
Flashrom Live CD
Flashrom Live CD
ROM chip overview
Modern mainboards store the BIOS in a reprogrammable flash ROM chip. There are hundreds of different flash ROMs, with variables such as memory size, speed, communication bus (LPC vs. ISA/PCI) and packaging to name just a few. 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 logotype, BIOS version, serial number and copyright notice.
DIP32: Dual In-line Package, 32 pins
A rectangular black plastic block with lots of pins along the two longer sides of the package. DIP ROMs 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 DIP 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 DIP 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 DIP 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. PLCC is becoming the standard for mainboards because of it's smaller physical size. PLCC can also be socketed or soldered directly to the mainboard. Socketed PLCC 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. PLCC sockets are often fragile so the screwdriver approach is not recommended. While the nylon line method sounds onorthodox it works well. Desoldering PLCC can be painful without specialized desoldering equipment particularly because PLCC chips have leads on all four sides of the package.
DIP8: Dual In-line Package, 8 pins
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 comes close to wizardry.