Speedup sis-updater using extra firmware changed detection

We already have all the info to detect if we need to upgrade
directly after the read of device firmware version. Bailing
here saves 2s runtime in the no upgrade case.

BUG=b:65213465
TEST=Tested on guado with and without recovery

Change-Id: I94af29ae3e640819943cfbb74cddcbf1b6837cb3
Reviewed-on: https://chromium-review.googlesource.com/646332
Commit-Ready: Stefan Adolfsson <sadolfsson@chromium.org>
Tested-by: Stefan Adolfsson <sadolfsson@chromium.org>
Reviewed-by: Zhongze Hu <frankhu@google.com>
3 files changed
tree: b62742114bb0fe2ac642567e7b5ffbc64ce891ca
  1. conf/
  2. src/
  3. .gitignore
  4. common.mk
  5. LICENSE
  6. Makefile
  7. README.md
README.md

SiS Firmware Updater

Description

The code was proviced by SiS and modified by Google. Modifications include:

  • Cleaning the code according to Google C++ coding style. Eliminating compiling errors.
  • Adding a feature that the updater can take the device name from input parameters. Blinded search is only required when input device name is invalid.
  • Adding a feature that the updater will compare FW version before actual update. If the FW versions on device and in Chrome OS are same, the updater will terminate.
  • Adding a input flag specifying whether the device is in recovery mode (FW update fails last time). The flag value is determined by VID from udev rule.

Requirements

On Linux, should run as root.

Build

At the root of the repository: make.

Under Chrome OS development enviroment: emerge-${BOARD} sis-updater.

How to use

Just run ./sis-updater.