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