New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 710302 link

Starred by 1 user

Issue metadata

Status: Archived
Owner:
Last visit > 30 days ago
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Task



Sign in to add a comment

Implement the Huddly camera firmware updater

Project Member Reported by porce@chromium.org, Apr 11 2017

Issue description

Implement the Huddly camera firmware updater.
It will consist of multiple incremental CLs, all will be hosted in this bug.

 

Comment 2 by porce@chromium.org, Apr 17 2017

Components: OS>Systems
Labels: Proj-Hotrod M-60
Project Member

Comment 4 by bugdroid1@chromium.org, Apr 25 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/huddly-updater/+/927748584ce871cdebe4ec076d0632ff91f45f87

commit 927748584ce871cdebe4ec076d0632ff91f45f87
Author: Jiwoong Lee <porce@google.com>
Date: Tue Apr 25 05:51:49 2017

Implement UsbDevice class

BUG= chromium:710302 
TEST=Build huddly-updater package for Guado board. Read peripheral fw version.
UsbDevice class handles the usb device specified by the vendor ID and
product ID. It lists up the vendor specific commands as VendorRequest
enum. It implements vendor specific USB read/write/boot operations.

This is the first set, and implements basic read, and querying the
firmware version.

Change-Id: I355fb5b02ac448da28fad9aaa99b653d56636c52
Reviewed-on: https://chromium-review.googlesource.com/483141
Commit-Ready: Jiwoong Lee <porce@chromium.org>
Tested-by: Jiwoong Lee <porce@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>

[modify] https://crrev.com/927748584ce871cdebe4ec076d0632ff91f45f87/src/firmware.cc
[modify] https://crrev.com/927748584ce871cdebe4ec076d0632ff91f45f87/src/module.mk
[modify] https://crrev.com/927748584ce871cdebe4ec076d0632ff91f45f87/src/main.cc
[modify] https://crrev.com/927748584ce871cdebe4ec076d0632ff91f45f87/src/tools.h
[modify] https://crrev.com/927748584ce871cdebe4ec076d0632ff91f45f87/src/firmware.h
[add] https://crrev.com/927748584ce871cdebe4ec076d0632ff91f45f87/src/usb_device.h
[add] https://crrev.com/927748584ce871cdebe4ec076d0632ff91f45f87/src/usb_device.cc
[modify] https://crrev.com/927748584ce871cdebe4ec076d0632ff91f45f87/src/tools.cc

Project Member

Comment 5 by bugdroid1@chromium.org, Apr 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/huddly-updater/+/df56b7c98545a5721800d4ed6b02999124e531d9

commit df56b7c98545a5721800d4ed6b02999124e531d9
Author: Jiwoong Lee <porce@google.com>
Date: Fri Apr 28 03:28:40 2017

Add misc utility tools

- Endianness: Platform check, Endianness conversion for uint32, LE array to uint32
- Time: Get epoch in millisecond. Sleep in millisecond
- File: Get file size, Read file into memory

BUG= chromium:710302 
TEST=Build package for Guado board

Change-Id: I7a7c8b25f87c3e8899f7a7b16e4ff9bf0e148aec
Reviewed-on: https://chromium-review.googlesource.com/487361
Commit-Ready: Jiwoong Lee <porce@chromium.org>
Tested-by: Jiwoong Lee <porce@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>

[modify] https://crrev.com/df56b7c98545a5721800d4ed6b02999124e531d9/src/tools.cc
[modify] https://crrev.com/df56b7c98545a5721800d4ed6b02999124e531d9/src/tools.h

Project Member

Comment 6 by bugdroid1@chromium.org, Apr 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/huddly-updater/+/ee151ecae2b775b656b8688bb31029213aef296d

commit ee151ecae2b775b656b8688bb31029213aef296d
Author: Jiwoong Lee <porce@google.com>
Date: Fri Apr 28 03:28:40 2017

Add app_path_ and getter to Firmware class

BUG= chromium:710302 
TEST=Build package for Guado board

Change-Id: Ib2500c9cc144891761ee06947ee61e4b5834f483
Reviewed-on: https://chromium-review.googlesource.com/487362
Commit-Ready: Jiwoong Lee <porce@chromium.org>
Tested-by: Jiwoong Lee <porce@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>

