U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Rasmus Villemoes <ravi@prevas.dk>
To: u-boot@lists.denx.de
Cc: Neha Malcom Francis <n-francis@ti.com>,
	Anshul Dalal <anshuld@ti.com>, Simon Glass <sjg@chromium.org>,
	Tom Rini <trini@konsulko.com>, Rasmus Villemoes <ravi@prevas.dk>
Subject: [PATCH v2 4/7] k3-binman.dtsi: add keyfile_template node
Date: Fri, 17 Jul 2026 15:58:21 +0200	[thread overview]
Message-ID: <20260717135824.2142135-5-ravi@prevas.dk> (raw)
In-Reply-To: <20260717135824.2142135-1-ravi@prevas.dk>

Currently, it is somewhat tedious for downstream/custom boards to
override the keyfile used for signing all the various artifacts
involved in booting on K3 devices to point at their own key. For a key
stored in a file, one could override node which "generates" (copies)
custMpk.pem in the build dir from the one in the source dir and point
that at another filename=. That works, but is a little misleading.

However, when the "keyfile" needs to be, say, a pkcs#11 uri, one has
to have overrides in one's .dtsi for each and every ti-secure /
ti-secure-rom node, and a lot of those do not even have dts labels, so
one has to use their full /binman/... path.

Add a small dedicated template that only contains the keyfile
property. In a subsequent patch, we will change nodes that contain an
explicit 'keyfile = "custMpk.pem"' to instead have this template
inserted. This way, the downstream board's .dtsi file only needs to
contain something like

  &keyfile_template {
    keyfile = "pkcs11:object=my-key-identifier";
  };

and that will then automatically propagate to all the nodes.

Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
---
 arch/arm/dts/k3-binman.dtsi | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/dts/k3-binman.dtsi b/arch/arm/dts/k3-binman.dtsi
index ad127663d03..69214bb32fb 100644
--- a/arch/arm/dts/k3-binman.dtsi
+++ b/arch/arm/dts/k3-binman.dtsi
@@ -25,6 +25,10 @@
 			filename = "arch/arm/mach-k3/keys/ti-degenerate-key.pem";
 		};
 	};
+
+	keyfile_template: template-keyfile {
+		keyfile = "custMpk.pem";
+	};
 };
 
 #ifndef CONFIG_ARM64
-- 
2.55.0


  parent reply	other threads:[~2026-07-17 13:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-17 13:58 [PATCH v2 0/7] k3-binman ergonomics Rasmus Villemoes
2026-07-17 13:58 ` [PATCH v2 1/7] binman: openssl: refactor creation of Distinguished Name section from dict Rasmus Villemoes
2026-07-17 13:58 ` [PATCH v2 2/7] binman: x509_cert: allow and parse distinguished-name subnode Rasmus Villemoes
2026-07-17 13:58 ` [PATCH v2 3/7] binman: x509: fix CN emitted for basic x509 certificates Rasmus Villemoes
2026-07-17 13:58 ` Rasmus Villemoes [this message]
2026-07-17 13:58 ` [PATCH v2 5/7] k3-binman.dtsi: add empty distinguished_name_template Rasmus Villemoes
2026-07-17 13:58 ` [PATCH v2 6/7] k3-binman.dtsi: insert keyfile and distinguished name templates in all ti-secure(-rom) nodes Rasmus Villemoes
2026-07-17 13:58 ` [PATCH v2 7/7] doc: k3.rst: describe use of keyname and distinguished_name binman templates Rasmus Villemoes

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=20260717135824.2142135-5-ravi@prevas.dk \
    --to=ravi@prevas.dk \
    --cc=anshuld@ti.com \
    --cc=n-francis@ti.com \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /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