the following patch was just integrated into master: commit 4a2661620347a6e8deba6ed579f9c4ecf17c3c18 Author: Chris Douglass cdouglass.orion@gmail.com Date: Thu Feb 27 09:25:19 2014 -0500
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.)
Example Usage:
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: 00000000:00000fff fd 00180000:003fffff bios 00001000:0017ffff me 00fff000:00000fff gbe 00fff000:00000fff pd
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: 00000000:00000fff fd 00180000:007fffff bios 00001000:0017ffff me 00fff000:00000fff gbe 00fff000:00000fff pd
ifdtool --newlayout layout.txt vpx7654.bin will create a file vpx7654.bin.new that is 8MB.
Change-Id: I0e0925a725c40fa44d8c4b6e86552028779d0523 Signed-off-by: Christopher Douglass cdouglass.orion@gmail.com
See http://review.coreboot.org/5312 for details.
-gerrit