| 1 | .TH FLASHROM 8 "Jul 25, 2011" |
|---|
| 2 | .SH NAME |
|---|
| 3 | flashrom \- detect, read, write, verify and erase flash chips |
|---|
| 4 | .SH SYNOPSIS |
|---|
| 5 | .B flashrom \fR[\fB\-n\fR] [\fB\-V\fR] [\fB\-f\fR] [\fB\-h\fR|\fB\-R\fR|\ |
|---|
| 6 | \fB\-L\fR|\fB\-z\fR|\fB\-E\fR|\fB\-r\fR <file>|\fB\-w\fR <file>|\ |
|---|
| 7 | \fB\-v\fR <file>] |
|---|
| 8 | [\fB\-c\fR <chipname>] \ |
|---|
| 9 | [\fB\-l\fR <file>] |
|---|
| 10 | [\fB\-i\fR <image>] [\fB\-p\fR <programmername>[:<parameters>]] |
|---|
| 11 | .SH DESCRIPTION |
|---|
| 12 | .B flashrom |
|---|
| 13 | is a utility for detecting, reading, writing, verifying and erasing flash |
|---|
| 14 | chips. It's often used to flash BIOS/EFI/coreboot/firmware images in-system |
|---|
| 15 | using a supported mainboard. However, it also supports various external |
|---|
| 16 | PCI/USB/parallel-port/serial-port based devices which can program flash chips, |
|---|
| 17 | including some network cards (NICs), SATA/IDE controller cards, graphics cards, |
|---|
| 18 | the Bus Pirate device, various FTDI FT2232/FT4232H based USB devices, and more. |
|---|
| 19 | .PP |
|---|
| 20 | It supports a wide range of DIP32, PLCC32, DIP8, SO8/SOIC8, TSOP32, TSOP40, |
|---|
| 21 | TSOP48, and BGA chips, which use various protocols such as LPC, FWH, |
|---|
| 22 | parallel flash, or SPI. |
|---|
| 23 | .SH OPTIONS |
|---|
| 24 | .B IMPORTANT: |
|---|
| 25 | Please note that the command line interface for flashrom will change before |
|---|
| 26 | flashrom 1.0. Do not use flashrom in scripts or other automated tools without |
|---|
| 27 | checking that your flashrom version won't interpret options in a different way. |
|---|
| 28 | .PP |
|---|
| 29 | You can specify one of |
|---|
| 30 | .BR \-h ", " \-R ", " \-L ", " \-z ", " \-E ", " \-r ", " \-w ", " \-v |
|---|
| 31 | or no operation. |
|---|
| 32 | If no operation is specified, flashrom will only probe for flash chips. It is |
|---|
| 33 | recommended that if you try flashrom the first time on a system, you run it |
|---|
| 34 | in probe-only mode and check the output. Also you are advised to make a |
|---|
| 35 | backup of your current ROM contents with |
|---|
| 36 | .B \-r |
|---|
| 37 | before you try to write a new image. |
|---|
| 38 | .TP |
|---|
| 39 | .B "\-r, \-\-read <file>" |
|---|
| 40 | Read flash ROM contents and save them into the given |
|---|
| 41 | .BR <file> . |
|---|
| 42 | If the file already exists, it will be overwritten. |
|---|
| 43 | .TP |
|---|
| 44 | .B "\-w, \-\-write <file>" |
|---|
| 45 | Write |
|---|
| 46 | .B <file> |
|---|
| 47 | into flash ROM. This will first automatically |
|---|
| 48 | .B erase |
|---|
| 49 | the chip, then write to it. |
|---|
| 50 | .sp |
|---|
| 51 | In the process the chip is also read several times. First an in-memory backup |
|---|
| 52 | is made for disaster recovery and to be able to skip regions that are |
|---|
| 53 | already equal to the image file. This copy is updated along with the write |
|---|
| 54 | operation. In case of erase errors it is even re-read completely. After |
|---|
| 55 | writing has finished and if verification is enabled, the whole flash chip is |
|---|
| 56 | read out and compared with the input image. |
|---|
| 57 | .TP |
|---|
| 58 | .B "\-n, \-\-noverify" |
|---|
| 59 | Skip the automatic verification of flash ROM contents after writing. Using this |
|---|
| 60 | option is |
|---|
| 61 | .B not |
|---|
| 62 | recommended, you should only use it if you know what you are doing and if you |
|---|
| 63 | feel that the time for verification takes too long. |
|---|
| 64 | .sp |
|---|
| 65 | Typical usage is: |
|---|
| 66 | .B "flashrom \-n \-w <file>" |
|---|
| 67 | .sp |
|---|
| 68 | This option is only useful in combination with |
|---|
| 69 | .BR \-\-write . |
|---|
| 70 | .TP |
|---|
| 71 | .B "\-v, \-\-verify <file>" |
|---|
| 72 | Verify the flash ROM contents against the given |
|---|
| 73 | .BR <file> . |
|---|
| 74 | .TP |
|---|
| 75 | .B "\-E, \-\-erase" |
|---|
| 76 | Erase the flash ROM chip. |
|---|
| 77 | .TP |
|---|
| 78 | .B "\-V, \-\-verbose" |
|---|
| 79 | More verbose output. This option can be supplied multiple times |
|---|
| 80 | (max. 3 times, i.e. |
|---|
| 81 | .BR \-VVV ) |
|---|
| 82 | for even more debug output. |
|---|
| 83 | .TP |
|---|
| 84 | .B "\-c, \-\-chip" <chipname> |
|---|
| 85 | Probe only for the specified flash ROM chip. This option takes the chip name as |
|---|
| 86 | printed by |
|---|
| 87 | .B "flashrom \-L" |
|---|
| 88 | without the vendor name as parameter. Please note that the chip name is |
|---|
| 89 | case sensitive. |
|---|
| 90 | .TP |
|---|
| 91 | .B "\-f, \-\-force" |
|---|
| 92 | Force one or more of the following actions: |
|---|
| 93 | .sp |
|---|
| 94 | * Force chip read and pretend the chip is there. |
|---|
| 95 | .sp |
|---|
| 96 | * Force chip access even if the chip is bigger than the maximum supported \ |
|---|
| 97 | size for the flash bus. |
|---|
| 98 | .sp |
|---|
| 99 | * Force erase even if erase is known bad. |
|---|
| 100 | .sp |
|---|
| 101 | * Force write even if write is known bad. |
|---|
| 102 | .TP |
|---|
| 103 | .B "\-l, \-\-layout <file>" |
|---|
| 104 | Read ROM layout from |
|---|
| 105 | .BR <file> . |
|---|
| 106 | .sp |
|---|
| 107 | flashrom supports ROM layouts. This allows you to flash certain parts of |
|---|
| 108 | the flash chip only. A ROM layout file looks like follows: |
|---|
| 109 | .sp |
|---|
| 110 | 00000000:00008fff gfxrom |
|---|
| 111 | 00009000:0003ffff normal |
|---|
| 112 | 00040000:0007ffff fallback |
|---|
| 113 | .sp |
|---|
| 114 | i.e.: |
|---|
| 115 | startaddr:endaddr name |
|---|
| 116 | .sp |
|---|
| 117 | All addresses are offsets within the file, not absolute addresses! |
|---|
| 118 | If you only want to update the normal image in a ROM you can say: |
|---|
| 119 | .sp |
|---|
| 120 | .B " flashrom \-\-layout rom.layout \-\-image normal \-w agami_aruma.rom" |
|---|
| 121 | .sp |
|---|
| 122 | To update normal and fallback but leave the VGA BIOS alone, say: |
|---|
| 123 | .sp |
|---|
| 124 | .B " flashrom \-l rom.layout \-i normal \" |
|---|
| 125 | .br |
|---|
| 126 | .B " \-i fallback \-w agami_aruma.rom" |
|---|
| 127 | .sp |
|---|
| 128 | Currently overlapping sections are not supported. |
|---|
| 129 | .TP |
|---|
| 130 | .B "\-i, \-\-image <name>" |
|---|
| 131 | Only flash image |
|---|
| 132 | .B <name> |
|---|
| 133 | from flash layout. |
|---|
| 134 | .TP |
|---|
| 135 | .B "\-L, \-\-list\-supported" |
|---|
| 136 | List the flash chips, chipsets, mainboards, and external programmers |
|---|
| 137 | (including PCI, USB, parallel port, and serial port based devices) |
|---|
| 138 | supported by flashrom. |
|---|
| 139 | .sp |
|---|
| 140 | There are many unlisted boards which will work out of the box, without |
|---|
| 141 | special support in flashrom. Please let us know if you can verify that |
|---|
| 142 | other boards work or do not work out of the box. |
|---|
| 143 | .sp |
|---|
| 144 | .B IMPORTANT: |
|---|
| 145 | For verification you have |
|---|
| 146 | to test an ERASE and/or WRITE operation, so make sure you only do that |
|---|
| 147 | if you have proper means to recover from failure! |
|---|
| 148 | .TP |
|---|
| 149 | .B "\-z, \-\-list\-supported-wiki" |
|---|
| 150 | Same as |
|---|
| 151 | .BR \-\-list\-supported , |
|---|
| 152 | but outputs the supported hardware in MediaWiki syntax, so that it can be |
|---|
| 153 | easily pasted into the wiki page at |
|---|
| 154 | .BR http://www.flashrom.org/ . |
|---|
| 155 | Please note that MediaWiki output is not compiled in by default. |
|---|
| 156 | .TP |
|---|
| 157 | .B "\-p, \-\-programmer <name>[:parameter[,parameter[,parameter]]]" |
|---|
| 158 | Specify the programmer device. Currently supported are: |
|---|
| 159 | .sp |
|---|
| 160 | .BR "* internal" " (default, for in-system flashing in the mainboard)" |
|---|
| 161 | .sp |
|---|
| 162 | .BR "* dummy" " (virtual programmer for testing flashrom)" |
|---|
| 163 | .sp |
|---|
| 164 | .BR "* nic3com" " (for flash ROMs on 3COM network cards)" |
|---|
| 165 | .sp |
|---|
| 166 | .BR "* nicrealtek" " (for flash ROMs on Realtek network cards)" |
|---|
| 167 | .sp |
|---|
| 168 | .BR "* nicsmc1211" " (for flash ROMs on RTL8139-compatible SMC2 network cards)" |
|---|
| 169 | .sp |
|---|
| 170 | .BR "* nicnatsemi" " (for flash ROMs on National Semiconductor DP838* network \ |
|---|
| 171 | cards)" |
|---|
| 172 | .sp |
|---|
| 173 | .BR "* nicintel" " (for parallel flash ROMs on Intel 10/100Mbit network cards) |
|---|
| 174 | .sp |
|---|
| 175 | .BR "* gfxnvidia" " (for flash ROMs on NVIDIA graphics cards)" |
|---|
| 176 | .sp |
|---|
| 177 | .BR "* drkaiser" " (for flash ROMs on Dr. Kaiser PC-Waechter PCI cards)" |
|---|
| 178 | .sp |
|---|
| 179 | .BR "* satasii" " (for flash ROMs on Silicon Image SATA/IDE controllers)" |
|---|
| 180 | .sp |
|---|
| 181 | .BR "* satamv" " (for flash ROMs on Marvell SATA controllers)" |
|---|
| 182 | .sp |
|---|
| 183 | .BR "* atahpt" " (for flash ROMs on Highpoint ATA/RAID controllers)" |
|---|
| 184 | .sp |
|---|
| 185 | .BR "* ft2232_spi" " (for SPI flash ROMs attached to an FT2232/FT4232H family \ |
|---|
| 186 | based USB SPI programmer), including the DLP Design DLP-USB1232H, \ |
|---|
| 187 | FTDI FT2232H Mini-Module, FTDI FT4232H Mini-Module, openbiosprog-spi, Amontec \ |
|---|
| 188 | JTAGkey/JTAGkey-tiny/JTAGkey-2, Dangerous Prototypes Bus Blaster, \ |
|---|
| 189 | Olimex ARM-USB-TINY/-H, Olimex ARM-USB-OCD/-H, TIAO/DIYGADGET USB |
|---|
| 190 | Multi-Protocol Adapter (TUMPA), and GOEPEL PicoTAP. |
|---|
| 191 | .sp |
|---|
| 192 | .BR "* serprog" " (for flash ROMs attached to a programmer speaking serprog), \ |
|---|
| 193 | including AVR flasher by Urja Rannikko, AVR flasher by eightdot, \ |
|---|
| 194 | Arduino Mega flasher by fritz, InSystemFlasher by Juhana Helovuo, and \ |
|---|
| 195 | atmegaXXu2-flasher by Stefan Tauner." |
|---|
| 196 | .sp |
|---|
| 197 | .BR "* buspirate_spi" " (for SPI flash ROMs attached to a Bus Pirate)" |
|---|
| 198 | .sp |
|---|
| 199 | .BR "* dediprog" " (for SPI flash ROMs attached to a Dediprog SF100)" |
|---|
| 200 | .sp |
|---|
| 201 | .BR "* rayer_spi" " (for SPI flash ROMs attached to a RayeR parport " |
|---|
| 202 | or Xilinx DLC5 compatible cable) |
|---|
| 203 | .sp |
|---|
| 204 | .BR "* nicintel_spi" " (for SPI flash ROMs on Intel Gigabit network cards)" |
|---|
| 205 | .sp |
|---|
| 206 | .BR "* ogp_spi" " (for SPI flash ROMs on Open Graphics Project graphics card)" |
|---|
| 207 | .sp |
|---|
| 208 | Some programmers have optional or mandatory parameters which are described |
|---|
| 209 | in detail in the |
|---|
| 210 | .B PROGRAMMER SPECIFIC INFO |
|---|
| 211 | section. Support for some programmers can be disabled at compile time. |
|---|
| 212 | .B "flashrom \-h" |
|---|
| 213 | lists all supported programmers. |
|---|
| 214 | .TP |
|---|
| 215 | .B "\-h, \-\-help" |
|---|
| 216 | Show a help text and exit. |
|---|
| 217 | .TP |
|---|
| 218 | .B "\-R, \-\-version" |
|---|
| 219 | Show version information and exit. |
|---|
| 220 | .SH PROGRAMMER SPECIFIC INFO |
|---|
| 221 | Some programmer drivers accept further parameters to set programmer-specific |
|---|
| 222 | parameters. These parameters are separated from the programmer name by a |
|---|
| 223 | colon. While some programmers take arguments at fixed positions, other |
|---|
| 224 | programmers use a key/value interface in which the key and value is separated |
|---|
| 225 | by an equal sign and different pairs are separated by a comma or a colon. |
|---|
| 226 | .TP |
|---|
| 227 | .BR "internal " programmer |
|---|
| 228 | Some mainboards require to run mainboard specific code to enable flash erase |
|---|
| 229 | and write support (and probe support on old systems with parallel flash). |
|---|
| 230 | The mainboard brand and model (if it requires specific code) is usually |
|---|
| 231 | autodetected using one of the following mechanisms: If your system is |
|---|
| 232 | running coreboot, the mainboard type is determined from the coreboot table. |
|---|
| 233 | Otherwise, the mainboard is detected by examining the onboard PCI devices |
|---|
| 234 | and possibly DMI info. If PCI and DMI do not contain information to uniquely |
|---|
| 235 | identify the mainboard (which is the exception), or if you want to override |
|---|
| 236 | the detected mainboard model, you can specify the mainboard using the |
|---|
| 237 | .sp |
|---|
| 238 | .B " flashrom \-p internal:mainboard=[<vendor>:]<board>" |
|---|
| 239 | syntax. |
|---|
| 240 | .sp |
|---|
| 241 | See the 'Known boards' or 'Known laptops' section in the output |
|---|
| 242 | of 'flashrom \-L' for a list of boards which require the specification of |
|---|
| 243 | the board name, if no coreboot table is found. |
|---|
| 244 | .sp |
|---|
| 245 | Some of these board-specific flash enabling functions (called |
|---|
| 246 | .BR "board enables" ) |
|---|
| 247 | in flashrom have not yet been tested. If your mainboard is detected needing |
|---|
| 248 | an untested board enable function, a warning message is printed and the |
|---|
| 249 | board enable is not executed, because a wrong board enable function might |
|---|
| 250 | cause the system to behave erratically, as board enable functions touch the |
|---|
| 251 | low-level internals of a mainboard. Not executing a board enable function |
|---|
| 252 | (if one is needed) might cause detection or erasing failure. If your board |
|---|
| 253 | protects only part of the flash (commonly the top end, called boot block), |
|---|
| 254 | flashrom might encounter an error only after erasing the unprotected part, |
|---|
| 255 | so running without the board-enable function might be dangerous for erase |
|---|
| 256 | and write (which includes erase). |
|---|
| 257 | .sp |
|---|
| 258 | The suggested procedure for a mainboard with untested board specific code is |
|---|
| 259 | to first try to probe the ROM (just invoke flashrom and check that it |
|---|
| 260 | detects your flash chip type) without running the board enable code (i.e. |
|---|
| 261 | without any parameters). If it finds your chip, fine. Otherwise, retry |
|---|
| 262 | probing your chip with the board-enable code running, using |
|---|
| 263 | .sp |
|---|
| 264 | .B " flashrom \-p internal:boardenable=force" |
|---|
| 265 | .sp |
|---|
| 266 | If your chip is still not detected, the board enable code seems to be broken |
|---|
| 267 | or the flash chip unsupported. Otherwise, make a backup of your current ROM |
|---|
| 268 | contents (using |
|---|
| 269 | .BR \-r ) |
|---|
| 270 | and store it to a medium outside of your computer, like |
|---|
| 271 | a USB drive or a network share. If you needed to run the board enable code |
|---|
| 272 | already for probing, use it for reading too. Now you can try to write the |
|---|
| 273 | new image. You should enable the board enable code in any case now, as it |
|---|
| 274 | has been written because it is known that writing/erasing without the board |
|---|
| 275 | enable is going to fail. In any case (success or failure), please report to |
|---|
| 276 | the flashrom mailing list, see below. |
|---|
| 277 | .sp |
|---|
| 278 | On systems running coreboot, flashrom checks whether the desired image matches |
|---|
| 279 | your mainboard. This needs some special board ID to be present in the image. |
|---|
| 280 | If flashrom detects that the image you want to write and the current board |
|---|
| 281 | do not match, it will refuse to write the image unless you specify |
|---|
| 282 | .sp |
|---|
| 283 | .B " flashrom \-p internal:boardmismatch=force" |
|---|
| 284 | .sp |
|---|
| 285 | If your mainboard uses an ITE IT87 series Super I/O for LPC<->SPI flash bus |
|---|
| 286 | translation, flashrom should autodetect that configuration. If you want to |
|---|
| 287 | set the I/O base port of the IT87 series SPI controller manually instead of |
|---|
| 288 | using the value provided by the BIOS, use the |
|---|
| 289 | .sp |
|---|
| 290 | .B " flashrom \-p internal:it87spiport=portnum" |
|---|
| 291 | .sp |
|---|
| 292 | syntax where |
|---|
| 293 | .B portnum |
|---|
| 294 | is the I/O port number (must be a multiple of 8). In the unlikely case |
|---|
| 295 | flashrom doesn't detect an active IT87 LPC<->SPI bridge, please send a bug |
|---|
| 296 | report so we can diagnose the problem. |
|---|
| 297 | .sp |
|---|
| 298 | If you have an Intel chipset with an ICH8 or later southbridge with SPI flash |
|---|
| 299 | attached, and if a valid descriptor was written to it (e.g. by the vendor), the |
|---|
| 300 | chipset provides an alternative way to access the flash chip(s) named |
|---|
| 301 | .BR "Hardware Sequencing" . |
|---|
| 302 | It is much simpler than the normal access method (called |
|---|
| 303 | .BR "Software Sequencing" ")," |
|---|
| 304 | but does not allow the software to choose the SPI commands to be sent. |
|---|
| 305 | You can use the |
|---|
| 306 | .sp |
|---|
| 307 | .B " flashrom \-p internal:ich_spi_mode=value" |
|---|
| 308 | .sp |
|---|
| 309 | syntax where value can be |
|---|
| 310 | .BR auto ", " swseq " or " hwseq . |
|---|
| 311 | By default |
|---|
| 312 | .RB "(or when setting " ich_spi_mode=auto ) |
|---|
| 313 | the module tries to use swseq and only activates hwseq if need be (e.g. if |
|---|
| 314 | important opcodes are inaccessible due to lockdown; or if more than one flash |
|---|
| 315 | chip is attached). The other options (swseq, hwseq) select the respective mode |
|---|
| 316 | (if possible). |
|---|
| 317 | .sp |
|---|
| 318 | If you have an Intel chipset with an ICH6 or later southbridge and if you want |
|---|
| 319 | to set specific IDSEL values for a non-default flash chip or an embedded |
|---|
| 320 | controller (EC), you can use the |
|---|
| 321 | .sp |
|---|
| 322 | .B " flashrom \-p internal:fwh_idsel=value" |
|---|
| 323 | .sp |
|---|
| 324 | syntax where value is the 48-bit hexadecimal raw value to be written in the |
|---|
| 325 | IDSEL registers of the Intel southbridge. The upper 32 bits use one hex digit |
|---|
| 326 | each per 512 kB range between 0xffc00000 and 0xffffffff, and the lower 16 bits |
|---|
| 327 | use one hex digit each per 1024 kB range between 0xff400000 and 0xff7fffff. |
|---|
| 328 | The rightmost hex digit corresponds with the lowest address range. All address |
|---|
| 329 | ranges have a corresponding sister range 4 MB below with identical IDSEL |
|---|
| 330 | settings. The default value for ICH7 is given in the example below. |
|---|
| 331 | .sp |
|---|
| 332 | Example: |
|---|
| 333 | .B "flashrom \-p internal:fwh_idsel=0x001122334567" |
|---|
| 334 | .sp |
|---|
| 335 | Using flashrom on laptops is dangerous and may easily make your hardware |
|---|
| 336 | unusable (see also the |
|---|
| 337 | .B BUGS |
|---|
| 338 | section). The embedded controller (EC) in these |
|---|
| 339 | machines often interacts badly with flashing. |
|---|
| 340 | .B http://www.flashrom.org/Laptops |
|---|
| 341 | has more information. If flash is shared with the EC, erase is guaranteed to |
|---|
| 342 | brick your laptop and write is very likely to brick your laptop. |
|---|
| 343 | Chip read and probe may irritate your EC and cause fan failure, backlight |
|---|
| 344 | failure, sudden poweroff, and other nasty effects. |
|---|
| 345 | flashrom will attempt to detect laptops and abort immediately for safety |
|---|
| 346 | reasons. |
|---|
| 347 | If you want to proceed anyway at your own risk, use |
|---|
| 348 | .sp |
|---|
| 349 | .B " flashrom \-p internal:laptop=force_I_want_a_brick" |
|---|
| 350 | .sp |
|---|
| 351 | You have been warned. |
|---|
| 352 | .sp |
|---|
| 353 | We will not help you if you force flashing on a laptop because this is a really |
|---|
| 354 | dumb idea. |
|---|
| 355 | .TP |
|---|
| 356 | .BR "dummy " programmer |
|---|
| 357 | The dummy programmer operates on a buffer in memory only. It provides a safe |
|---|
| 358 | and fast way to test various aspects of flashrom and is mainly used in |
|---|
| 359 | development and while debugging. |
|---|
| 360 | .sp |
|---|
| 361 | It is able to emulate some chips to a certain degree (basic |
|---|
| 362 | identify/read/erase/write operations work). |
|---|
| 363 | .sp |
|---|
| 364 | An optional parameter specifies the bus types it |
|---|
| 365 | should support. For that you have to use the |
|---|
| 366 | .sp |
|---|
| 367 | .B " flashrom \-p dummy:bus=[type[+type[+type]]]" |
|---|
| 368 | .sp |
|---|
| 369 | syntax where |
|---|
| 370 | .B type |
|---|
| 371 | can be |
|---|
| 372 | .BR parallel ", " lpc ", " fwh ", " spi |
|---|
| 373 | in any order. If you specify bus without type, all buses will be disabled. |
|---|
| 374 | If you do not specify bus, all buses will be enabled. |
|---|
| 375 | .sp |
|---|
| 376 | Example: |
|---|
| 377 | .B "flashrom \-p dummy:bus=lpc+fwh" |
|---|
| 378 | .sp |
|---|
| 379 | The dummy programmer supports flash chip emulation for automated self-tests |
|---|
| 380 | without hardware access. If you want to emulate a flash chip, use the |
|---|
| 381 | .sp |
|---|
| 382 | .B " flashrom \-p dummy:emulate=chip" |
|---|
| 383 | .sp |
|---|
| 384 | syntax where |
|---|
| 385 | .B chip |
|---|
| 386 | is one of the following chips (please specify only the chip name, not the |
|---|
| 387 | vendor): |
|---|
| 388 | .sp |
|---|
| 389 | .RB "* ST " M25P10.RES " SPI flash chip (RES, page write)" |
|---|
| 390 | .sp |
|---|
| 391 | .RB "* SST " SST25VF040.REMS " SPI flash chip (REMS, byte write)" |
|---|
| 392 | .sp |
|---|
| 393 | .RB "* SST " SST25VF032B " SPI flash chip (RDID, AAI write)" |
|---|
| 394 | .sp |
|---|
| 395 | Example: |
|---|
| 396 | .B "flashrom -p dummy:emulate=SST25VF040.REMS" |
|---|
| 397 | .sp |
|---|
| 398 | If you use flash chip emulation, flash image persistence is available as well |
|---|
| 399 | by using the |
|---|
| 400 | .sp |
|---|
| 401 | .B " flashrom \-p dummy:emulate=chip,image=image.rom" |
|---|
| 402 | .sp |
|---|
| 403 | syntax where |
|---|
| 404 | .B image.rom |
|---|
| 405 | is the file where the simulated chip contents are read on flashrom startup and |
|---|
| 406 | where the chip contents on flashrom shutdown are written to. |
|---|
| 407 | .sp |
|---|
| 408 | Example: |
|---|
| 409 | .B "flashrom -p dummy:emulate=M25P10.RES,image=dummy.bin" |
|---|
| 410 | .sp |
|---|
| 411 | If you use SPI flash chip emulation for a chip which supports SPI page write |
|---|
| 412 | with the default opcode, you can set the maximum allowed write chunk size with |
|---|
| 413 | the |
|---|
| 414 | .sp |
|---|
| 415 | .B " flashrom \-p dummy:emulate=chip,spi_write_256_chunksize=size" |
|---|
| 416 | .sp |
|---|
| 417 | syntax where |
|---|
| 418 | .B size |
|---|
| 419 | is the number of bytes (min. 1, max. 256). |
|---|
| 420 | .sp |
|---|
| 421 | Example: |
|---|
| 422 | .sp |
|---|
| 423 | .B " flashrom -p dummy:emulate=M25P10.RES,spi_write_256_chunksize=5" |
|---|
| 424 | .TP |
|---|
| 425 | .BR "nic3com" , " nicrealtek" , " nicsmc1211" , " nicnatsemi" , " nicintel\ |
|---|
| 426 | " , " nicintel_spi" , " gfxnvidia" , " ogp_spi" , " drkaiser" , " satasii\ |
|---|
| 427 | " , " satamv" ", and " atahpt " programmers |
|---|
| 428 | These programmers have an option to specify the PCI address of the card |
|---|
| 429 | your want to use, which must be specified if more than one card supported |
|---|
| 430 | by the selected programmer is installed in your system. The syntax is |
|---|
| 431 | .sp |
|---|
| 432 | .BR " flashrom \-p xxxx:pci=bb:dd.f" , |
|---|
| 433 | .sp |
|---|
| 434 | where |
|---|
| 435 | .B xxxx |
|---|
| 436 | is the name of the programmer |
|---|
| 437 | .B bb |
|---|
| 438 | is the PCI bus number, |
|---|
| 439 | .B dd |
|---|
| 440 | is the PCI device number, and |
|---|
| 441 | .B f |
|---|
| 442 | is the PCI function number of the desired device. |
|---|
| 443 | .sp |
|---|
| 444 | Example: |
|---|
| 445 | .B "flashrom \-p nic3com:pci=05:04.0" |
|---|
| 446 | .TP |
|---|
| 447 | .BR "ft2232_spi " programmer |
|---|
| 448 | An optional parameter specifies the controller |
|---|
| 449 | type and interface/port it should support. For that you have to use the |
|---|
| 450 | .sp |
|---|
| 451 | .B " flashrom \-p ft2232_spi:type=model,port=interface" |
|---|
| 452 | .sp |
|---|
| 453 | syntax where |
|---|
| 454 | .B model |
|---|
| 455 | can be |
|---|
| 456 | .BR 2232H ", " 4232H ", " jtagkey ", " busblaster ", " openmoko ", " \ |
|---|
| 457 | arm-usb-tiny ", " arm-usb-tiny-h ", " arm-usb-ocd ", " arm-usb-ocd-h \ |
|---|
| 458 | ", " tumpa ", or " picotap |
|---|
| 459 | and |
|---|
| 460 | .B interface |
|---|
| 461 | can be |
|---|
| 462 | .BR A ", or " B . |
|---|
| 463 | The default model is |
|---|
| 464 | .B 4232H |
|---|
| 465 | and the default interface is |
|---|
| 466 | .BR B . |
|---|
| 467 | .TP |
|---|
| 468 | .BR "serprog " programmer |
|---|
| 469 | A mandatory parameter specifies either a serial |
|---|
| 470 | device/baud combination or an IP/port combination for communication with the |
|---|
| 471 | programmer. In the device/baud combination, the device has to start with a |
|---|
| 472 | slash. For serial, you have to use the |
|---|
| 473 | .sp |
|---|
| 474 | .B " flashrom \-p serprog:dev=/dev/device:baud" |
|---|
| 475 | .sp |
|---|
| 476 | syntax and for IP, you have to use |
|---|
| 477 | .sp |
|---|
| 478 | .B " flashrom \-p serprog:ip=ipaddr:port" |
|---|
| 479 | .sp |
|---|
| 480 | instead. More information about serprog is available in |
|---|
| 481 | .B serprog-protocol.txt |
|---|
| 482 | in the source distribution. |
|---|
| 483 | .TP |
|---|
| 484 | .BR "buspirate_spi " programmer |
|---|
| 485 | A required |
|---|
| 486 | .B dev |
|---|
| 487 | parameter specifies the Bus Pirate device node and an optional |
|---|
| 488 | .B spispeed |
|---|
| 489 | parameter specifies the frequency of the SPI bus. The parameter |
|---|
| 490 | delimiter is a comma. Syntax is |
|---|
| 491 | .sp |
|---|
| 492 | .B " flashrom \-p buspirate_spi:dev=/dev/device,spispeed=frequency" |
|---|
| 493 | .sp |
|---|
| 494 | where |
|---|
| 495 | .B frequency |
|---|
| 496 | can be |
|---|
| 497 | .BR 30k ", " 125k ", " 250k ", " 1M ", " 2M ", " 2.6M ", " 4M " or " 8M |
|---|
| 498 | (in Hz). The default is the maximum frequency of 8 MHz. |
|---|
| 499 | .TP |
|---|
| 500 | .BR "dediprog " programmer |
|---|
| 501 | An optional |
|---|
| 502 | .B voltage |
|---|
| 503 | parameter specifies the voltage the Dediprog should use. The default unit is |
|---|
| 504 | Volt if no unit is specified. You can use |
|---|
| 505 | .BR mV ", " milliVolt ", " V " or " Volt |
|---|
| 506 | as unit specifier. Syntax is |
|---|
| 507 | .sp |
|---|
| 508 | .B " flashrom \-p dediprog:voltage=value" |
|---|
| 509 | .sp |
|---|
| 510 | where |
|---|
| 511 | .B value |
|---|
| 512 | can be |
|---|
| 513 | .BR 0V ", " 1.8V ", " 2.5V ", " 3.5V |
|---|
| 514 | or the equivalent in mV. |
|---|
| 515 | .TP |
|---|
| 516 | .BR "rayer_spi " programmer |
|---|
| 517 | The default I/O base address used for the parallel port is 0x378 and you can use |
|---|
| 518 | the optional |
|---|
| 519 | .B iobase |
|---|
| 520 | parameter to specify an alternate base I/O address with the |
|---|
| 521 | .sp |
|---|
| 522 | .B " flashrom \-p rayer_spi:iobase=baseaddr" |
|---|
| 523 | .sp |
|---|
| 524 | syntax where |
|---|
| 525 | .B baseaddr |
|---|
| 526 | is base I/O port address of the parallel port, which must be a multiple of |
|---|
| 527 | four. Make sure to not forget the "0x" prefix for hexadecimal port addresses. |
|---|
| 528 | .sp |
|---|
| 529 | The default cable type is the RayeR cable. You can use the optional |
|---|
| 530 | .B type |
|---|
| 531 | parameter to specify the cable type with the |
|---|
| 532 | .sp |
|---|
| 533 | .B " flashrom \-p rayer_spi:type=model" |
|---|
| 534 | .sp |
|---|
| 535 | syntax where |
|---|
| 536 | .B model |
|---|
| 537 | can be |
|---|
| 538 | .BR rayer " for the RayeR cable or " xilinx " for the Xilinx Parallel Cable III |
|---|
| 539 | (DLC 5). |
|---|
| 540 | .sp |
|---|
| 541 | More information about the RayeR hardware is available at |
|---|
| 542 | .BR "http://rayer.ic.cz/elektro/spipgm.htm " . |
|---|
| 543 | The schematic of the Xilinx DLC 5 was published at |
|---|
| 544 | .BR "http://www.xilinx.com/itp/xilinx4/data/docs/pac/appendixb.html " . |
|---|
| 545 | .TP |
|---|
| 546 | .BR "ogp_spi " programmer |
|---|
| 547 | The flash ROM chip to access must be specified with the |
|---|
| 548 | .B rom |
|---|
| 549 | parameter. |
|---|
| 550 | .sp |
|---|
| 551 | .B " flashrom \-p ogp_spi:rom=name" |
|---|
| 552 | .sp |
|---|
| 553 | Where |
|---|
| 554 | .B name |
|---|
| 555 | is either |
|---|
| 556 | .B cprom |
|---|
| 557 | or |
|---|
| 558 | .B s3 |
|---|
| 559 | for the configuration ROM and |
|---|
| 560 | .B bprom |
|---|
| 561 | or |
|---|
| 562 | .B bios |
|---|
| 563 | for the BIOS ROM. If more than one card supported by the ogp_spi programmer |
|---|
| 564 | is installed in your system, you have to specify the PCI address of the card |
|---|
| 565 | you want to use with the |
|---|
| 566 | .B pci= |
|---|
| 567 | parameter as explained in the |
|---|
| 568 | .B nic3com |
|---|
| 569 | section above. |
|---|
| 570 | .sp |
|---|
| 571 | More information about the hardware is available at |
|---|
| 572 | .BR http://wiki.opengraphics.org . |
|---|
| 573 | .SH EXIT STATUS |
|---|
| 574 | flashrom exits with 0 on success, 1 on most failures but with 2 if /dev/mem |
|---|
| 575 | (/dev/xsvc on Solaris) can not be opened and with 3 if a call to mmap() fails. |
|---|
| 576 | .SH REQUIREMENTS |
|---|
| 577 | flashrom needs different access permissions for different programmers. |
|---|
| 578 | .sp |
|---|
| 579 | .B internal |
|---|
| 580 | needs raw memory access, PCI configuration space access, raw I/O port |
|---|
| 581 | access (x86) and MSR access (x86). |
|---|
| 582 | .sp |
|---|
| 583 | .BR nic3com ", " nicrealtek ", " nicsmc1211 " and " nicnatsemi " |
|---|
| 584 | need PCI configuration space read access and raw I/O port access. |
|---|
| 585 | .sp |
|---|
| 586 | .B atahpt |
|---|
| 587 | needs PCI configuration space access and raw I/O port access. |
|---|
| 588 | .sp |
|---|
| 589 | .BR gfxnvidia " and " drkaiser |
|---|
| 590 | need PCI configuration space access and raw memory access. |
|---|
| 591 | .sp |
|---|
| 592 | .B rayer_spi |
|---|
| 593 | needs raw I/O port access. |
|---|
| 594 | .sp |
|---|
| 595 | .B satasii |
|---|
| 596 | needs PCI configuration space read access and raw memory access. |
|---|
| 597 | .sp |
|---|
| 598 | .B satamv |
|---|
| 599 | needs PCI configuration space read access, raw I/O port access and raw memory |
|---|
| 600 | access. |
|---|
| 601 | .sp |
|---|
| 602 | .B serprog |
|---|
| 603 | needs TCP access to the network or userspace access to a serial port. |
|---|
| 604 | .sp |
|---|
| 605 | .B buspirate_spi |
|---|
| 606 | needs userspace access to a serial port. |
|---|
| 607 | .sp |
|---|
| 608 | .BR dediprog " and " ft2232_spi |
|---|
| 609 | need access to the USB device via libusb. |
|---|
| 610 | .sp |
|---|
| 611 | .B dummy |
|---|
| 612 | needs no access permissions at all. |
|---|
| 613 | .sp |
|---|
| 614 | .BR internal ", " nic3com ", " nicrealtek ", " nicsmc1211 ", " nicnatsemi ", " |
|---|
| 615 | .BR gfxnvidia ", " drkaiser ", " satasii ", " satamv " and " atahpt |
|---|
| 616 | have to be run as superuser/root, and need additional raw access permission. |
|---|
| 617 | .sp |
|---|
| 618 | .BR serprog ", " buspirate_spi ", " dediprog " and " ft2232_spi |
|---|
| 619 | can be run as normal user on most operating systems if appropriate device |
|---|
| 620 | permissions are set. |
|---|
| 621 | .sp |
|---|
| 622 | .B ogp |
|---|
| 623 | needs PCI configuration space read access and raw memory access. |
|---|
| 624 | .sp |
|---|
| 625 | On OpenBSD, you can obtain raw access permission by setting |
|---|
| 626 | .B "securelevel=-1" |
|---|
| 627 | in |
|---|
| 628 | .B "/etc/rc.securelevel" |
|---|
| 629 | and rebooting, or rebooting into single user mode. |
|---|
| 630 | .SH BUGS |
|---|
| 631 | Please report any bugs at |
|---|
| 632 | .sp |
|---|
| 633 | .B " http://www.flashrom.org/trac/flashrom/newticket" |
|---|
| 634 | .sp |
|---|
| 635 | or on the flashrom mailing list at |
|---|
| 636 | .B "<flashrom@flashrom.org>" |
|---|
| 637 | .sp |
|---|
| 638 | We recommend to subscribe first at |
|---|
| 639 | .sp |
|---|
| 640 | .B " http://www.flashrom.org/mailman/listinfo/flashrom" |
|---|
| 641 | .sp |
|---|
| 642 | Using flashrom on laptops is dangerous and may easily make your hardware |
|---|
| 643 | unusable unless you can desolder the flash chip and have a full flash chip |
|---|
| 644 | backup. This is caused by the embedded controller (EC) present in many laptops, |
|---|
| 645 | which interacts badly with any flash attempts. This is a hardware limitation |
|---|
| 646 | and flashrom will attempt to detect it and abort immediately for safety reasons. |
|---|
| 647 | .sp |
|---|
| 648 | More information about flashrom on laptops is available from |
|---|
| 649 | .sp |
|---|
| 650 | .B " http://www.flashrom.org/Laptops" |
|---|
| 651 | .SH LICENSE |
|---|
| 652 | .B flashrom |
|---|
| 653 | is covered by the GNU General Public License (GPL), version 2. Some files are |
|---|
| 654 | additionally available under the GPL (version 2, or any later version). |
|---|
| 655 | .SH COPYRIGHT |
|---|
| 656 | .br |
|---|
| 657 | Please see the individual files. |
|---|
| 658 | .SH AUTHORS |
|---|
| 659 | Andrew Morgan |
|---|
| 660 | .br |
|---|
| 661 | Carl-Daniel Hailfinger |
|---|
| 662 | .br |
|---|
| 663 | Claus Gindhart |
|---|
| 664 | .br |
|---|
| 665 | David Borg |
|---|
| 666 | .br |
|---|
| 667 | David Hendricks |
|---|
| 668 | .br |
|---|
| 669 | Dominik Geyer |
|---|
| 670 | .br |
|---|
| 671 | Eric Biederman |
|---|
| 672 | .br |
|---|
| 673 | Giampiero Giancipoli |
|---|
| 674 | .br |
|---|
| 675 | Helge Wagner |
|---|
| 676 | .br |
|---|
| 677 | Idwer Vollering |
|---|
| 678 | .br |
|---|
| 679 | Joe Bao |
|---|
| 680 | .br |
|---|
| 681 | Joerg Fischer |
|---|
| 682 | .br |
|---|
| 683 | Joshua Roys |
|---|
| 684 | .br |
|---|
| 685 | Luc Verhaegen |
|---|
| 686 | .br |
|---|
| 687 | Li-Ta Lo |
|---|
| 688 | .br |
|---|
| 689 | Mark Marshall |
|---|
| 690 | .br |
|---|
| 691 | Markus Boas |
|---|
| 692 | .br |
|---|
| 693 | Mattias Mattsson |
|---|
| 694 | .br |
|---|
| 695 | Michael Karcher |
|---|
| 696 | .br |
|---|
| 697 | Nikolay Petukhov |
|---|
| 698 | .br |
|---|
| 699 | Patrick Georgi |
|---|
| 700 | .br |
|---|
| 701 | Peter Lemenkov |
|---|
| 702 | .br |
|---|
| 703 | Peter Stuge |
|---|
| 704 | .br |
|---|
| 705 | Reinder E.N. de Haan |
|---|
| 706 | .br |
|---|
| 707 | Ronald G. Minnich |
|---|
| 708 | .br |
|---|
| 709 | Ronald Hoogenboom |
|---|
| 710 | .br |
|---|
| 711 | Sean Nelson |
|---|
| 712 | .br |
|---|
| 713 | Stefan Reinauer |
|---|
| 714 | .br |
|---|
| 715 | Stefan Tauner |
|---|
| 716 | .br |
|---|
| 717 | Stefan Wildemann |
|---|
| 718 | .br |
|---|
| 719 | Stephan Guilloux |
|---|
| 720 | .br |
|---|
| 721 | Steven James |
|---|
| 722 | .br |
|---|
| 723 | Uwe Hermann |
|---|
| 724 | .br |
|---|
| 725 | Wang Qingpei |
|---|
| 726 | .br |
|---|
| 727 | Yinghai Lu |
|---|
| 728 | .br |
|---|
| 729 | some others, please see the flashrom svn changelog for details. |
|---|
| 730 | .br |
|---|
| 731 | All authors can be reached via email at <flashrom@flashrom.org>. |
|---|
| 732 | .PP |
|---|
| 733 | This manual page was written by Uwe Hermann <uwe@hermann-uwe.de>, |
|---|
| 734 | Carl-Daniel Hailfinger and others. |
|---|
| 735 | It is licensed under the terms of the GNU GPL (version 2 or later). |
|---|