[modify] https://crrev.com/ee151ecae2b775b656b8688bb31029213aef296d/src/firmware.cc
[modify] https://crrev.com/ee151ecae2b775b656b8688bb31029213aef296d/src/firmware.h

Project Member

Comment 7 by bugdroid1@chromium.org, Apr 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/huddly-updater/+/db612b0102a8ce20a444744530f21d80e6ada056

commit db612b0102a8ce20a444744530f21d80e6ada056
Author: Jiwoong Lee <porce@google.com>
Date: Fri Apr 28 05:54:50 2017

Implement Flasher class

This class is responsible to perform flash action
on a specified camera peripheral with a specified firmware package.

BUG= chromium:710302 
TEST=Build package for Guado board

Change-Id: I7a8d345433bce44e6e3594efdeaf87983b44fdde
Reviewed-on: https://chromium-review.googlesource.com/487402
Commit-Ready: Jiwoong Lee <porce@chromium.org>
Tested-by: Jiwoong Lee <porce@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>

[add] https://crrev.com/db612b0102a8ce20a444744530f21d80e6ada056/src/flasher.cc
[add] https://crrev.com/db612b0102a8ce20a444744530f21d80e6ada056/src/flasher.h

Project Member

Comment 8 by bugdroid1@chromium.org, Apr 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/huddly-updater/+/e5cf68cc592d2354973916b160b2e520bf804f33

commit e5cf68cc592d2354973916b160b2e520bf804f33
Author: Jiwoong Lee <porce@google.com>
Date: Fri Apr 28 05:54:50 2017

Implement MinicamDevice class

MinicamDevice class implements Huddly camera vendor-specific read, write,
and various commands. It also implements getter and setters of information
that is stored on the peripheral.

BUG= chromium:710302 
TEST=Build package for Guado board

Change-Id: I2de8a2aabfc81d9540aafa21d56c398caf671d58
Reviewed-on: https://chromium-review.googlesource.com/487403
Commit-Ready: Jiwoong Lee <porce@chromium.org>
Tested-by: Jiwoong Lee <porce@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>

[add] https://crrev.com/e5cf68cc592d2354973916b160b2e520bf804f33/src/minicam_device.h
[add] https://crrev.com/e5cf68cc592d2354973916b160b2e520bf804f33/src/minicam_device.cc

Project Member

Comment 9 by bugdroid1@chromium.org, Apr 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/huddly-updater/+/e5cf68cc592d2354973916b160b2e520bf804f33

commit e5cf68cc592d2354973916b160b2e520bf804f33
Author: Jiwoong Lee <porce@google.com>
Date: Fri Apr 28 05:54:50 2017

Implement MinicamDevice class

MinicamDevice class implements Huddly camera vendor-specific read, write,
and various commands. It also implements getter and setters of information
that is stored on the peripheral.

BUG= chromium:710302 
TEST=Build package for Guado board

Change-Id: I2de8a2aabfc81d9540aafa21d56c398caf671d58
Reviewed-on: https://chromium-review.googlesource.com/487403
Commit-Ready: Jiwoong Lee <porce@chromium.org>
Tested-by: Jiwoong Lee <porce@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>

[add] https://crrev.com/e5cf68cc592d2354973916b160b2e520bf804f33/src/minicam_device.h
[add] https://crrev.com/e5cf68cc592d2354973916b160b2e520bf804f33/src/minicam_device.cc

Project Member

Comment 10 by bugdroid1@chromium.org, Apr 29 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/huddly-updater/+/4c772be56d7e04cdfd2e9605232616808fe88c9e

commit 4c772be56d7e04cdfd2e9605232616808fe88c9e
Author: Jiwoong Lee <porce@google.com>
Date: Sat Apr 29 00:09:20 2017

Revamp the main function of huddly firmware updater

Performs reboot if the device is in abnormal Bootloader mode.
Converting the APP mode to Bootloader mode.
Invoke Flasher.

BUG= chromium:710302 
TEST=Build package for Guado board

Change-Id: I39f460ac2f63889f83964700d7155a2d0f8e0bc9
Reviewed-on: https://chromium-review.googlesource.com/487404
Commit-Ready: Jiwoong Lee <porce@chromium.org>
Tested-by: Jiwoong Lee <porce@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>

