summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Zhizhikin <andrey.z@gmail.com>2021-10-21 10:01:01 +0000
committergithub-actions[bot] <github-actions[bot]@users.noreply.github.com>2021-10-25 15:21:08 +0000
commit199c4d81f64a6c7374feba9e7ce8e06246198bf2 (patch)
tree076ac868177f347225be06f64d7b013bbfd5a750
parentdb13f2306611bf301720725dc0e21a86f570361a (diff)
downloadmeta-freescale-199c4d81f64a6c7374feba9e7ce8e06246198bf2.tar.gz
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> (cherry picked from commit c59f817b0d1ee70ef224405ff8acd31e0743ed91)
-rw-r--r--recipes-bsp/imx-mkimage/files/0001-iMX8M-soc.mak-use-native-mkimage-from-sysroot.patch82
-rw-r--r--recipes-bsp/imx-mkimage/imx-boot_1.0.bb4
-rw-r--r--recipes-bsp/imx-mkimage/imx-mkimage_git.inc1
3 files changed, 84 insertions, 3 deletions
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
index 00000000..a879208c
--- /dev/null
+++ b/recipes-bsp/imx-mkimage/files/0001-iMX8M-soc.mak-use-native-mkimage-from-sysroot.patch
@@ -0,0 +1,82 @@
1From a4af3747abd88247bf4498ec0cf67a4151e64d41 Mon Sep 17 00:00:00 2001
2From: Andrey Zhizhikin <andrey.z@gmail.com>
3Date: Thu, 21 Oct 2021 08:53:38 +0000
4Subject: [PATCH] iMX8M: soc.mak: use native mkimage from sysroot
5
6mkimage tool is provided as a part of sysroot from Yocto build. Current
7implementation on the imx-mkimge on the other hand copies it locally in
8order to invoke it from within the build folder.
9
10Since recent updates, mkimage requires openssl.so to be installed, which
11when local copy is used causes the tool not to operate and fails the
12build.
13
14Use it from the build sysroot, and do not pull the local version of it.
15
16Upstream-Status: Inappropriate [OE-specific]
17
18Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
19---
20 iMX8M/soc.mak | 11 +++++------
21 1 file changed, 5 insertions(+), 6 deletions(-)
22
23diff --git a/iMX8M/soc.mak b/iMX8M/soc.mak
24index 4bfdc37..03b05f7 100644
25--- a/iMX8M/soc.mak
26+++ b/iMX8M/soc.mak
27@@ -148,7 +148,7 @@ u-boot.itb: $(dtb)
28 ./$(PAD_IMAGE) bl31.bin
29 ./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb)
30 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
31- ./mkimage_uboot -E -p 0x3000 -f u-boot.its u-boot.itb
32+ mkimage -E -p 0x3000 -f u-boot.its u-boot.itb
33 @rm -f u-boot.its $(dtb)
34
35 dtb_ddr3l = valddr3l.dtb
36@@ -160,7 +160,7 @@ u-boot-ddr3l.itb: $(dtb_ddr3l)
37 ./$(PAD_IMAGE) bl31.bin
38 ./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb_ddr3l)
39 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
40- ./mkimage_uboot -E -p 0x3000 -f u-boot-ddr3l.its u-boot-ddr3l.itb
41+ mkimage -E -p 0x3000 -f u-boot-ddr3l.its u-boot-ddr3l.itb
42 @rm -f u-boot.its $(dtb_ddr3l)
43
44 dtb_ddr3l_evk = evkddr3l.dtb
45@@ -172,7 +172,7 @@ u-boot-ddr3l-evk.itb: $(dtb_ddr3l_evk)
46 ./$(PAD_IMAGE) bl31.bin
47 ./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb_ddr3l_evk)
48 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
49- ./mkimage_uboot -E -p 0x3000 -f u-boot-ddr3l-evk.its u-boot-ddr3l-evk.itb
50+ mkimage -E -p 0x3000 -f u-boot-ddr3l-evk.its u-boot-ddr3l-evk.itb
51 @rm -f u-boot.its $(dtb_ddr3l_evk)
52
53 dtb_ddr4 = valddr4.dtb
54@@ -184,7 +184,7 @@ u-boot-ddr4.itb: $(dtb_ddr4)
55 ./$(PAD_IMAGE) bl31.bin
56 ./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb_ddr4)
57 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
58- ./mkimage_uboot -E -p 0x3000 -f u-boot-ddr4.its u-boot-ddr4.itb
59+ mkimage -E -p 0x3000 -f u-boot-ddr4.its u-boot-ddr4.itb
60 @rm -f u-boot.its $(dtb_ddr4)
61
62 dtb_ddr4_evk = evkddr4.dtb
63@@ -196,7 +196,7 @@ u-boot-ddr4-evk.itb: $(dtb_ddr4_evk)
64 ./$(PAD_IMAGE) bl31.bin
65 ./$(PAD_IMAGE) u-boot-nodtb.bin $(dtb_ddr4_evk)
66 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
67- ./mkimage_uboot -E -p 0x3000 -f u-boot-ddr4-evk.its u-boot-ddr4-evk.itb
68+ mkimage -E -p 0x3000 -f u-boot-ddr4-evk.its u-boot-ddr4-evk.itb
69 @rm -f u-boot.its $(dtb_ddr4_evk)
70
71 ifeq ($(HDMI),yes)
72@@ -312,7 +312,6 @@ nightly :
73 @$(WGET) -q $(SERVER)/$(DIR)/$(FW_DIR)/fsl-$(PLAT)-evk.dtb -O fsl-$(PLAT)-evk.dtb
74 @$(WGET) -q $(SERVER)/$(DIR)/$(FW_DIR)/signed_hdmi_imx8m.bin -O signed_hdmi_imx8m.bin
75 @$(WGET) -q $(SERVER)/$(DIR)/$(FW_DIR)/signed_dp_imx8m.bin -O signed_dp_imx8m.bin
76- @$(WGET) -q $(SERVER)/$(DIR)/$(FW_DIR)/mkimage_uboot -O mkimage_uboot
77
78 archive :
79 git ls-files --others --exclude-standard -z | xargs -0 tar rvf $(ARCHIVE_PATH)/$(ARCHIVE_NAME)
80--
812.17.1
82
diff --git a/recipes-bsp/imx-mkimage/imx-boot_1.0.bb b/recipes-bsp/imx-mkimage/imx-boot_1.0.bb
index 1425c5a3..f8ebb730 100644
--- a/recipes-bsp/imx-mkimage/imx-boot_1.0.bb
+++ b/recipes-bsp/imx-mkimage/imx-boot_1.0.bb
@@ -84,7 +84,6 @@ compile_mx8m() {
84 cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${UBOOT_DTB_NAME} ${BOOT_STAGING} 84 cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${UBOOT_DTB_NAME} ${BOOT_STAGING}
85 cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/u-boot-nodtb.bin-${MACHINE}-${UBOOT_CONFIG} \ 85 cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/u-boot-nodtb.bin-${MACHINE}-${UBOOT_CONFIG} \
86 ${BOOT_STAGING}/u-boot-nodtb.bin 86 ${BOOT_STAGING}/u-boot-nodtb.bin
87 cp ${STAGING_DIR_NATIVE}/${bindir}/mkimage ${BOOT_STAGING}/mkimage_uboot
88 cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin 87 cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin
89 cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${BOOT_STAGING}/u-boot.bin 88 cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${BOOT_STAGING}/u-boot.bin
90} 89}
@@ -151,7 +150,6 @@ deploy_mx8m() {
151 install -m 0644 ${BOOT_STAGING}/signed_hdmi_imx8m.bin ${DEPLOYDIR}/${BOOT_TOOLS} 150 install -m 0644 ${BOOT_STAGING}/signed_hdmi_imx8m.bin ${DEPLOYDIR}/${BOOT_TOOLS}
152 install -m 0755 ${BOOT_STAGING}/${TOOLS_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} 151 install -m 0755 ${BOOT_STAGING}/${TOOLS_NAME} ${DEPLOYDIR}/${BOOT_TOOLS}
153 install -m 0755 ${BOOT_STAGING}/mkimage_fit_atf.sh ${DEPLOYDIR}/${BOOT_TOOLS} 152 install -m 0755 ${BOOT_STAGING}/mkimage_fit_atf.sh ${DEPLOYDIR}/${BOOT_TOOLS}
154 install -m 0755 ${BOOT_STAGING}/mkimage_uboot ${DEPLOYDIR}/${BOOT_TOOLS}
155} 153}
156deploy_mx8() { 154deploy_mx8() {
157 install -d ${DEPLOYDIR}/${BOOT_TOOLS} 155 install -d ${DEPLOYDIR}/${BOOT_TOOLS}
@@ -173,7 +171,7 @@ deploy_mx8x() {
173} 171}
174do_deploy() { 172do_deploy() {
175 deploy_${SOC_FAMILY} 173 deploy_${SOC_FAMILY}
176 # copy the tool mkimage to deploy path and sc fw, dcd and uboot 174 # copy the sc fw, dcd and uboot to deploy path
177 install -m 0644 ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} 175 install -m 0644 ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${DEPLOYDIR}/${BOOT_TOOLS}
178 176
179 # copy tee.bin to deploy path 177 # copy tee.bin to deploy path
diff --git a/recipes-bsp/imx-mkimage/imx-mkimage_git.inc b/recipes-bsp/imx-mkimage/imx-mkimage_git.inc
index ccad28ec..c51c1e08 100644
--- a/recipes-bsp/imx-mkimage/imx-mkimage_git.inc
+++ b/recipes-bsp/imx-mkimage/imx-mkimage_git.inc
@@ -5,6 +5,7 @@ DEPENDS = "zlib-native openssl-native"
5SRCBRANCH = "lf-5.10.52_2.1.0" 5SRCBRANCH = "lf-5.10.52_2.1.0"
6SRC_URI = "git://source.codeaurora.org/external/imx/imx-mkimage.git;protocol=https;branch=${SRCBRANCH} \ 6SRC_URI = "git://source.codeaurora.org/external/imx/imx-mkimage.git;protocol=https;branch=${SRCBRANCH} \
7 file://0001-mkimage_fit_atf-fix-fit-generator-node-naming.patch \ 7 file://0001-mkimage_fit_atf-fix-fit-generator-node-naming.patch \
8 file://0001-iMX8M-soc.mak-use-native-mkimage-from-sysroot.patch \
8" 9"
9SRCREV = "1112c88470f339dc631e2a7117087f416af6d6b5" 10SRCREV = "1112c88470f339dc631e2a7117087f416af6d6b5"
10S = "${WORKDIR}/git" 11S = "${WORKDIR}/git"