From 96bffa5378208069ae93da5467b9eb3bff882dfd Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Wed, 24 Aug 2022 14:01:47 +0000 Subject: [PATCH] tf-a-tools: fix the RPATH for the native target the libcrypto.so.3 is provide on the native sysroot of the fiptool but the fiptool don't search the native sysroot so it will work in hosts with the library libcrypto.so.3 and fail when the libcrypto.so.3 not found. this patch fix this host contamination bug. | fiptool: error while loading shared libraries: libcrypto.so.3: cannot open shared object file: No such file or directory Signed-off-by: Jose Quaresma --- recipes-bsp/trusted-firmware-a/tf-a-tools_2.6.bb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/recipes-bsp/trusted-firmware-a/tf-a-tools_2.6.bb b/recipes-bsp/trusted-firmware-a/tf-a-tools_2.6.bb index 2526b3b..b1137f0 100644 --- a/recipes-bsp/trusted-firmware-a/tf-a-tools_2.6.bb +++ b/recipes-bsp/trusted-firmware-a/tf-a-tools_2.6.bb @@ -20,6 +20,14 @@ EXTRA_OEMAKE += "certtool fiptool" do_configure[noexec] = "1" +do_compile:prepend () { + # This is still needed to have the native fiptool executing properly by + # setting the RPATH + sed -e '/^LDLIBS/ s,$, \$\{BUILD_LDFLAGS},' \ + -e '/^INCLUDE_PATHS/ s,$, \$\{BUILD_CFLAGS},' \ + -i ${S}/tools/fiptool/Makefile +} + do_install() { install -d ${D}${bindir} install -m 0755 \