From 80f295a9dd259f75f201c09abee849f1780efaff Mon Sep 17 00:00:00 2001 From: Andrei Emeltchenko Date: Mon, 30 Mar 2020 14:07:01 +0300 Subject: [PATCH] boards: up_squared_adsp: Add flasher script Add script signing and flashing up_squared_adsp board. Can be used: $ west flash \ /boards/xtensa/up_squared_adsp/tools/up_squared_adsp_flash.sh Signed-off-by: Andrei Emeltchenko --- .../tools/up_squared_adsp_flash.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 boards/xtensa/up_squared_adsp/tools/up_squared_adsp_flash.sh diff --git a/boards/xtensa/up_squared_adsp/tools/up_squared_adsp_flash.sh b/boards/xtensa/up_squared_adsp/tools/up_squared_adsp_flash.sh new file mode 100755 index 0000000000..1ee9451fa5 --- /dev/null +++ b/boards/xtensa/up_squared_adsp/tools/up_squared_adsp_flash.sh @@ -0,0 +1,18 @@ +#!/bin/sh +# Copyright (c) 2020 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +BUILD=$1 +FIRMWARE=${BUILD}/zephyr/zephyr.ri +FLASHER=${ZEPHYR_BASE}/boards/xtensa/up_squared_adsp/tools/fw_loader.py + +if [ -z "$2" ] + then + echo "Signing using default key" + west sign -d ${BUILD} -t rimage +else + echo "Signing with key " $key + west sign -d ${BUILD} -t rimage -- -k $2 +fi + +${FLASHER} -f ${FIRMWARE} 2>&1