usb_updater: allow to communicate with cr50 using trunks_send
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 <5515d6d2d0829cbe0dd0dcf2094aaded06d58514@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/634629
Reviewed-by: Hung-Te Lin <8a7fce4940baad93a69f5073b383c85deed9d9c4@chromium.org>
Reviewed-by: Andrey Pronin <53bbebe6910b11f7aa2d1daaa466658eb4cba5f2@chromium.org>

coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec