diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2017-06-08 13:54:42 -0700 |
---|---|---|
committer | Vadim Bendebury <vbendeb@chromium.org> | 2017-06-23 21:32:35 +0000 |
commit | 976c99634430026b6d6f38ee89aba01545ce1b14 (patch) | |
tree | 756c34fc64b39a1a3ccaba132dc48dcc407eb322 /common/lb_common.c | |
parent | a2e2a6a9da6ad2144b009ee0253c0bfca62982be (diff) | |
download | chrome-ec-976c99634430026b6d6f38ee89aba01545ce1b14.tar.gz |
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>
(cherry picked from commit bdbb45b14acf4af6acef045272c845204adc77e3)
Reviewed-on: https://chromium-review.googlesource.com/547043
Diffstat (limited to 'common/lb_common.c')
0 files changed, 0 insertions, 0 deletions