[3/8] classes/kernel-fitimage: allow substituting mkimage command

Submitted by Paul Eggleton on Dec. 17, 2020, 2:51 a.m. | Patch ID: 178973

Details

Message ID f6dcfa11e8fa750e523b21025589962e1767eda5.1608173226.git.paul.eggleton@linux.microsoft.com
State Accepted
Commit aee5bac02eff28a75fa1eee646bc511984013aa4
Headers show

Commit Message

Paul Eggleton Dec. 17, 2020, 2:51 a.m.
From: Paul Eggleton <paul.eggleton@microsoft.com>


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>

---
 meta/classes/kernel-fitimage.bbclass | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

-- 
1.8.3.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#145799): https://lists.openembedded.org/g/openembedded-core/message/145799
Mute This Topic: https://lists.openembedded.org/mt/79028966/3616849
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [michael@yoctoproject.org]
-=-=-=-=-=-=-=-=-=-=-=-

Patch hide | download patch | download mbox

diff --git a/meta/classes/kernel-fitimage.bbclass b/meta/classes/kernel-fitimage.bbclass
index f3d18e2..08b5db2 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -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 \