fitimage.bbclass: Add missing punctuation
PATCH 1/1 fitimage.bbclass: Add missing punctuation
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.
---
meta-oe/classes/fitimage.bbclass | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
meta-oe/classes/fitimage.bbclass +0 -0
@@ -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
Thanks for your submission John, but
patch is corrupted somehow
Applying: fitimage.bbclass: Add missing punctuation
error: corrupt patch at line 10
Quoted 54 lines · John Ripple via lists.openembedded.org
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 setFITIMAGE_SIGNto 1. The resulting fitImage its file should have one property per line with quotes around the property values.Signed-off-by John Ripple <[email protected]>--- meta-oe/classes/fitimage.bbclass | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)meta-oe/classes/fitimage.bbclass +4
-5@@ -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 -=-=-=-=-=-=-=-=-=-=-=-Links: You receive all messages sent to this group.
View/Reply Online (#115942): https://lists.openembedded.org/g/openembedded-devel/message/115942
Mute This Topic: https://lists.openembedded.org/mt/111667776/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
PATCH 1/1 fitimage.bbclass: Add missing punctuation
From c5d765dc5fe4d16dcce7878216a8916bfa832bb4 Mon Sep 17 00:00:00 2001
From: John Ripple <[email protected]>
Date: Wed, 12 Mar 2025 13:55:00 -0600
Subject: [PATCH] fitimage.bbclass: Add missing punctuation
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.
--- meta-oe/classes/fitimage.bbclass | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
meta-oe/classes/fitimage.bbclass +4 -4
@@ -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