well the subject is a bit exaggerated and kinky, but i think layouts (not the write/read protection thingy carl-daniel wrote about lately, but the -l option) could be much more useful. especially for systems that are quite locked down (ICH/PCH...).
with this patch set it is possible to - use -i and -l parameters in any order - specify a file for each image (so there is no need to create a full image beforehand) - use layout files for reading - use layout files for verifying
some may need some refinements, and man page entries of course, but i wanted to post this now. first for thomas from GE because he asked for it and secondly to discuss if it is the right way to do this at all :)
things to improve (either in the future or in a refined form of this patches): - reduce the footprint of the romlayout_t struct by not holding the whole strings but only references to strduped strings. - make the file parameter for -w, -r, -v optional if there are -i file names specified. - see 4/7 comments.
Stefan Tauner (7): layout: change return type and name of find_next_included_romentry Add deferred -i processing layout: Add -i <image>[:<file>] support Make read before write configurable (infrastructure part) Use layout for read operations too Use layout for verify operations too (not for merge) Fix the "Use layout for verify operations too" patch in a hacky way
cli_classic.c | 10 +-- flash.h | 13 +++- flashrom.c | 149 ++++++++++++++++++++++++++++++++------------ layout.c | 193 +++++++++++++++++++++++++++++++++++++++++++++------------ 4 files changed, 279 insertions(+), 86 deletions(-)