source: trunk/flashrom.8

Last change on this file was 1674, checked in by stefanct, 4 weeks ago

dediprog: fix SPI clock setting.

Avoid setting SPI speed on firmware versions < 5.0.0 and note this
limitation in the man page.
Use the correct offset of the "12M" element in the spispeeds array to
match our manpage and the default of Dediprog's dpcmd.

Signed-off-by: Patrick Georgi <patrick.georgi@…>
Signed-off-by: Stefan Tauner <stefan.tauner@…>
Acked-by: Stefan Tauner <stefan.tauner@…>

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