diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2017-08-24 19:24:02 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-09-07 12:56:30 -0700 |
commit | 8c9f9ad861a48903aef5bd923741e12aa802c65c (patch) | |
tree | dd9a8b40bb6a91449c0ec49c3158b8c6bd75a8a5 /chip/g | |
parent | 588320d4b840e4466775815496f266e003586f9d (diff) | |
download | chrome-ec-8c9f9ad861a48903aef5bd923741e12aa802c65c.tar.gz |
usb_updater: allow to communicate with cr50 using trunks_send
It is necessary to be able to access Cr50 using usb_updater without
stopping trunksd services. This patch adds another option for
usb_updater to communicate with Cr50, using the trunks_send command.
A new command line option '-t' is added to allow to choose the new
interface.
When communicating over trunks_send the same processing is used as
when communicating over /dev/tpm0, just instead of talking to the
hardware device, popen() function is used to run trunks_send --raw
command and to gain access to its console output.
BRANCH=none
BUG=none
TEST=ran various commands using the new '-t' option:
# ./usb_updater -t /opt/google/cr50/firmware/cr50.bin.prod
read 524288(0x80000) bytes from /opt/google/cr50/firmware/cr50.bin.prod
start
target running protocol version 6
keyids: RO 0xaa66150f, RW 0xb93d6539
offsets: backup RO at 0x40000, backup RW at 0x4000
sending 0x32288 bytes to 0x4000
-------
update complete
reboot requested
image updated
[reboot...]
# ./usb_updater -t -f
start
target running protocol version 6
keyids: RO 0xaa66150f, RW 0xb93d6539
offsets: backup RO at 0x40000, backup RW at 0x4000
Current versions:
RO 0.0.10
RW 0.0.23
Change-Id: I9c7481c30c2f6908e0d1ac4f204654d2fd1b3b2e
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/634629
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Andrey Pronin <apronin@chromium.org>
Diffstat (limited to 'chip/g')
0 files changed, 0 insertions, 0 deletions