| 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 | .sp␊ |
| 425 | To simulate a programmer which refuses to send certain SPI commands to the␊ |
| 426 | flash chip, you can specify a blacklist of SPI commands with the␊ |
| 427 | .sp␊ |
| 428 | .B " flashrom -p dummy:spi_blacklist=commandlist"␊ |
| 429 | .sp␊ |
| 430 | syntax where commandlist is a list of two-digit hexadecimal representations of␊ |
| 431 | SPI commands. If commandlist is e.g. 0302, flashrom will behave as if the SPI␊ |
| 432 | controller refuses to run command 0x03 (READ) and command 0x02 (WRITE).␊ |
| 433 | commandlist may be up to 512 characters (256 commands) long.␊ |
| 434 | Implementation note: flashrom will detect an error during command execution.␊ |
| 435 | .sp␊ |
| 436 | To simulate a flash chip which ignores (doesn't support) certain SPI commands,␊ |
| 437 | you can specify an ignorelist of SPI commands with the␊ |
| 438 | .sp␊ |
| 439 | .B " flashrom -p dummy:spi_ignorelist=commandlist"␊ |
| 440 | .sp␊ |
| 441 | syntax where commandlist is a list of two-digit hexadecimal representations of␊ |
| 442 | SPI commands. If commandlist is e.g. 0302, the emulated flash chip will ignore␊ |
| 443 | command 0x03 (READ) and command 0x02 (WRITE). commandlist may be up to 512␊ |
| 444 | characters (256 commands) long.␊ |
| 445 | Implementation note: flashrom won't detect an error during command execution.␊ |
| 446 | .TP␊ |
| 447 | .BR "nic3com" , " nicrealtek" , " nicsmc1211" , " nicnatsemi" , " nicintel\␊ |
| 448 | " , " nicintel_spi" , " gfxnvidia" , " ogp_spi" , " drkaiser" , " satasii\␊ |
| 449 | " , " satamv" ", and " atahpt " programmers␊ |
| 450 | These programmers have an option to specify the PCI address of the card␊ |
| 451 | your want to use, which must be specified if more than one card supported␊ |
| 452 | by the selected programmer is installed in your system. The syntax is␊ |
| 453 | .sp␊ |
| 454 | .BR " flashrom \-p xxxx:pci=bb:dd.f" ,␊ |
| 455 | .sp␊ |
| 456 | where␊ |
| 457 | .B xxxx␊ |
| 458 | is the name of the programmer␊ |
| 459 | .B bb␊ |
| 460 | is the PCI bus number,␊ |
| 461 | .B dd␊ |
| 462 | is the PCI device number, and␊ |
| 463 | .B f␊ |
| 464 | is the PCI function number of the desired device.␊ |
| 465 | .sp␊ |
| 466 | Example:␊ |
| 467 | .B "flashrom \-p nic3com:pci=05:04.0"␊ |
| 468 | .TP␊ |
| 469 | .BR "ft2232_spi " programmer␊ |
| 470 | An optional parameter specifies the controller␊ |
| 471 | type and interface/port it should support. For that you have to use the␊ |
| 472 | .sp␊ |
| 473 | .B " flashrom \-p ft2232_spi:type=model,port=interface"␊ |
| 474 | .sp␊ |
| 475 | syntax where␊ |
| 476 | .B model␊ |
| 477 | can be␊ |
| 478 | .BR 2232H ", " 4232H ", " jtagkey ", " busblaster ", " openmoko ", " \␊ |
| 479 | arm-usb-tiny ", " arm-usb-tiny-h ", " arm-usb-ocd ", " arm-usb-ocd-h \␊ |
| 480 | ", " tumpa ", or " picotap␊ |
| 481 | and␊ |
| 482 | .B interface␊ |
| 483 | can be␊ |
| 484 | .BR A ", or " B .␊ |
| 485 | The default model is␊ |
| 486 | .B 4232H␊ |
| 487 | and the default interface is␊ |
| 488 | .BR B .␊ |
| 489 | .TP␊ |
| 490 | .BR "serprog " programmer␊ |
| 491 | A mandatory parameter specifies either a serial␊ |
| 492 | device/baud combination or an IP/port combination for communication with the␊ |
| 493 | programmer. In the device/baud combination, the device has to start with a␊ |
| 494 | slash. For serial, you have to use the␊ |
| 495 | .sp␊ |
| 496 | .B " flashrom \-p serprog:dev=/dev/device:baud"␊ |
| 497 | .sp␊ |
| 498 | syntax and for IP, you have to use␊ |
| 499 | .sp␊ |
| 500 | .B " flashrom \-p serprog:ip=ipaddr:port"␊ |
| 501 | .sp␊ |
| 502 | instead. More information about serprog is available in␊ |
| 503 | .B serprog-protocol.txt␊ |
| 504 | in the source distribution.␊ |
| 505 | .TP␊ |
| 506 | .BR "buspirate_spi " programmer␊ |
| 507 | A required␊ |
| 508 | .B dev␊ |
| 509 | parameter specifies the Bus Pirate device node and an optional␊ |
| 510 | .B spispeed␊ |
| 511 | parameter specifies the frequency of the SPI bus. The parameter␊ |
| 512 | delimiter is a comma. Syntax is␊ |
| 513 | .sp␊ |
| 514 | .B " flashrom \-p buspirate_spi:dev=/dev/device,spispeed=frequency"␊ |
| 515 | .sp␊ |
| 516 | where␊ |
| 517 | .B frequency␊ |
| 518 | can be␊ |
| 519 | .BR 30k ", " 125k ", " 250k ", " 1M ", " 2M ", " 2.6M ", " 4M " or " 8M␊ |
| 520 | (in Hz). The default is the maximum frequency of 8 MHz.␊ |
| 521 | .TP␊ |
| 522 | .BR "dediprog " programmer␊ |
| 523 | An optional␊ |
| 524 | .B voltage␊ |
| 525 | parameter specifies the voltage the Dediprog should use. The default unit is␊ |
| 526 | Volt if no unit is specified. You can use␊ |
| 527 | .BR mV ", " milliVolt ", " V " or " Volt␊ |
| 528 | as unit specifier. Syntax is␊ |
| 529 | .sp␊ |
| 530 | .B " flashrom \-p dediprog:voltage=value"␊ |
| 531 | .sp␊ |
| 532 | where␊ |
| 533 | .B value␊ |
| 534 | can be␊ |
| 535 | .BR 0V ", " 1.8V ", " 2.5V ", " 3.5V␊ |
| 536 | or the equivalent in mV.␊ |
| 537 | .TP␊ |
| 538 | .BR "rayer_spi " programmer␊ |
| 539 | The default I/O base address used for the parallel port is 0x378 and you can use␊ |
| 540 | the optional␊ |
| 541 | .B iobase␊ |
| 542 | parameter to specify an alternate base I/O address with the␊ |
| 543 | .sp␊ |
| 544 | .B " flashrom \-p rayer_spi:iobase=baseaddr"␊ |
| 545 | .sp␊ |
| 546 | syntax where␊ |
| 547 | .B baseaddr␊ |
| 548 | is base I/O port address of the parallel port, which must be a multiple of␊ |
| 549 | four. Make sure to not forget the "0x" prefix for hexadecimal port addresses.␊ |
| 550 | .sp␊ |
| 551 | The default cable type is the RayeR cable. You can use the optional␊ |
| 552 | .B type␊ |
| 553 | parameter to specify the cable type with the␊ |
| 554 | .sp␊ |
| 555 | .B " flashrom \-p rayer_spi:type=model"␊ |
| 556 | .sp␊ |
| 557 | syntax where␊ |
| 558 | .B model␊ |
| 559 | can be␊ |
| 560 | .BR rayer " for the RayeR cable or " xilinx " for the Xilinx Parallel Cable III␊ |
| 561 | (DLC 5).␊ |
| 562 | .sp␊ |
| 563 | More information about the RayeR hardware is available at␊ |
| 564 | .BR "http://rayer.ic.cz/elektro/spipgm.htm " .␊ |
| 565 | The schematic of the Xilinx DLC 5 was published at␊ |
| 566 | .BR "http://www.xilinx.com/itp/xilinx4/data/docs/pac/appendixb.html " .␊ |
| 567 | .TP␊ |
| 568 | .BR "ogp_spi " programmer␊ |
| 569 | The flash ROM chip to access must be specified with the ␊ |
| 570 | .B rom␊ |
| 571 | parameter.␊ |
| 572 | .sp␊ |
| 573 | .B " flashrom \-p ogp_spi:rom=name"␊ |
| 574 | .sp␊ |
| 575 | Where␊ |
| 576 | .B name␊ |
| 577 | is either␊ |
| 578 | .B cprom␊ |
| 579 | or␊ |
| 580 | .B s3␊ |
| 581 | for the configuration ROM and ␊ |
| 582 | .B bprom␊ |
| 583 | or␊ |
| 584 | .B bios␊ |
| 585 | for the BIOS ROM. If more than one card supported by the ogp_spi programmer␊ |
| 586 | is installed in your system, you have to specify the PCI address of the card␊ |
| 587 | you want to use with the␊ |
| 588 | .B pci=␊ |
| 589 | parameter as explained in the␊ |
| 590 | .B nic3com␊ |
| 591 | section above.␊ |
| 592 | .sp␊ |
| 593 | More information about the hardware is available at␊ |
| 594 | .BR http://wiki.opengraphics.org .␊ |
| 595 | .SH EXIT STATUS␊ |
| 596 | flashrom exits with 0 on success, 1 on most failures but with 2 if /dev/mem␊ |
| 597 | (/dev/xsvc on Solaris) can not be opened and with 3 if a call to mmap() fails.␊ |
| 598 | .SH REQUIREMENTS␊ |
| 599 | flashrom needs different access permissions for different programmers.␊ |
| 600 | .sp␊ |
| 601 | .B internal␊ |
| 602 | needs raw memory access, PCI configuration space access, raw I/O port␊ |
| 603 | access (x86) and MSR access (x86).␊ |
| 604 | .sp␊ |
| 605 | .BR nic3com ", " nicrealtek ", " nicsmc1211 " and " nicnatsemi "␊ |
| 606 | need PCI configuration space read access and raw I/O port access.␊ |
| 607 | .sp␊ |
| 608 | .B atahpt␊ |
| 609 | needs PCI configuration space access and raw I/O port access.␊ |
| 610 | .sp␊ |
| 611 | .BR gfxnvidia " and " drkaiser␊ |
| 612 | need PCI configuration space access and raw memory access.␊ |
| 613 | .sp␊ |
| 614 | .B rayer_spi␊ |
| 615 | needs raw I/O port access.␊ |
| 616 | .sp␊ |
| 617 | .B satasii␊ |
| 618 | needs PCI configuration space read access and raw memory access.␊ |
| 619 | .sp␊ |
| 620 | .B satamv␊ |
| 621 | needs PCI configuration space read access, raw I/O port access and raw memory␊ |
| 622 | access.␊ |
| 623 | .sp␊ |
| 624 | .B serprog␊ |
| 625 | needs TCP access to the network or userspace access to a serial port.␊ |
| 626 | .sp␊ |
| 627 | .B buspirate_spi␊ |
| 628 | needs userspace access to a serial port.␊ |
| 629 | .sp␊ |
| 630 | .BR dediprog " and " ft2232_spi␊ |
| 631 | need access to the USB device via libusb.␊ |
| 632 | .sp␊ |
| 633 | .B dummy␊ |
| 634 | needs no access permissions at all.␊ |
| 635 | .sp␊ |
| 636 | .BR internal ", " nic3com ", " nicrealtek ", " nicsmc1211 ", " nicnatsemi ", "␊ |
| 637 | .BR gfxnvidia ", " drkaiser ", " satasii ", " satamv " and " atahpt␊ |
| 638 | have to be run as superuser/root, and need additional raw access permission.␊ |
| 639 | .sp␊ |
| 640 | .BR serprog ", " buspirate_spi ", " dediprog " and " ft2232_spi␊ |
| 641 | can be run as normal user on most operating systems if appropriate device␊ |
| 642 | permissions are set.␊ |
| 643 | .sp␊ |
| 644 | .B ogp␊ |
| 645 | needs PCI configuration space read access and raw memory access.␊ |
| 646 | .sp␊ |
| 647 | On OpenBSD, you can obtain raw access permission by setting␊ |
| 648 | .B "securelevel=-1"␊ |
| 649 | in␊ |
| 650 | .B "/etc/rc.securelevel"␊ |
| 651 | and rebooting, or rebooting into single user mode.␊ |
| 652 | .SH BUGS␊ |
| 653 | Please report any bugs at␊ |
| 654 | .sp␊ |
| 655 | .B " http://www.flashrom.org/trac/flashrom/newticket"␊ |
| 656 | .sp␊ |
| 657 | or on the flashrom mailing list at␊ |
| 658 | .B "<flashrom@flashrom.org>"␊ |
| 659 | .sp␊ |
| 660 | We recommend to subscribe first at␊ |
| 661 | .sp␊ |
| 662 | .B " http://www.flashrom.org/mailman/listinfo/flashrom"␊ |
| 663 | .sp␊ |
| 664 | Using flashrom on laptops is dangerous and may easily make your hardware␊ |
| 665 | unusable unless you can desolder the flash chip and have a full flash chip␊ |
| 666 | backup. This is caused by the embedded controller (EC) present in many laptops,␊ |
| 667 | which interacts badly with any flash attempts. This is a hardware limitation␊ |
| 668 | and flashrom will attempt to detect it and abort immediately for safety reasons.␊ |
| 669 | .sp␊ |
| 670 | More information about flashrom on laptops is available from␊ |
| 671 | .sp␊ |
| 672 | .B " http://www.flashrom.org/Laptops"␊ |
| 673 | .SH LICENSE␊ |
| 674 | .B flashrom␊ |
| 675 | is covered by the GNU General Public License (GPL), version 2. Some files are␊ |
| 676 | additionally available under the GPL (version 2, or any later version).␊ |
| 677 | .SH COPYRIGHT␊ |
| 678 | .br␊ |
| 679 | Please see the individual files.␊ |
| 680 | .SH AUTHORS␊ |
| 681 | Andrew Morgan␊ |
| 682 | .br␊ |
| 683 | Carl-Daniel Hailfinger␊ |
| 684 | .br␊ |
| 685 | Claus Gindhart␊ |
| 686 | .br␊ |
| 687 | David Borg␊ |
| 688 | .br␊ |
| 689 | David Hendricks␊ |
| 690 | .br␊ |
| 691 | Dominik Geyer␊ |
| 692 | .br␊ |
| 693 | Eric Biederman␊ |
| 694 | .br␊ |
| 695 | Giampiero Giancipoli␊ |
| 696 | .br␊ |
| 697 | Helge Wagner␊ |
| 698 | .br␊ |
| 699 | Idwer Vollering␊ |
| 700 | .br␊ |
| 701 | Joe Bao␊ |
| 702 | .br␊ |
| 703 | Joerg Fischer␊ |
| 704 | .br␊ |
| 705 | Joshua Roys␊ |
| 706 | .br␊ |
| 707 | Luc Verhaegen␊ |
| 708 | .br␊ |
| 709 | Li-Ta Lo␊ |
| 710 | .br␊ |
| 711 | Mark Marshall␊ |
| 712 | .br␊ |
| 713 | Markus Boas␊ |
| 714 | .br␊ |
| 715 | Mattias Mattsson␊ |
| 716 | .br␊ |
| 717 | Michael Karcher␊ |
| 718 | .br␊ |
| 719 | Nikolay Petukhov␊ |
| 720 | .br␊ |
| 721 | Patrick Georgi␊ |
| 722 | .br␊ |
| 723 | Peter Lemenkov␊ |
| 724 | .br␊ |
| 725 | Peter Stuge␊ |
| 726 | .br␊ |
| 727 | Reinder E.N. de Haan␊ |
| 728 | .br␊ |
| 729 | Ronald G. Minnich␊ |
| 730 | .br␊ |
| 731 | Ronald Hoogenboom␊ |
| 732 | .br␊ |
| 733 | Sean Nelson␊ |
| 734 | .br␊ |
| 735 | Stefan Reinauer␊ |
| 736 | .br␊ |
| 737 | Stefan Tauner␊ |
| 738 | .br␊ |
| 739 | Stefan Wildemann␊ |
| 740 | .br␊ |
| 741 | Stephan Guilloux␊ |
| 742 | .br␊ |
| 743 | Steven James␊ |
| 744 | .br␊ |
| 745 | Uwe Hermann␊ |
| 746 | .br␊ |
| 747 | Wang Qingpei␊ |
| 748 | .br␊ |
| 749 | Yinghai Lu␊ |
| 750 | .br␊ |
| 751 | some others, please see the flashrom svn changelog for details.␊ |
| 752 | .br␊ |
| 753 | All authors can be reached via email at <flashrom@flashrom.org>.␊ |
| 754 | .PP␊ |
| 755 | This manual page was written by Uwe Hermann <uwe@hermann-uwe.de>,␊ |
| 756 | Carl-Daniel Hailfinger and others.␊ |
| 757 | It is licensed under the terms of the GNU GPL (version 2 or later).␊ |
| 758 | |