]> code.ossystems Code Review - meta-freescale.git/commitdiff
imx-mkimage: use mkimage tool from sysroot
authorAndrey Zhizhikin <andrey.z@gmail.com>
Thu, 21 Oct 2021 10:01:01 +0000 (10:01 +0000)
committerAndrey Zhizhikin <andrey.z@gmail.com>
Fri, 22 Oct 2021 19:15:38 +0000 (19:15 +0000)
mkimage tool is provided as a part of sysroot and should not be used as
a local copy, since it contains runtime dependencies which local copy
does not account for.

Drop the local copy on mkimage, introduce the patch that fixes mkimage
invocations in build system.

Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
recipes-bsp/imx-mkimage/files/0001-iMX8M-soc.mak-use-native-mkimage-from-sysroot.patch [new file with mode: 0644]
recipes-bsp/imx-mkimage/imx-boot_1.0.bb
recipes-bsp/imx-mkimage/imx-mkimage_git.inc

diff --git a/recipes-bsp/imx-mkimage/files/0001-iMX8M-soc.mak-use-native-mkimage-from-sysroot.patch b/recipes-bsp/imx-mkimage/files/0001-iMX8M-soc.mak-use-native-mkimage-from-sysroot.patch
new file mode 100644 (file)
index 0000000..a879208
--- /dev/null
@@ -0,0 +1,82 @@
+From a4af3747abd88247bf4498ec0cf67a4151e64d41 Mon Sep 17 00:00:00 2001
+From: Andrey Zhizhikin <andrey.z@gmail.com>
+Date: Thu, 21 Oct 2021 08:53:38 +0000
+Subject: [PATCH] iMX8M: soc.mak: use native mkimage from sysroot
+
+mkimage tool is provided as a part of sysroot from Yocto build. Current
+implementation on the imx-mkimge on the other hand copies it locally in
+order to invoke it from within the build folder.
+
+Since recent updates, mkimage requires openssl.so to be installed, which
+when local copy is used causes the tool not to operate and fails the
+build.
+
+Use it from the build sysroot, and do not pull the local version of it.
+
+Upstream-Status: Inappropriate [OE-specific]
+
+Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
+---
+ iMX8M/soc.mak | 11 +++++------
+ 1 file changed, 5 insertions(+), 6 deletions(-)
+
+diff --git a/iMX8M/soc.mak b/iMX8M/soc.mak
+index 4bfdc37..03b05f7 100644
+--- a/iMX8M/soc.mak
++++ b/iMX8M/soc.mak
+@@ -148,7 +148,7 @@ u-boot.itb: $(dtb)
+       ./$(PAD_IMAGE) bl31.bin
+       ./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb)
+       DEK_BLOB_LOAD_ADDR=$(DEK_BLOB_LOAD_ADDR) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) ./mkimage_fit_atf.sh $(dtb) > u-boot.its
+-      ./mkimage_uboot -E -p 0x3000 -f u-boot.its u-boot.itb
++      mkimage -E -p 0x3000 -f u-boot.its u-boot.itb
+       @rm -f u-boot.its $(dtb)
+ dtb_ddr3l = valddr3l.dtb
+@@ -160,7 +160,7 @@ u-boot-ddr3l.itb: $(dtb_ddr3l)
+       ./$(PAD_IMAGE) bl31.bin
+       ./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb_ddr3l)
+       DEK_BLOB_LOAD_ADDR=$(DEK_BLOB_LOAD_ADDR) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) ./mkimage_fit_atf.sh $(dtb_ddr3l) > u-boot-ddr3l.its
+-      ./mkimage_uboot -E -p 0x3000 -f u-boot-ddr3l.its u-boot-ddr3l.itb
++      mkimage -E -p 0x3000 -f u-boot-ddr3l.its u-boot-ddr3l.itb
+       @rm -f u-boot.its $(dtb_ddr3l)
+ dtb_ddr3l_evk = evkddr3l.dtb
+@@ -172,7 +172,7 @@ u-boot-ddr3l-evk.itb: $(dtb_ddr3l_evk)
+       ./$(PAD_IMAGE) bl31.bin
+       ./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb_ddr3l_evk)
+       DEK_BLOB_LOAD_ADDR=$(DEK_BLOB_LOAD_ADDR) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) ./mkimage_fit_atf.sh $(dtb_ddr3l_evk) > u-boot-ddr3l-evk.its
+-      ./mkimage_uboot -E -p 0x3000 -f u-boot-ddr3l-evk.its u-boot-ddr3l-evk.itb
++      mkimage -E -p 0x3000 -f u-boot-ddr3l-evk.its u-boot-ddr3l-evk.itb
+       @rm -f u-boot.its $(dtb_ddr3l_evk)
+ dtb_ddr4 = valddr4.dtb
+@@ -184,7 +184,7 @@ u-boot-ddr4.itb: $(dtb_ddr4)
+       ./$(PAD_IMAGE) bl31.bin
+       ./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb_ddr4)
+       DEK_BLOB_LOAD_ADDR=$(DEK_BLOB_LOAD_ADDR) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) ./mkimage_fit_atf.sh $(dtb_ddr4) > u-boot-ddr4.its
+-      ./mkimage_uboot -E -p 0x3000 -f u-boot-ddr4.its u-boot-ddr4.itb
++      mkimage -E -p 0x3000 -f u-boot-ddr4.its u-boot-ddr4.itb
+       @rm -f u-boot.its $(dtb_ddr4)
+ dtb_ddr4_evk = evkddr4.dtb
+@@ -196,7 +196,7 @@ u-boot-ddr4-evk.itb: $(dtb_ddr4_evk)
+       ./$(PAD_IMAGE) bl31.bin
+       ./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb_ddr4_evk)
+       DEK_BLOB_LOAD_ADDR=$(DEK_BLOB_LOAD_ADDR) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) ./mkimage_fit_atf.sh $(dtb_ddr4_evk) > u-boot-ddr4-evk.its
+-      ./mkimage_uboot -E -p 0x3000 -f u-boot-ddr4-evk.its u-boot-ddr4-evk.itb
++      mkimage -E -p 0x3000 -f u-boot-ddr4-evk.its u-boot-ddr4-evk.itb
+       @rm -f u-boot.its $(dtb_ddr4_evk)
+ ifeq ($(HDMI),yes)
+@@ -312,7 +312,6 @@ nightly :
+       @$(WGET) -q $(SERVER)/$(DIR)/$(FW_DIR)/fsl-$(PLAT)-evk.dtb -O fsl-$(PLAT)-evk.dtb
+       @$(WGET) -q $(SERVER)/$(DIR)/$(FW_DIR)/signed_hdmi_imx8m.bin -O signed_hdmi_imx8m.bin
+       @$(WGET) -q $(SERVER)/$(DIR)/$(FW_DIR)/signed_dp_imx8m.bin -O signed_dp_imx8m.bin
+-      @$(WGET) -q $(SERVER)/$(DIR)/$(FW_DIR)/mkimage_uboot -O mkimage_uboot
+ archive :
+       git ls-files --others --exclude-standard -z | xargs -0 tar rvf $(ARCHIVE_PATH)/$(ARCHIVE_NAME)
+-- 
+2.17.1
+
index 1425c5a3173c79535cde8b25087fe2283c2a4302..f8ebb7308bfa63aa50f45a95478a07fa6d1799f9 100644 (file)
@@ -84,7 +84,6 @@ compile_mx8m() {
     cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${UBOOT_DTB_NAME}   ${BOOT_STAGING}
     cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/u-boot-nodtb.bin-${MACHINE}-${UBOOT_CONFIG} \
                                                              ${BOOT_STAGING}/u-boot-nodtb.bin
-    cp ${STAGING_DIR_NATIVE}/${bindir}/mkimage               ${BOOT_STAGING}/mkimage_uboot
     cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin
     cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME}                     ${BOOT_STAGING}/u-boot.bin
 }
