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

Issue 764232 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature



Sign in to add a comment

init: integrate the tasks that show boot message before UI

Project Member Reported by akahuang@chromium.org, Sep 12 2017

Issue description

Some updaters will run once at boot. They show boot message and return to normal UI after it is finished. Originally there is only one touch firmware, which just calls `display-boot-message` and clear frecon afterward. Now the hammer firmware also need to update at boot time. We need a mechanism to avoid both jobs upgrade UI at the same time.
 

Comment 1 by vapier@chromium.org, Sep 28 2017

how long does the no-op case take ?  by serializing these firmware updates before the UI comes up, even the scenario of no updates inflicts boot delays.

ideally we'd be able to check for all the firmware in parallel to see if any need updating, and then start doing the updates together.  since actual updates are (presumably) rare, we don't need to optimize for that path ... that can stay serial.  but we need the checking logic to be fast and parallel if possible.
Project Member

Comment 2 by bugdroid1@chromium.org, Oct 7 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/touch_updater/+/9e750885513df457a83efed5be11d64a7c518a64

commit 9e750885513df457a83efed5be11d64a7c518a64
Author: Chih-Yu Huang <akahuang@google.com>
Date: Sat Oct 07 09:29:47 2017

Invoke `chromeos-touch-update` from `boot-update-firmware` job.

Currently we also need to update hammer firmware at boot time. In
order to avoid hammer updater and touch updater upgrade UI at the same
time, we use a integration job `boot-update-firmware` to invoke them
sequentially.

Also, because `boot-update-firmware` will restore frecon after all
jobs finish, we don't need to kill frecon process here.

BUG= chromium:764232 
TEST=Reboot device and chromeos-touch-update is running
CQ-DEPEND=CL:659440

Change-Id: Icc23df61a63c6dd498276af769ba3c76b2488159
Reviewed-on: https://chromium-review.googlesource.com/658015
Commit-Ready: Chih-Yu Huang <akahuang@chromium.org>
Tested-by: Chih-Yu Huang <akahuang@chromium.org>
Reviewed-by: Wei-Ning Huang <wnhuang@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/9e750885513df457a83efed5be11d64a7c518a64/scripts/chromeos-google-touch-firmware-update.sh
[modify] https://crrev.com/9e750885513df457a83efed5be11d64a7c518a64/scripts/chromeos-touch-update.conf

Project Member

Comment 3 by bugdroid1@chromium.org, Oct 7 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/b04da64fa404622f6c4d07d4fb10019ffaa42205

commit b04da64fa404622f6c4d07d4fb10019ffaa42205
Author: Chih-Yu Huang <akahuang@google.com>
Date: Sat Oct 07 09:29:47 2017

hammerd: Force update at boot and show boot message during update.

On boot, we try to update several kinds of firmware. If the firmware
needs to update, we block the UI at until update finishes, and then go
back to Chrome UI. Therefore, we need a new upstart job to check these
jobs sequentially.

This CL adds a job "boot-update-firmware" for this. It triggers
hammerd and show up the message if the hammer firmware needs update.

When the base does not need to update (firmware is up to date, or the
base is not attached), the task only takes 0.06 second. It does not
affect the bootup time significantly.

BUG=b:65180379,  chromium:764232 
TEST=With new firmware, plug hammer and reboot poppy,
     check the boot message shows up and
     keyboard works after entering UI
TEST=With original firmware, plug hammer and reboot poppy,
     check the boot message does not show up, enter UI directly
TEST=With new firmware, unplug hammer and reboot poppy,
     check the boot message does not how up, enter UI directly.
     Then plug hammer, check the keyboard works after 5 seconds.
CQ-DEPEND=CL:651711,CL:656859

Change-Id: If5324c036faa8a7520f06945871a0d1b602d4da3
Reviewed-on: https://chromium-review.googlesource.com/651788
Commit-Ready: Chih-Yu Huang <akahuang@chromium.org>
Tested-by: Chih-Yu Huang <akahuang@chromium.org>
Reviewed-by: Chih-Yu Huang <akahuang@chromium.org>

[modify] https://crrev.com/b04da64fa404622f6c4d07d4fb10019ffaa42205/hammerd/mock_update_fw.h
[modify] https://crrev.com/b04da64fa404622f6c4d07d4fb10019ffaa42205/hammerd/hammer_updater_unittest.cc
[modify] https://crrev.com/b04da64fa404622f6c4d07d4fb10019ffaa42205/init/chromeos-boot-alert
[modify] https://crrev.com/b04da64fa404622f6c4d07d4fb10019ffaa42205/hammerd/update_fw.cc
[modify] https://crrev.com/b04da64fa404622f6c4d07d4fb10019ffaa42205/hammerd/main.cc
[add] https://crrev.com/b04da64fa404622f6c4d07d4fb10019ffaa42205/hammerd/init/hammerd-at-boot.sh
[modify] https://crrev.com/b04da64fa404622f6c4d07d4fb10019ffaa42205/hammerd/update_fw.h
[add] https://crrev.com/b04da64fa404622f6c4d07d4fb10019ffaa42205/init/upstart/boot-update-firmware.conf
[modify] https://crrev.com/b04da64fa404622f6c4d07d4fb10019ffaa42205/hammerd/init/hammerd.conf
[modify] https://crrev.com/b04da64fa404622f6c4d07d4fb10019ffaa42205/hammerd/hammer_updater.cc
[modify] https://crrev.com/b04da64fa404622f6c4d07d4fb10019ffaa42205/hammerd/hammer_updater.h

Project Member

Comment 4 by bugdroid1@chromium.org, Oct 7 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/10f81416c8ca20ad619108d6127771c806528037

commit 10f81416c8ca20ad619108d6127771c806528037
Author: Chih-Yu Huang <akahuang@google.com>
Date: Sat Oct 07 09:29:47 2017

init: Invoke `chromeos-touch-update` from `boot-update-firmware` job.

Currently we also need to update hammer firmware at boot time. In
order to avoid hammer updater and touch updater upgrade UI at the same
time, we use a integration job `boot-update-firmware` to invoke them
sequentially.

The task takes 0.22 second when the touchpad firmware does not update.

BUG= chromium:764232 
TEST=Reboot device and chromeos-touch-update is running
CQ-DEPEND=CL:658015

Change-Id: Ife7c0d363cc5bb46a6918544a133108d2da0e4d5
Reviewed-on: https://chromium-review.googlesource.com/659440
Commit-Ready: Chih-Yu Huang <akahuang@chromium.org>
Tested-by: Chih-Yu Huang <akahuang@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/10f81416c8ca20ad619108d6127771c806528037/init/upstart/boot-update-firmware.conf

Status: Fixed (was: Untriaged)

Sign in to add a comment