[modify] https://crrev.com/4c772be56d7e04cdfd2e9605232616808fe88c9e/src/module.mk
[modify] https://crrev.com/4c772be56d7e04cdfd2e9605232616808fe88c9e/src/main.cc

Project Member

Comment 11 by bugdroid1@chromium.org, Apr 29 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/55229a18fb60e6dd78c0871a33249cf9f7c17bcb

commit 55229a18fb60e6dd78c0871a33249cf9f7c17bcb
Author: Jiwoong Lee <porce@google.com>
Date: Sat Apr 29 02:42:30 2017

Add unzip runtime dependency to huddly-updater ebuild

BUG= chromium:710302 
TEST=Build package for Guado board

Change-Id: Ibe9134410f9a9b9ec95623996896e764288309f0
Reviewed-on: https://chromium-review.googlesource.com/489473
Commit-Ready: Jiwoong Lee <porce@chromium.org>
Tested-by: Jiwoong Lee <porce@chromium.org>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>

[modify] https://crrev.com/55229a18fb60e6dd78c0871a33249cf9f7c17bcb/sys-apps/huddly-updater/huddly-updater-9999.ebuild

Project Member

Comment 12 by bugdroid1@chromium.org, May 4 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/928b64791cbe8d31561edc3b70f653724b6fdbb9

commit 928b64791cbe8d31561edc3b70f653724b6fdbb9
Author: Simon Que <sque@chromium.org>
Date: Thu May 04 02:40:24 2017

huddly-updater: Add dependency on libchrome

This allows us to use libchrome library features in huddly-updater.

BUG= chromium:710302 
TEST=Successfully run: "emerge-guado huddly-updater"

Change-Id: I07446801783e15eec46087bff3d145f21ad741d2
Reviewed-on: https://chromium-review.googlesource.com/494846
Commit-Ready: Simon Que <sque@chromium.org>
Tested-by: Simon Que <sque@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/928b64791cbe8d31561edc3b70f653724b6fdbb9/sys-apps/huddly-updater/huddly-updater-9999.ebuild

Project Member

Comment 13 by bugdroid1@chromium.org, May 4 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/huddly-updater/+/280d5c047e1e16b03f3452fbf013a7ec7aeba7f7

commit 280d5c047e1e16b03f3452fbf013a7ec7aeba7f7
Author: Jiwoong Lee <porce@google.com>
Date: Thu May 04 06:17:45 2017

Implement explicit Setup and Teardown in FlashApp()

Also implement eligibility test.
BUG= chromium:710302 
TEST=Build package for Guado board

Change-Id: I75715ea57740a82de89b415eec50d009b0cea2c9
Reviewed-on: https://chromium-review.googlesource.com/490695
Commit-Ready: Jiwoong Lee <porce@chromium.org>
Tested-by: Jiwoong Lee <porce@chromium.org>
Reviewed-by: Simon Que <sque@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>

[modify] https://crrev.com/280d5c047e1e16b03f3452fbf013a7ec7aeba7f7/src/flasher.cc
[modify] https://crrev.com/280d5c047e1e16b03f3452fbf013a7ec7aeba7f7/src/flasher.h

Project Member

Comment 14 by bugdroid1@chromium.org, May 4 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/huddly-updater/+/fa6ff53ec26127d6dd1581d021f227e486df04cb

commit fa6ff53ec26127d6dd1581d021f227e486df04cb
Author: Simon Que <sque@chromium.org>
Date: Thu May 04 06:17:45 2017

Add makefile dependency on libchrome

This allows us to use libchrome library features in huddly-updater.

BUG= chromium:710302 
TEST=Successfully run: "emerge-guado huddly-updater"

CQ-DEPEND=I07446801783e15eec46087bff3d145f21ad741d2

Change-Id: I34e20c3463d60f0bb2536df79f98677221e21887
Reviewed-on: https://chromium-review.googlesource.com/495066
Commit-Ready: Simon Que <sque@chromium.org>
Tested-by: Simon Que <sque@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/fa6ff53ec26127d6dd1581d021f227e486df04cb/src/module.mk

Project Member

