diff options
Diffstat (limited to 'fw')
-rw-r--r-- | fw/prj.conf | 2 | ||||
-rwxr-xr-x | fw/sign.sh | 26 |
2 files changed, 28 insertions, 0 deletions
diff --git a/fw/prj.conf b/fw/prj.conf index 2485227..1769590 100644 --- a/fw/prj.conf +++ b/fw/prj.conf @@ -9,3 +9,5 @@ CONFIG_NETWORKING=y CONFIG_NET_SHELL=y CONFIG_GPIO=y + +CONFIG_BOOTLOADER_MCUBOOT=y 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}" |