source: trunk/flashrom.8

Last change on this file was 1673, checked in by stefanct, 2 weeks ago

dediprog: add support for chip select.

Thanks to the traces captured and tests done by Martin Roth, and confirmed
by tests and analysis by Joshua Zarr too, we can now use both target chips
on the Dediprog SF100.

Signed-off-by: Stefan Tauner <stefan.tauner@…>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@…>

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. Syntax is
687.sp
688.B "  flashrom \-p dediprog:spispeed=frequency"
689.sp
690where
691.B frequency
692can be
693.BR 375k ", " 750k ", " 1.5M ", " 2.18M ", " 3M ", " 8M ", " 12M " or " 24M
694(in Hz). The default is a frequency of 12 MHz.
695.sp
696An optional
697.B target
698parameter specifies which target chip should be used. Syntax is
699.sp
700.B "  flashrom \-p dediprog:target=value"
701.sp
702where
703.B value
704can be
705.BR 1 " or " 2
706to select target chip 1 or 2 repectively. The default is target chip 1.
707.SS
708.BR "rayer_spi " programmer
709The default I/O base address used for the parallel port is 0x378 and you can use
710the optional
711.B iobase
712parameter to specify an alternate base I/O address with the
713.sp
714.B "  flashrom \-p rayer_spi:iobase=baseaddr"
715.sp
716syntax where
717.B baseaddr
718is base I/O port address of the parallel port, which must be a multiple of
719four. Make sure to not forget the "0x" prefix for hexadecimal port addresses.
720.sp
721The default cable type is the RayeR cable. You can use the optional
722.B type
723parameter to specify the cable type with the
724.sp
725.B "  flashrom \-p rayer_spi:type=model"
726.sp
727syntax where
728.B model
729can be
730.BR rayer " for the RayeR cable or " xilinx " for the Xilinx Parallel Cable III
731(DLC 5).
732.sp
733More information about the RayeR hardware is available at
734.nh
735.BR "http://rayer.ic.cz/elektro/spipgm.htm " .
736The schematic of the Xilinx DLC 5 was published at
737.nh
738.BR "http://www.xilinx.com/itp/xilinx4/data/docs/pac/appendixb.html " .
739.SS
740.BR "pony_spi " programmer
741The serial port (like /dev/ttyS0, /dev/ttyUSB0 on Linux or COM3 on windows) is
742specified using the mandatory
743.B dev
744parameter. The adapter type is selectable between SI-Prog (used for
745SPI devices with PonyProg 2000) or a custom made serial bitbanging programmer
746named "serbang". The optional
747.B type
748parameter accepts the values "si_prog" (default) or "serbang".
749.sp
750Information about the SI-Prog adapter can be found at
751.nh
752.BR "http://www.lancos.com/siprogsch.html " .
753.sp
754An example call to flashrom is
755.sp
756.B "  flashrom \-p pony_spi:dev=/dev/ttyS0,type=serbang"
757.sp
758Please note that while USB-to-serial adapters work under certain circumstances,
759this slows down operation considerably.
760.SS
761.BR "ogp_spi " programmer
762The flash ROM chip to access must be specified with the
763.B rom
764parameter.
765.sp
766.B "  flashrom \-p ogp_spi:rom=name"
767.sp
768Where
769.B name
770is either
771.B cprom
772or
773.B s3
774for the configuration ROM and
775.B bprom
776or
777.B bios
778for the BIOS ROM. If more than one card supported by the ogp_spi programmer
779is installed in your system, you have to specify the PCI address of the card
780you want to use with the
781.B pci=
782parameter as explained in the
783.B nic3com et al.\&
784section above.
785.sp
786More information about the hardware is available at
787.nh
788.BR http://wiki.opengraphics.org .
789.SS
790.BR "linux_spi " programmer
791You have to specify the SPI controller to use with the
792.sp
793.B "  flashrom \-p linux_spi:dev=/dev/spidevX.Y"
794.sp
795syntax where
796.B /dev/spidevX.Y
797is the Linux device node for your SPI controller.
798.sp
799Please note that the linux_spi driver only works on Linux.
800.SH EXAMPLES
801To back up and update your BIOS, run
802.sp
803.B flashrom -p internal -r backup.rom -o backuplog.txt
804.br
805.B flashrom -p internal -w newbios.rom -o writelog.txt
806.sp
807Please make sure to copy backup.rom to some external media before you try
808to write. That makes offline recovery easier.
809.br
810If writing fails and flashrom complains about the chip being in an unknown
811state, you can try to restore the backup by running
812.sp
813.B flashrom -p internal -w backup.rom -o restorelog.txt
814.sp
815If you encounter any problems, please contact us and supply
816backuplog.txt, writelog.txt and restorelog.txt. See section
817.B BUGS
818for contact info.
819.SH EXIT STATUS
820flashrom exits with 0 on success, 1 on most failures but with 2 if /dev/mem
821(/dev/xsvc on Solaris) can not be opened and with 3 if a call to mmap() fails.
822.SH REQUIREMENTS
823flashrom needs different access permissions for different programmers.
824.sp
825.B internal
826needs raw memory access, PCI configuration space access, raw I/O port
827access (x86) and MSR access (x86).
828.sp
829.BR nic3com ", " nicrealtek " and " nicnatsemi "
830need PCI configuration space read access and raw I/O port access.
831.sp
832.B atahpt
833needs PCI configuration space access and raw I/O port access.
834.sp
835.BR gfxnvidia " and " drkaiser
836need PCI configuration space access and raw memory access.
837.sp
838.B rayer_spi
839needs raw I/O port access.
840.sp
841.B satasii
842needs PCI configuration space read access and raw memory access.
843.sp
844.B satamv
845needs PCI configuration space read access, raw I/O port access and raw memory
846access.
847.sp
848.B serprog
849needs TCP access to the network or userspace access to a serial port.
850.sp
851.B buspirate_spi
852needs userspace access to a serial port.
853.sp
854.BR dediprog ", " ft2232_spi " and " usbblaster_spi
855need access to the USB device via libusb.
856.sp
857.B dummy
858needs no access permissions at all.
859.sp
860.BR internal ", " nic3com ", " nicrealtek ", " nicnatsemi ", "
861.BR gfxnvidia ", " drkaiser ", " satasii ", " satamv " and " atahpt
862have to be run as superuser/root, and need additional raw access permission.
863.sp
864.BR serprog ", " buspirate_spi ", " dediprog ", " usbblaster_spi " and " ft2232_spi
865can be run as normal user on most operating systems if appropriate device
866permissions are set.
867.sp
868.B ogp
869needs PCI configuration space read access and raw memory access.
870.sp
871On OpenBSD, you can obtain raw access permission by setting
872.B "securelevel=-1"
873in
874.B "/etc/rc.securelevel"
875and rebooting, or rebooting into single user mode.
876.SH BUGS
877Please report any bugs to the flashrom mailing list at
878.B "<flashrom@flashrom.org>"
879.sp
880We recommend to subscribe first at
881.sp
882.B "  http://www.flashrom.org/mailman/listinfo/flashrom"
883.sp
884Many of the developers communicate via the
885.B "#flashrom"
886IRC channel on
887.BR chat.freenode.net .
888You are welcome to join and ask questions, send us bug and success reports there
889too. Please provide a way to contact you later (e.g.\& a mail address) and be
890patient if there is no immediate reaction. Also, we provide a pastebin service
891at
892.nh
893.B http://paste.flashrom.org
894that is very useful when you want to share logs etc.\& without spamming the
895channel.
896.SS
897.B Laptops
898.sp
899Using flashrom on laptops is dangerous and may easily make your hardware
900unusable. flashrom will attempt to detect if it is running on a laptop and abort
901immediately for safety reasons. Please see the detailed discussion of this topic
902and associated flashrom options in the
903.B Laptops
904paragraph in the
905.B internal programmer
906subsection of the
907.B PROGRAMMER SPECIFIC INFO
908section and the information in our wiki at
909.BR "http://www.flashrom.org/Laptops " .
910.SS
911One-time programmable (OTP) memory and unique IDs
912.sp
913Some flash chips contain OTP memory often denoted as "security registers".
914They usually have a capacity in the range of some bytes to a few hundred
915bytes and can be used to give devices unique IDs etc.  flashrom is not able
916to read or write these memories and may therefore not be able to duplicate a
917chip completely. For chip types known to include OTP memories a warning is
918printed when they are detected.
919.sp
920Similar to OTP memories are unique, factory programmed, unforgeable IDs.
921They are not modifiable by the user at all.
922.SH LICENSE
923.B flashrom
924is covered by the GNU General Public License (GPL), version 2. Some files are
925additionally available under the GPL (version 2, or any later version).
926.SH COPYRIGHT
927.br
928Please see the individual files.
929.SH AUTHORS
930Andrew Morgan
931.br
932Carl-Daniel Hailfinger
933.br
934Claus Gindhart
935.br
936David Borg
937.br
938David Hendricks
939.br
940Dominik Geyer
941.br
942Eric Biederman
943.br
944Giampiero Giancipoli
945.br
946Helge Wagner
947.br
948Idwer Vollering
949.br
950Joe Bao
951.br
952Joerg Fischer
953.br
954Joshua Roys
955.br
956Luc Verhaegen
957.br
958Li-Ta Lo
959.br
960Mark Marshall
961.br
962Markus Boas
963.br
964Mattias Mattsson
965.br
966Michael Karcher
967.br
968Nikolay Petukhov
969.br
970Patrick Georgi
971.br
972Peter Lemenkov
973.br
974Peter Stuge
975.br
976Reinder E.N. de Haan
977.br
978Ronald G. Minnich
979.br
980Ronald Hoogenboom
981.br
982Sean Nelson
983.br
984Stefan Reinauer
985.br
986Stefan Tauner
987.br
988Stefan Wildemann
989.br
990Stephan Guilloux
991.br
992Steven James
993.br
994Uwe Hermann
995.br
996Wang Qingpei
997.br
998Yinghai Lu
999.br
1000some others, please see the flashrom svn changelog for details.
1001.br
1002All authors can be reached via email at <flashrom@flashrom.org>.
1003.PP
1004This manual page was written by Uwe Hermann <uwe@hermann-uwe.de>,
1005Carl-Daniel Hailfinger and others.
1006It is licensed under the terms of the GNU GPL (version 2 or later).
Note: See TracBrowser for help on using the repository browser.