From: Sascha Hauer <s.hauer@pengutronix.de>
To: BAREBOX <barebox@lists.infradead.org>
Subject: [PATCH 3/6] ARM: k3: allow to pass custom signing keys
Date: Thu, 14 Aug 2025 12:46:51 +0200 [thread overview]
Message-ID: <20250814-k3-am62l-updates-v1-3-9934277d8757@pengutronix.de> (raw)
In-Reply-To: <20250814-k3-am62l-updates-v1-0-9934277d8757@pengutronix.de>
By default the AM62x images are signed with default TI development keys.
Allow to sign the images with custom keys for future secure boot.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/mach-k3/Kconfig | 22 ++++++++++++++++++++++
images/Makefile.k3 | 4 ++++
2 files changed, 26 insertions(+)
diff --git a/arch/arm/mach-k3/Kconfig b/arch/arm/mach-k3/Kconfig
index 338421a8af1715c72a23adc41fb7a21d69091585..281068071e4ef617f5fe5006b225428c7e2d17c1 100644
--- a/arch/arm/mach-k3/Kconfig
+++ b/arch/arm/mach-k3/Kconfig
@@ -66,4 +66,26 @@ config ARCH_K3_COMMAND_AUTHENTICATE
Add k3_authenticate_image command to test authenticating images
against the K3 ROM API.
+choice
+ prompt "Select signing key"
+ default ARCH_K3_SIGNING_KEY_TI_DEVEL
+
+config ARCH_K3_SIGNING_KEY_TI_DEVEL
+ bool "Use TI devel key for signing (arch/arm/mach-k3/custMpk.pem)"
+ help
+ Use the TI provided devel key for signing the bootable certificates
+
+config ARCH_K3_SIGNING_KEY_CUSTOM
+ bool "Specify custom key for signing"
+ help
+ Use custom keys for signing the bootable certificates
+
+endchoice
+
+config ARCH_K3_SIGNING_KEY
+ string "Signing key"
+ depends on ARCH_K3_SIGNING_KEY_CUSTOM
+ help
+ Path or PKS#11 uri for the signing keys
+
endmenu
diff --git a/images/Makefile.k3 b/images/Makefile.k3
index 0024cefa3687778487749f39b1c5bb57d490ec10..05b645f6d48b0594eec2af1208825c1d551a1dff 100644
--- a/images/Makefile.k3
+++ b/images/Makefile.k3
@@ -17,7 +17,11 @@ image-$(CONFIG_MACH_BEAGLEPLAY) += barebox-beagleplay.img
endif
+ifdef CONFIG_ARCH_K3_SIGNING_KEY_TI_DEVEL
KEY_custmpk=$(srctree)/arch/arm/mach-k3/custMpk.pem
+else
+KEY_custmpk="$(CONFIG_ARCH_K3_SIGNING_KEY)"
+endif
KEY_degenerate=$(srctree)/arch/arm/mach-k3/ti-degenerate-key.pem
ifdef CONFIG_MACH_K3_CORTEX_R5
--
2.39.5
next prev parent reply other threads:[~2025-08-14 15:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-14 10:46 [PATCH 0/6] ARM: k3: updates Sascha Hauer
2025-08-14 10:46 ` [PATCH 1/6] ARM: k3: AM62l3-EVM: add usb0 Sascha Hauer
2025-08-14 10:46 ` [PATCH 2/6] ARM: k3: quote PEM files Sascha Hauer
2025-08-14 10:46 ` Sascha Hauer [this message]
2025-08-14 10:46 ` [PATCH 4/6] k3img: handle PKCS#11 uris Sascha Hauer
2025-08-14 10:46 ` [PATCH 5/6] ARM: K3: Update yaml files for AM62L Sascha Hauer
2025-08-14 10:46 ` [PATCH 6/6] ARM: k3: use newer ti-linux-firmware Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250814-k3-am62l-updates-v1-3-9934277d8757@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox