cros_bundle_firmware: Move BL1, BL2 extraction into function

We want to use this code in other places, so put it in a function.

BUG=chromium-os:28394
TEST=manual:
cros_bundle_firmware -b daisy -w usb
cros_bundle_firmware -b daisy -w sd:.
cros_write_firmware -b daisy -w sd:. -i out/image.bin
cros_write_firmware -b daisy -w usb -i out/image.bin
See that it still produces/writes a booting image in each case

Change-Id: Ifdf4d26927ed95c797149af63bb1a8927d04dd07
Reviewed-on: https://gerrit.chromium.org/gerrit/23405
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Ready: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
1 file changed