contrib/firmware/repack_fw_tars: Support swapping EC RW

Add an option --ecrw to repack_fw_tars to allow swapping the EC RW from
AP firmware images. Example usage:

 repack_fw_tars -m steelix -o out/ \
   --ecrw corsola_for_ecrw.tar.bz2 corsola.tar.bz2

Note that this option only affects the resulting AP tarballs. The
generated EC tarballs are still the same as before.

BUG=b:272167756
TEST=repack_fw_tars corsola.tar.bz2 -m steelix,kingler -o out --ecrw ...

Change-Id: I38d48ebf7e702c19bdbd37f3ab56b020844811c8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/dev-util/+/4659476
Reviewed-by: Yidi Lin <yidilin@chromium.org>
Auto-Submit: Yu-Ping Wu <yupingso@chromium.org>
Commit-Queue: Yidi Lin <yidilin@chromium.org>
Tested-by: Yu-Ping Wu <yupingso@chromium.org>
1 file changed