brillo_update_payload: Refactor code to extract_image_cros

To support extracting images from either Android or Chrome OS format,
this patch refactors the partition extraction function to a new
extract_image_cros function called twice. This will then be wrapped
with a extract_image function that will handle either format.

The function stores the partition name->filename mapping in a bash
associative array which then will be used to pass the filenames and
partition names to delta_generator.

This patch also includes the missing --metadata_signature_file flags.

BUG=b:23599483
TEST=Ran brillo_update_payload generate with various full/delta images.

Change-Id: I55e0c6f951b12e6b3e89ffb9fcd2240a2e2593cc
Reviewed-on: https://chromium-review.googlesource.com/299971
Commit-Ready: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
1 file changed
tree: 4af9c683f0372cdb5dfef1cf20125a0bc2cfa36a
  1. scripts/