util/ifdtool: add option to change flash layout
The new option "--newlayout <file>" will read <file> in flashrom's
layout format and copy flash regions from the current flash image
file to a new flash image file.
If a region grows, the padding is added at the beginning of the target
region in the new file so that the data is "right-aligned" to the
end of the region.
If a region shrinks, a warning is given and the tail end of existing
data is copied to the target region in the new file.
Regions of zero or negative size are ignored. (In the example below
00fff000:00000fff regions are an artifact of the address encoding
in the register fields.)
Given a flash image for a board with a Sandy Bridge processor and
Intel 6-Series chipset in the file vpx7654.bin
ifdtool --layout layout.txt vpx7564.bin
will yield the file layout.txt:
Notice that the "bios" portion extends to the end of the 4MB flash.
It may be edited to extend the bios portion to consume to the extent
of an 8MB flash. like layout2.txt:
ifdtool --newlayout layout.txt vpx7654.bin
will create a file vpx7654.bin.new that is 8MB.
Signed-off-by: Christopher Douglass <firstname.lastname@example.org>
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <email@example.com>
1 file changed