blob: 4afc29fff73d76388cff2dd3f3adc461c733bf9d [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"
15gsutil.py cp \
16 "$GSUTIL_ROOT/chromeos_${VERSION}_brya_hps_firmware_canary-channel_hps-accessory-mp.bin" \
17 mcu_stage1.bin
18gsutil.py cp \
19 "$GSUTIL_ROOT/ChromeOS-hps_firmware-$MILESTONE-$VERSION-brya.tar.bz2" \
20 .
21
22tar --strip-components=1 -xvf \
23 "ChromeOS-hps_firmware-$MILESTONE-$VERSION-brya.tar.bz2" \
24 hps/fpga_bitstream.bin hps/fpga_application.bin
25
26cp mcu_stage1.bin fpga_bitstream.bin fpga_application.bin ..
27cd ..
28
29git add mcu_stage1.bin fpga_bitstream.bin fpga_application.bin
30git commit -m "Update signed binaries from $MILESTONE-$VERSION
31
32BUG=b:204378599
33TEST=None
34"
35
36echo "Reminder to test these files:"
37echo "scp mcu_stage1.bin fpga_bitstream.bin fpga_application.bin dut:/usr/lib/firmware/hps/"
38echo "ssh dut stop hpsd \; start hpsd"
39echo "ssh dut tail -f /var/log/messages \| grep hps"