blob: 5f5686913568ae56afeb2d9f7be4d8aebfd0660b [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
Uwe Hermann67808fe2007-10-18 00:29:05 +000024 $ flashrom [-rwvEVfh] [-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
Ronald G. Minnich5e5f75e2002-01-29 18:21:41 +000039
Ollie Lho184a4042005-11-26 21:55:36 +000040 If no file is specified, then all that happens
41 is that flash info is dumped and the flash chip is set to writable.
Ronald G. Minnich5e5f75e2002-01-29 18:21:41 +000042
Ronald G. Minnich5e5f75e2002-01-29 18:21:41 +000043
Stefan Reinauere3f3e2e2008-01-18 15:33:10 +000044coreboot Table and Mainboard Identification
Ollie Lho184a4042005-11-26 21:55:36 +000045--------------------------------------------
Ronald G. Minnich5e5f75e2002-01-29 18:21:41 +000046
Stefan Reinauere3f3e2e2008-01-18 15:33:10 +000047Flashrom reads the coreboot table to determine the current mainboard
48(parse DMI as well in future?). If no coreboot table could be read
Uwe Hermann2dc5f422006-11-20 20:32:35 +000049or if you want to override these values, you can specify -m, e.g.:
Ollie Lho184a4042005-11-26 21:55:36 +000050
Uwe Hermannf8a49fe2008-06-22 18:50:25 +000051 $ flashrom -w --mainboard AGAMI:ARUMA agami_aruma.rom
Ollie Lho184a4042005-11-26 21:55:36 +000052
Uwe Hermannf8a49fe2008-06-22 18:50:25 +000053See the 'Supported mainboards' section in the output of 'flashrom -L' for
54a list of boards which require the specification of the board name, if no
55coreboot table is found.
Uwe Hermann67808fe2007-10-18 00:29:05 +000056
Ollie Lho184a4042005-11-26 21:55:36 +000057
Uwe Hermann2dc5f422006-11-20 20:32:35 +000058ROM Layout Support
Ollie Lho184a4042005-11-26 21:55:36 +000059------------------
60
Uwe Hermann42eb17f2008-01-18 17:48:51 +000061Flashrom supports ROM layouts. This allows you to flash certain parts of
Uwe Hermann2dc5f422006-11-20 20:32:35 +000062the flash chip only. A ROM layout file looks like follows:
Ollie Lho184a4042005-11-26 21:55:36 +000063
64 00000000:00008fff gfxrom
65 00009000:0003ffff normal
66 00040000:0007ffff fallback
67
68 i.e.:
69 startaddr:endaddr name
70
Uwe Hermann67808fe2007-10-18 00:29:05 +000071 All addresses are offsets within the file, not absolute addresses!
Ollie Lho184a4042005-11-26 21:55:36 +000072
Uwe Hermann2dc5f422006-11-20 20:32:35 +000073If you only want to update the normal image in a ROM you can say:
Ollie Lho184a4042005-11-26 21:55:36 +000074
Uwe Hermann67808fe2007-10-18 00:29:05 +000075 flashrom -w --layout rom.layout --image normal agami_aruma.rom
Ollie Lho184a4042005-11-26 21:55:36 +000076
Uwe Hermann2dc5f422006-11-20 20:32:35 +000077To update normal and fallback but leave the VGA BIOS alone, say:
Ollie Lho184a4042005-11-26 21:55:36 +000078
Uwe Hermann67808fe2007-10-18 00:29:05 +000079 flashrom -w -l rom.layout -i normal -i fallback agami_aruma.rom
Ollie Lho184a4042005-11-26 21:55:36 +000080
Uwe Hermann2dc5f422006-11-20 20:32:35 +000081Currently overlapping sections are not supported.
Ollie Lho184a4042005-11-26 21:55:36 +000082
Uwe Hermann2dc5f422006-11-20 20:32:35 +000083ROM layouts should replace the -s and -e option since they are more
84flexible and they should lead to a ROM update file format with the
Uwe Hermann67808fe2007-10-18 00:29:05 +000085ROM layout and the ROM image in one file (cpio, zip or something?).
Ollie Lho184a4042005-11-26 21:55:36 +000086
87
Uwe Hermann67808fe2007-10-18 00:29:05 +000088Disk on Chip support
89--------------------
Ollie Lho184a4042005-11-26 21:55:36 +000090
Peter Stuge87d51fb2008-06-22 17:54:03 +000091Disk on Chip support was removed from flashrom in r3382. It had already
Peter Stugedb52c582008-06-22 17:06:41 +000092been disabled by default in flashrom for several years because the code
93was considered unstable and incomplete. The products intended to work
94have been End-Of-Lifed by the manufacturer for a long time.
Ollie Lho184a4042005-11-26 21:55:36 +000095
96
Uwe Hermannf8a49fe2008-06-22 18:50:25 +000097Supported Flash Chips / Chipsets / Mainboards
98---------------------------------------------
Uwe Hermannb6d28322006-12-04 08:15:47 +000099
Uwe Hermannf8a49fe2008-06-22 18:50:25 +0000100Please check the output of 'flashrom -L' for the list of supported
101flash chips, chipsets/southbridges, and mainboards.
Uwe Hermannb6d28322006-12-04 08:15:47 +0000102
Uwe Hermannf8a49fe2008-06-22 18:50:25 +0000103See also http://coreboot.org/Flashrom for more details.
Uwe Hermannb6d28322006-12-04 08:15:47 +0000104