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

Issue 917570 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

chromeos-ec: ebuild should only pass TOUCHPAD_FW to detachable base, and BOOTBLOCK to main EC

Project Member Reported by drinkcat@chromium.org, Dec 22

Issue description

The make parameter TOUCHPAD_FW only makes sense for detachable bases, and BOOTBLOCK only makes sense for the main EC (when USE="bootblock_in_ec" is set, i.e. on kukui).

Currently, the ebuild passes TOUCHPAD_FW and BOOTBLOCK to all targets (which is harmless is most cases): https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/387dedd872fb6660d819bd53a41209bea6d77072/chromeos-base/chromeos-ec/chromeos-ec-9999.ebuild#121 .

Also, when USE="bootblock_in_ec" is set, it builds all EC targets twice (with a serial enabled bootblock or not), which makes no sense for extra EC targets.
 
At least in the unibuild case, it should be simple enough to change the chromeos-ec ebuild to call cros_config_host get-firmware-build-targets with different parameters (ec for main EC => pass BOOTBLOCK, base for base => pass TOUCHPAD_FW, ec_extras for the others).

Partial fix here that only separates EC and all the extra ECs: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/1390015

Another option would be to move more code to the generic cros-ec-board.eclass, have have multiple, simple, chromeos-ec-* ebuilds.

For now, we can get away with simple change to chromeos-ec, but we may want to clean this up, eventually: https://chromium-review.googlesource.com/c/chromiumos/overlays/chromiumos-overlay/+/1390075 .
Project Member

Comment 2 by bugdroid1@chromium.org, Dec 25

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

commit 6488ed4d4d0c3696891f491a4204c6a682fdabb1
Author: Nicolas Boichat <drinkcat@chromium.org>
Date: Tue Dec 25 04:37:35 2018

chromeos-ec: Fix BOOTBLOCK handling with multiple EC builds

Testing if the bootblock.bin file exists is redundant: the EC build
would fail anyway.

Also, when the serial-enabled bootblock does not exist (e.g. on
extra ECs), do not build and install serial-enabled EC images.

BUG=b:120177230
BUG=chromium:917570
TEST=emerge-kukui -av chromeos-ec
  => /build/kukui/firmware/kukui_scp exists

Change-Id: I82cb42b84cb9ebaf87e004e8f087683eb1b93719
Reviewed-on: https://chromium-review.googlesource.com/1390075
Commit-Ready: Nicolas Boichat <drinkcat@chromium.org>
Tested-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>

[modify] https://crrev.com/6488ed4d4d0c3696891f491a4204c6a682fdabb1/chromeos-base/chromeos-ec/chromeos-ec-9999.ebuild

Sign in to add a comment