Use logging instead of printf in sis fw updater

Use libbrillo syslog_logging to save logs. By default, the log
will be save to /var/log/messages. It can also be print to
stdout or write to a particular file.

BUG=None
TEST=Built chrome os image and verified on chrome box.

Change-Id: I14a1bb12a4c9130a30dda1d40298399dd3a4e50d
Reviewed-on: https://chromium-review.googlesource.com/526298
Commit-Ready: Zhongze Hu <frankhu@google.com>
Tested-by: Zhongze Hu <frankhu@google.com>
Reviewed-by: Simon Que <sque@chromium.org>
4 files changed
tree: ecfbf9636634ca6efab431a930c0d308f84f089c
  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.