futility: flashrom_drv: support partial write for multiple regions
When we have multiple regions to update, invoking flashrom_write_image
multiple times will take much longer because for each write it has to
read the whole flash, write and then verify whole flash (also timer
calibration and programmer init/shutdown every time).
As a result, we want to support writing multiple regions - just like
that flashrom can take arbitrary numbers of "-i REGION".
This change only extended flashrom_write_image, and the firmware updater
is calling flashrom_drv multiple times. That will be addressed in the
follow up changes.
TEST=build; and run test
Signed-off-by: Hung-Te Lin <email@example.com>
Reviewed-by: Edward O'Callaghan <firstname.lastname@example.org>
5 files changed