@@ -72,6 +72,10 @@ SPL_NODTB_SYMLINK ?= "u-boot-spl-nodtb-${MACHINE}.bin"
# padding it adds behind BSS for SPLs built without SPL_SEPARATE_BSS.
SPL_WITH_DTB_BINARY ?= ""
+# Arguments passed to mkimage both when creating and when signing the
+# U-Boot fitImage, e.g. "-E" to place the image data after the FIT structure
+SPL_MKIMAGE_ARGS ?= ""
+
# U-Boot fitImage description
UBOOT_FIT_DESC ?= "U-Boot fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}"
@@ -563,6 +567,7 @@ EOF
#
${UBOOT_MKIMAGE} \
${@'-D "${SPL_MKIMAGE_DTCOPTS}"' if len('${SPL_MKIMAGE_DTCOPTS}') else ''} \
+ ${SPL_MKIMAGE_ARGS} \
-f ${UBOOT_ITS} \
${UBOOT_FITIMAGE_BINARY}
@@ -591,6 +596,7 @@ EOF
cp ${SPL_DIR}/${SPL_DTB_BINARY} ${SPL_DIR}/${SPL_DTB_SIGNED}
${UBOOT_MKIMAGE_SIGN} \
${@'-D "${SPL_MKIMAGE_DTCOPTS}"' if len('${SPL_MKIMAGE_DTCOPTS}') else ''} \
+ ${SPL_MKIMAGE_ARGS} \
-F -k "${SPL_SIGN_KEYDIR}" \
-K "${SPL_DIR}/${SPL_DTB_SIGNED}" \
-r ${UBOOT_FITIMAGE_BINARY} \
@@ -604,6 +610,7 @@ EOF
# Sign the U-boot FIT image
${UBOOT_MKIMAGE_SIGN} \
${@'-D "${SPL_MKIMAGE_DTCOPTS}"' if len('${SPL_MKIMAGE_DTCOPTS}') else ''} \
+ ${SPL_MKIMAGE_ARGS} \
-F -k "${SPL_SIGN_KEYDIR}" \
-r ${UBOOT_FITIMAGE_BINARY} \
${SPL_MKIMAGE_SIGN_ARGS}
There is no way to pass options such as -E, which places the image data after the FIT structure, to the mkimage call creating the U-Boot fitImage. Such an option also has to be repeated when signing, since mkimage -F moves external data back into the FIT unless -E is given again. Add SPL_MKIMAGE_ARGS and pass it to the mkimage calls that create and sign the U-Boot fitImage. Signed-off-by: Viswanath Kraleti <viswanath.kraleti@oss.qualcomm.com> --- meta/classes-recipe/uboot-sign.bbclass | 7 +++++++ 1 file changed, 7 insertions(+)