Skip to content

Commit 86bcc55

Browse files
LeStarchineskhou
andauthored
Add signing (#264)
* Add key maker tool * Add signing key * worklfoe sos it builds --------- Co-authored-by: ineskhou <ineskhouider03@gmail.com>
1 parent b5f2e1a commit 86bcc55

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ jobs:
7474
7575
- name: Generate
7676
run: |
77+
mkdir -p ./keys
78+
cp lib/zephyr-workspace/bootloader/mcuboot/root-rsa-2048.pem ./keys/proves.pem
7779
make generate
7880
7981
- name: Set Authentication Key

prj.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ CONFIG_FAT_FILESYSTEM_ELM=y
6969
CONFIG_FS_FATFS_EXFAT=y
7070
CONFIG_FS_FATFS_MOUNT_MKFS=y
7171
CONFIG_FS_FATFS_FSTAB_AUTOMOUNT=y
72-
CONFIG_MCUBOOT_SIGNATURE_KEY_FILE="lib/zephyr-workspace/bootloader/mcuboot/root-rsa-2048.pem"
72+
CONFIG_MCUBOOT_SIGNATURE_KEY_FILE="keys/proves.pem"
7373

7474
CONFIG_HAPTICS=y
7575
CONFIG_HAPTICS_DRV2605=y

tools/bin/key-maker

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
ROOT="$(cd $(dirname $BASH_SOURCE)/../..; pwd)"
3+
4+
mkdir -p "${ROOT}/keys"
5+
6+
imgtool keygen -k "${ROOT}/keys/proves.pem" -t rsa-2048
7+
imgtool getpub -k "${ROOT}/keys/proves.pem" > "${ROOT}/keys/proves.pub.pem"

0 commit comments

Comments
 (0)