Files
OpenCellular/extra/usb_updater
Vadim Bendebury bdbb45b14a usb_updater: allow symbolic Board IDs
When specifying board ID to program, it is convenient to be able to
specify the ID as a string, as reported by the RLZ stored in the VPD.

With this patch the first component of the board_id command line
option is considered a string if it is no longer than 4 bytes.

BRANCH=cr50
BUG=b:35587387,b:35587053

TEST=ran the following commands (interleaved with erasing INFO1 on the
     target):

  localhost ~ # usb_updater -s -i
  Board ID space: ffffffff:ffffffff:ffffffff
  localhost ~ # usb_updater -s -i ABCD
  localhost ~ # usb_updater -s -i
  Board ID space: 41424344:bebdbcbb:0000ff00
  localhost ~ # usb_updater -s -i
  Board ID space: ffffffff:ffffffff:ffffffff
  localhost ~ # usb_updater -s -i 0x41424344:0x1234
  localhost ~ # usb_updater -s -i
  Board ID space: 41424344:bebdbcbb:00001234
  localhost ~ # usb_updater -s -i
  Board ID space: ffffffff:ffffffff:ffffffff
  localhost ~ # usb_updater -s -i ABCD:0x1234
  localhost ~ # usb_updater -s -i
  Board ID space: 41424344:bebdbcbb:00001234

Change-Id: Ied8b240d60ea50f6fc8633f919ce4bc81ac17727
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/528440
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2017-06-09 13:27:52 -07:00
..
2016-09-02 21:17:22 -07:00