* [OE-core][PATCH] uboot-sign: Rebuild binman image with configuration signing keys
@ 2026-02-04 15:33 Kory Maincent
0 siblings, 0 replies; only message in thread
From: Kory Maincent @ 2026-02-04 15:33 UTC (permalink / raw)
To: openembedded-core
Cc: Jérémie Dautheribes, thomas.petazzoni, Kory Maincent
When using binman to generate U-Boot images, the configuration signing
keys are not included in the final image. This occurs because the binman
image is not regenerated after the configuration signing keys are added
to the device tree.
In case binman is used, regenerate the image with the updated device tree
containing the configuration signing keys. This ensures the signed
configuration is properly included in the final U-Boot image.
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
---
meta/classes-recipe/uboot-sign.bbclass | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/meta/classes-recipe/uboot-sign.bbclass b/meta/classes-recipe/uboot-sign.bbclass
index 9cb5c6ccf3..9268bfc451 100644
--- a/meta/classes-recipe/uboot-sign.bbclass
+++ b/meta/classes-recipe/uboot-sign.bbclass
@@ -192,6 +192,15 @@ concat_dtb() {
-k "${UBOOT_DTB_BINARY}" \
-f ${B}/unused.itb
fi
+
+ # Regenerate binman image with the newly signed key
+ if [ "${UBOOT_BINMAN_IMAGE}" = "1" ] && [ -f "..binman_stamp.cmd" ]; then
+ binman_cmd=$(sed -n 's/^cmd_[^:]*:= *//p' ..binman_stamp.cmd)
+ dtb_binary=$(basename ${UBOOT_DTB_BINARY} .dtb)
+ binman_cmd="${binman_cmd} -a of-list=\"${dtb_binary}\" -a default-dt=\"${dtb_binary}\""
+ eval ${binman_cmd}
+ fi
+
cp ${UBOOT_DTB_BINARY} ${UBOOT_DTB_SIGNED}
fi
--
2.43.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-02-04 15:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-04 15:33 [OE-core][PATCH] uboot-sign: Rebuild binman image with configuration signing keys Kory Maincent
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox