diff options
author | xengineering <me@xengineering.eu> | 2025-02-23 20:42:12 +0100 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2025-02-24 19:53:36 +0100 |
commit | 5099b9846dcd8c62a877140f99936ea8f7101e4e (patch) | |
tree | f48d3e54d9fb5e1c91be58b92831f6c5e508caaf /fw/sign.sh | |
parent | d24bdfcca2eb9d3ef9c5a77d5e96dc80c73cf13e (diff) | |
download | iot-contact-5099b9846dcd8c62a877140f99936ea8f7101e4e.tar iot-contact-5099b9846dcd8c62a877140f99936ea8f7101e4e.tar.zst iot-contact-5099b9846dcd8c62a877140f99936ea8f7101e4e.zip |
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.
Diffstat (limited to 'fw/sign.sh')
-rwxr-xr-x | fw/sign.sh | 26 |
1 files changed, 26 insertions, 0 deletions
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}" |