Uwe Hermann | e8ba538 | 2009-05-22 11:37:27 +0000 | [diff] [blame] | 1 | .TH FLASHROM 8 "May 21, 2009" |
Stefan Reinauer | 261144c | 2006-07-27 23:29:02 +0000 | [diff] [blame] | 2 | .SH NAME |
Uwe Hermann | 530cb2d | 2009-05-14 22:58:21 +0000 | [diff] [blame] | 3 | flashrom \- detect, read, write, verify and erase flash chips |
Stefan Reinauer | 261144c | 2006-07-27 23:29:02 +0000 | [diff] [blame] | 4 | .SH SYNOPSIS |
Carl-Daniel Hailfinger | 01d6aba | 2009-06-12 14:02:07 +0000 | [diff] [blame] | 5 | .B flashrom \fR[\fB\-VfLhR\fR] [\fB\-E\fR|\fB\-r\fR file|\fB\-w\fR file|\fB\-v\fR file] |
Uwe Hermann | 530cb2d | 2009-05-14 22:58:21 +0000 | [diff] [blame] | 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 Reinauer | 261144c | 2006-07-27 23:29:02 +0000 | [diff] [blame] | 8 | .SH DESCRIPTION |
| 9 | .B flashrom |
Uwe Hermann | e8ba538 | 2009-05-22 11:37:27 +0000 | [diff] [blame] | 10 | is a utility for detecting, reading, writing, verifying and erasing flash |
Uwe Hermann | 530cb2d | 2009-05-14 22:58:21 +0000 | [diff] [blame] | 11 | chips. It's often used to flash BIOS/EFI/coreboot/firmware images in-system |
| 12 | using a supported mainboard, but it also supports flashing of network cards |
| 13 | (NICs), SATA controller cards, and other external devices which can program |
| 14 | flash chips. |
Uwe Hermann | e74b9f8 | 2009-04-10 14:41:29 +0000 | [diff] [blame] | 15 | .PP |
Uwe Hermann | d42009c | 2009-04-11 13:59:00 +0000 | [diff] [blame] | 16 | It supports a wide range of DIP32, PLCC32, DIP8, SO8/SOIC8, TSOP32, and |
| 17 | TSOP40 chips, which use various protocols such as LPC, FWH, parallel flash, |
| 18 | or SPI. |
Uwe Hermann | e74b9f8 | 2009-04-10 14:41:29 +0000 | [diff] [blame] | 19 | .PP |
Uwe Hermann | 42eb17f | 2008-01-18 17:48:51 +0000 | [diff] [blame] | 20 | (see |
| 21 | .B http://coreboot.org |
| 22 | for details on coreboot) |
Stefan Reinauer | 261144c | 2006-07-27 23:29:02 +0000 | [diff] [blame] | 23 | .SH OPTIONS |
Carl-Daniel Hailfinger | 5de9341 | 2009-05-01 10:53:49 +0000 | [diff] [blame] | 24 | Please note that the command line interface for flashrom will change before |
| 25 | flashrom 1.0. Do not use flashrom in scripts or other automated tools without |
Uwe Hermann | e8ba538 | 2009-05-22 11:37:27 +0000 | [diff] [blame] | 26 | checking that your flashrom version won't interpret options in a different way. |
Carl-Daniel Hailfinger | 5de9341 | 2009-05-01 10:53:49 +0000 | [diff] [blame] | 27 | .PP |
Carl-Daniel Hailfinger | 01d6aba | 2009-06-12 14:02:07 +0000 | [diff] [blame] | 28 | You can specify one of -E, -r, -w, -v or no operation. |
| 29 | If no operation is specified, then all that happens |
Stefan Reinauer | 261144c | 2006-07-27 23:29:02 +0000 | [diff] [blame] | 30 | is that flash info is dumped and the flash chip is set to writable. |
Stefan Reinauer | de063bf | 2006-09-21 13:09:22 +0000 | [diff] [blame] | 31 | .TP |
Uwe Hermann | e74b9f8 | 2009-04-10 14:41:29 +0000 | [diff] [blame] | 32 | .B "\-r, \-\-read <file>" |
| 33 | Read flash ROM contents and save them into the given |
| 34 | .BR <file> . |
Stefan Reinauer | de063bf | 2006-09-21 13:09:22 +0000 | [diff] [blame] | 35 | .TP |
Uwe Hermann | e74b9f8 | 2009-04-10 14:41:29 +0000 | [diff] [blame] | 36 | .B "\-w, \-\-write <file>" |
| 37 | Write file into flash ROM (default when |
| 38 | .B <file> |
| 39 | is specified). |
Stefan Reinauer | de063bf | 2006-09-21 13:09:22 +0000 | [diff] [blame] | 40 | .TP |
Uwe Hermann | e74b9f8 | 2009-04-10 14:41:29 +0000 | [diff] [blame] | 41 | .B "\-v, \-\-verify <file>" |
| 42 | Verify the flash ROM contents against the given |
| 43 | .BR <file> . |
Stefan Reinauer | de063bf | 2006-09-21 13:09:22 +0000 | [diff] [blame] | 44 | .TP |
Stefan Reinauer | 261144c | 2006-07-27 23:29:02 +0000 | [diff] [blame] | 45 | .B "\-E, \-\-erase" |
Uwe Hermann | e74b9f8 | 2009-04-10 14:41:29 +0000 | [diff] [blame] | 46 | Erase the flash ROM chip. |
Stefan Reinauer | de063bf | 2006-09-21 13:09:22 +0000 | [diff] [blame] | 47 | .TP |
Stefan Reinauer | 261144c | 2006-07-27 23:29:02 +0000 | [diff] [blame] | 48 | .B "\-V, \-\-verbose" |
| 49 | More verbose output. |
Stefan Reinauer | de063bf | 2006-09-21 13:09:22 +0000 | [diff] [blame] | 50 | .TP |
Stefan Reinauer | 261144c | 2006-07-27 23:29:02 +0000 | [diff] [blame] | 51 | .B "\-c, \-\-chip" <chipname> |
Uwe Hermann | 42eb17f | 2008-01-18 17:48:51 +0000 | [diff] [blame] | 52 | Probe only for specified flash ROM chip. |
Stefan Reinauer | de063bf | 2006-09-21 13:09:22 +0000 | [diff] [blame] | 53 | .TP |
Stefan Reinauer | 261144c | 2006-07-27 23:29:02 +0000 | [diff] [blame] | 54 | .B "\-s, \-\-estart" <addr> |
Uwe Hermann | 42eb17f | 2008-01-18 17:48:51 +0000 | [diff] [blame] | 55 | Exclude start position (obsolete). |
Uwe Hermann | 87c0793 | 2009-05-05 16:15:46 +0000 | [diff] [blame] | 56 | .sp |
| 57 | flashrom supports ROM layouts. This allows you to flash certain parts of |
| 58 | the 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 |
| 67 | All addresses are offsets within the file, not absolute addresses! |
| 68 | If 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 |
| 72 | To 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 |
| 78 | Currently overlapping sections are not supported. |
| 79 | .sp |
Uwe Hermann | e8ba538 | 2009-05-22 11:37:27 +0000 | [diff] [blame] | 80 | ROM layouts should replace the \-s and \-e option since they are more |
Uwe Hermann | 87c0793 | 2009-05-05 16:15:46 +0000 | [diff] [blame] | 81 | flexible and they should lead to a ROM update file format with the |
| 82 | ROM layout and the ROM image in one file (cpio, zip or something?). |
Stefan Reinauer | de063bf | 2006-09-21 13:09:22 +0000 | [diff] [blame] | 83 | .TP |
Stefan Reinauer | f8337dd | 2006-08-03 10:49:09 +0000 | [diff] [blame] | 84 | .B "\-e, \-\-eend" <addr> |
Uwe Hermann | 42eb17f | 2008-01-18 17:48:51 +0000 | [diff] [blame] | 85 | Exclude end postion (obsolete). |
Stefan Reinauer | de063bf | 2006-09-21 13:09:22 +0000 | [diff] [blame] | 86 | .TP |
Peter Stuge | 6b53fed | 2008-01-27 16:21:21 +0000 | [diff] [blame] | 87 | .B "\-m, \-\-mainboard" <[vendor:]part> |
Uwe Hermann | 87c0793 | 2009-05-05 16:15:46 +0000 | [diff] [blame] | 88 | Override mainboard settings. |
| 89 | .sp |
| 90 | flashrom reads the coreboot table to determine the current mainboard. If no |
| 91 | coreboot table could be read or if you want to override these values, you can |
Uwe Hermann | e8ba538 | 2009-05-22 11:37:27 +0000 | [diff] [blame] | 92 | specify \-m, e.g.: |
Uwe Hermann | 87c0793 | 2009-05-05 16:15:46 +0000 | [diff] [blame] | 93 | .sp |
| 94 | .B " flashrom -w --mainboard AGAMI:ARUMA agami_aruma.rom" |
| 95 | .sp |
Uwe Hermann | e8ba538 | 2009-05-22 11:37:27 +0000 | [diff] [blame] | 96 | See the 'Supported mainboards' section in the output of 'flashrom \-L' for |
Uwe Hermann | 87c0793 | 2009-05-05 16:15:46 +0000 | [diff] [blame] | 97 | a list of boards which require the specification of the board name, if no |
| 98 | coreboot table is found. |
Stefan Reinauer | de063bf | 2006-09-21 13:09:22 +0000 | [diff] [blame] | 99 | .TP |
Stefan Reinauer | 261144c | 2006-07-27 23:29:02 +0000 | [diff] [blame] | 100 | .B "\-f, \-\-force" |
Uwe Hermann | 67808fe | 2007-10-18 00:29:05 +0000 | [diff] [blame] | 101 | Force write without checking whether the ROM image file is really meant |
| 102 | to be used on this board. |
| 103 | .sp |
Stefan Reinauer | e3f3e2e | 2008-01-18 15:33:10 +0000 | [diff] [blame] | 104 | Note: This check only works while coreboot is running, and only for those |
| 105 | boards where the coreboot code supports it. |
Stefan Reinauer | de063bf | 2006-09-21 13:09:22 +0000 | [diff] [blame] | 106 | .TP |
Uwe Hermann | e74b9f8 | 2009-04-10 14:41:29 +0000 | [diff] [blame] | 107 | .B "\-l, \-\-layout <file>" |
| 108 | Read ROM layout from |
| 109 | .BR <file> . |
Stefan Reinauer | de063bf | 2006-09-21 13:09:22 +0000 | [diff] [blame] | 110 | .TP |
Uwe Hermann | e74b9f8 | 2009-04-10 14:41:29 +0000 | [diff] [blame] | 111 | .B "\-i, \-\-image <name>" |
Uwe Hermann | 67808fe | 2007-10-18 00:29:05 +0000 | [diff] [blame] | 112 | Only flash image |
| 113 | .B <name> |
| 114 | from flash layout. |
Stefan Reinauer | de063bf | 2006-09-21 13:09:22 +0000 | [diff] [blame] | 115 | .TP |
Uwe Hermann | e5ac164 | 2008-03-12 11:54:51 +0000 | [diff] [blame] | 116 | .B "\-L, \-\-list\-supported" |
Uwe Hermann | e8ba538 | 2009-05-22 11:37:27 +0000 | [diff] [blame] | 117 | List the flash chips, chipsets, mainboards, and PCI card "programmers" |
| 118 | supported by flashrom. |
Uwe Hermann | e5ac164 | 2008-03-12 11:54:51 +0000 | [diff] [blame] | 119 | .sp |
Uwe Hermann | e8ba538 | 2009-05-22 11:37:27 +0000 | [diff] [blame] | 120 | There are many unlisted boards which will work out of the box, without |
| 121 | special support in flashrom. Please let us know if you can verify that |
| 122 | other boards work or do not work out of the box. For verification you have |
| 123 | to test an ERASE and/or WRITE operation, so make sure you only do that |
| 124 | if you have proper means to recover from failure! |
Uwe Hermann | e5ac164 | 2008-03-12 11:54:51 +0000 | [diff] [blame] | 125 | .TP |
Carl-Daniel Hailfinger | ce98677 | 2009-05-09 00:27:07 +0000 | [diff] [blame] | 126 | .B "\-p, \-\-programmer <name>" |
| 127 | Specify the programmer device. Currently supported are: |
| 128 | .sp |
Uwe Hermann | 530cb2d | 2009-05-14 22:58:21 +0000 | [diff] [blame] | 129 | .BR "* internal" " (default, for in-system flashing in the mainboard)" |
| 130 | .sp |
Uwe Hermann | c7e8a0c | 2009-05-19 14:14:21 +0000 | [diff] [blame] | 131 | .BR "* dummy" " (just prints all operations and accesses)" |
| 132 | .sp |
Uwe Hermann | 530cb2d | 2009-05-14 22:58:21 +0000 | [diff] [blame] | 133 | .BR "* nic3com" " (for flash ROMs on 3COM network cards)" |
| 134 | .sp |
Uwe Hermann | c7e8a0c | 2009-05-19 14:14:21 +0000 | [diff] [blame] | 135 | .BR "* satasii" " (for flash ROMs on Silicon Image SATA/IDE controllers)" |
| 136 | .sp |
Uwe Hermann | e9d04d4 | 2009-06-02 19:54:22 +0000 | [diff] [blame] | 137 | .BR "* it87spi" " (for flash ROMs behind an ITE IT87xx Super I/O LPC/SPI translation unit)" |
Carl-Daniel Hailfinger | b8afecd | 2009-05-31 18:00:57 +0000 | [diff] [blame] | 138 | .sp |
Carl-Daniel Hailfinger | 3504b53 | 2009-06-01 00:02:11 +0000 | [diff] [blame] | 139 | The dummy programmer has an optional parameter specifying the bus types it |
| 140 | should support. For that you have to use the |
| 141 | .B "flashrom -p dummy=type" |
| 142 | syntax where |
| 143 | .B type |
| 144 | can be any comma-separated combination of |
| 145 | .B parallel lpc fwh spi all |
| 146 | in any order. |
| 147 | .sp |
| 148 | Example: |
| 149 | .B "flashrom -p dummy=lpc,fwh" |
| 150 | .sp |
Uwe Hermann | c7e8a0c | 2009-05-19 14:14:21 +0000 | [diff] [blame] | 151 | If you have multiple supported PCI cards which can program flash chips |
| 152 | (NICs, SATA/IDE controllers, etc.) in your system, you must use the |
| 153 | .B "flashrom -p xxxx=bb:dd.f" |
| 154 | syntax to explicitly select one of them, where |
| 155 | .B xxxx |
| 156 | is the name of the programmer |
Uwe Hermann | 530cb2d | 2009-05-14 22:58:21 +0000 | [diff] [blame] | 157 | .B bb |
| 158 | is the PCI bus number, |
| 159 | .B dd |
| 160 | is the PCI device number, and |
| 161 | .B f |
| 162 | is the PCI function number of the desired NIC. |
| 163 | .sp |
| 164 | Example: |
| 165 | .B "flashrom -p nic3com=05:04.0" |
| 166 | .sp |
Uwe Hermann | c7e8a0c | 2009-05-19 14:14:21 +0000 | [diff] [blame] | 167 | Currently the following programmers support this mechanism: |
| 168 | .BR nic3com , |
| 169 | .BR satasii . |
Carl-Daniel Hailfinger | ce98677 | 2009-05-09 00:27:07 +0000 | [diff] [blame] | 170 | .TP |
Stefan Reinauer | 261144c | 2006-07-27 23:29:02 +0000 | [diff] [blame] | 171 | .B "\-h, \-\-help" |
| 172 | Show a help text and exit. |
Bernhard Walle | 201bde3 | 2008-01-21 15:24:22 +0000 | [diff] [blame] | 173 | .TP |
| 174 | .B "\-R, \-\-version" |
| 175 | Show version information and exit. |
Peter Stuge | 42688e5 | 2009-01-26 02:20:56 +0000 | [diff] [blame] | 176 | .SH EXIT STATUS |
| 177 | flashrom exits with 0 on success, 1 on most failures but with 2 if /dev/mem |
| 178 | (/dev/xsvc on Solaris) can not be opened and with 3 if a call to mmap() fails. |
Stefan Reinauer | 261144c | 2006-07-27 23:29:02 +0000 | [diff] [blame] | 179 | .SH BUGS |
Uwe Hermann | 42eb17f | 2008-01-18 17:48:51 +0000 | [diff] [blame] | 180 | Please report any bugs at |
| 181 | .BR http://tracker.coreboot.org/trac/coreboot/newticket "," |
| 182 | or on the coreboot mailing list |
| 183 | .RB "(" http://coreboot.org/Mailinglist ")." |
Stefan Reinauer | 261144c | 2006-07-27 23:29:02 +0000 | [diff] [blame] | 184 | .SH LICENCE |
| 185 | .B flashrom |
Carl-Daniel Hailfinger | 851ecf2 | 2009-01-08 04:56:59 +0000 | [diff] [blame] | 186 | is covered by the GNU General Public License (GPL), version 2. Some files are |
| 187 | additionally available under the GPL (version 2, or any later version). |
Stefan Reinauer | 261144c | 2006-07-27 23:29:02 +0000 | [diff] [blame] | 188 | .SH COPYRIGHT |
Stefan Reinauer | 261144c | 2006-07-27 23:29:02 +0000 | [diff] [blame] | 189 | .br |
Carl-Daniel Hailfinger | 851ecf2 | 2009-01-08 04:56:59 +0000 | [diff] [blame] | 190 | Please see the individual files. |
Stefan Reinauer | 261144c | 2006-07-27 23:29:02 +0000 | [diff] [blame] | 191 | .SH AUTHORS |
Carl-Daniel Hailfinger | 851ecf2 | 2009-01-08 04:56:59 +0000 | [diff] [blame] | 192 | Carl-Daniel Hailfinger |
| 193 | .br |
| 194 | Claus Gindhart <claus.gindhart@kontron.com> |
| 195 | .br |
| 196 | Dominik Geyer <dominik.geyer@kontron.com> |
| 197 | .br |
| 198 | Eric Biederman <ebiederman@lnxi.com> |
| 199 | .br |
| 200 | Giampiero Giancipoli <gianci@email.it> |
| 201 | .br |
| 202 | Joe Bao <Zheng.Bao@amd.com> |
| 203 | .br |
| 204 | Luc Verhaegen <libv@skynet.be> |
| 205 | .br |
Carl-Daniel Hailfinger | 451dc80 | 2009-05-01 11:00:39 +0000 | [diff] [blame] | 206 | Li-Ta Lo |
| 207 | .br |
Carl-Daniel Hailfinger | 851ecf2 | 2009-01-08 04:56:59 +0000 | [diff] [blame] | 208 | Markus Boas <ryven@ryven.de> |
| 209 | .br |
| 210 | Nikolay Petukhov <nikolay.petukhov@gmail.com> |
| 211 | .br |
| 212 | Peter Stuge <peter@stuge.se> |
| 213 | .br |
| 214 | Reinder E.N. de Haan <lb_reha@mveas.com> |
| 215 | .br |
| 216 | Ronald G. Minnich <rminnich@gmail.com> |
| 217 | .br |
| 218 | Ronald Hoogenboom <ronald@zonnet.nl> |
Stefan Reinauer | 261144c | 2006-07-27 23:29:02 +0000 | [diff] [blame] | 219 | .br |
| 220 | Stefan Reinauer <stepan@coresystems.de> |
| 221 | .br |
Carl-Daniel Hailfinger | 851ecf2 | 2009-01-08 04:56:59 +0000 | [diff] [blame] | 222 | Stefan Wildemann <stefan.wildemann@kontron.com> |
| 223 | .br |
| 224 | Steven James <pyro@linuxlabs.com> |
| 225 | .br |
| 226 | Uwe Hermann <uwe@hermann-uwe.de> |
| 227 | .br |
| 228 | Wang Qingpei <Qingpei.Wang@amd.com> |
| 229 | .br |
| 230 | Yinghai Lu <yinghai.lu@amd.com> |
Stefan Reinauer | f8337dd | 2006-08-03 10:49:09 +0000 | [diff] [blame] | 231 | .br |
| 232 | some others |
Stefan Reinauer | 261144c | 2006-07-27 23:29:02 +0000 | [diff] [blame] | 233 | .PP |
Stefan Reinauer | de063bf | 2006-09-21 13:09:22 +0000 | [diff] [blame] | 234 | This manual page was written by Uwe Hermann <uwe@hermann-uwe.de>. |
Uwe Hermann | 42eb17f | 2008-01-18 17:48:51 +0000 | [diff] [blame] | 235 | It is licensed under the terms of the GNU GPL (version 2 or later). |