blob: d51034ed547c9031a1e6197461021346f4c3c71a [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 Hermann20a293f2009-06-19 10:42:43 +00005.B flashrom \fR[\fB\-VfLzhR\fR] [\fB\-E\fR|\fB\-r\fR file|\fB\-w\fR file|\fB\-v\fR file]
Carl-Daniel Hailfinger49eb4dd2009-06-19 11:23:57 +00006 [\fB\-c\fR chipname] [\fB\-m\fR [vendor:]part]
Uwe Hermann530cb2d2009-05-14 22:58:21 +00007 [\fB\-l\fR file] [\fB\-i\fR image] [\fB\-p\fR programmer] [file]
Stefan Reinauer261144c2006-07-27 23:29:02 +00008.SH DESCRIPTION
9.B flashrom
Uwe Hermanne8ba5382009-05-22 11:37:27 +000010is a utility for detecting, reading, writing, verifying and erasing flash
Uwe Hermann530cb2d2009-05-14 22:58:21 +000011chips. It's often used to flash BIOS/EFI/coreboot/firmware images in-system
12using a supported mainboard, but it also supports flashing of network cards
13(NICs), SATA controller cards, and other external devices which can program
14flash chips.
Uwe Hermanne74b9f82009-04-10 14:41:29 +000015.PP
Uwe Hermannd42009c2009-04-11 13:59:00 +000016It supports a wide range of DIP32, PLCC32, DIP8, SO8/SOIC8, TSOP32, and
17TSOP40 chips, which use various protocols such as LPC, FWH, parallel flash,
18or SPI.
Uwe Hermanne74b9f82009-04-10 14:41:29 +000019.PP
Uwe Hermann42eb17f2008-01-18 17:48:51 +000020(see
21.B http://coreboot.org
22for details on coreboot)
Stefan Reinauer261144c2006-07-27 23:29:02 +000023.SH OPTIONS
Carl-Daniel Hailfinger5de93412009-05-01 10:53:49 +000024Please note that the command line interface for flashrom will change before
25flashrom 1.0. Do not use flashrom in scripts or other automated tools without
Uwe Hermanne8ba5382009-05-22 11:37:27 +000026checking that your flashrom version won't interpret options in a different way.
Carl-Daniel Hailfinger5de93412009-05-01 10:53:49 +000027.PP
Carl-Daniel Hailfinger01d6aba2009-06-12 14:02:07 +000028You can specify one of -E, -r, -w, -v or no operation.
29If no operation is specified, then all that happens
Stefan Reinauer261144c2006-07-27 23:29:02 +000030is that flash info is dumped and the flash chip is set to writable.
Stefan Reinauerde063bf2006-09-21 13:09:22 +000031.TP
Uwe Hermanne74b9f82009-04-10 14:41:29 +000032.B "\-r, \-\-read <file>"
33Read flash ROM contents and save them into the given
34.BR <file> .
Stefan Reinauerde063bf2006-09-21 13:09:22 +000035.TP
Uwe Hermanne74b9f82009-04-10 14:41:29 +000036.B "\-w, \-\-write <file>"
37Write file into flash ROM (default when
38.B <file>
39is specified).
Stefan Reinauerde063bf2006-09-21 13:09:22 +000040.TP
Uwe Hermanne74b9f82009-04-10 14:41:29 +000041.B "\-v, \-\-verify <file>"
42Verify the flash ROM contents against the given
43.BR <file> .
Stefan Reinauerde063bf2006-09-21 13:09:22 +000044.TP
Stefan Reinauer261144c2006-07-27 23:29:02 +000045.B "\-E, \-\-erase"
Uwe Hermanne74b9f82009-04-10 14:41:29 +000046Erase the flash ROM chip.
Stefan Reinauerde063bf2006-09-21 13:09:22 +000047.TP
Stefan Reinauer261144c2006-07-27 23:29:02 +000048.B "\-V, \-\-verbose"
49More verbose output.
Stefan Reinauerde063bf2006-09-21 13:09:22 +000050.TP
Stefan Reinauer261144c2006-07-27 23:29:02 +000051.B "\-c, \-\-chip" <chipname>
Uwe Hermann42eb17f2008-01-18 17:48:51 +000052Probe only for specified flash ROM chip.
Uwe Hermann87c07932009-05-05 16:15:46 +000053.sp
54flashrom supports ROM layouts. This allows you to flash certain parts of
55the flash chip only. A ROM layout file looks like follows:
56.sp
57 00000000:00008fff gfxrom
58 00009000:0003ffff normal
59 00040000:0007ffff fallback
60.sp
61 i.e.:
62 startaddr:endaddr name
63.sp
64All addresses are offsets within the file, not absolute addresses!
65If you only want to update the normal image in a ROM you can say:
66.sp
67.B " flashrom -w --layout rom.layout --image normal agami_aruma.rom"
68.sp
69To update normal and fallback but leave the VGA BIOS alone, say:
70.sp
71.B " flashrom -w -l rom.layout -i normal \"
72.br
73.B " -i fallback agami_aruma.rom"
74.sp
75Currently overlapping sections are not supported.
76.sp
Uwe Hermanne8ba5382009-05-22 11:37:27 +000077ROM layouts should replace the \-s and \-e option since they are more
Uwe Hermann87c07932009-05-05 16:15:46 +000078flexible and they should lead to a ROM update file format with the
79ROM layout and the ROM image in one file (cpio, zip or something?).
Stefan Reinauerde063bf2006-09-21 13:09:22 +000080.TP
Peter Stuge6b53fed2008-01-27 16:21:21 +000081.B "\-m, \-\-mainboard" <[vendor:]part>
Uwe Hermann87c07932009-05-05 16:15:46 +000082Override mainboard settings.
83.sp
84flashrom reads the coreboot table to determine the current mainboard. If no
85coreboot table could be read or if you want to override these values, you can
Uwe Hermanne8ba5382009-05-22 11:37:27 +000086specify \-m, e.g.:
Uwe Hermann87c07932009-05-05 16:15:46 +000087.sp
88.B " flashrom -w --mainboard AGAMI:ARUMA agami_aruma.rom"
89.sp
Uwe Hermanne8ba5382009-05-22 11:37:27 +000090See the 'Supported mainboards' section in the output of 'flashrom \-L' for
Uwe Hermann87c07932009-05-05 16:15:46 +000091a list of boards which require the specification of the board name, if no
92coreboot table is found.
Stefan Reinauerde063bf2006-09-21 13:09:22 +000093.TP
Stefan Reinauer261144c2006-07-27 23:29:02 +000094.B "\-f, \-\-force"
Uwe Hermann67808fe2007-10-18 00:29:05 +000095Force write without checking whether the ROM image file is really meant
96to be used on this board.
97.sp
Stefan Reinauere3f3e2e2008-01-18 15:33:10 +000098Note: This check only works while coreboot is running, and only for those
99boards where the coreboot code supports it.
Stefan Reinauerde063bf2006-09-21 13:09:22 +0000100.TP
Uwe Hermanne74b9f82009-04-10 14:41:29 +0000101.B "\-l, \-\-layout <file>"
102Read ROM layout from
103.BR <file> .
Stefan Reinauerde063bf2006-09-21 13:09:22 +0000104.TP
Uwe Hermanne74b9f82009-04-10 14:41:29 +0000105.B "\-i, \-\-image <name>"
Uwe Hermann67808fe2007-10-18 00:29:05 +0000106Only flash image
107.B <name>
108from flash layout.
Stefan Reinauerde063bf2006-09-21 13:09:22 +0000109.TP
Uwe Hermanne5ac1642008-03-12 11:54:51 +0000110.B "\-L, \-\-list\-supported"
Uwe Hermanne8ba5382009-05-22 11:37:27 +0000111List the flash chips, chipsets, mainboards, and PCI card "programmers"
112supported by flashrom.
Uwe Hermanne5ac1642008-03-12 11:54:51 +0000113.sp
Uwe Hermanne8ba5382009-05-22 11:37:27 +0000114There are many unlisted boards which will work out of the box, without
115special support in flashrom. Please let us know if you can verify that
116other boards work or do not work out of the box. For verification you have
117to test an ERASE and/or WRITE operation, so make sure you only do that
118if you have proper means to recover from failure!
Uwe Hermanne5ac1642008-03-12 11:54:51 +0000119.TP
Uwe Hermann20a293f2009-06-19 10:42:43 +0000120.B "\-z, \-\-list\-supported-wiki"
121Same as
122.BR \-\-list\-supported ,
123but outputs the supported hardware in MediaWiki syntax, so that it can be
124easily pasted into the wiki page at http://coreboot.org/Flashrom.
125.TP
Carl-Daniel Hailfingerce986772009-05-09 00:27:07 +0000126.B "\-p, \-\-programmer <name>"
127Specify the programmer device. Currently supported are:
128.sp
Uwe Hermann530cb2d2009-05-14 22:58:21 +0000129.BR "* internal" " (default, for in-system flashing in the mainboard)"
130.sp
Uwe Hermannc7e8a0c2009-05-19 14:14:21 +0000131.BR "* dummy" " (just prints all operations and accesses)"
132.sp
Uwe Hermann530cb2d2009-05-14 22:58:21 +0000133.BR "* nic3com" " (for flash ROMs on 3COM network cards)"
134.sp
Uwe Hermannc7e8a0c2009-05-19 14:14:21 +0000135.BR "* satasii" " (for flash ROMs on Silicon Image SATA/IDE controllers)"
136.sp
Uwe Hermanne9d04d42009-06-02 19:54:22 +0000137.BR "* it87spi" " (for flash ROMs behind an ITE IT87xx Super I/O LPC/SPI translation unit)"
Carl-Daniel Hailfingerb8afecd2009-05-31 18:00:57 +0000138.sp
Paul Fox05dfbe62009-06-16 21:08:06 +0000139.BR "* ft2232spi" " (for flash ROMs attached to a FT2232H/FT4232H based USB SPI programmer)"
140.sp
Carl-Daniel Hailfinger3504b532009-06-01 00:02:11 +0000141The dummy programmer has an optional parameter specifying the bus types it
142should support. For that you have to use the
143.B "flashrom -p dummy=type"
144syntax where
145.B type
146can be any comma-separated combination of
147.B parallel lpc fwh spi all
148in any order.
149.sp
150Example:
151.B "flashrom -p dummy=lpc,fwh"
152.sp
Uwe Hermannc7e8a0c2009-05-19 14:14:21 +0000153If you have multiple supported PCI cards which can program flash chips
154(NICs, SATA/IDE controllers, etc.) in your system, you must use the
155.B "flashrom -p xxxx=bb:dd.f"
156syntax to explicitly select one of them, where
157.B xxxx
158is the name of the programmer
Uwe Hermann530cb2d2009-05-14 22:58:21 +0000159.B bb
160is the PCI bus number,
161.B dd
162is the PCI device number, and
163.B f
164is the PCI function number of the desired NIC.
165.sp
166Example:
167.B "flashrom -p nic3com=05:04.0"
168.sp
Uwe Hermannc7e8a0c2009-05-19 14:14:21 +0000169Currently the following programmers support this mechanism:
170.BR nic3com ,
171.BR satasii .
Carl-Daniel Hailfingerce986772009-05-09 00:27:07 +0000172.TP
Stefan Reinauer261144c2006-07-27 23:29:02 +0000173.B "\-h, \-\-help"
174Show a help text and exit.
Bernhard Walle201bde32008-01-21 15:24:22 +0000175.TP
176.B "\-R, \-\-version"
177Show version information and exit.
Peter Stuge42688e52009-01-26 02:20:56 +0000178.SH EXIT STATUS
179flashrom exits with 0 on success, 1 on most failures but with 2 if /dev/mem
180(/dev/xsvc on Solaris) can not be opened and with 3 if a call to mmap() fails.
Stefan Reinauer261144c2006-07-27 23:29:02 +0000181.SH BUGS
Uwe Hermann42eb17f2008-01-18 17:48:51 +0000182Please report any bugs at
183.BR http://tracker.coreboot.org/trac/coreboot/newticket ","
184or on the coreboot mailing list
185.RB "(" http://coreboot.org/Mailinglist ")."
Stefan Reinauer261144c2006-07-27 23:29:02 +0000186.SH LICENCE
187.B flashrom
Carl-Daniel Hailfinger851ecf22009-01-08 04:56:59 +0000188is covered by the GNU General Public License (GPL), version 2. Some files are
189additionally available under the GPL (version 2, or any later version).
Stefan Reinauer261144c2006-07-27 23:29:02 +0000190.SH COPYRIGHT
Stefan Reinauer261144c2006-07-27 23:29:02 +0000191.br
Carl-Daniel Hailfinger851ecf22009-01-08 04:56:59 +0000192Please see the individual files.
Stefan Reinauer261144c2006-07-27 23:29:02 +0000193.SH AUTHORS
Carl-Daniel Hailfinger851ecf22009-01-08 04:56:59 +0000194Carl-Daniel Hailfinger
195.br
196Claus Gindhart <claus.gindhart@kontron.com>
197.br
198Dominik Geyer <dominik.geyer@kontron.com>
199.br
200Eric Biederman <ebiederman@lnxi.com>
201.br
202Giampiero Giancipoli <gianci@email.it>
203.br
204Joe Bao <Zheng.Bao@amd.com>
205.br
206Luc Verhaegen <libv@skynet.be>
207.br
Carl-Daniel Hailfinger451dc802009-05-01 11:00:39 +0000208Li-Ta Lo
209.br
Carl-Daniel Hailfinger851ecf22009-01-08 04:56:59 +0000210Markus Boas <ryven@ryven.de>
211.br
212Nikolay Petukhov <nikolay.petukhov@gmail.com>
213.br
214Peter Stuge <peter@stuge.se>
215.br
216Reinder E.N. de Haan <lb_reha@mveas.com>
217.br
218Ronald G. Minnich <rminnich@gmail.com>
219.br
220Ronald Hoogenboom <ronald@zonnet.nl>
Stefan Reinauer261144c2006-07-27 23:29:02 +0000221.br
222Stefan Reinauer <stepan@coresystems.de>
223.br
Carl-Daniel Hailfinger851ecf22009-01-08 04:56:59 +0000224Stefan Wildemann <stefan.wildemann@kontron.com>
225.br
226Steven James <pyro@linuxlabs.com>
227.br
228Uwe Hermann <uwe@hermann-uwe.de>
229.br
230Wang Qingpei <Qingpei.Wang@amd.com>
231.br
232Yinghai Lu <yinghai.lu@amd.com>
Stefan Reinauerf8337dd2006-08-03 10:49:09 +0000233.br
234some others
Stefan Reinauer261144c2006-07-27 23:29:02 +0000235.PP
Stefan Reinauerde063bf2006-09-21 13:09:22 +0000236This manual page was written by Uwe Hermann <uwe@hermann-uwe.de>.
Uwe Hermann42eb17f2008-01-18 17:48:51 +0000237It is licensed under the terms of the GNU GPL (version 2 or later).