Fixes [YOCTO #16427] The minimal requirement of mkimage for signing a fitImage is a private key file (.key -> using -k). Passing a public key file (.crt) is only necessary when a key-destination is provided (-K). The -K option is optional in the kernel-fit-image signing process and can be passed only by the user via UBOOT_MKIMAGE_SIGN_ARGS. Therefore, providing a private .crt key file is optional and should not cause a fatal error when missing.
changes in v2: - fix shortlog format Signed-off-by: Tobias Pistora <[email protected]> --- meta/lib/oe/fitimage.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/meta/lib/oe/fitimage.py b/meta/lib/oe/fitimage.py index 1ac4b2c59d..484e5c5ee0 100644 --- a/meta/lib/oe/fitimage.py +++ b/meta/lib/oe/fitimage.py @@ -593,8 +593,11 @@ class ItsNodeRootKernel(ItsNode): if not os.path.exists(key_path + '.pem'): bb.fatal("ECDSA signing requires '%s.pem'" % key_path) else: - if not os.path.exists(key_path + '.key') or not os.path.exists(key_path + '.crt'): - bb.fatal("%s.key or .crt does not exist" % key_path) + if not os.path.exists(key_path + '.key'): + bb.fatal("%s.key (private key) does not exist" % key_path) + # public key is only necessary when passing -K option to mkimage + if not os.path.exists(key_path + '.crt'): + bb.debug(1, "%s.crt (public key) does not exist" % key_path) def run_mkimage_sign(self, fitfile): if not self._sign_enable: -- 2.47.3
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#246575): https://lists.openembedded.org/g/openembedded-core/message/246575 Mute This Topic: https://lists.openembedded.org/mt/121406807/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
