Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] kernel-fit-image: Don't add hash node when signing is enabled
@ 2026-08-19  8:21 jonas.juffinger
  2026-08-20 18:23 ` [OE-core] " Mathieu Dubois-Briand
  0 siblings, 1 reply; 2+ messages in thread
From: jonas.juffinger @ 2026-08-19  8:21 UTC (permalink / raw)
  To: openembedded-core; +Cc: Jonas Juffinger

From: Jonas Juffinger <jonas.juffinger@liebherr.com>

When configuration signing is enabled, mkimage does not fill
the hash node even if it present. This causes the verification
to fail with a "Bad Data Hash' error because the hash exists
but it empty.

This patch adds a check to only add the hash node if signing
is not enabled.

The example FIT from the official documentation also shows
the configuration field with only the signature, without the
hash field:
https://docs.u-boot.org/en/latest/usage/fit/signature.html#signed-configurations

Signed-off-by: Jonas Juffinger <jonas.juffinger@liebherr.com>
---
 meta/lib/oe/fitimage.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/lib/oe/fitimage.py b/meta/lib/oe/fitimage.py
index d4dacdd508..142a5d60f7 100644
--- a/meta/lib/oe/fitimage.py
+++ b/meta/lib/oe/fitimage.py
@@ -485,7 +485,7 @@ class ItsNodeRootKernel(ItsNode):
             f"{default_flag} {', '.join(conf_desc)}",
             opt_props=opt_props
         )
-        if self._hash_algo:
+        if self._hash_algo and not self._sign_enable:
             ItsNodeHash(
                 "hash-1",
                 conf_node,

---
base-commit: 6f7a806ece411ab32e4b1c08a0299400bdf3b588
change-id: 20260819-bugfix-dont-add-hash-node-to-signed-fit-images-12ab0c9271ce

Best regards,
-- 
Jonas Juffinger <jonas.juffinger@liebherr.com>




^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-08-20 18:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-19  8:21 [PATCH] kernel-fit-image: Don't add hash node when signing is enabled jonas.juffinger
2026-08-20 18:23 ` [OE-core] " Mathieu Dubois-Briand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox