blob: 7a48041ef18071bb5613c2f3f787403373de3204 [file] [log] [blame]
Uwe Hermannd42009c2009-04-11 13:59:00 +00001.TH FLASHROM 8 "April 11, 2009"
Stefan Reinauer261144c2006-07-27 23:29:02 +00002.SH NAME
Peter Stuge261cafa2009-05-01 14:52:50 +00003flashrom \- read, write, verify and erase BIOS/ROM/flash chips
Stefan Reinauer261144c2006-07-27 23:29:02 +00004.SH SYNOPSIS
Uwe Hermanne5ac1642008-03-12 11:54:51 +00005.B flashrom \fR[\fB\-rwvEVfLhR\fR] [\fB\-c\fR chipname] [\fB\-s\fR exclude_start] [\fB\-e\fR exclude_end]
Peter Stuge92ef62c2009-05-01 14:49:49 +00006 [\fB-m\fR [vendor:]part] [\fB-l\fR file.layout] [\fB-i\fR image_name] [file]
Stefan Reinauer261144c2006-07-27 23:29:02 +00007.SH DESCRIPTION
8.B flashrom
Peter Stuge261cafa2009-05-01 14:52:50 +00009is a utility for reading, writing, verifying and erasing flash ROM chips.
Uwe Hermanne74b9f82009-04-10 14:41:29 +000010It's often used to flash BIOS/coreboot/firmware images.
11.PP
Uwe Hermannd42009c2009-04-11 13:59:00 +000012It supports a wide range of DIP32, PLCC32, DIP8, SO8/SOIC8, TSOP32, and
13TSOP40 chips, which use various protocols such as LPC, FWH, parallel flash,
14or SPI.
Uwe Hermanne74b9f82009-04-10 14:41:29 +000015.PP
Uwe Hermann42eb17f2008-01-18 17:48:51 +000016(see
17.B http://coreboot.org
18for details on coreboot)
Stefan Reinauer261144c2006-07-27 23:29:02 +000019.SH OPTIONS
Carl-Daniel Hailfinger5de93412009-05-01 10:53:49 +000020Please note that the command line interface for flashrom will change before
21flashrom 1.0. Do not use flashrom in scripts or other automated tools without
22checking that your flashrom version won't interpret them in a totally different
23way.
24.PP
Stefan Reinauer261144c2006-07-27 23:29:02 +000025If no file is specified, then all that happens
26is that flash info is dumped and the flash chip is set to writable.
Stefan Reinauerde063bf2006-09-21 13:09:22 +000027.TP
Uwe Hermanne74b9f82009-04-10 14:41:29 +000028.B "\-r, \-\-read <file>"
29Read flash ROM contents and save them into the given
30.BR <file> .
Stefan Reinauerde063bf2006-09-21 13:09:22 +000031.TP
Uwe Hermanne74b9f82009-04-10 14:41:29 +000032.B "\-w, \-\-write <file>"
33Write file into flash ROM (default when
34.B <file>
35is specified).
Stefan Reinauerde063bf2006-09-21 13:09:22 +000036.TP
Uwe Hermanne74b9f82009-04-10 14:41:29 +000037.B "\-v, \-\-verify <file>"
38Verify the flash ROM contents against the given
39.BR <file> .
Stefan Reinauerde063bf2006-09-21 13:09:22 +000040.TP
Stefan Reinauer261144c2006-07-27 23:29:02 +000041.B "\-E, \-\-erase"
Uwe Hermanne74b9f82009-04-10 14:41:29 +000042Erase the flash ROM chip.
Stefan Reinauerde063bf2006-09-21 13:09:22 +000043.TP
Stefan Reinauer261144c2006-07-27 23:29:02 +000044.B "\-V, \-\-verbose"
45More verbose output.
Stefan Reinauerde063bf2006-09-21 13:09:22 +000046.TP
Stefan Reinauer261144c2006-07-27 23:29:02 +000047.B "\-c, \-\-chip" <chipname>
Uwe Hermann42eb17f2008-01-18 17:48:51 +000048Probe only for specified flash ROM chip.
Stefan Reinauerde063bf2006-09-21 13:09:22 +000049.TP
Stefan Reinauer261144c2006-07-27 23:29:02 +000050.B "\-s, \-\-estart" <addr>
Uwe Hermann42eb17f2008-01-18 17:48:51 +000051Exclude start position (obsolete).
Uwe Hermann87c07932009-05-05 16:15:46 +000052.sp
53flashrom supports ROM layouts. This allows you to flash certain parts of
54the flash chip only. A ROM layout file looks like follows:
55.sp
56 00000000:00008fff gfxrom
57 00009000:0003ffff normal
58 00040000:0007ffff fallback
59.sp
60 i.e.:
61 startaddr:endaddr name
62.sp
63All addresses are offsets within the file, not absolute addresses!
64If you only want to update the normal image in a ROM you can say:
65.sp
66.B " flashrom -w --layout rom.layout --image normal agami_aruma.rom"
67.sp
68To update normal and fallback but leave the VGA BIOS alone, say:
69.sp
70.B " flashrom -w -l rom.layout -i normal \"
71.br
72.B " -i fallback agami_aruma.rom"
73.sp
74Currently overlapping sections are not supported.
75.sp
76ROM layouts should replace the -s and -e option since they are more
77flexible and they should lead to a ROM update file format with the
78ROM layout and the ROM image in one file (cpio, zip or something?).
Stefan Reinauerde063bf2006-09-21 13:09:22 +000079.TP
Stefan Reinauerf8337dd2006-08-03 10:49:09 +000080.B "\-e, \-\-eend" <addr>
Uwe Hermann42eb17f2008-01-18 17:48:51 +000081Exclude end postion (obsolete).
Stefan Reinauerde063bf2006-09-21 13:09:22 +000082.TP
Peter Stuge6b53fed2008-01-27 16:21:21 +000083.B "\-m, \-\-mainboard" <[vendor:]part>
Uwe Hermann87c07932009-05-05 16:15:46 +000084Override mainboard settings.
85.sp
86flashrom reads the coreboot table to determine the current mainboard. If no
87coreboot table could be read or if you want to override these values, you can
88specify -m, e.g.:
89.sp
90.B " flashrom -w --mainboard AGAMI:ARUMA agami_aruma.rom"
91.sp
92See the 'Supported mainboards' section in the output of 'flashrom -L' for
93a list of boards which require the specification of the board name, if no
94coreboot table is found.
Stefan Reinauerde063bf2006-09-21 13:09:22 +000095.TP
Stefan Reinauer261144c2006-07-27 23:29:02 +000096.B "\-f, \-\-force"
Uwe Hermann67808fe2007-10-18 00:29:05 +000097Force write without checking whether the ROM image file is really meant
98to be used on this board.
99.sp
Stefan Reinauere3f3e2e2008-01-18 15:33:10 +0000100Note: This check only works while coreboot is running, and only for those
101boards where the coreboot code supports it.
Stefan Reinauerde063bf2006-09-21 13:09:22 +0000102.TP
Uwe Hermanne74b9f82009-04-10 14:41:29 +0000103.B "\-l, \-\-layout <file>"
104Read ROM layout from
105.BR <file> .
Stefan Reinauerde063bf2006-09-21 13:09:22 +0000106.TP
Uwe Hermanne74b9f82009-04-10 14:41:29 +0000107.B "\-i, \-\-image <name>"
Uwe Hermann67808fe2007-10-18 00:29:05 +0000108Only flash image
109.B <name>
110from flash layout.
Stefan Reinauerde063bf2006-09-21 13:09:22 +0000111.TP
Uwe Hermanne5ac1642008-03-12 11:54:51 +0000112.B "\-L, \-\-list\-supported"
113List the ROM chips, chipsets, and mainboards supported by flashrom.
114The list of mainboards consists of those boards which need a special
115ROM write-enable function for flashrom to work.
116.sp
117There are many other boards which will work out of the box, without such
118special support in flashrom. Some of the known-good/known-bad and tested ones
119are listed at
120.BR http://coreboot.org/Flashrom#Supported_mainboards ,
121but the list is not exhaustive, of course.
Uwe Hermanne74b9f82009-04-10 14:41:29 +0000122.sp
123Please let us know if you can verify other boards to work or not work out
124of the box.
Uwe Hermanne5ac1642008-03-12 11:54:51 +0000125.TP
Carl-Daniel Hailfingerce986772009-05-09 00:27:07 +0000126.B "\-p, \-\-programmer <name>"
127Specify the programmer device. Currently supported are:
128.sp
129.BR " internal" " (default, for in-system flashing in the mainboard)"
Uwe Hermannb4dcb712009-05-13 11:36:06 +0000130.br
131.BR " nic3com" " (for flash ROMs on 3COM network cards)"
132.br
Carl-Daniel Hailfingerc3129202009-05-09 00:54:55 +0000133.BR " dummy" " (just prints all operations and accesses)"
Carl-Daniel Hailfingerce986772009-05-09 00:27:07 +0000134.TP
Stefan Reinauer261144c2006-07-27 23:29:02 +0000135.B "\-h, \-\-help"
136Show a help text and exit.
Bernhard Walle201bde32008-01-21 15:24:22 +0000137.TP
138.B "\-R, \-\-version"
139Show version information and exit.
Peter Stuge42688e52009-01-26 02:20:56 +0000140.SH EXIT STATUS
141flashrom exits with 0 on success, 1 on most failures but with 2 if /dev/mem
142(/dev/xsvc on Solaris) can not be opened and with 3 if a call to mmap() fails.
Stefan Reinauer261144c2006-07-27 23:29:02 +0000143.SH BUGS
Uwe Hermann42eb17f2008-01-18 17:48:51 +0000144Please report any bugs at
145.BR http://tracker.coreboot.org/trac/coreboot/newticket ","
146or on the coreboot mailing list
147.RB "(" http://coreboot.org/Mailinglist ")."
Stefan Reinauer261144c2006-07-27 23:29:02 +0000148.SH LICENCE
149.B flashrom
Carl-Daniel Hailfinger851ecf22009-01-08 04:56:59 +0000150is covered by the GNU General Public License (GPL), version 2. Some files are
151additionally available under the GPL (version 2, or any later version).
Stefan Reinauer261144c2006-07-27 23:29:02 +0000152.SH COPYRIGHT
Stefan Reinauer261144c2006-07-27 23:29:02 +0000153.br
Carl-Daniel Hailfinger851ecf22009-01-08 04:56:59 +0000154Please see the individual files.
Stefan Reinauer261144c2006-07-27 23:29:02 +0000155.SH AUTHORS
Carl-Daniel Hailfinger851ecf22009-01-08 04:56:59 +0000156Carl-Daniel Hailfinger
157.br
158Claus Gindhart <claus.gindhart@kontron.com>
159.br
160Dominik Geyer <dominik.geyer@kontron.com>
161.br
162Eric Biederman <ebiederman@lnxi.com>
163.br
164Giampiero Giancipoli <gianci@email.it>
165.br
166Joe Bao <Zheng.Bao@amd.com>
167.br
168Luc Verhaegen <libv@skynet.be>
169.br
Carl-Daniel Hailfinger451dc802009-05-01 11:00:39 +0000170Li-Ta Lo
171.br
Carl-Daniel Hailfinger851ecf22009-01-08 04:56:59 +0000172Markus Boas <ryven@ryven.de>
173.br
174Nikolay Petukhov <nikolay.petukhov@gmail.com>
175.br
176Peter Stuge <peter@stuge.se>
177.br
178Reinder E.N. de Haan <lb_reha@mveas.com>
179.br
180Ronald G. Minnich <rminnich@gmail.com>
181.br
182Ronald Hoogenboom <ronald@zonnet.nl>
Stefan Reinauer261144c2006-07-27 23:29:02 +0000183.br
184Stefan Reinauer <stepan@coresystems.de>
185.br
Carl-Daniel Hailfinger851ecf22009-01-08 04:56:59 +0000186Stefan Wildemann <stefan.wildemann@kontron.com>
187.br
188Steven James <pyro@linuxlabs.com>
189.br
190Uwe Hermann <uwe@hermann-uwe.de>
191.br
192Wang Qingpei <Qingpei.Wang@amd.com>
193.br
194Yinghai Lu <yinghai.lu@amd.com>
Stefan Reinauerf8337dd2006-08-03 10:49:09 +0000195.br
196some others
Stefan Reinauer261144c2006-07-27 23:29:02 +0000197.PP
Stefan Reinauerde063bf2006-09-21 13:09:22 +0000198This manual page was written by Uwe Hermann <uwe@hermann-uwe.de>.
Uwe Hermann42eb17f2008-01-18 17:48:51 +0000199It is licensed under the terms of the GNU GPL (version 2 or later).