summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMing Liu <ming.liu@toradex.com>2022-02-23 15:15:12 +0100
committerMing Liu <ming.liu@toradex.int>2022-02-26 13:44:50 +0000
commit4cc37e369a36f31327461a361b4bdf1ca275e8ff (patch)
treec1e01c3d08b462409fe02919427907b9b5f439e3
parent573584738a40e072f126ad99b26626b0ea1e7ee0 (diff)
imx-mkimage: drop a Toradex specific fix
Backport a fix from meta-freescale upstream: [ commit c59f817b0d1ee70ef224405ff8acd31e0743ed91 Author: Andrey Zhizhikin <andrey.z@gmail.com> Date: Thu Oct 21 10:01:01 2021 +0000 imx-mkimage: use mkimage tool from sysroot 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> ] Related-to: ELB-3046 Signed-off-by: Ming Liu <ming.liu@toradex.com>
-rw-r--r--backports/recipes-bsp/imx-mkimage/files/0001-iMX8M-soc.mak-use-native-mkimage-from-sysroot.patch82
-rw-r--r--backports/recipes-bsp/imx-mkimage/imx-mkimage_git.inc1
-rw-r--r--recipes-bsp/imx-mkimage/imx-boot_%.bbappend8
3 files changed, 83 insertions, 8 deletions
diff --git a/backports/recipes-bsp/imx-mkimage/files/0001-iMX8M-soc.mak-use-native-mkimage-from-sysroot.patch b/backports/recipes-bsp/imx-mkimage/files/0001-iMX8M-soc.mak-use-native-mkimage-from-sysroot.patch
new file mode 100644
index 0000000..ea5c058
--- /dev/null
+++ b/backports/recipes-bsp/imx-mkimage/files/0001-iMX8M-soc.mak-use-native-mkimage-from-sysroot.patch
@@ -0,0 +1,82 @@
+From e630c5809ad039efaaea0342b06306512eada53a Mon Sep 17 00:00:00 2001
+From: Andrey Zhizhikin <andrey.z@gmail.com>
+Date: Tue, 22 Feb 2022 20:00:21 +0100
+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 30ecefd..5d568e7 100644
+--- a/iMX8M/soc.mak
++++ b/iMX8M/soc.mak
+@@ -146,7 +146,7 @@ u-boot.itb: $(dtbs)
+ ./$(PAD_IMAGE) bl31.bin
+ ./$(PAD_IMAGE) u-boot-nodtb.bin $(dtbs)
+ DEK_BLOB_LOAD_ADDR=$(DEK_BLOB_LOAD_ADDR) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) ./mkimage_fit_atf.sh $(dtbs) > 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 $(dtbs)
+
+ dtbs_ddr3l = valddr3l.dtb
+@@ -158,7 +158,7 @@ u-boot-ddr3l.itb: $(dtbs_ddr3l)
+ ./$(PAD_IMAGE) bl31.bin
+ ./$(PAD_IMAGE) u-boot-nodtb.bin $(dtbs_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 $(dtbs_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 $(dtbs_ddr3l)
+
+ dtbs_ddr3l_evk = evkddr3l.dtb
+@@ -170,7 +170,7 @@ u-boot-ddr3l-evk.itb: $(dtbs_ddr3l_evk)
+ ./$(PAD_IMAGE) bl31.bin
+ ./$(PAD_IMAGE) u-boot-nodtb.bin $(dtbs_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 $(dtbs_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 $(dtbs_ddr3l_evk)
+
+ dtbs_ddr4 = valddr4.dtb
+@@ -182,7 +182,7 @@ u-boot-ddr4.itb: $(dtbs_ddr4)
+ ./$(PAD_IMAGE) bl31.bin
+ ./$(PAD_IMAGE) u-boot-nodtb.bin $(dtbs_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 $(dtbs_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 $(dtbs_ddr4)
+
+ dtbs_ddr4_evk = evkddr4.dtb
+@@ -194,7 +194,7 @@ u-boot-ddr4-evk.itb: $(dtbs_ddr4_evk)
+ ./$(PAD_IMAGE) bl31.bin
+ ./$(PAD_IMAGE) u-boot-nodtb.bin $(dtbs_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 $(dtbs_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 $(dtbs_ddr4_evk)
+
+ ifeq ($(HDMI),yes)
+@@ -310,7 +310,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.25.1
+
diff --git a/backports/recipes-bsp/imx-mkimage/imx-mkimage_git.inc b/backports/recipes-bsp/imx-mkimage/imx-mkimage_git.inc
index e52fd72..12d9859 100644
--- a/backports/recipes-bsp/imx-mkimage/imx-mkimage_git.inc
+++ b/backports/recipes-bsp/imx-mkimage/imx-mkimage_git.inc
@@ -5,6 +5,7 @@ DEPENDS = "zlib-native openssl-native"
SRCBRANCH = "imx_5.4.70_2.3.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 = "8947fea369ab3932259630232cfb9f87b8f9dda1"
diff --git a/recipes-bsp/imx-mkimage/imx-boot_%.bbappend b/recipes-bsp/imx-mkimage/imx-boot_%.bbappend
deleted file mode 100644
index bd97840..0000000
--- a/recipes-bsp/imx-mkimage/imx-boot_%.bbappend
+++ /dev/null
@@ -1,8 +0,0 @@
-# Create symbolic link rather than copying mkimage_uboot
-compile_mx8m_prepend() {
- rm -rf ${BOOT_STAGING}/mkimage_uboot
-}
-compile_mx8m_append() {
- rm -rf ${BOOT_STAGING}/mkimage_uboot
- lnr ${STAGING_DIR_NATIVE}/${bindir}/mkimage ${BOOT_STAGING}/mkimage_uboot
-}