Comment 15 by bugdroid1@chromium.org, May 4 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/huddly-updater/+/5b838ffd68cc774636cec74e566f3162f46ec574

commit 5b838ffd68cc774636cec74e566f3162f46ec574
Author: Jiwoong Lee <porce@google.com>
Date: Thu May 04 15:14:22 2017

Refactor UsbDevice class

The original Setup() routine was used for different purposes:
  to check if the device exists,
  to wait for rebooting device to come up,
  to prepare the USB communication.

The new code refactored Setup() and implemented new modularized routines:
  GetContext(), GetDevice(), DetachKernelDriver().
As a pair, ReattachKernelDriver() is implemented too.

Not only this subroutines simplify the functional identification of Setup(),
but also now these new subroutines are used to implement
new wrapper conveninece methods: Exists(), WaitForOnline().

BUG= chromium:710302 
TEST=Build package for Guado board

Change-Id: I16732bd9c92e1e9cb67144aa33f95dfc4889e25a
Reviewed-on: https://chromium-review.googlesource.com/490696
Commit-Ready: Simon Que <sque@chromium.org>
Tested-by: Jiwoong Lee <porce@chromium.org>
Reviewed-by: Simon Que <sque@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>

[modify] https://crrev.com/5b838ffd68cc774636cec74e566f3162f46ec574/src/usb_device.h
[modify] https://crrev.com/5b838ffd68cc774636cec74e566f3162f46ec574/src/usb_device.cc

Project Member

Comment 16 by bugdroid1@chromium.org, May 4 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/huddly-updater/+/56019f1233ccd2a0aaf4a0bd06f7bada12e51566

commit 56019f1233ccd2a0aaf4a0bd06f7bada12e51566
Author: Jiwoong Lee <porce@google.com>
Date: Thu May 04 15:14:22 2017

Make MinicamDevice inherit from UsbDevice

Corresponding super class constructor, destructor, Setup(), Teardown()
are now delegated.
Upon Reboot(), Teardown() is called for clean up.
CheckIfExists() is implemented.
Error handling is improved.
BootMode related utilities are implemented.

BUG= chromium:710302 
TEST=Build package for Guado board

Change-Id: Iacfda7b2d01a56c98f26f3dd79a2da5accef74ef
Reviewed-on: https://chromium-review.googlesource.com/490697
Commit-Ready: Simon Que <sque@chromium.org>
Tested-by: Jiwoong Lee <porce@chromium.org>
Reviewed-by: Simon Que <sque@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>

[modify] https://crrev.com/56019f1233ccd2a0aaf4a0bd06f7bada12e51566/src/firmware.cc
[modify] https://crrev.com/56019f1233ccd2a0aaf4a0bd06f7bada12e51566/src/minicam_device.h
[modify] https://crrev.com/56019f1233ccd2a0aaf4a0bd06f7bada12e51566/src/minicam_device.cc

Project Member

Comment 17 by bugdroid1@chromium.org, May 4 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/huddly-updater/+/b490de4edc6353b19a06787c654f3699777c6517

commit b490de4edc6353b19a06787c654f3699777c6517
Author: Jiwoong Lee <porce@google.com>
Date: Thu May 04 22:06:16 2017

Refactor main file

Similar procedures are modularized and the entire call flow is simplified.

BUG= chromium:710302 
TEST=Build package for Guado board

Change-Id: I69df92ef62f673702f199be8aeb203c6bce50b1b
Reviewed-on: https://chromium-review.googlesource.com/490698
Commit-Ready: Jiwoong Lee <porce@chromium.org>
Tested-by: Jiwoong Lee <porce@chromium.org>
Reviewed-by: Simon Que <sque@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>

[modify] https://crrev.com/b490de4edc6353b19a06787c654f3699777c6517/src/module.mk
[modify] https://crrev.com/b490de4edc6353b19a06787c654f3699777c6517/src/main.cc

Project Member

Comment 18 by bugdroid1@chromium.org, May 11 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/huddly-updater/+/0592f833bd2861c9f8be52658b3251265723167d

commit 0592f833bd2861c9f8be52658b3251265723167d
Author: Jiwoong Lee <porce@google.com>
Date: Thu May 11 00:27:32 2017

