blob: 70abe0a49f068da67370bae871cb54ab8d1fa4a9 [file] [log] [blame]
Uwe Hermann2dc5f422006-11-20 20:32:35 +00001-------------------------------------------------------------------------------
Peter Stuge44dd3042009-04-20 12:34:30 +00002flashrom README
Uwe Hermann2dc5f422006-11-20 20:32:35 +00003-------------------------------------------------------------------------------
Ronald G. Minnich1e5003f2002-04-10 18:02:07 +00004
Peter Stuge261cafa2009-05-01 14:52:50 +00005flashrom is a utility for reading, writing, verifying and erasing flash ROM
6chips. It's often used to flash BIOS/coreboot/firmware images.
Uwe Hermanne74b9f82009-04-10 14:41:29 +00007
Uwe Hermannd42009c2009-04-11 13:59:00 +00008It supports a wide range of DIP32, PLCC32, DIP8, SO8/SOIC8, TSOP32, and
9TSOP40 chips, which use various protocols such as LPC, FWH, parallel flash,
10or SPI.
Uwe Hermann42eb17f2008-01-18 17:48:51 +000011
12(see http://coreboot.org for details on coreboot)
13
Uwe Hermann2dc5f422006-11-20 20:32:35 +000014
15Build Requirements
Stefan Reinauer06b2c4d2005-12-01 10:51:08 +000016------------------
17
Uwe Hermannf8a49fe2008-06-22 18:50:25 +000018To build the flashrom utility you need to install the following packages:
Stefan Reinauer06b2c4d2005-12-01 10:51:08 +000019
20* pciutils
Uwe Hermannf8a49fe2008-06-22 18:50:25 +000021* pciutils-devel / pciutils-dev / libpci-dev
Uwe Hermann83f0db22006-12-20 14:53:22 +000022* zlib-devel / zlib1g-dev
Stefan Reinauer06b2c4d2005-12-01 10:51:08 +000023
24
Uwe Hermann3d5f96c2009-04-23 14:57:55 +000025Usage / Options
26---------------
Stefan Reinauer06b2c4d2005-12-01 10:51:08 +000027
Uwe Hermann3d5f96c2009-04-23 14:57:55 +000028Please see the flashrom(8) manpage.
Ronald G. Minnich5e5f75e2002-01-29 18:21:41 +000029
Ronald G. Minnich5e5f75e2002-01-29 18:21:41 +000030
Peter Stuge42688e52009-01-26 02:20:56 +000031Exit status
32-----------
Uwe Hermanne74b9f82009-04-10 14:41:29 +000033
Peter Stuge44dd3042009-04-20 12:34:30 +000034flashrom exits with 0 on success, 1 on most failures but with 2 if /dev/mem
Peter Stuge42688e52009-01-26 02:20:56 +000035(/dev/xsvc on Solaris) can not be opened and with 3 if a call to mmap() fails.
36
37
Stefan Reinauere3f3e2e2008-01-18 15:33:10 +000038coreboot Table and Mainboard Identification
Ollie Lho184a4042005-11-26 21:55:36 +000039--------------------------------------------
Ronald G. Minnich5e5f75e2002-01-29 18:21:41 +000040
Peter Stuge44dd3042009-04-20 12:34:30 +000041flashrom reads the coreboot table to determine the current mainboard. If no
Uwe Hermanne74b9f82009-04-10 14:41:29 +000042coreboot table could be read or if you want to override these values, you can
43specify -m, e.g.:
Ollie Lho184a4042005-11-26 21:55:36 +000044
Uwe Hermannf8a49fe2008-06-22 18:50:25 +000045 $ flashrom -w --mainboard AGAMI:ARUMA agami_aruma.rom
Ollie Lho184a4042005-11-26 21:55:36 +000046
Uwe Hermannf8a49fe2008-06-22 18:50:25 +000047See the 'Supported mainboards' section in the output of 'flashrom -L' for
48a list of boards which require the specification of the board name, if no
49coreboot table is found.
Uwe Hermann67808fe2007-10-18 00:29:05 +000050
Ollie Lho184a4042005-11-26 21:55:36 +000051
Uwe Hermann2dc5f422006-11-20 20:32:35 +000052ROM Layout Support
Ollie Lho184a4042005-11-26 21:55:36 +000053------------------
54
Peter Stuge44dd3042009-04-20 12:34:30 +000055flashrom supports ROM layouts. This allows you to flash certain parts of
Uwe Hermann2dc5f422006-11-20 20:32:35 +000056the flash chip only. A ROM layout file looks like follows:
Ollie Lho184a4042005-11-26 21:55:36 +000057
58 00000000:00008fff gfxrom
59 00009000:0003ffff normal
60 00040000:0007ffff fallback
61
62 i.e.:
63 startaddr:endaddr name
64
Uwe Hermann67808fe2007-10-18 00:29:05 +000065 All addresses are offsets within the file, not absolute addresses!
Ollie Lho184a4042005-11-26 21:55:36 +000066
Uwe Hermann2dc5f422006-11-20 20:32:35 +000067If you only want to update the normal image in a ROM you can say:
Ollie Lho184a4042005-11-26 21:55:36 +000068
Uwe Hermann67808fe2007-10-18 00:29:05 +000069 flashrom -w --layout rom.layout --image normal agami_aruma.rom
Ollie Lho184a4042005-11-26 21:55:36 +000070
Uwe Hermann2dc5f422006-11-20 20:32:35 +000071To update normal and fallback but leave the VGA BIOS alone, say:
Ollie Lho184a4042005-11-26 21:55:36 +000072
Uwe Hermann67808fe2007-10-18 00:29:05 +000073 flashrom -w -l rom.layout -i normal -i fallback agami_aruma.rom
Ollie Lho184a4042005-11-26 21:55:36 +000074
Uwe Hermann2dc5f422006-11-20 20:32:35 +000075Currently overlapping sections are not supported.
Ollie Lho184a4042005-11-26 21:55:36 +000076
Uwe Hermann2dc5f422006-11-20 20:32:35 +000077ROM layouts should replace the -s and -e option since they are more
78flexible and they should lead to a ROM update file format with the
Uwe Hermann67808fe2007-10-18 00:29:05 +000079ROM layout and the ROM image in one file (cpio, zip or something?).
Ollie Lho184a4042005-11-26 21:55:36 +000080
81
Uwe Hermannf8a49fe2008-06-22 18:50:25 +000082Supported Flash Chips / Chipsets / Mainboards
83---------------------------------------------
Uwe Hermannb6d28322006-12-04 08:15:47 +000084
Uwe Hermannf8a49fe2008-06-22 18:50:25 +000085Please check the output of 'flashrom -L' for the list of supported
86flash chips, chipsets/southbridges, and mainboards.
Uwe Hermannb6d28322006-12-04 08:15:47 +000087
Uwe Hermannf8a49fe2008-06-22 18:50:25 +000088See also http://coreboot.org/Flashrom for more details.
Uwe Hermannb6d28322006-12-04 08:15:47 +000089