blob: 98f8bdd3fc601809549692479f5206c35cba94e3 [file] [log] [blame]
Uwe Hermann530cb2d2009-05-14 22:58:21 +00001.TH FLASHROM 8 "May 14, 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 Hermann530cb2d2009-05-14 22:58:21 +00005.B flashrom \fR[\fB\-EVfLhR\fR] [\fB\-r\fR file] [\fB\-w\fR file] [\fB\-v\fR file]
6 [\fB\-c\fR chipname] [\fB\-s\fR addr] [\fB\-e\fR addr] [\fB\-m\fR [vendor:]part]
7 [\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 Hermann530cb2d2009-05-14 22:58:21 +000010is a utility for detecting, reading, writing, verifying and erasing flash ROM
11chips. 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
26checking that your flashrom version won't interpret them in a totally different
27way.
28.PP
Stefan Reinauer261144c2006-07-27 23:29:02 +000029If no file is specified, then all that happens
30is 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.
Stefan Reinauerde063bf2006-09-21 13:09:22 +000053.TP
Stefan Reinauer261144c2006-07-27 23:29:02 +000054.B "\-s, \-\-estart" <addr>
Uwe Hermann42eb17f2008-01-18 17:48:51 +000055Exclude start position (obsolete).
Uwe Hermann87c07932009-05-05 16:15:46 +000056.sp
57flashrom supports ROM layouts. This allows you to flash certain parts of
58the flash chip only. A ROM layout file looks like follows:
59.sp
60 00000000:00008fff gfxrom
61 00009000:0003ffff normal
62 00040000:0007ffff fallback
63.sp
64 i.e.:
65 startaddr:endaddr name
66.sp
67All addresses are offsets within the file, not absolute addresses!
68If you only want to update the normal image in a ROM you can say:
69.sp
70.B " flashrom -w --layout rom.layout --image normal agami_aruma.rom"
71.sp
72To update normal and fallback but leave the VGA BIOS alone, say:
73.sp
74.B " flashrom -w -l rom.layout -i normal \"
75.br
76.B " -i fallback agami_aruma.rom"
77.sp
78Currently overlapping sections are not supported.
79.sp
80ROM layouts should replace the -s and -e option since they are more
81flexible and they should lead to a ROM update file format with the
82ROM layout and the ROM image in one file (cpio, zip or something?).
Stefan Reinauerde063bf2006-09-21 13:09:22 +000083.TP
Stefan Reinauerf8337dd2006-08-03 10:49:09 +000084.B "\-e, \-\-eend" <addr>
Uwe Hermann42eb17f2008-01-18 17:48:51 +000085Exclude end postion (obsolete).
Stefan Reinauerde063bf2006-09-21 13:09:22 +000086.TP
Peter Stuge6b53fed2008-01-27 16:21:21 +000087.B "\-m, \-\-mainboard" <[vendor:]part>
Uwe Hermann87c07932009-05-05 16:15:46 +000088Override mainboard settings.
89.sp
90flashrom reads the coreboot table to determine the current mainboard. If no
91coreboot table could be read or if you want to override these values, you can
92specify -m, e.g.:
93.sp
94.B " flashrom -w --mainboard AGAMI:ARUMA agami_aruma.rom"
95.sp
96See the 'Supported mainboards' section in the output of 'flashrom -L' for
97a list of boards which require the specification of the board name, if no
98coreboot table is found.
Stefan Reinauerde063bf2006-09-21 13:09:22 +000099.TP
Stefan Reinauer261144c2006-07-27 23:29:02 +0000100.B "\-f, \-\-force"
Uwe Hermann67808fe2007-10-18 00:29:05 +0000101Force write without checking whether the ROM image file is really meant
102to be used on this board.
103.sp
Stefan Reinauere3f3e2e2008-01-18 15:33:10 +0000104Note: This check only works while coreboot is running, and only for those
105boards where the coreboot code supports it.
Stefan Reinauerde063bf2006-09-21 13:09:22 +0000106.TP
Uwe Hermanne74b9f82009-04-10 14:41:29 +0000107.B "\-l, \-\-layout <file>"
108Read ROM layout from
109.BR <file> .
Stefan Reinauerde063bf2006-09-21 13:09:22 +0000110.TP
Uwe Hermanne74b9f82009-04-10 14:41:29 +0000111.B "\-i, \-\-image <name>"
Uwe Hermann67808fe2007-10-18 00:29:05 +0000112Only flash image
113.B <name>
114from flash layout.
Stefan Reinauerde063bf2006-09-21 13:09:22 +0000115.TP
Uwe Hermanne5ac1642008-03-12 11:54:51 +0000116.B "\-L, \-\-list\-supported"
117List the ROM chips, chipsets, and mainboards supported by flashrom.
118The list of mainboards consists of those boards which need a special
119ROM write-enable function for flashrom to work.
120.sp
121There are many other boards which will work out of the box, without such
122special support in flashrom. Some of the known-good/known-bad and tested ones
123are listed at
124.BR http://coreboot.org/Flashrom#Supported_mainboards ,
125but the list is not exhaustive, of course.
Uwe Hermanne74b9f82009-04-10 14:41:29 +0000126.sp
127Please let us know if you can verify other boards to work or not work out
128of the box.
Uwe Hermanne5ac1642008-03-12 11:54:51 +0000129.TP
Carl-Daniel Hailfingerce986772009-05-09 00:27:07 +0000130.B "\-p, \-\-programmer <name>"
131Specify the programmer device. Currently supported are:
132.sp
Uwe Hermann530cb2d2009-05-14 22:58:21 +0000133.BR "* internal" " (default, for in-system flashing in the mainboard)"
134.sp
Uwe Hermannc7e8a0c2009-05-19 14:14:21 +0000135.BR "* dummy" " (just prints all operations and accesses)"
136.sp
Uwe Hermann530cb2d2009-05-14 22:58:21 +0000137.BR "* nic3com" " (for flash ROMs on 3COM network cards)"
138.sp
Uwe Hermannc7e8a0c2009-05-19 14:14:21 +0000139.BR "* satasii" " (for flash ROMs on Silicon Image SATA/IDE controllers)"
140.sp
141If you have multiple supported PCI cards which can program flash chips
142(NICs, SATA/IDE controllers, etc.) in your system, you must use the
143.B "flashrom -p xxxx=bb:dd.f"
144syntax to explicitly select one of them, where
145.B xxxx
146is the name of the programmer
Uwe Hermann530cb2d2009-05-14 22:58:21 +0000147.B bb
148is the PCI bus number,
149.B dd
150is the PCI device number, and
151.B f
152is the PCI function number of the desired NIC.
153.sp
154Example:
155.B "flashrom -p nic3com=05:04.0"
156.sp
Uwe Hermannc7e8a0c2009-05-19 14:14:21 +0000157Currently the following programmers support this mechanism:
158.BR nic3com ,
159.BR satasii .
Carl-Daniel Hailfingerce986772009-05-09 00:27:07 +0000160.TP
Stefan Reinauer261144c2006-07-27 23:29:02 +0000161.B "\-h, \-\-help"
162Show a help text and exit.
Bernhard Walle201bde32008-01-21 15:24:22 +0000163.TP
164.B "\-R, \-\-version"
165Show version information and exit.
Peter Stuge42688e52009-01-26 02:20:56 +0000166.SH EXIT STATUS
167flashrom exits with 0 on success, 1 on most failures but with 2 if /dev/mem
168(/dev/xsvc on Solaris) can not be opened and with 3 if a call to mmap() fails.
Stefan Reinauer261144c2006-07-27 23:29:02 +0000169.SH BUGS
Uwe Hermann42eb17f2008-01-18 17:48:51 +0000170Please report any bugs at
171.BR http://tracker.coreboot.org/trac/coreboot/newticket ","
172or on the coreboot mailing list
173.RB "(" http://coreboot.org/Mailinglist ")."
Stefan Reinauer261144c2006-07-27 23:29:02 +0000174.SH LICENCE
175.B flashrom
Carl-Daniel Hailfinger851ecf22009-01-08 04:56:59 +0000176is covered by the GNU General Public License (GPL), version 2. Some files are
177additionally available under the GPL (version 2, or any later version).
Stefan Reinauer261144c2006-07-27 23:29:02 +0000178.SH COPYRIGHT
Stefan Reinauer261144c2006-07-27 23:29:02 +0000179.br
Carl-Daniel Hailfinger851ecf22009-01-08 04:56:59 +0000180Please see the individual files.
Stefan Reinauer261144c2006-07-27 23:29:02 +0000181.SH AUTHORS
Carl-Daniel Hailfinger851ecf22009-01-08 04:56:59 +0000182Carl-Daniel Hailfinger
183.br
184Claus Gindhart <claus.gindhart@kontron.com>
185.br
186Dominik Geyer <dominik.geyer@kontron.com>
187.br
188Eric Biederman <ebiederman@lnxi.com>
189.br
190Giampiero Giancipoli <gianci@email.it>
191.br
192Joe Bao <Zheng.Bao@amd.com>
193.br
194Luc Verhaegen <libv@skynet.be>
195.br
Carl-Daniel Hailfinger451dc802009-05-01 11:00:39 +0000196Li-Ta Lo
197.br
Carl-Daniel Hailfinger851ecf22009-01-08 04:56:59 +0000198Markus Boas <ryven@ryven.de>
199.br
200Nikolay Petukhov <nikolay.petukhov@gmail.com>
201.br
202Peter Stuge <peter@stuge.se>
203.br
204Reinder E.N. de Haan <lb_reha@mveas.com>
205.br
206Ronald G. Minnich <rminnich@gmail.com>
207.br
208Ronald Hoogenboom <ronald@zonnet.nl>
Stefan Reinauer261144c2006-07-27 23:29:02 +0000209.br
210Stefan Reinauer <stepan@coresystems.de>
211.br
Carl-Daniel Hailfinger851ecf22009-01-08 04:56:59 +0000212Stefan Wildemann <stefan.wildemann@kontron.com>
213.br
214Steven James <pyro@linuxlabs.com>
215.br
216Uwe Hermann <uwe@hermann-uwe.de>
217.br
218Wang Qingpei <Qingpei.Wang@amd.com>
219.br
220Yinghai Lu <yinghai.lu@amd.com>
Stefan Reinauerf8337dd2006-08-03 10:49:09 +0000221.br
222some others
Stefan Reinauer261144c2006-07-27 23:29:02 +0000223.PP
Stefan Reinauerde063bf2006-09-21 13:09:22 +0000224This manual page was written by Uwe Hermann <uwe@hermann-uwe.de>.
Uwe Hermann42eb17f2008-01-18 17:48:51 +0000225It is licensed under the terms of the GNU GPL (version 2 or later).