Uwe Hermann | d42009c | 2009-04-11 13:59:00 +0000 | [diff] [blame] | 1 | .TH FLASHROM 8 "April 11, 2009" |
Stefan Reinauer | 261144c | 2006-07-27 23:29:02 +0000 | [diff] [blame] | 2 | .SH NAME |
Peter Stuge | 261cafa | 2009-05-01 14:52:50 +0000 | [diff] [blame] | 3 | flashrom \- read, write, verify and erase BIOS/ROM/flash chips |
Stefan Reinauer | 261144c | 2006-07-27 23:29:02 +0000 | [diff] [blame] | 4 | .SH SYNOPSIS |
Uwe Hermann | e5ac164 | 2008-03-12 11:54:51 +0000 | [diff] [blame] | 5 | .B flashrom \fR[\fB\-rwvEVfLhR\fR] [\fB\-c\fR chipname] [\fB\-s\fR exclude_start] [\fB\-e\fR exclude_end] |
Peter Stuge | 92ef62c | 2009-05-01 14:49:49 +0000 | [diff] [blame] | 6 | [\fB-m\fR [vendor:]part] [\fB-l\fR file.layout] [\fB-i\fR image_name] [file] |
Stefan Reinauer | 261144c | 2006-07-27 23:29:02 +0000 | [diff] [blame] | 7 | .SH DESCRIPTION |
| 8 | .B flashrom |
Peter Stuge | 261cafa | 2009-05-01 14:52:50 +0000 | [diff] [blame] | 9 | is a utility for reading, writing, verifying and erasing flash ROM chips. |
Uwe Hermann | e74b9f8 | 2009-04-10 14:41:29 +0000 | [diff] [blame] | 10 | It's often used to flash BIOS/coreboot/firmware images. |
| 11 | .PP |
Uwe Hermann | d42009c | 2009-04-11 13:59:00 +0000 | [diff] [blame] | 12 | It supports a wide range of DIP32, PLCC32, DIP8, SO8/SOIC8, TSOP32, and |
| 13 | TSOP40 chips, which use various protocols such as LPC, FWH, parallel flash, |
| 14 | or SPI. |
Uwe Hermann | e74b9f8 | 2009-04-10 14:41:29 +0000 | [diff] [blame] | 15 | .PP |
Uwe Hermann | 42eb17f | 2008-01-18 17:48:51 +0000 | [diff] [blame] | 16 | (see |
| 17 | .B http://coreboot.org |
| 18 | for details on coreboot) |
Stefan Reinauer | 261144c | 2006-07-27 23:29:02 +0000 | [diff] [blame] | 19 | .SH OPTIONS |
Carl-Daniel Hailfinger | 5de9341 | 2009-05-01 10:53:49 +0000 | [diff] [blame] | 20 | Please note that the command line interface for flashrom will change before |
| 21 | flashrom 1.0. Do not use flashrom in scripts or other automated tools without |
| 22 | checking that your flashrom version won't interpret them in a totally different |
| 23 | way. |
| 24 | .PP |
Stefan Reinauer | 261144c | 2006-07-27 23:29:02 +0000 | [diff] [blame] | 25 | If no file is specified, then all that happens |
| 26 | 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] | 27 | .TP |
Uwe Hermann | e74b9f8 | 2009-04-10 14:41:29 +0000 | [diff] [blame] | 28 | .B "\-r, \-\-read <file>" |
| 29 | Read flash ROM contents and save them into the given |
| 30 | .BR <file> . |
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 "\-w, \-\-write <file>" |
| 33 | Write file into flash ROM (default when |
| 34 | .B <file> |
| 35 | is specified). |
Stefan Reinauer | de063bf | 2006-09-21 13:09:22 +0000 | [diff] [blame] | 36 | .TP |
Uwe Hermann | e74b9f8 | 2009-04-10 14:41:29 +0000 | [diff] [blame] | 37 | .B "\-v, \-\-verify <file>" |
| 38 | Verify the flash ROM contents against the given |
| 39 | .BR <file> . |
Stefan Reinauer | de063bf | 2006-09-21 13:09:22 +0000 | [diff] [blame] | 40 | .TP |
Stefan Reinauer | 261144c | 2006-07-27 23:29:02 +0000 | [diff] [blame] | 41 | .B "\-E, \-\-erase" |
Uwe Hermann | e74b9f8 | 2009-04-10 14:41:29 +0000 | [diff] [blame] | 42 | Erase the flash ROM chip. |
Stefan Reinauer | de063bf | 2006-09-21 13:09:22 +0000 | [diff] [blame] | 43 | .TP |
Stefan Reinauer | 261144c | 2006-07-27 23:29:02 +0000 | [diff] [blame] | 44 | .B "\-V, \-\-verbose" |
| 45 | More verbose output. |
Stefan Reinauer | de063bf | 2006-09-21 13:09:22 +0000 | [diff] [blame] | 46 | .TP |
Stefan Reinauer | 261144c | 2006-07-27 23:29:02 +0000 | [diff] [blame] | 47 | .B "\-c, \-\-chip" <chipname> |
Uwe Hermann | 42eb17f | 2008-01-18 17:48:51 +0000 | [diff] [blame] | 48 | Probe only for specified flash ROM chip. |
Stefan Reinauer | de063bf | 2006-09-21 13:09:22 +0000 | [diff] [blame] | 49 | .TP |
Stefan Reinauer | 261144c | 2006-07-27 23:29:02 +0000 | [diff] [blame] | 50 | .B "\-s, \-\-estart" <addr> |
Uwe Hermann | 42eb17f | 2008-01-18 17:48:51 +0000 | [diff] [blame] | 51 | Exclude start position (obsolete). |
Uwe Hermann | 87c0793 | 2009-05-05 16:15:46 +0000 | [diff] [blame] | 52 | .sp |
| 53 | flashrom supports ROM layouts. This allows you to flash certain parts of |
| 54 | the 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 |
| 63 | All addresses are offsets within the file, not absolute addresses! |
| 64 | If 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 |
| 68 | To 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 |
| 74 | Currently overlapping sections are not supported. |
| 75 | .sp |
| 76 | ROM layouts should replace the -s and -e option since they are more |
| 77 | flexible and they should lead to a ROM update file format with the |
| 78 | 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] | 79 | .TP |
Stefan Reinauer | f8337dd | 2006-08-03 10:49:09 +0000 | [diff] [blame] | 80 | .B "\-e, \-\-eend" <addr> |
Uwe Hermann | 42eb17f | 2008-01-18 17:48:51 +0000 | [diff] [blame] | 81 | Exclude end postion (obsolete). |
Stefan Reinauer | de063bf | 2006-09-21 13:09:22 +0000 | [diff] [blame] | 82 | .TP |
Peter Stuge | 6b53fed | 2008-01-27 16:21:21 +0000 | [diff] [blame] | 83 | .B "\-m, \-\-mainboard" <[vendor:]part> |
Uwe Hermann | 87c0793 | 2009-05-05 16:15:46 +0000 | [diff] [blame] | 84 | Override mainboard settings. |
| 85 | .sp |
| 86 | flashrom reads the coreboot table to determine the current mainboard. If no |
| 87 | coreboot table could be read or if you want to override these values, you can |
| 88 | specify -m, e.g.: |
| 89 | .sp |
| 90 | .B " flashrom -w --mainboard AGAMI:ARUMA agami_aruma.rom" |
| 91 | .sp |
| 92 | See the 'Supported mainboards' section in the output of 'flashrom -L' for |
| 93 | a list of boards which require the specification of the board name, if no |
| 94 | coreboot table is found. |
Stefan Reinauer | de063bf | 2006-09-21 13:09:22 +0000 | [diff] [blame] | 95 | .TP |
Stefan Reinauer | 261144c | 2006-07-27 23:29:02 +0000 | [diff] [blame] | 96 | .B "\-f, \-\-force" |
Uwe Hermann | 67808fe | 2007-10-18 00:29:05 +0000 | [diff] [blame] | 97 | Force write without checking whether the ROM image file is really meant |
| 98 | to be used on this board. |
| 99 | .sp |
Stefan Reinauer | e3f3e2e | 2008-01-18 15:33:10 +0000 | [diff] [blame] | 100 | Note: This check only works while coreboot is running, and only for those |
| 101 | boards where the coreboot code supports it. |
Stefan Reinauer | de063bf | 2006-09-21 13:09:22 +0000 | [diff] [blame] | 102 | .TP |
Uwe Hermann | e74b9f8 | 2009-04-10 14:41:29 +0000 | [diff] [blame] | 103 | .B "\-l, \-\-layout <file>" |
| 104 | Read ROM layout from |
| 105 | .BR <file> . |
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 "\-i, \-\-image <name>" |
Uwe Hermann | 67808fe | 2007-10-18 00:29:05 +0000 | [diff] [blame] | 108 | Only flash image |
| 109 | .B <name> |
| 110 | from flash layout. |
Stefan Reinauer | de063bf | 2006-09-21 13:09:22 +0000 | [diff] [blame] | 111 | .TP |
Uwe Hermann | e5ac164 | 2008-03-12 11:54:51 +0000 | [diff] [blame] | 112 | .B "\-L, \-\-list\-supported" |
| 113 | List the ROM chips, chipsets, and mainboards supported by flashrom. |
| 114 | The list of mainboards consists of those boards which need a special |
| 115 | ROM write-enable function for flashrom to work. |
| 116 | .sp |
| 117 | There are many other boards which will work out of the box, without such |
| 118 | special support in flashrom. Some of the known-good/known-bad and tested ones |
| 119 | are listed at |
| 120 | .BR http://coreboot.org/Flashrom#Supported_mainboards , |
| 121 | but the list is not exhaustive, of course. |
Uwe Hermann | e74b9f8 | 2009-04-10 14:41:29 +0000 | [diff] [blame] | 122 | .sp |
| 123 | Please let us know if you can verify other boards to work or not work out |
| 124 | of the box. |
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 |
| 129 | .BR " internal" " (default, for in-system flashing in the mainboard)" |
Carl-Daniel Hailfinger | c312920 | 2009-05-09 00:54:55 +0000 | [diff] [blame^] | 130 | |
| 131 | .BR " dummy" " (just prints all operations and accesses)" |
Carl-Daniel Hailfinger | ce98677 | 2009-05-09 00:27:07 +0000 | [diff] [blame] | 132 | .TP |
Stefan Reinauer | 261144c | 2006-07-27 23:29:02 +0000 | [diff] [blame] | 133 | .B "\-h, \-\-help" |
| 134 | Show a help text and exit. |
Bernhard Walle | 201bde3 | 2008-01-21 15:24:22 +0000 | [diff] [blame] | 135 | .TP |
| 136 | .B "\-R, \-\-version" |
| 137 | Show version information and exit. |
Peter Stuge | 42688e5 | 2009-01-26 02:20:56 +0000 | [diff] [blame] | 138 | .SH EXIT STATUS |
| 139 | flashrom exits with 0 on success, 1 on most failures but with 2 if /dev/mem |
| 140 | (/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] | 141 | .SH BUGS |
Uwe Hermann | 42eb17f | 2008-01-18 17:48:51 +0000 | [diff] [blame] | 142 | Please report any bugs at |
| 143 | .BR http://tracker.coreboot.org/trac/coreboot/newticket "," |
| 144 | or on the coreboot mailing list |
| 145 | .RB "(" http://coreboot.org/Mailinglist ")." |
Stefan Reinauer | 261144c | 2006-07-27 23:29:02 +0000 | [diff] [blame] | 146 | .SH LICENCE |
| 147 | .B flashrom |
Carl-Daniel Hailfinger | 851ecf2 | 2009-01-08 04:56:59 +0000 | [diff] [blame] | 148 | is covered by the GNU General Public License (GPL), version 2. Some files are |
| 149 | additionally available under the GPL (version 2, or any later version). |
Stefan Reinauer | 261144c | 2006-07-27 23:29:02 +0000 | [diff] [blame] | 150 | .SH COPYRIGHT |
Stefan Reinauer | 261144c | 2006-07-27 23:29:02 +0000 | [diff] [blame] | 151 | .br |
Carl-Daniel Hailfinger | 851ecf2 | 2009-01-08 04:56:59 +0000 | [diff] [blame] | 152 | Please see the individual files. |
Stefan Reinauer | 261144c | 2006-07-27 23:29:02 +0000 | [diff] [blame] | 153 | .SH AUTHORS |
Carl-Daniel Hailfinger | 851ecf2 | 2009-01-08 04:56:59 +0000 | [diff] [blame] | 154 | Carl-Daniel Hailfinger |
| 155 | .br |
| 156 | Claus Gindhart <claus.gindhart@kontron.com> |
| 157 | .br |
| 158 | Dominik Geyer <dominik.geyer@kontron.com> |
| 159 | .br |
| 160 | Eric Biederman <ebiederman@lnxi.com> |
| 161 | .br |
| 162 | Giampiero Giancipoli <gianci@email.it> |
| 163 | .br |
| 164 | Joe Bao <Zheng.Bao@amd.com> |
| 165 | .br |
| 166 | Luc Verhaegen <libv@skynet.be> |
| 167 | .br |
Carl-Daniel Hailfinger | 451dc80 | 2009-05-01 11:00:39 +0000 | [diff] [blame] | 168 | Li-Ta Lo |
| 169 | .br |
Carl-Daniel Hailfinger | 851ecf2 | 2009-01-08 04:56:59 +0000 | [diff] [blame] | 170 | Markus Boas <ryven@ryven.de> |
| 171 | .br |
| 172 | Nikolay Petukhov <nikolay.petukhov@gmail.com> |
| 173 | .br |
| 174 | Peter Stuge <peter@stuge.se> |
| 175 | .br |
| 176 | Reinder E.N. de Haan <lb_reha@mveas.com> |
| 177 | .br |
| 178 | Ronald G. Minnich <rminnich@gmail.com> |
| 179 | .br |
| 180 | Ronald Hoogenboom <ronald@zonnet.nl> |
Stefan Reinauer | 261144c | 2006-07-27 23:29:02 +0000 | [diff] [blame] | 181 | .br |
| 182 | Stefan Reinauer <stepan@coresystems.de> |
| 183 | .br |
Carl-Daniel Hailfinger | 851ecf2 | 2009-01-08 04:56:59 +0000 | [diff] [blame] | 184 | Stefan Wildemann <stefan.wildemann@kontron.com> |
| 185 | .br |
| 186 | Steven James <pyro@linuxlabs.com> |
| 187 | .br |
| 188 | Uwe Hermann <uwe@hermann-uwe.de> |
| 189 | .br |
| 190 | Wang Qingpei <Qingpei.Wang@amd.com> |
| 191 | .br |
| 192 | Yinghai Lu <yinghai.lu@amd.com> |
Stefan Reinauer | f8337dd | 2006-08-03 10:49:09 +0000 | [diff] [blame] | 193 | .br |
| 194 | some others |
Stefan Reinauer | 261144c | 2006-07-27 23:29:02 +0000 | [diff] [blame] | 195 | .PP |
Stefan Reinauer | de063bf | 2006-09-21 13:09:22 +0000 | [diff] [blame] | 196 | This manual page was written by Uwe Hermann <uwe@hermann-uwe.de>. |
Uwe Hermann | 42eb17f | 2008-01-18 17:48:51 +0000 | [diff] [blame] | 197 | It is licensed under the terms of the GNU GPL (version 2 or later). |