Isolate Huddly firmware updater by minijail

BUG= chromium:710302 
TEST=Build package for Guado board
CQ-DEPEND=CL:493792

Change-Id: If13584ccd4ea471b7e7bb18f6fe7ded2a93d5d30
Reviewed-on: https://chromium-review.googlesource.com/493836
Commit-Ready: Jiwoong Lee <porce@chromium.org>
Tested-by: Jiwoong Lee <porce@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/0592f833bd2861c9f8be52658b3251265723167d/conf/99-huddly.rules

Project Member

Comment 19 by bugdroid1@chromium.org, May 11 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/huddly-updater/+/823d7d5357f11401c47ccc09a4eca913a5937e04

commit 823d7d5357f11401c47ccc09a4eca913a5937e04
Author: Jiwoong Lee <porce@google.com>
Date: Thu May 11 00:27:32 2017

Suppress debug message of shell command utility

BUG= chromium:710302 
TEST=Build package for Guado board

Change-Id: Ia6b61b8272130334f1f6eb73d1243fec47f65a1b
Reviewed-on: https://chromium-review.googlesource.com/497708
Commit-Ready: Jiwoong Lee <porce@chromium.org>
Tested-by: Jiwoong Lee <porce@chromium.org>
Reviewed-by: Simon Que <sque@chromium.org>

[modify] https://crrev.com/823d7d5357f11401c47ccc09a4eca913a5937e04/src/tools.cc

Project Member

Comment 20 by bugdroid1@chromium.org, May 11 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/huddly-updater/+/df3b344c4016685fa953f9d234e659cb87d2913d

commit df3b344c4016685fa953f9d234e659cb87d2913d
Author: Jiwoong Lee <porce@google.com>
Date: Thu May 11 00:27:32 2017

Improve multiple APIs in UsbDevice class and MinicamDevice class

 - Make ControlTransfer() more generic, and better aligned with libusb_control_transfer().
 - Implement ShowInfo() and GetVersion()
 - Implement Dry-run mode
 - Beatify console print messages

BUG= chromium:710302 
TEST=Build package for Guado board

Change-Id: I72ad0d964101abc755b8f953b4b65a3d101f2fc2
Reviewed-on: https://chromium-review.googlesource.com/497709
Commit-Ready: Jiwoong Lee <porce@chromium.org>
Tested-by: Jiwoong Lee <porce@chromium.org>
Reviewed-by: Simon Que <sque@chromium.org>

[modify] https://crrev.com/df3b344c4016685fa953f9d234e659cb87d2913d/src/usb_device.h
[modify] https://crrev.com/df3b344c4016685fa953f9d234e659cb87d2913d/src/usb_device.cc
[modify] https://crrev.com/df3b344c4016685fa953f9d234e659cb87d2913d/src/minicam_device.h
[modify] https://crrev.com/df3b344c4016685fa953f9d234e659cb87d2913d/src/minicam_device.cc

Project Member

Comment 21 by bugdroid1@chromium.org, May 11 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/huddly-updater/+/83fd51e7613f7ad249c65f2921f8c0c2f049f67c

commit 83fd51e7613f7ad249c65f2921f8c0c2f049f67c
Author: Jiwoong Lee <porce@google.com>
Date: Thu May 11 00:27:33 2017

Implement parser for firmware package manifest file

Manifest file is used to identify the versions of the firmware package,
and the compatible hardware revisions.

BUG= chromium:710302 
TEST=Build package for Guado board

Change-Id: If596715c6e04d4f8615a7ecfab3501f590cde532
Reviewed-on: https://chromium-review.googlesource.com/497710
Commit-Ready: Jiwoong Lee <porce@chromium.org>
Tested-by: Jiwoong Lee <porce@chromium.org>
Reviewed-by: Simon Que <sque@chromium.org>

[modify] https://crrev.com/83fd51e7613f7ad249c65f2921f8c0c2f049f67c/src/firmware.cc
[modify] https://crrev.com/83fd51e7613f7ad249c65f2921f8c0c2f049f67c/src/firmware.h

Project Member

Comment 22 by bugdroid1@chromium.org, May 11 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/huddly-updater/+/c484da201ceb97a3220c263075408ce6a5843d73

