contrib/firmware/repack_fw_tars: Add support for EC component manifest

When the EC component manifest (component_manifest.json) exists in the
firmware tarball, it needs to be repacked together with the EC image to
be uploaded to the Binary Component Server (BCS). Therefore, add support
for repacking it.

BUG=b:309821164
TEST=Ran repack_fw_tars with tarball with component_manifest.json
TEST=Ran repack_fw_tars with tarball without component_manifest.json

Change-Id: I4c5d69a999c87e891ba8e2a0fc6f6ec58545d062
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/dev-util/+/5108528
Reviewed-by: Wai-Hong Tam <waihong@google.com>
Reviewed-by: Yidi Lin <yidilin@chromium.org>
Commit-Queue: Yu-Ping Wu <yupingso@chromium.org>
Tested-by: Yu-Ping Wu <yupingso@chromium.org>
(cherry picked from commit 9071f11824b5414444aa0dbb237e10c474fcb4fe)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/dev-util/+/5960136
Tested-by: Clark Chung <ckclark@chromium.org>
Reviewed-by: Tzu-Min Sun <jimmysun@chromium.org>
Commit-Queue: Tzu-Min Sun <jimmysun@chromium.org>
Auto-Submit: Clark Chung <ckclark@chromium.org>
1 file changed