From 5099b9846dcd8c62a877140f99936ea8f7101e4e Mon Sep 17 00:00:00 2001 From: xengineering Date: Sun, 23 Feb 2025 20:42:12 +0100 Subject: fw: Build application firmware for bootloader This changes the flash address for which the application firmware is built. Furthermore it adds the MCUboot header as offset to the application firmware. For details see the documentation of the enabled Kconfig flag. --- fw/sign.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 fw/sign.sh (limited to 'fw/sign.sh') diff --git a/fw/sign.sh b/fw/sign.sh new file mode 100755 index 0000000..343a038 --- /dev/null +++ b/fw/sign.sh @@ -0,0 +1,26 @@ +#!/bin/sh + + +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. + + +set -euf + + +ROOT="$(dirname "$0")" +MCUBOOT="${ROOT}/zephyrproject/bootloader/mcuboot" +IMGTOOL="${MCUBOOT}/scripts/imgtool.py" +KEY="${MCUBOOT}/root-rsa-2048.pem" +INPUT="${ROOT}/../build/fw/zephyr/zephyr.bin" +OUTPUT="${INPUT}.signed" + + +python $IMGTOOL sign \ + --version 0.0.0 \ + --header-size 0x200 \ + --slot-size 0xc0000 \ + --key "${KEY}" \ + "${INPUT}" \ + "${OUTPUT}" -- cgit v1.2.3-70-g09d2