commit c484da201ceb97a3220c263075408ce6a5843d73
Author: Jiwoong Lee <porce@google.com>
Date: Thu May 11 00:27:33 2017

Implement upgrade eligibility check in Flasher class

Compares the firmware versions and the hardware revision
before decides the upgrade action.
Supports command line option that overrides the logic and
upgrade forcefully.

BUG= chromium:710302 
TEST=Build package for Guado board

Change-Id: I29ceb988c43058bfa6b8499d28723fd3d39c4280
Reviewed-on: https://chromium-review.googlesource.com/497711
Commit-Ready: Jiwoong Lee <porce@chromium.org>
Tested-by: Jiwoong Lee <porce@chromium.org>
Reviewed-by: Simon Que <sque@chromium.org>

[modify] https://crrev.com/c484da201ceb97a3220c263075408ce6a5843d73/src/flasher.cc
[modify] https://crrev.com/c484da201ceb97a3220c263075408ce6a5843d73/src/flasher.h

Project Member

Comment 23 by bugdroid1@chromium.org, May 11 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/huddly-updater/+/17a689083997df4c9ed885000ccc0fd19187a30f

commit 17a689083997df4c9ed885000ccc0fd19187a30f
Author: Jiwoong Lee <porce@google.com>
Date: Thu May 11 00:27:33 2017

Support command line options and enable bootloader upgrade

Also modularize for better readability and functional separation.

BUG= chromium:710302 
TEST=Build package for Guado board

Change-Id: I1e836f15abdbe65cdd96c3890f197614f0b7d771
Reviewed-on: https://chromium-review.googlesource.com/497712
Commit-Ready: Jiwoong Lee <porce@chromium.org>
Tested-by: Jiwoong Lee <porce@chromium.org>
Reviewed-by: Simon Que <sque@chromium.org>

[modify] https://crrev.com/17a689083997df4c9ed885000ccc0fd19187a30f/src/main.cc

Project Member

Comment 24 by bugdroid1@chromium.org, May 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/huddly-updater/+/c5395f1d8392ae8e050e9f8c952be12c7553b33f

commit c5395f1d8392ae8e050e9f8c952be12c7553b33f
Author: Jiwoong Lee <porce@google.com>
Date: Fri May 12 10:25:38 2017

Fix a typo of manifest string

BUG= chromium:710302 
TEST=Build package for Guado board. "Run huddly-updater --info"
Change-Id: I2b51dfbe5ba6b17bd06780d86190dcfe23cbb9ca
Reviewed-on: https://chromium-review.googlesource.com/503554
Commit-Ready: Jiwoong Lee <porce@chromium.org>
Tested-by: Jiwoong Lee <porce@chromium.org>
Reviewed-by: Simon Que <sque@chromium.org>

[modify] https://crrev.com/c5395f1d8392ae8e050e9f8c952be12c7553b33f/src/firmware.cc

Project Member

Comment 25 by bugdroid1@chromium.org, May 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/e2e0855ce59e4d7b57b3fc300e64f1b1898d010f

commit e2e0855ce59e4d7b57b3fc300e64f1b1898d010f
Author: Jiwoong Lee <porce@google.com>
Date: Sat May 13 03:58:02 2017

Add user/group of minijail to Huddly updater ebuild

BUG= chromium:710302 
TEST=Build huddly updater package for guado and confirm the passwd/group

Change-Id: Ib6119acd9b8e746685d187ba23f20eaa850052fb
Reviewed-on: https://chromium-review.googlesource.com/505201
Commit-Ready: Jiwoong Lee <porce@chromium.org>
Tested-by: Jiwoong Lee <porce@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/e2e0855ce59e4d7b57b3fc300e64f1b1898d010f/sys-apps/huddly-updater/huddly-updater-9999.ebuild

Project Member

Comment 26 by bugdroid1@chromium.org, May 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/huddly-updater/+/73de6aadb78bb09fb1d588427597985b8c6154c4

commit 73de6aadb78bb09fb1d588427597985b8c6154c4
Author: Jiwoong Lee <porce@google.com>
Date: Thu May 18 09:26:09 2017

Improve the command line argument support

Clean up by distinguishing the workflows
for ChromeOS automatic upgrade vs for manual upgrade.

