From patchwork Wed Mar 12 20:30:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: John Ripple X-Patchwork-Id: 58881 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1E1D7C28B2E for ; Wed, 12 Mar 2025 20:30:48 +0000 (UTC) Subject: [meta-oe][PATCH] fitimage.bbclass: Add missing punctuation To: openembedded-devel@lists.openembedded.org From: "John Ripple" X-Originating-Location: Colorado Springs, Colorado, US (192.25.7.195) X-Originating-Platform: Windows Chrome 133 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Wed, 12 Mar 2025 13:30:41 -0700 Message-ID: List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 12 Mar 2025 20:30:48 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/115942 The functions related to signing the fitimage had missing quotations and newlines. Without this punctuation, the signing class would fail to generate a signed fitimage. To test this change just create a fitImage using this class and set FITIMAGE_SIGN to 1. The resulting fitImage its file should have one property per line with quotes around the property values. Signed-off-by: John Ripple --- meta-oe/classes/fitimage.bbclass | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meta-oe/classes/fitimage.bbclass b/meta-oe/classes/fitimage.bbclass index fef8974187..03c01a1ed3 100644 --- a/meta-oe/classes/fitimage.bbclass +++ b/meta-oe/classes/fitimage.bbclass @@ -276,7 +276,7 @@ def fitimage_emit_subsection_signature(d, fd, sign_images_list): fd.write('\t\t\tsignature-1 {\n') fd.write(f'\t\t\t\talgo = "{hash_algo},{encrypt_algo}";\n') if conf_sign_keyname: -        fd.write(f'\t\t\t\tkey-name-hint = {conf_sign_keyname}";\n') +        fd.write(f'\t\t\t\tkey-name-hint = "{conf_sign_keyname}";\n') fd.write(f'\t\t\t\tsign-images = {sign_images};\n') fd.write(f'\t\t\t\tsigner-name = "{signer_name}";\n') fd.write(f'\t\t\t\tsigner-version = "{signer_version}";\n') @@ -341,9 +341,9 @@ def fitimage_emit_section_config_fdto(d, fd, dtb, compatible): fd.write(f'\t\t{dtb} {{\n') fd.write(f'\t\t\tdescription = "Device Tree Overlay";\n') -    fd.write(f'\t\t\tfdt = "fdt-{dtb}";') +    fd.write(f'\t\t\tfdt = "fdt-{dtb}";\n') if compatible: -       fd.write(f'\t\t\tcompatible = "{compatible}";') +       fd.write(f'\t\t\tcompatible = "{compatible}";\n') if sign == "1": sign_images = ["fdt"] @@ -493,7 +493,7 @@ do_configure[postfuncs] += "write_manifest" do_fitimage () { if [ "${FITIMAGE_SIGN}" = "1" ]; then uboot-mkimage ${FITIMAGE_MKIMAGE_EXTRA_ARGS} \ -            -k ${FITIMAGE_SIGN_KEYDIR} -r \ +            -k "${FITIMAGE_SIGN_KEYDIR}" -r \ -f "${B}/manifest.its" \ "${B}/fitImage" else