README 2.57 KB
Newer Older
Uwe Hermann's avatar
Uwe Hermann committed
1
-------------------------------------------------------------------------------
2
flashrom README
Uwe Hermann's avatar
Uwe Hermann committed
3
-------------------------------------------------------------------------------
4

5 6
flashrom is a utility for reading, writing, verifying and erasing flash ROM
chips.  It's often used to flash BIOS/coreboot/firmware images.
Uwe Hermann's avatar
Uwe Hermann committed
7

8 9 10
It supports a wide range of DIP32, PLCC32, DIP8, SO8/SOIC8, TSOP32, and
TSOP40 chips, which use various protocols such as LPC, FWH, parallel flash,
or SPI.
11 12 13

(see http://coreboot.org for details on coreboot)

Uwe Hermann's avatar
Uwe Hermann committed
14 15

Build Requirements
16 17
------------------

18
To build the flashrom utility you need to install the following packages:
19 20

* pciutils
21
* pciutils-devel / pciutils-dev / libpci-dev
22
* zlib-devel / zlib1g-dev
23 24


25 26 27 28
Usage / Options
---------------

Please see the flashrom(8) manpage.
29 30


31 32
Exit status
-----------
Uwe Hermann's avatar
Uwe Hermann committed
33

34
flashrom exits with 0 on success, 1 on most failures but with 2 if /dev/mem
35 36 37
(/dev/xsvc on Solaris) can not be opened and with 3 if a call to mmap() fails.


Stefan Reinauer's avatar
Stefan Reinauer committed
38
coreboot Table and Mainboard Identification
39 40
--------------------------------------------

41
flashrom reads the coreboot table to determine the current mainboard. If no
Uwe Hermann's avatar
Uwe Hermann committed
42 43
coreboot table could be read or if you want to override these values, you can
specify -m, e.g.:
44

45
 $ flashrom -w --mainboard AGAMI:ARUMA agami_aruma.rom
46

47 48 49
See the 'Supported mainboards' section in the output of 'flashrom -L' for
a list of boards which require the specification of the board name, if no
coreboot table is found.
Uwe Hermann's avatar
Uwe Hermann committed
50

51

Uwe Hermann's avatar
Uwe Hermann committed
52
ROM Layout Support
53 54
------------------

55
flashrom supports ROM layouts. This allows you to flash certain parts of
Uwe Hermann's avatar
Uwe Hermann committed
56
the flash chip only. A ROM layout file looks like follows:
57 58 59 60 61 62 63 64

  00000000:00008fff gfxrom
  00009000:0003ffff normal
  00040000:0007ffff fallback

  i.e.:
  startaddr:endaddr name

Uwe Hermann's avatar
Uwe Hermann committed
65
  All addresses are offsets within the file, not absolute addresses!
66
  
Uwe Hermann's avatar
Uwe Hermann committed
67
If you only want to update the normal image in a ROM you can say:
68

Uwe Hermann's avatar
Uwe Hermann committed
69
  flashrom -w --layout rom.layout --image normal agami_aruma.rom
70
     
Uwe Hermann's avatar
Uwe Hermann committed
71
To update normal and fallback but leave the VGA BIOS alone, say:
72

Uwe Hermann's avatar
Uwe Hermann committed
73
  flashrom -w -l rom.layout -i normal -i fallback agami_aruma.rom
74
 
Uwe Hermann's avatar
Uwe Hermann committed
75
Currently overlapping sections are not supported.
76

Uwe Hermann's avatar
Uwe Hermann committed
77 78
ROM layouts should replace the -s and -e option since they are more 
flexible and they should lead to a ROM update file format with the 
Uwe Hermann's avatar
Uwe Hermann committed
79
ROM layout and the ROM image in one file (cpio, zip or something?).
80 81


82 83 84 85 86 87 88
Supported Flash Chips / Chipsets / Mainboards
---------------------------------------------

Please check the output of 'flashrom -L' for the list of supported
flash chips, chipsets/southbridges, and mainboards.

See also http://coreboot.org/Flashrom for more details.
89