Flash ec-rw from specified path

If the EC-RW image path is set, then swap it into the AP-RW before
flashing. AP-RO+EC-RW will flash during the RO update step. AP-RW+EC-RW
will flash during the RW step. And EC-RW without any AP update will read
the current AP image from the DUT, swap the EC, and flash it back during
the RW step.

When downloading ec images, also extract the ec.config, as the swap
script will want to swap it in.

Don't check the EC-RW hash if we have the EC-RW version number. The
presence of the EC-RW version appears to depend on the age of the image.

Add some TODOs for future ideas.

BUG=b:397764548
TEST=Ran several scenarios on rex/karis

Change-Id: I90e6a7458c7bb570d0d05d400404fd4db6595c2e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/dev-util/+/6300458
Tested-by: Jeremy Bettis <jbettis@chromium.org>
Auto-Submit: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Kshitij Shah <tij@google.com>
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
8 files changed