flashrom.8 27 KB

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