| 1 | ------------------------------------------------------------------------------- |
|---|
| 2 | Flashrom README |
|---|
| 3 | ------------------------------------------------------------------------------- |
|---|
| 4 | |
|---|
| 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 | |
|---|
| 10 | |
|---|
| 11 | Build Requirements |
|---|
| 12 | ------------------ |
|---|
| 13 | |
|---|
| 14 | To build the flashrom utility you need to install the following packages: |
|---|
| 15 | |
|---|
| 16 | * pciutils |
|---|
| 17 | * pciutils-devel / pciutils-dev / libpci-dev |
|---|
| 18 | * zlib-devel / zlib1g-dev |
|---|
| 19 | |
|---|
| 20 | |
|---|
| 21 | Usage |
|---|
| 22 | ----- |
|---|
| 23 | |
|---|
| 24 | $ flashrom [-rwvEVfh] [-c chipname] [-s exclude_start] [-e exclude_end] |
|---|
| 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 |
|---|
| 39 | |
|---|
| 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. |
|---|
| 42 | |
|---|
| 43 | |
|---|
| 44 | coreboot Table and Mainboard Identification |
|---|
| 45 | -------------------------------------------- |
|---|
| 46 | |
|---|
| 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 |
|---|
| 49 | or if you want to override these values, you can specify -m, e.g.: |
|---|
| 50 | |
|---|
| 51 | $ flashrom -w --mainboard AGAMI:ARUMA agami_aruma.rom |
|---|
| 52 | |
|---|
| 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. |
|---|
| 56 | |
|---|
| 57 | |
|---|
| 58 | ROM Layout Support |
|---|
| 59 | ------------------ |
|---|
| 60 | |
|---|
| 61 | Flashrom supports ROM layouts. This allows you to flash certain parts of |
|---|
| 62 | the flash chip only. A ROM layout file looks like follows: |
|---|
| 63 | |
|---|
| 64 | 00000000:00008fff gfxrom |
|---|
| 65 | 00009000:0003ffff normal |
|---|
| 66 | 00040000:0007ffff fallback |
|---|
| 67 | |
|---|
| 68 | i.e.: |
|---|
| 69 | startaddr:endaddr name |
|---|
| 70 | |
|---|
| 71 | All addresses are offsets within the file, not absolute addresses! |
|---|
| 72 | |
|---|
| 73 | If you only want to update the normal image in a ROM you can say: |
|---|
| 74 | |
|---|
| 75 | flashrom -w --layout rom.layout --image normal agami_aruma.rom |
|---|
| 76 | |
|---|
| 77 | To update normal and fallback but leave the VGA BIOS alone, say: |
|---|
| 78 | |
|---|
| 79 | flashrom -w -l rom.layout -i normal -i fallback agami_aruma.rom |
|---|
| 80 | |
|---|
| 81 | Currently overlapping sections are not supported. |
|---|
| 82 | |
|---|
| 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 |
|---|
| 85 | ROM layout and the ROM image in one file (cpio, zip or something?). |
|---|
| 86 | |
|---|
| 87 | |
|---|
| 88 | Disk on Chip support |
|---|
| 89 | -------------------- |
|---|
| 90 | |
|---|
| 91 | Disk on Chip support was removed from flashrom in r3382. It had already |
|---|
| 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. |
|---|
| 95 | |
|---|
| 96 | |
|---|
| 97 | Supported Flash Chips / Chipsets / Mainboards |
|---|
| 98 | --------------------------------------------- |
|---|
| 99 | |
|---|
| 100 | Please check the output of 'flashrom -L' for the list of supported |
|---|
| 101 | flash chips, chipsets/southbridges, and mainboards. |
|---|
| 102 | |
|---|
| 103 | See also http://coreboot.org/Flashrom for more details. |
|---|