boards: up_squared_adsp: Add flasher script

Add script signing and flashing up_squared_adsp board. Can be used:

$ west flash \
<zephyr>/boards/xtensa/up_squared_adsp/tools/up_squared_adsp_flash.sh

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This commit is contained in:
Andrei Emeltchenko 2020-03-30 14:07:01 +03:00 committed by Carles Cufí
parent e934914dcc
commit 80f295a9dd

View file

@ -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