@@ -151,7 +150,6 @@ deploy_mx8m() {
     install -m 0644 ${BOOT_STAGING}/signed_hdmi_imx8m.bin    ${DEPLOYDIR}/${BOOT_TOOLS}
     install -m 0755 ${BOOT_STAGING}/${TOOLS_NAME}            ${DEPLOYDIR}/${BOOT_TOOLS}
     install -m 0755 ${BOOT_STAGING}/mkimage_fit_atf.sh       ${DEPLOYDIR}/${BOOT_TOOLS}
-    install -m 0755 ${BOOT_STAGING}/mkimage_uboot            ${DEPLOYDIR}/${BOOT_TOOLS}
 }
 deploy_mx8() {
     install -d ${DEPLOYDIR}/${BOOT_TOOLS}
@@ -173,7 +171,7 @@ deploy_mx8x() {
 }
 do_deploy() {
     deploy_${SOC_FAMILY}
-    # copy the tool mkimage to deploy path and sc fw, dcd and uboot
+    # copy the sc fw, dcd and uboot to deploy path
     install -m 0644 ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME}        ${DEPLOYDIR}/${BOOT_TOOLS}
 
     # copy tee.bin to deploy path
index ccad28ec38fe509faf1869d710756f297358e6f4..c51c1e0801f3ee03f21b6bedb31c3e0f727d911e 100644 (file)
@@ -5,6 +5,7 @@ DEPENDS = "zlib-native openssl-native"
 SRCBRANCH = "lf-5.10.52_2.1.0"
 SRC_URI = "git://source.codeaurora.org/external/imx/imx-mkimage.git;protocol=https;branch=${SRCBRANCH} \
            file://0001-mkimage_fit_atf-fix-fit-generator-node-naming.patch \
+           file://0001-iMX8M-soc.mak-use-native-mkimage-from-sysroot.patch \
 "
 SRCREV = "1112c88470f339dc631e2a7117087f416af6d6b5"
 S = "${WORKDIR}/git"