Uwe Hermann | 2dc5f42 | 2006-11-20 20:32:35 +0000 | [diff] [blame] | 1 | ------------------------------------------------------------------------------- |
| 2 | Flashrom README |
| 3 | ------------------------------------------------------------------------------- |
Ronald G. Minnich | 1e5003f | 2002-04-10 18:02:07 +0000 | [diff] [blame] | 4 | |
Uwe Hermann | 42eb17f | 2008-01-18 17:48:51 +0000 | [diff] [blame] | 5 | Flashrom is a universal flash programming utility for DIP, PLCC, or SPI |
| 6 | flash ROM chips. It can be used to flash BIOS/coreboot/firmware images. |
| 7 | |
| 8 | (see http://coreboot.org for details on coreboot) |
| 9 | |
Uwe Hermann | 2dc5f42 | 2006-11-20 20:32:35 +0000 | [diff] [blame] | 10 | |
| 11 | Build Requirements |
Stefan Reinauer | 06b2c4d | 2005-12-01 10:51:08 +0000 | [diff] [blame] | 12 | ------------------ |
| 13 | |
Uwe Hermann | f8a49fe | 2008-06-22 18:50:25 +0000 | [diff] [blame] | 14 | To build the flashrom utility you need to install the following packages: |
Stefan Reinauer | 06b2c4d | 2005-12-01 10:51:08 +0000 | [diff] [blame] | 15 | |
| 16 | * pciutils |
Uwe Hermann | f8a49fe | 2008-06-22 18:50:25 +0000 | [diff] [blame] | 17 | * pciutils-devel / pciutils-dev / libpci-dev |
Uwe Hermann | 83f0db2 | 2006-12-20 14:53:22 +0000 | [diff] [blame] | 18 | * zlib-devel / zlib1g-dev |
Stefan Reinauer | 06b2c4d | 2005-12-01 10:51:08 +0000 | [diff] [blame] | 19 | |
| 20 | |
Uwe Hermann | 2dc5f42 | 2006-11-20 20:32:35 +0000 | [diff] [blame] | 21 | Usage |
Stefan Reinauer | 06b2c4d | 2005-12-01 10:51:08 +0000 | [diff] [blame] | 22 | ----- |
| 23 | |
Uwe Hermann | 67808fe | 2007-10-18 00:29:05 +0000 | [diff] [blame] | 24 | $ flashrom [-rwvEVfh] [-c chipname] [-s exclude_start] [-e exclude_end] |
Peter Stuge | 6b53fed | 2008-01-27 16:21:21 +0000 | [diff] [blame] | 25 | [-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. Minnich | 5e5f75e | 2002-01-29 18:21:41 +0000 | [diff] [blame] | 39 | |
Ollie Lho | 184a404 | 2005-11-26 21:55:36 +0000 | [diff] [blame] | 40 | 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. Minnich | 5e5f75e | 2002-01-29 18:21:41 +0000 | [diff] [blame] | 42 | |
Ronald G. Minnich | 5e5f75e | 2002-01-29 18:21:41 +0000 | [diff] [blame] | 43 | |
Stefan Reinauer | e3f3e2e | 2008-01-18 15:33:10 +0000 | [diff] [blame] | 44 | coreboot Table and Mainboard Identification |
Ollie Lho | 184a404 | 2005-11-26 21:55:36 +0000 | [diff] [blame] | 45 | -------------------------------------------- |
Ronald G. Minnich | 5e5f75e | 2002-01-29 18:21:41 +0000 | [diff] [blame] | 46 | |
Stefan Reinauer | e3f3e2e | 2008-01-18 15:33:10 +0000 | [diff] [blame] | 47 | Flashrom reads the coreboot table to determine the current mainboard |
| 48 | (parse DMI as well in future?). If no coreboot table could be read |
Uwe Hermann | 2dc5f42 | 2006-11-20 20:32:35 +0000 | [diff] [blame] | 49 | or if you want to override these values, you can specify -m, e.g.: |
Ollie Lho | 184a404 | 2005-11-26 21:55:36 +0000 | [diff] [blame] | 50 | |
Uwe Hermann | f8a49fe | 2008-06-22 18:50:25 +0000 | [diff] [blame] | 51 | $ flashrom -w --mainboard AGAMI:ARUMA agami_aruma.rom |
Ollie Lho | 184a404 | 2005-11-26 21:55:36 +0000 | [diff] [blame] | 52 | |
Uwe Hermann | f8a49fe | 2008-06-22 18:50:25 +0000 | [diff] [blame] | 53 | See the 'Supported mainboards' section in the output of 'flashrom -L' for |
| 54 | a list of boards which require the specification of the board name, if no |
| 55 | coreboot table is found. |
Uwe Hermann | 67808fe | 2007-10-18 00:29:05 +0000 | [diff] [blame] | 56 | |
Ollie Lho | 184a404 | 2005-11-26 21:55:36 +0000 | [diff] [blame] | 57 | |
Uwe Hermann | 2dc5f42 | 2006-11-20 20:32:35 +0000 | [diff] [blame] | 58 | ROM Layout Support |
Ollie Lho | 184a404 | 2005-11-26 21:55:36 +0000 | [diff] [blame] | 59 | ------------------ |
| 60 | |
Uwe Hermann | 42eb17f | 2008-01-18 17:48:51 +0000 | [diff] [blame] | 61 | Flashrom supports ROM layouts. This allows you to flash certain parts of |
Uwe Hermann | 2dc5f42 | 2006-11-20 20:32:35 +0000 | [diff] [blame] | 62 | the flash chip only. A ROM layout file looks like follows: |
Ollie Lho | 184a404 | 2005-11-26 21:55:36 +0000 | [diff] [blame] | 63 | |
| 64 | 00000000:00008fff gfxrom |
| 65 | 00009000:0003ffff normal |
| 66 | 00040000:0007ffff fallback |
| 67 | |
| 68 | i.e.: |
| 69 | startaddr:endaddr name |
| 70 | |
Uwe Hermann | 67808fe | 2007-10-18 00:29:05 +0000 | [diff] [blame] | 71 | All addresses are offsets within the file, not absolute addresses! |
Ollie Lho | 184a404 | 2005-11-26 21:55:36 +0000 | [diff] [blame] | 72 | |
Uwe Hermann | 2dc5f42 | 2006-11-20 20:32:35 +0000 | [diff] [blame] | 73 | If you only want to update the normal image in a ROM you can say: |
Ollie Lho | 184a404 | 2005-11-26 21:55:36 +0000 | [diff] [blame] | 74 | |
Uwe Hermann | 67808fe | 2007-10-18 00:29:05 +0000 | [diff] [blame] | 75 | flashrom -w --layout rom.layout --image normal agami_aruma.rom |
Ollie Lho | 184a404 | 2005-11-26 21:55:36 +0000 | [diff] [blame] | 76 | |
Uwe Hermann | 2dc5f42 | 2006-11-20 20:32:35 +0000 | [diff] [blame] | 77 | To update normal and fallback but leave the VGA BIOS alone, say: |
Ollie Lho | 184a404 | 2005-11-26 21:55:36 +0000 | [diff] [blame] | 78 | |
Uwe Hermann | 67808fe | 2007-10-18 00:29:05 +0000 | [diff] [blame] | 79 | flashrom -w -l rom.layout -i normal -i fallback agami_aruma.rom |
Ollie Lho | 184a404 | 2005-11-26 21:55:36 +0000 | [diff] [blame] | 80 | |
Uwe Hermann | 2dc5f42 | 2006-11-20 20:32:35 +0000 | [diff] [blame] | 81 | Currently overlapping sections are not supported. |
Ollie Lho | 184a404 | 2005-11-26 21:55:36 +0000 | [diff] [blame] | 82 | |
Uwe Hermann | 2dc5f42 | 2006-11-20 20:32:35 +0000 | [diff] [blame] | 83 | ROM layouts should replace the -s and -e option since they are more |
| 84 | flexible and they should lead to a ROM update file format with the |
Uwe Hermann | 67808fe | 2007-10-18 00:29:05 +0000 | [diff] [blame] | 85 | ROM layout and the ROM image in one file (cpio, zip or something?). |
Ollie Lho | 184a404 | 2005-11-26 21:55:36 +0000 | [diff] [blame] | 86 | |
| 87 | |
Uwe Hermann | 67808fe | 2007-10-18 00:29:05 +0000 | [diff] [blame] | 88 | Disk on Chip support |
| 89 | -------------------- |
Ollie Lho | 184a404 | 2005-11-26 21:55:36 +0000 | [diff] [blame] | 90 | |
Peter Stuge | 87d51fb | 2008-06-22 17:54:03 +0000 | [diff] [blame] | 91 | Disk on Chip support was removed from flashrom in r3382. It had already |
Peter Stuge | db52c58 | 2008-06-22 17:06:41 +0000 | [diff] [blame] | 92 | been disabled by default in flashrom for several years because the code |
| 93 | was considered unstable and incomplete. The products intended to work |
| 94 | have been End-Of-Lifed by the manufacturer for a long time. |
Ollie Lho | 184a404 | 2005-11-26 21:55:36 +0000 | [diff] [blame] | 95 | |
| 96 | |
Uwe Hermann | f8a49fe | 2008-06-22 18:50:25 +0000 | [diff] [blame] | 97 | Supported Flash Chips / Chipsets / Mainboards |
| 98 | --------------------------------------------- |
Uwe Hermann | b6d2832 | 2006-12-04 08:15:47 +0000 | [diff] [blame] | 99 | |
Uwe Hermann | f8a49fe | 2008-06-22 18:50:25 +0000 | [diff] [blame] | 100 | Please check the output of 'flashrom -L' for the list of supported |
| 101 | flash chips, chipsets/southbridges, and mainboards. |
Uwe Hermann | b6d2832 | 2006-12-04 08:15:47 +0000 | [diff] [blame] | 102 | |
Uwe Hermann | f8a49fe | 2008-06-22 18:50:25 +0000 | [diff] [blame] | 103 | See also http://coreboot.org/Flashrom for more details. |
Uwe Hermann | b6d2832 | 2006-12-04 08:15:47 +0000 | [diff] [blame] | 104 | |