From 69ba703ea2f4994bd1cca5a73869cfe0d7e46073 Mon Sep 17 00:00:00 2001 From: Ming Liu Date: Sun, 6 Dec 2020 17:25:06 +0100 Subject: imx-boot: fix a build issue The following build errors was observed on ubuntu 16.04: | ./mkimage_uboot -E -p 0x3000 -f u-boot.its u-boot.itb | ./mkimage_uboot: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory or: | ./mkimage_uboot: /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1: version `OPENSSL_1_1_1' not found (required by ./mkimage_uboot) the issue is caused by OE builds native tools with a relative runpath: $ aarch64-tdx-linux-objdump -p iMX8M/mkimage_uboot | egrep 'RPATH|RUNPATH' RUNPATH $ORIGIN/../lib:$ORIGIN/../../lib when mkimage_uboot is copied from ${STAGING_BINDIR_NATIVE} to ${S}, the '$ORIGIN/../lib:$ORIGIN/../../lib' directories dont exist and ld hence fall back to load libssl.so.1.1/libcrypto.so.1.1 from host system. It could be fixed by creating a symbolic link in source to ${STAGING_BINDIR_NATIVE}/mkimage instead of copying it. Related-to: ELB-3394 Signed-off-by: Ming Liu (cherry picked from commit be8f831ce0728062bacc686f2ab9178e8c53031f) --- recipes-bsp/imx-mkimage/imx-boot_%.bbappend | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 recipes-bsp/imx-mkimage/imx-boot_%.bbappend (limited to 'recipes-bsp/imx-mkimage') diff --git a/recipes-bsp/imx-mkimage/imx-boot_%.bbappend b/recipes-bsp/imx-mkimage/imx-boot_%.bbappend new file mode 100644 index 0000000..d137231 --- /dev/null +++ b/recipes-bsp/imx-mkimage/imx-boot_%.bbappend @@ -0,0 +1,5 @@ +compile_mx8m_append() { + # Create symbolic link rather than copying mkimage_uboot + rm -rf ${BOOT_STAGING}/mkimage_uboot + lnr ${STAGING_DIR_NATIVE}/${bindir}/mkimage ${BOOT_STAGING}/mkimage_uboot +} -- cgit v1.2.3