mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-02 22:43:17 +02:00
Add support to get layout from fmap (e.g. coreboot rom)
Flashmap, or simply fmap, is a binary data format for describing region offsets, sizes, and certain attributes and is widely used by coreboot. This patch adds support for the fmap data format version 1.1 and adds --fmap and --fmap-file arguments. Using --fmap will make flashrom to search the ROM content for fmap data. Using --fmap-file will make flashrom search a supplied file for fmap data. An example of how to update the COREBOOT region of a ROM: flashrom -p programmer --fmap -w coreboot.rom -i COREBOOT flashrom -p programmer --fmap-file coreboot.rom -w coreboot.rom -i COREBOOT The fmap functions are mostly copied from cbfstool. Currently it is made mutually exclusive with other layout options until we are more clever about this input. Change-Id: I0e7fad38ed79a84d41358e1f175c36d255786c12 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Signed-off-by: David Hendricks <dhendricks@fb.com> Reviewed-on: https://review.coreboot.org/23203 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Tested-by: David Hendricks <david.hendricks@gmail.com> Reviewed-by: Werner Zeh <werner.zeh@siemens.com> Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:

committed by
Nico Huber

parent
4acc3f3a89
commit
c82900b661
@ -44,12 +44,10 @@
|
||||
.SH NAME
|
||||
flashrom \- detect, read, write, verify and erase flash chips
|
||||
.SH SYNOPSIS
|
||||
.B flashrom \fR[\fB\-h\fR|\fB\-R\fR|\fB\-L\fR|\fB\-z\fR|\
|
||||
\fB\-p\fR <programmername>[:<parameters>]
|
||||
[\fB\-E\fR|\fB\-r\fR <file>|\fB\-w\fR <file>|\fB\-v\fR <file>] \
|
||||
[\fB\-c\fR <chipname>]
|
||||
[(\fB\-l\fR <file>|\fB\-\-ifd\fR) [\fB\-i\fR <image>]] \
|
||||
[\fB\-n\fR] [\fB\-N\fR] [\fB\-f\fR]]
|
||||
.B flashrom \fR[\fB\-h\fR|\fB\-R\fR|\fB\-L\fR|\fB\-z\fR|\fB\-p\fR <programmername>[:<parameters>]
|
||||
[\fB\-E\fR|\fB\-r\fR <file>|\fB\-w\fR <file>|\fB\-v\fR <file>] [\fB\-c\fR <chipname>]
|
||||
[(\fB\-l\fR <file>|\fB\-\-ifd|\fB \-\-fmap\fR|\fB\-\-fmap-file\fR <file>) [\fB\-i\fR <image>]]
|
||||
[\fB\-n\fR] [\fB\-N\fR] [\fB\-f\fR]]
|
||||
[\fB\-V\fR[\fBV\fR[\fBV\fR]]] [\fB-o\fR <logfile>]
|
||||
.SH DESCRIPTION
|
||||
.B flashrom
|
||||
@ -195,6 +193,34 @@ To update only the images named
|
||||
.sp
|
||||
Overlapping sections are not supported.
|
||||
.TP
|
||||
.B "\-\-fmap"
|
||||
Read layout from fmap in flash chip.
|
||||
.sp
|
||||
flashrom supports the fmap binary format which is commonly used by coreboot
|
||||
for partitioning a flash chip. The on-chip fmap will be read and used to generate
|
||||
the layout.
|
||||
.sp
|
||||
If you only want to update the
|
||||
.BR "COREBOOT"
|
||||
region defined in the fmap, run
|
||||
.sp
|
||||
.B " flashrom -p prog \-\-fmap \-\-image COREBOOT \-w some.rom"
|
||||
.TP
|
||||
.B "\-\-fmap-file <file>"
|
||||
Read layout from a
|
||||
.BR <file>
|
||||
containing binary fmap (e.g. coreboot roms).
|
||||
.sp
|
||||
flashrom supports the fmap binary format which is commonly used by coreboot
|
||||
for partitioning a flash chip. The fmap in the specified file will be read and
|
||||
used to generate the layout.
|
||||
.sp
|
||||
If you only want to update the
|
||||
.BR "COREBOOT"
|
||||
region defined in the binary fmap file, run
|
||||
.sp
|
||||
.B " flashrom \-p prog \-\-fmap-file some.rom \-\-image COREBOOT \-w some.rom"
|
||||
.TP
|
||||
.B "\-\-ifd"
|
||||
Read ROM layout from Intel Firmware Descriptor.
|
||||
.sp
|
||||
|
Reference in New Issue
Block a user