]> code.ossystems Code Review - openembedded-core.git/commitdiff
classes/kernel-fitimage: allow substituting mkimage command
authorPaul Eggleton <paul.eggleton@microsoft.com>
Thu, 17 Dec 2020 02:51:37 +0000 (18:51 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 20 Dec 2020 00:03:01 +0000 (00:03 +0000)
Add a UBOOT_MKIMAGE and UBOOT_MKIMAGE_SIGN variables to allow specifying
an alternative uboot-mkimage executable (or wrapper script/function).

Signed-off-by: Paul Eggleton <paul.eggleton@microsoft.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/kernel-fitimage.bbclass

index f3d18e22cf7b21cec20fe97b51e04b100d49f598..08b5db24b7e6ad080789cc0c295f1fae2a2953ac 100644 (file)
@@ -75,6 +75,10 @@ FIT_KEY_SIGN_PKCS ?= "-x509"
 # Description string
 FIT_DESC ?= "U-Boot fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}"
 
+# mkimage command
+UBOOT_MKIMAGE ?= "uboot-mkimage"
+UBOOT_MKIMAGE_SIGN ?= "${UBOOT_MKIMAGE}"
+
 #
 # Emit the fitImage ITS header
 #
@@ -505,7 +509,7 @@ fitimage_assemble() {
        #
        # Step 6: Assemble the image
        #
-       uboot-mkimage \
+       ${UBOOT_MKIMAGE} \
                ${@'-D "${UBOOT_MKIMAGE_DTCOPTS}"' if len('${UBOOT_MKIMAGE_DTCOPTS}') else ''} \
                -f ${1} \
                arch/${ARCH}/boot/${2}
@@ -521,7 +525,7 @@ fitimage_assemble() {
                        cp -P ${STAGING_DATADIR}/u-boot*.dtb ${B}
                        add_key_to_u_boot="-K ${B}/${UBOOT_DTB_BINARY}"
                fi
-               uboot-mkimage \
+               ${UBOOT_MKIMAGE_SIGN} \
                        ${@'-D "${UBOOT_MKIMAGE_DTCOPTS}"' if len('${UBOOT_MKIMAGE_DTCOPTS}') else ''} \
                        -F -k "${UBOOT_SIGN_KEYDIR}" \
                        $add_key_to_u_boot \