Enhance cros_write_firmware to report success explicitly

When cros_write_firmware utility is invoked to program an ARM system's
firmware, the verification success is not reported on the console (the
failures are reported implicitly when a CRC mismatch is
detected). After this change both success and failure are reported
explicitly, which allows scripting tools to look for known patterns.

BUG=chrome-os-partner:15610
TEST=manual
  . run the following command:

    $ cros_write_firmware -b daisy -w usb -d exynos5250-snow  -F spi \
        -i /build/daisy/firmware/image-daisy.bin  -V
    observed

	Image Programmed Successfully

    showing up on the DUT console

  . corrupted the SPI Flash contents on Snow, modified
    write_firmware.py to update only part of the image and reran the
    above command.

    observed

        CRC32 for 43e66000 ... 44265fff ==> 1e801933 != 4d3a430a ** ERROR **
        ** Checksum error on readback, programming failed!! **

    showing up on the DUT console

Change-Id: Id25884ba1be5d5d3b8e0efb957c1a3b671883e33
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/42818
Reviewed-by: Simon Glass <sjg@chromium.org>
1 file changed