1 -------------------------------------------------------------------------------
3 -------------------------------------------------------------------------------
5 Flashrom is a utility for reading, writing, and erasing flash ROM chips.
6 It's often used to flash BIOS/coreboot/firmware images.
8 It supports a wide range of DIP32, PLCC32, DIP8, SO8/SOIC8, TSOP32, and
9 TSOP40 chips, which use various protocols such as LPC, FWH, parallel flash,
12 (see http://coreboot.org for details on coreboot)
18 To build the flashrom utility you need to install the following packages:
21 * pciutils-devel / pciutils-dev / libpci-dev
22 * zlib-devel / zlib1g-dev
28 $ flashrom [-rwvEVfLhR] [-c chipname] [-s exclude_start] [-e exclude_end]
29 [-m [vendor:]part] [-l file.layout] [-i imagename] [file]
30 -r | --read: read flash and save into file
31 -w | --write: write file into flash (default when
33 -v | --verify: verify flash against file
34 -E | --erase: erase flash device
35 -V | --verbose: more verbose output
36 -c | --chip <chipname>: probe only for specified flash chip
37 -s | --estart <addr>: exclude start position
38 -e | --eend <addr>: exclude end postion
39 -m | --mainboard <[vendor:]part>: override mainboard settings
40 -f | --force: force write without checking image
41 -l | --layout <file.layout>: read rom layout from file
42 -i | --image <name>: only flash image name from flash layout
43 -L | --list-supported: print supported devices
44 -h | --help: print this help text
45 -R | --version: print the version (release)
47 If no file is specified, then all that happens
48 is that flash info is dumped and the flash chip is set to writable.
54 Flashrom exits with 0 on success, 1 on most failures but with 2 if /dev/mem
55 (/dev/xsvc on Solaris) can not be opened and with 3 if a call to mmap() fails.
58 coreboot Table and Mainboard Identification
59 --------------------------------------------
61 Flashrom reads the coreboot table to determine the current mainboard. If no
62 coreboot table could be read or if you want to override these values, you can
65 $ flashrom -w --mainboard AGAMI:ARUMA agami_aruma.rom
67 See the 'Supported mainboards' section in the output of 'flashrom -L' for
68 a list of boards which require the specification of the board name, if no
69 coreboot table is found.
75 Flashrom supports ROM layouts. This allows you to flash certain parts of
76 the flash chip only. A ROM layout file looks like follows:
78 00000000:00008fff gfxrom
79 00009000:0003ffff normal
80 00040000:0007ffff fallback
83 startaddr:endaddr name
85 All addresses are offsets within the file, not absolute addresses!
87 If you only want to update the normal image in a ROM you can say:
89 flashrom -w --layout rom.layout --image normal agami_aruma.rom
91 To update normal and fallback but leave the VGA BIOS alone, say:
93 flashrom -w -l rom.layout -i normal -i fallback agami_aruma.rom
95 Currently overlapping sections are not supported.
97 ROM layouts should replace the -s and -e option since they are more
98 flexible and they should lead to a ROM update file format with the
99 ROM layout and the ROM image in one file (cpio, zip or something?).
102 Supported Flash Chips / Chipsets / Mainboards
103 ---------------------------------------------
105 Please check the output of 'flashrom -L' for the list of supported
106 flash chips, chipsets/southbridges, and mainboards.
108 See also http://coreboot.org/Flashrom for more details.