--path option is deprecated.
--pkg option is added to specify an absolute path
  to huddly firmware package file.

If --pkg is set, then manual upgrade: the provided package file is unzipped
into /tmp/huddly/.
Otherwise, then automatic upgrade: the firmware binaries and manifest files
in /lib/firmware/hudlly/ is used.

BUG= chromium:710302 
TEST=Build package for Guado board

Change-Id: Id7909c556b80118733f73c14dfcba1d83c4b1072
Reviewed-on: https://chromium-review.googlesource.com/506605
Commit-Ready: Simon Que <sque@chromium.org>
Tested-by: Jiwoong Lee <porce@chromium.org>
Reviewed-by: Simon Que <sque@chromium.org>

[modify] https://crrev.com/73de6aadb78bb09fb1d588427597985b8c6154c4/src/firmware.cc
[modify] https://crrev.com/73de6aadb78bb09fb1d588427597985b8c6154c4/src/firmware.h
[modify] https://crrev.com/73de6aadb78bb09fb1d588427597985b8c6154c4/src/main.cc

Project Member

Comment 27 by bugdroid1@chromium.org, May 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/huddly-updater/+/5c1dbb939529300705605d1377dec9153a8d2a56

commit 5c1dbb939529300705605d1377dec9153a8d2a56
Author: Jiwoong Lee <porce@google.com>
Date: Thu May 18 09:26:09 2017

Add example manifest files.

These files are dynamically bundled into the OS image in /lib/firmware/huddly/
at the time of image building. See huddly-firmware package ebuild for more.

BUG= chromium:710302 
TEST=Build package for Guado board

Change-Id: Ib1d67d4f4c7c96aa7f34e69ef241040c211c0b8f
Reviewed-on: https://chromium-review.googlesource.com/506774
Commit-Ready: Simon Que <sque@chromium.org>
Tested-by: Jiwoong Lee <porce@chromium.org>
Reviewed-by: Simon Que <sque@chromium.org>

[add] https://crrev.com/5c1dbb939529300705605d1377dec9153a8d2a56/src/example/manifest.json
[add] https://crrev.com/5c1dbb939529300705605d1377dec9153a8d2a56/src/example/manifest.txt
[add] https://crrev.com/5c1dbb939529300705605d1377dec9153a8d2a56/src/example/README.md

Project Member

Comment 28 by bugdroid1@chromium.org, May 19 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/huddly-updater/+/e80dd18c56ba7f15dcb19f07c518c68ce20229b7

commit e80dd18c56ba7f15dcb19f07c518c68ce20229b7
Author: Jiwoong Lee <porce@google.com>
Date: Fri May 19 04:05:24 2017

Eliminate unnecessary mode change invocation by huddly-updater

This CL
 - eliminates unnecessary mode change of huddly camera
   when upgrade is not eligible.

This CL also improves the logic and the modularity:
 - internalizes bootloader mode into the flasher.
 - internalizes firmware versions query into the flasher.
 - makes it explicit the call flow to check the firmware upgrade eligibility.

BUG= chromium:710302 
TEST=Build package for Guado board.

Change-Id: I4afaef22c37dbafae9f37fdc42367fb8522b4ca1
Reviewed-on: https://chromium-review.googlesource.com/508063
Commit-Ready: Jiwoong Lee <porce@chromium.org>
Tested-by: Jiwoong Lee <porce@chromium.org>
Reviewed-by: Simon Que <sque@chromium.org>

[modify] https://crrev.com/e80dd18c56ba7f15dcb19f07c518c68ce20229b7/src/main.cc
[modify] https://crrev.com/e80dd18c56ba7f15dcb19f07c518c68ce20229b7/src/flasher.cc
[modify] https://crrev.com/e80dd18c56ba7f15dcb19f07c518c68ce20229b7/src/flasher.h

Project Member

Comment 29 by bugdroid1@chromium.org, May 19 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/huddly-updater/+/ba26748d23c7d08717c49027f3945eedb8647350

commit ba26748d23c7d08717c49027f3945eedb8647350
Author: Jiwoong Lee <porce@google.com>
Date: Fri May 19 07:09:12 2017

