blob: 6af61a7ef66f5bd77a458315c581cf94c068c86a [file] [log] [blame]
Evan Benn332f1cc2022-02-28 16:22:33 +11001#!/usr/bin/env bash
2
3set -euo pipefail
4# set -x
5
6MILESTONE="$1"
7VERSION="$2"
8
9ROOT_DIR=$(git rev-parse --show-toplevel)
10
11mkdir -p "$ROOT_DIR/firmware-signed/$MILESTONE-$VERSION"
12cd "$ROOT_DIR/firmware-signed/$MILESTONE-$VERSION"
13
14GSUTIL_ROOT="gs://chromeos-releases/canary-channel/brya/$VERSION"
Dan Callaghanb98db552022-03-08 13:19:23 +110015# TODO(b/222000200): uncomment this when we want MP-signed firmware
16#gsutil.py cp \
17# "$GSUTIL_ROOT/chromeos_${VERSION}_brya_hps_firmware_canary-channel_hps-accessory-mp.bin" \
18# mcu_stage1.bin
Evan Benn332f1cc2022-02-28 16:22:33 +110019gsutil.py cp \
20 "$GSUTIL_ROOT/ChromeOS-hps_firmware-$MILESTONE-$VERSION-brya.tar.bz2" \
21 .
22
23tar --strip-components=1 -xvf \
24 "ChromeOS-hps_firmware-$MILESTONE-$VERSION-brya.tar.bz2" \
Dan Callaghanb98db552022-03-08 13:19:23 +110025 hps/mcu_stage1.bin hps/fpga_bitstream.bin hps/fpga_application.bin
26# hps/fpga_bitstream.bin hps/fpga_application.bin
Evan Benn332f1cc2022-02-28 16:22:33 +110027
28cp mcu_stage1.bin fpga_bitstream.bin fpga_application.bin ..
29cd ..
30
31git add mcu_stage1.bin fpga_bitstream.bin fpga_application.bin
32git commit -m "Update signed binaries from $MILESTONE-$VERSION
33
34BUG=b:204378599
35TEST=None
36"
37
38echo "Reminder to test these files:"
39echo "scp mcu_stage1.bin fpga_bitstream.bin fpga_application.bin dut:/usr/lib/firmware/hps/"
40echo "ssh dut stop hpsd \; start hpsd"
41echo "ssh dut tail -f /var/log/messages \| grep hps"