futility: updater: support /firmware as a raw archive

For early bring up and the lab deployment, the developers need a simple
way to update the firmware directly from the build artifacts (either
from CPFE firmware archives or /build/$BOARD/firmware) before the
firmware is pinned and available via chromeos-firmwareupdate.

To simplify the process, we want the updater to understand the layout of
files in /firmware. This change supports that as "raw archive" so
developers can update by:

  # Verify what's available.
  futility update -a /build/$BOARD/firmware --manifest

  # Update the firmware for a specific model.
  futility update -a /build/$BOARD/firmware --model $MODEL

  # On DUT, detect the model and update the firmware.
  mkdir /tmp/firmware
  tar -xvf firmware.tbz -C /tmp/firmware
  futility update -a /tmp/firmware

BUG=b:230679721
TEST=make; run tests
BRANCH=None

Change-Id: I8a262f1d2ec916da62e49a53fd45bdec9fa0ad9b
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3611322
Reviewed-by: Sergey Frolov <sfrolov@google.com>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
1 file changed