Vadim Bendebury fcbea6a324 usb_updater: move to protocol version 4
Trying to use usb_updater in the upstart script made its shortcomings
very obvious: it is difficult to tell if the cr50 needs to have both
RO and RW updated, and if so - if it is even capable of updating RW.

Also, it is not clear that the target should erase its backup sections
as soon as it receives the transfer originating PDU. It is not known
in advance if the host has a newer RW section, of if the host is even
going to transfer the RO section.

These issues are addressed by version 4 of the image transfer
protocol.

The target now reports versions of its currently active RO and RW
sections back to the host. The host compares versions running on the
target with the versions retrieved from the image prepared for the
update and decides which sections, if any, need to be transferred.

The host also takes into account protocol version currently running by
the target's RW: versions below 3 do not allow RO updates.

In the development environment USB transfer ends with the target
reset. This is not desirable when the update is happening on a
Chromebook running production code. Also, in the development
environment there could exist multiple versions of the image with the
same signer header version fields, with only difference in the
timestamp. We want to be able to update using these images in
development environment, but in production we want to rely to the
header version fields.

These two mode (dev versus production) are now controlled by the
-u/--upstart command line flag.

The updater now can return four different exit values:

  - 0 means that the update was not required, the device is already
    running the current code.

  - 1 means update was completed, the target must be reset for the
    update to kick in.

  - 2 means that the RW transfer was completed, but the RO transfer
    could bot be attempted, because the target is running an early
    protocol version and is not capable of the RO updates.

    This exit value is the indicator that the utility needs to be run
    again after target restated, so that the new RW version can accept
    an RO update.

  - 3 means the update failed due to some internal error.

BRANCH=none
BUG=chrome-os-partner:49954
TEST=updates of targets running earlier protocol version still work
     fine.

Change-Id: Ia56f63072eaf88dcdefebf621b7341535748c7d7
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/374759
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
2016-08-26 21:49:30 +00:00
2016-08-25 07:32:31 -07:00
2016-08-25 07:32:31 -07:00
2012-05-11 09:11:52 -07:00
2016-07-11 21:27:46 -07:00
2014-04-02 19:58:53 +00:00
2015-12-08 20:05:05 -08:00

For an overview of the Embedded Controller firmware, refer to

http://www.chromium.org/chromium-os/2014-firmware-summit

For instructions on building from source, refer to

http://www.chromium.org/chromium-os/ec-development/getting-started-building-ec-images-quickly
Description
No description provided
Readme 1.4 GiB
Languages
C 64.7%
Lasso 20.7%
ASL 3.6%
JavaScript 3.2%
C# 2.9%
Other 4.6%