New issue
Advanced search Search tips

Issue 764210 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 13
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Add board specific scripts for postinstall

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

Issue description

Currently some projects choose to put their special hacks (usually for solving issues in early builds) in firmware updater board customization script (chromeos-base/chromeos-firmware-XXX/files/extra/updater_custom.sh) but that may have few defects:

 - 1. test images don't run firmware updaters by default
 - 2. the 'side effects' made execution of firmware updater unpredicted and made debugging even harder (we've seen many issues due to the ME/lock-spi scripts)

By the new simplified firmware updater, we already have a new 'sbin/board-setgoodfirmware' that will be invoked on every system reboot, just like the old 'chromeos-firmwareupdate --mode=bootok'.

Now, I wonder if we should add another script, say 'board-postinst', that will be executed in every AU or recovery installation, so the hacks can be really removed from firmware updater.

Duncan is a heavy user on hacks in firmware updater, so I think we'll get his feedbacks first, and see if we can do this on future platforms to prevent creating more custom.sh :)
 

Comment 1 by hungte@chromium.org, Sep 12 2017

from duncan: "Good question.. Since we seem to use this for pre-production/dogfood issues it should probably run always.  (though usually we have at least premp keys for dogfood)"

So probably a sbin/board-postinst that is invoked no matter if firmware updater is executed or not.
Project Member

Comment 2 by bugdroid1@chromium.org, Sep 14 2017

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

commit 8ef78de6b0835985320a6209c18d154ba29de7ef
Author: Hung-Te Lin <hungte@chromium.org>
Date: Thu Sep 14 18:36:38 2017

installer: Add a new hook 'board-postinst' for board specific post install.

Many projects may need board specific hooks to be installed only when an
auto update or recovery installation is done, instead of on every
reboot (which is provided by board-setgoodfirmware).

The new RunBoardPostInstall provides a way to run command
/usr/sbin/board-postinst (can be installed by either chromeos-bsp-$BOARD
or the files/sbin/board-postinst inside chromeos-firmware-$BOARD) during
post install.

BUG= chromium:764210 
TEST=emerge-reef chromeos-installer

Change-Id: I2455a363c4f5881dfbd326553016148f43535b91
Reviewed-on: https://chromium-review.googlesource.com/662918
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[add] https://crrev.com/8ef78de6b0835985320a6209c18d154ba29de7ef/installer/README.md
[modify] https://crrev.com/8ef78de6b0835985320a6209c18d154ba29de7ef/installer/chromeos_postinst.cc

Project Member

Comment 3 by bugdroid1@chromium.org, Feb 1 2018

Owner: hungte@chromium.org
Status: Fixed (was: Untriaged)

Sign in to add a comment