blob: 446315e219e7e5b0df25a0ef590e599a793c6085 [file] [log] [blame]
Uwe Hermanne8ba5382009-05-22 11:37:27 +00001.TH FLASHROM 8 "May 21, 2009"
Stefan Reinauer261144c2006-07-27 23:29:02 +00002.SH NAME
Uwe Hermann530cb2d2009-05-14 22:58:21 +00003flashrom \- detect, read, write, verify and erase flash chips
Stefan Reinauer261144c2006-07-27 23:29:02 +00004.SH SYNOPSIS
Uwe Hermannea07f622009-06-24 17:31:08 +00005.B flashrom \fR[\fB\-VfLzhRn\fR] [\fB\-E\fR|\fB\-r\fR file|\fB\-w\fR file|\fB\-v\fR file] [\fB\-c\fR chipname]
6 [\fB\-m\fR [vendor:]part] [\fB\-l\fR file] [\fB\-i\fR image] [\fB\-p\fR programmer]
Stefan Reinauer261144c2006-07-27 23:29:02 +00007.SH DESCRIPTION
8.B flashrom
Uwe Hermanne8ba5382009-05-22 11:37:27 +00009is a utility for detecting, reading, writing, verifying and erasing flash
Uwe Hermann530cb2d2009-05-14 22:58:21 +000010chips. It's often used to flash BIOS/EFI/coreboot/firmware images in-system
11using a supported mainboard, but it also supports flashing of network cards
12(NICs), SATA controller cards, and other external devices which can program
13flash chips.
Uwe Hermanne74b9f82009-04-10 14:41:29 +000014.PP
Uwe Hermannd42009c2009-04-11 13:59:00 +000015It supports a wide range of DIP32, PLCC32, DIP8, SO8/SOIC8, TSOP32, and
16TSOP40 chips, which use various protocols such as LPC, FWH, parallel flash,
17or SPI.
Uwe Hermanne74b9f82009-04-10 14:41:29 +000018.PP
Uwe Hermann42eb17f2008-01-18 17:48:51 +000019(see
21for details on coreboot)
Stefan Reinauer261144c2006-07-27 23:29:02 +000022.SH OPTIONS
Carl-Daniel Hailfinger5de93412009-05-01 10:53:49 +000023Please note that the command line interface for flashrom will change before
24flashrom 1.0. Do not use flashrom in scripts or other automated tools without
Uwe Hermanne8ba5382009-05-22 11:37:27 +000025checking that your flashrom version won't interpret options in a different way.
Carl-Daniel Hailfinger5de93412009-05-01 10:53:49 +000026.PP
Uwe Hermann1432a602009-06-28 23:26:37 +000027You can specify one of \-E, \-r, \-w, \-v or no operation.
Carl-Daniel Hailfinger01d6aba2009-06-12 14:02:07 +000028If no operation is specified, then all that happens
Stefan Reinauer261144c2006-07-27 23:29:02 +000029is that flash info is dumped and the flash chip is set to writable.
Stefan Reinauerde063bf2006-09-21 13:09:22 +000030.TP
Uwe Hermanne74b9f82009-04-10 14:41:29 +000031.B "\-r, \-\-read <file>"
32Read flash ROM contents and save them into the given
33.BR <file> .
Stefan Reinauerde063bf2006-09-21 13:09:22 +000034.TP
Uwe Hermanne74b9f82009-04-10 14:41:29 +000035.B "\-w, \-\-write <file>"
36Write file into flash ROM (default when
37.B <file>
38is specified).
Stefan Reinauerde063bf2006-09-21 13:09:22 +000039.TP
Uwe Hermannea07f622009-06-24 17:31:08 +000040.B "\-n, \-\-noverify"
42.B not
43verify the flash ROM contents after writing them to the chip. Using this
44option is
45.B not
46recommended, you should only use it if you know what you are doing and you
47feel that the time for verification takes too long.
49Typical usage is:
50.B "flashrom -wn file"
52This option is only useful in combination with
53.BR \-\-write .
Uwe Hermanne74b9f82009-04-10 14:41:29 +000055.B "\-v, \-\-verify <file>"
56Verify the flash ROM contents against the given
57.BR <file> .
Stefan Reinauerde063bf2006-09-21 13:09:22 +000058.TP
Stefan Reinauer261144c2006-07-27 23:29:02 +000059.B "\-E, \-\-erase"
Uwe Hermanne74b9f82009-04-10 14:41:29 +000060Erase the flash ROM chip.
Stefan Reinauerde063bf2006-09-21 13:09:22 +000061.TP
Stefan Reinauer261144c2006-07-27 23:29:02 +000062.B "\-V, \-\-verbose"
63More verbose output.
Stefan Reinauerde063bf2006-09-21 13:09:22 +000064.TP
Stefan Reinauer261144c2006-07-27 23:29:02 +000065.B "\-c, \-\-chip" <chipname>
Uwe Hermann42eb17f2008-01-18 17:48:51 +000066Probe only for specified flash ROM chip.
Uwe Hermann87c07932009-05-05 16:15:46 +000067.sp
68flashrom supports ROM layouts. This allows you to flash certain parts of
69the flash chip only. A ROM layout file looks like follows:
71 00000000:00008fff gfxrom
72 00009000:0003ffff normal
73 00040000:0007ffff fallback
75 i.e.:
76 startaddr:endaddr name
78All addresses are offsets within the file, not absolute addresses!
79If you only want to update the normal image in a ROM you can say:
81.B " flashrom -w --layout rom.layout --image normal agami_aruma.rom"
83To update normal and fallback but leave the VGA BIOS alone, say:
85.B " flashrom -w -l rom.layout -i normal \"
87.B " -i fallback agami_aruma.rom"
89Currently overlapping sections are not supported.
Uwe Hermanne8ba5382009-05-22 11:37:27 +000091ROM layouts should replace the \-s and \-e option since they are more
Uwe Hermann87c07932009-05-05 16:15:46 +000092flexible and they should lead to a ROM update file format with the
93ROM layout and the ROM image in one file (cpio, zip or something?).
Stefan Reinauerde063bf2006-09-21 13:09:22 +000094.TP
Peter Stuge6b53fed2008-01-27 16:21:21 +000095.B "\-m, \-\-mainboard" <[vendor:]part>
Uwe Hermann87c07932009-05-05 16:15:46 +000096Override mainboard settings.
98flashrom reads the coreboot table to determine the current mainboard. If no
99coreboot table could be read or if you want to override these values, you can
Uwe Hermanne8ba5382009-05-22 11:37:27 +0000100specify \-m, e.g.:
Uwe Hermann87c07932009-05-05 16:15:46 +0000101.sp
102.B " flashrom -w --mainboard AGAMI:ARUMA agami_aruma.rom"
Uwe Hermanne8ba5382009-05-22 11:37:27 +0000104See the 'Supported mainboards' section in the output of 'flashrom \-L' for
Uwe Hermann87c07932009-05-05 16:15:46 +0000105a list of boards which require the specification of the board name, if no
106coreboot table is found.
Stefan Reinauerde063bf2006-09-21 13:09:22 +0000107.TP
Stefan Reinauer261144c2006-07-27 23:29:02 +0000108.B "\-f, \-\-force"
Uwe Hermann67808fe2007-10-18 00:29:05 +0000109Force write without checking whether the ROM image file is really meant
110to be used on this board.
Stefan Reinauere3f3e2e2008-01-18 15:33:10 +0000112Note: This check only works while coreboot is running, and only for those
113boards where the coreboot code supports it.
Stefan Reinauerde063bf2006-09-21 13:09:22 +0000114.TP
Uwe Hermanne74b9f82009-04-10 14:41:29 +0000115.B "\-l, \-\-layout <file>"
116Read ROM layout from
117.BR <file> .
Stefan Reinauerde063bf2006-09-21 13:09:22 +0000118.TP
Uwe Hermanne74b9f82009-04-10 14:41:29 +0000119.B "\-i, \-\-image <name>"
Uwe Hermann67808fe2007-10-18 00:29:05 +0000120Only flash image
121.B <name>
122from flash layout.
Stefan Reinauerde063bf2006-09-21 13:09:22 +0000123.TP
Uwe Hermanne5ac1642008-03-12 11:54:51 +0000124.B "\-L, \-\-list\-supported"
Uwe Hermanne8ba5382009-05-22 11:37:27 +0000125List the flash chips, chipsets, mainboards, and PCI card "programmers"
126supported by flashrom.
Uwe Hermanne5ac1642008-03-12 11:54:51 +0000127.sp
Uwe Hermanne8ba5382009-05-22 11:37:27 +0000128There are many unlisted boards which will work out of the box, without
129special support in flashrom. Please let us know if you can verify that
130other boards work or do not work out of the box. For verification you have
131to test an ERASE and/or WRITE operation, so make sure you only do that
132if you have proper means to recover from failure!
Uwe Hermanne5ac1642008-03-12 11:54:51 +0000133.TP
Uwe Hermann20a293f2009-06-19 10:42:43 +0000134.B "\-z, \-\-list\-supported-wiki"
135Same as
136.BR \-\-list\-supported ,
137but outputs the supported hardware in MediaWiki syntax, so that it can be
138easily pasted into the wiki page at
Carl-Daniel Hailfingerce986772009-05-09 00:27:07 +0000140.B "\-p, \-\-programmer <name>"
141Specify the programmer device. Currently supported are:
Uwe Hermann530cb2d2009-05-14 22:58:21 +0000143.BR "* internal" " (default, for in-system flashing in the mainboard)"
Uwe Hermannc7e8a0c2009-05-19 14:14:21 +0000145.BR "* dummy" " (just prints all operations and accesses)"
Uwe Hermann530cb2d2009-05-14 22:58:21 +0000147.BR "* nic3com" " (for flash ROMs on 3COM network cards)"
Uwe Hermannc7e8a0c2009-05-19 14:14:21 +0000149.BR "* satasii" " (for flash ROMs on Silicon Image SATA/IDE controllers)"
Uwe Hermanne9d04d42009-06-02 19:54:22 +0000151.BR "* it87spi" " (for flash ROMs behind an ITE IT87xx Super I/O LPC/SPI translation unit)"
Carl-Daniel Hailfingerb8afecd2009-05-31 18:00:57 +0000152.sp
Paul Fox05dfbe62009-06-16 21:08:06 +0000153.BR "* ft2232spi" " (for flash ROMs attached to a FT2232H/FT4232H based USB SPI programmer)"
Carl-Daniel Hailfinger3504b532009-06-01 00:02:11 +0000155The dummy programmer has an optional parameter specifying the bus types it
156should support. For that you have to use the
157.B "flashrom -p dummy=type"
158syntax where
159.B type
160can be any comma-separated combination of
161.B parallel lpc fwh spi all
162in any order.
165.B "flashrom -p dummy=lpc,fwh"
Uwe Hermannc7e8a0c2009-05-19 14:14:21 +0000167If you have multiple supported PCI cards which can program flash chips
168(NICs, SATA/IDE controllers, etc.) in your system, you must use the
169.B "flashrom -p xxxx=bb:dd.f"
170syntax to explicitly select one of them, where
171.B xxxx
172is the name of the programmer
Uwe Hermann530cb2d2009-05-14 22:58:21 +0000173.B bb
174is the PCI bus number,
175.B dd
176is the PCI device number, and
177.B f
178is the PCI function number of the desired NIC.
181.B "flashrom -p nic3com=05:04.0"
Uwe Hermannc7e8a0c2009-05-19 14:14:21 +0000183Currently the following programmers support this mechanism:
184.BR nic3com ,
185.BR satasii .
Carl-Daniel Hailfingerce986772009-05-09 00:27:07 +0000186.TP
Stefan Reinauer261144c2006-07-27 23:29:02 +0000187.B "\-h, \-\-help"
188Show a help text and exit.
Bernhard Walle201bde32008-01-21 15:24:22 +0000189.TP
190.B "\-R, \-\-version"
191Show version information and exit.
Peter Stuge42688e52009-01-26 02:20:56 +0000192.SH EXIT STATUS
193flashrom exits with 0 on success, 1 on most failures but with 2 if /dev/mem
194(/dev/xsvc on Solaris) can not be opened and with 3 if a call to mmap() fails.
Stefan Reinauer261144c2006-07-27 23:29:02 +0000195.SH BUGS
Uwe Hermann42eb17f2008-01-18 17:48:51 +0000196Please report any bugs at
197.BR ","
198or on the coreboot mailing list
199.RB "(" ")."
Stefan Reinauer261144c2006-07-27 23:29:02 +0000200.SH LICENCE
201.B flashrom
Carl-Daniel Hailfinger851ecf22009-01-08 04:56:59 +0000202is covered by the GNU General Public License (GPL), version 2. Some files are
203additionally available under the GPL (version 2, or any later version).
Stefan Reinauer261144c2006-07-27 23:29:02 +0000204.SH COPYRIGHT
Stefan Reinauer261144c2006-07-27 23:29:02
Carl-Daniel Hailfinger851ecf22009-01-08 04:56:59 +0000206Please see the individual files.
Stefan Reinauer261144c2006-07-27 23:29:02 +0000207.SH AUTHORS
Carl-Daniel Hailfinger851ecf22009-01-08 04:56:59 +0000208Carl-Daniel Hailfinger
210Claus Gindhart <>
212Dominik Geyer <>
214Eric Biederman <>
216Giampiero Giancipoli <>
218Joe Bao <>
220Luc Verhaegen <>
Carl-Daniel Hailfinger451dc802009-05-01 11:00:39 +0000222Li-Ta Lo
Carl-Daniel Hailfinger851ecf22009-01-08 04:56:59 +0000224Markus Boas <>
226Nikolay Petukhov <>
228Peter Stuge <>
230Reinder E.N. de Haan <>
232Ronald G. Minnich <>
234Ronald Hoogenboom <>
Stefan Reinauer261144c2006-07-27 23:29:02
236Stefan Reinauer <>
Carl-Daniel Hailfinger851ecf22009-01-08 04:56:59 +0000238Stefan Wildemann <>
240Steven James <>
242Uwe Hermann <>
244Wang Qingpei <>
246Yinghai Lu <>
Stefan Reinauerf8337dd2006-08-03 10:49:09
248some others
Stefan Reinauer261144c2006-07-27 23:29:02 +0000249.PP
Stefan Reinauerde063bf2006-09-21 13:09:22 +0000250This manual page was written by Uwe Hermann <>.
Uwe Hermann42eb17f2008-01-18 17:48:51 +0000251It is licensed under the terms of the GNU GPL (version 2 or later).