Fix udev rule for huddly updater

 - Fix concatenated minijail0 options
 - Specify the permission for bootloader mode PID: 0x0010

BUG= chromium:710302 
TEST=Build package for Guado board. Execution permission on CFM.

Change-Id: Ifa9093d9feccece0e2a638b3a39b838f61a058aa
Reviewed-on: https://chromium-review.googlesource.com/508278
Commit-Ready: Jiwoong Lee <porce@chromium.org>
Tested-by: Jiwoong Lee <porce@chromium.org>
Reviewed-by: Simon Que <sque@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/ba26748d23c7d08717c49027f3945eedb8647350/conf/99-huddly.rules

Project Member

Comment 30 by bugdroid1@chromium.org, May 20 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/huddly-updater/+/6bd0b72534a0e1e5181b0f3e90efbe39db911fe5

commit 6bd0b72534a0e1e5181b0f3e90efbe39db911fe5
Author: Jiwoong Lee <porce@google.com>
Date: Sat May 20 03:47:36 2017

Convert std::cout/printf to LOG() of base/logging.h

This CL adds a command line option to specify the log file destination,
with default /tmp/huddly.log.

BUG= chromium:710302 
TEST=Build package for Guado board. Run on CFM.

Change-Id: I3462698128a3d20677d89394868be80512b20563
Reviewed-on: https://chromium-review.googlesource.com/509269
Commit-Ready: Jiwoong Lee <porce@chromium.org>
Tested-by: Jiwoong Lee <porce@chromium.org>
Reviewed-by: Simon Que <sque@chromium.org>

[modify] https://crrev.com/6bd0b72534a0e1e5181b0f3e90efbe39db911fe5/src/firmware.cc
[modify] https://crrev.com/6bd0b72534a0e1e5181b0f3e90efbe39db911fe5/src/main.cc
[modify] https://crrev.com/6bd0b72534a0e1e5181b0f3e90efbe39db911fe5/src/usb_device.cc
[modify] https://crrev.com/6bd0b72534a0e1e5181b0f3e90efbe39db911fe5/src/flasher.cc
[modify] https://crrev.com/6bd0b72534a0e1e5181b0f3e90efbe39db911fe5/src/minicam_device.cc
[modify] https://crrev.com/6bd0b72534a0e1e5181b0f3e90efbe39db911fe5/src/tools.cc

Project Member

Comment 31 by bugdroid1@chromium.org, May 20 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/huddly-updater/+/6bd0b72534a0e1e5181b0f3e90efbe39db911fe5

commit 6bd0b72534a0e1e5181b0f3e90efbe39db911fe5
Author: Jiwoong Lee <porce@google.com>
Date: Sat May 20 03:47:36 2017

Convert std::cout/printf to LOG() of base/logging.h

This CL adds a command line option to specify the log file destination,
with default /tmp/huddly.log.

BUG= chromium:710302 
TEST=Build package for Guado board. Run on CFM.

Change-Id: I3462698128a3d20677d89394868be80512b20563
Reviewed-on: https://chromium-review.googlesource.com/509269
Commit-Ready: Jiwoong Lee <porce@chromium.org>
Tested-by: Jiwoong Lee <porce@chromium.org>
Reviewed-by: Simon Que <sque@chromium.org>

[modify] https://crrev.com/6bd0b72534a0e1e5181b0f3e90efbe39db911fe5/src/firmware.cc
[modify] https://crrev.com/6bd0b72534a0e1e5181b0f3e90efbe39db911fe5/src/main.cc
[modify] https://crrev.com/6bd0b72534a0e1e5181b0f3e90efbe39db911fe5/src/usb_device.cc
[modify] https://crrev.com/6bd0b72534a0e1e5181b0f3e90efbe39db911fe5/src/flasher.cc
[modify] https://crrev.com/6bd0b72534a0e1e5181b0f3e90efbe39db911fe5/src/minicam_device.cc
[modify] https://crrev.com/6bd0b72534a0e1e5181b0f3e90efbe39db911fe5/src/tools.cc

Comment 32 by porce@chromium.org, Jul 25 2017

Status: Fixed (was: Untriaged)
All landed in M60. Feature completion.
Labels: Proj-Bluestreak

Comment 34 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Sign in to add a comment