Files
OpenCellular/include
Randall Spangler 88ff608ae2 Add capability to auto-hash correct size for EC-RO or EC-RW
Otherwise the host needs to tell the EC how big this image is (which
it knows, but it's inconvenient for it to provide).

BUG=chrome-os-partner:13511
BRANCH=all
TEST=manual

1. ectool echash recalc ro -> prints hash of RO code (offset 0)
2. ectool echash recalc rw -> prints hash of RW code (offset non-zero)

In each case, size should be an exact number and not the size of the
whole RO or RW section.  So for link, output should be something similar to:

  localhost ~ # ectool echash recalc ro
  Hashing EC-RO...
  status:  done
  type:    SHA-256
  offset:  0x00000000
  size:    0x00012a64
  hash:    03a66c076d6dd4b4aa9ed6386713f45291f5143f9af2093003e632485899daf1
  localhost ~ # ectool echash recalc rw
  Hashing EC-RW...
  status:  done
  type:    SHA-256
  offset:  0x00014000
  size:    0x000123d1
  hash:    0d6225e70f0b1e0419e987370371e00783f945827ef25915a8fb8549159dd2a4

Signed-off-by: Randall Spangler <rspangler@chromium.org>

3. At ec console, 'hash ro' or 'hash rw' should regenerate the same
hash values printed above.

Change-Id: I3f6085d29927b8cdf9dabc6930f0fdc7222bd8b5
Reviewed-on: https://gerrit.chromium.org/gerrit/33123
Tested-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Commit-Ready: Randall Spangler <rspangler@chromium.org>
2012-09-12 15:42:25 -07:00
..
2012-04-19 13:08:58 -07:00
2012-04-19 11:08:28 -07:00
2012-04-19 11:08:28 -07:00
2012-07-12 18:22:24 -07:00
2011-12-07 19:10:02 +00:00
2012-07-10 14:56:05 -07:00
2012-08-27 12:16:10 -07:00
2012-08-29 18:16:46 -07:00
2012-06-29 10:46:22 -07:00
2012-05-31 15:03:17 -07:00
2012-01-11 11:37:55 -08:00
2012-06-07 09:59:55 -07:00
2012-07-12 18:22:24 -07:00
2011-12-07 19:10:02 +00:00
2012-04-19 13:08:58 -07:00
2011-12-07 19:10:02 +00:00
2012-07-30 13:41:33 -07:00
2012-08-09 17:40:37 -07:00
2012-05-30 13:12:34 -07:00
2012-09-09 11:00:34 -07:00
2012-08-28 16:39:32 -07:00
2012-04-24 17:46:54 -07:00