cros_bundle_firmware: Add optional bus and dev for flash_dest

On some platforms, the proper flash_dest is not at the default bus and dev.
This change allows bus and dev to optionally be specified on the
cros_bundle_firmware and cros_write_firmware command invocation.

Where flash_dest occurs, the semantics have been changed from a string to
a dictionary containing 'type' (the old value of flash_dest), 'bus', and
'dev'.  Where bus occurs in a function parameter, we remove that and use
the 'bus':'dev' values from the dictionary instead.

There were some examples of Exynos hardcoding the bus and dev for certain
busses.  In those cases, use those hardcoded values as the defaults for
that particular bus.

BUG=none
TEST=Was able to flash using SPI:1:0 (which is the appropriate bus/dev on
venice).  Tested that SPI:1 works also (dev will default to 0). Also ran
unittests: FEATURES=test sudo -E emerge cros-devutils without seeing any
errors.

Change-Id: Id4d552fc2dbc4fd1df8f9e21833702ab3f29a74c
Signed-off-by: Andrew Chew <achew@nvidia.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/62907
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
3 files changed