blob: 656468f734d82b6e639afb34e8f6ff4cfc8243da [file] [log] [blame]
Uwe Hermann2dc5f422006-11-20 20:32:35 +00001-------------------------------------------------------------------------------
2Flashrom README
3-------------------------------------------------------------------------------
Ronald G. Minnich1e5003f2002-04-10 18:02:07 +00004
Uwe Hermann42eb17f2008-01-18 17:48:51 +00005Flashrom is a universal flash programming utility for DIP, PLCC, or SPI
6flash ROM chips. It can be used to flash BIOS/coreboot/firmware images.
7
8(see http://coreboot.org for details on coreboot)
9
Uwe Hermann2dc5f422006-11-20 20:32:35 +000010
11Build Requirements
Stefan Reinauer06b2c4d2005-12-01 10:51:08 +000012------------------
13
Uwe Hermannf8a49fe2008-06-22 18:50:25 +000014To build the flashrom utility you need to install the following packages:
Stefan Reinauer06b2c4d2005-12-01 10:51:08 +000015
16* pciutils
Uwe Hermannf8a49fe2008-06-22 18:50:25 +000017* pciutils-devel / pciutils-dev / libpci-dev
Uwe Hermann83f0db22006-12-20 14:53:22 +000018* zlib-devel / zlib1g-dev
Stefan Reinauer06b2c4d2005-12-01 10:51:08 +000019
20
Uwe Hermann2dc5f422006-11-20 20:32:35 +000021Usage
Stefan Reinauer06b2c4d2005-12-01 10:51:08 +000022-----
23
Idwer Vollering4cf3eef2009-01-11 03:31:02 +000024 $ flashrom [-rwvEVfLhR] [-c chipname] [-s exclude_start] [-e exclude_end]
Peter Stuge6b53fed2008-01-27 16:21:21 +000025 [-m [vendor:]part] [-l file.layout] [-i imagename] [file]
26 -r | --read: read flash and save into file
27 -w | --write: write file into flash (default when
28 file is specified)
29 -v | --verify: verify flash against file
30 -E | --erase: erase flash device
31 -V | --verbose: more verbose output
32 -c | --chip <chipname>: probe only for specified flash chip
33 -s | --estart <addr>: exclude start position
34 -e | --eend <addr>: exclude end postion
35 -m | --mainboard <[vendor:]part>: override mainboard settings
36 -f | --force: force write without checking image
37 -l | --layout <file.layout>: read rom layout from file
38 -i | --image <name>: only flash image name from flash layout
Idwer Vollering4cf3eef2009-01-11 03:31:02 +000039 -L | --list-supported: print supported devices
40 -h | --help: print this help text
41 -R | --version: print the version (release)
Ronald G. Minnich5e5f75e2002-01-29 18:21:41 +000042
Ollie Lho184a4042005-11-26 21:55:36 +000043 If no file is specified, then all that happens
44 is that flash info is dumped and the flash chip is set to writable.
Ronald G. Minnich5e5f75e2002-01-29 18:21:41 +000045
Ronald G. Minnich5e5f75e2002-01-29 18:21:41 +000046
Stefan Reinauere3f3e2e2008-01-18 15:33:10 +000047coreboot Table and Mainboard Identification
Ollie Lho184a4042005-11-26 21:55:36 +000048--------------------------------------------
Ronald G. Minnich5e5f75e2002-01-29 18:21:41 +000049
Stefan Reinauere3f3e2e2008-01-18 15:33:10 +000050Flashrom reads the coreboot table to determine the current mainboard
51(parse DMI as well in future?). If no coreboot table could be read
Uwe Hermann2dc5f422006-11-20 20:32:35 +000052or if you want to override these values, you can specify -m, e.g.:
Ollie Lho184a4042005-11-26 21:55:36 +000053
Uwe Hermannf8a49fe2008-06-22 18:50:25 +000054 $ flashrom -w --mainboard AGAMI:ARUMA agami_aruma.rom
Ollie Lho184a4042005-11-26 21:55:36 +000055
Uwe Hermannf8a49fe2008-06-22 18:50:25 +000056See the 'Supported mainboards' section in the output of 'flashrom -L' for
57a list of boards which require the specification of the board name, if no
58coreboot table is found.
Uwe Hermann67808fe2007-10-18 00:29:05 +000059
Ollie Lho184a4042005-11-26 21:55:36 +000060
Uwe Hermann2dc5f422006-11-20 20:32:35 +000061ROM Layout Support
Ollie Lho184a4042005-11-26 21:55:36 +000062------------------
63
Uwe Hermann42eb17f2008-01-18 17:48:51 +000064Flashrom supports ROM layouts. This allows you to flash certain parts of
Uwe Hermann2dc5f422006-11-20 20:32:35 +000065the flash chip only. A ROM layout file looks like follows:
Ollie Lho184a4042005-11-26 21:55:36 +000066
67 00000000:00008fff gfxrom
68 00009000:0003ffff normal
69 00040000:0007ffff fallback
70
71 i.e.:
72 startaddr:endaddr name
73
Uwe Hermann67808fe2007-10-18 00:29:05 +000074 All addresses are offsets within the file, not absolute addresses!
Ollie Lho184a4042005-11-26 21:55:36 +000075
Uwe Hermann2dc5f422006-11-20 20:32:35 +000076If you only want to update the normal image in a ROM you can say:
Ollie Lho184a4042005-11-26 21:55:36 +000077
Uwe Hermann67808fe2007-10-18 00:29:05 +000078 flashrom -w --layout rom.layout --image normal agami_aruma.rom
Ollie Lho184a4042005-11-26 21:55:36 +000079
Uwe Hermann2dc5f422006-11-20 20:32:35 +000080To update normal and fallback but leave the VGA BIOS alone, say:
Ollie Lho184a4042005-11-26 21:55:36 +000081
Uwe Hermann67808fe2007-10-18 00:29:05 +000082 flashrom -w -l rom.layout -i normal -i fallback agami_aruma.rom
Ollie Lho184a4042005-11-26 21:55:36 +000083
Uwe Hermann2dc5f422006-11-20 20:32:35 +000084Currently overlapping sections are not supported.
Ollie Lho184a4042005-11-26 21:55:36 +000085
Uwe Hermann2dc5f422006-11-20 20:32:35 +000086ROM layouts should replace the -s and -e option since they are more
87flexible and they should lead to a ROM update file format with the
Uwe Hermann67808fe2007-10-18 00:29:05 +000088ROM layout and the ROM image in one file (cpio, zip or something?).
Ollie Lho184a4042005-11-26 21:55:36 +000089
90
Uwe Hermann67808fe2007-10-18 00:29:05 +000091Disk on Chip support
92--------------------
Ollie Lho184a4042005-11-26 21:55:36 +000093
Peter Stuge87d51fb2008-06-22 17:54:03 +000094Disk on Chip support was removed from flashrom in r3382. It had already
Peter Stugedb52c582008-06-22 17:06:41 +000095been disabled by default in flashrom for several years because the code
96was considered unstable and incomplete. The products intended to work
97have been End-Of-Lifed by the manufacturer for a long time.
Ollie Lho184a4042005-11-26 21:55:36 +000098
99
Uwe Hermannf8a49fe2008-06-22 18:50:25 +0000100Supported Flash Chips / Chipsets / Mainboards
101---------------------------------------------
Uwe Hermannb6d28322006-12-04 08:15:47 +0000102
Uwe Hermannf8a49fe2008-06-22 18:50:25 +0000103Please check the output of 'flashrom -L' for the list of supported
104flash chips, chipsets/southbridges, and mainboards.
Uwe Hermannb6d28322006-12-04 08:15:47 +0000105
Uwe Hermannf8a49fe2008-06-22 18:50:25 +0000106See also http://coreboot.org/Flashrom for more details.
Uwe Hermannb6d28322006-12-04 08:15:47 +0000107