From 54a4e5779ddcdcc54182ea500b05eab26bc88fad Mon Sep 17 00:00:00 2001 From: Hector Palacios Date: Mon, 2 Oct 2023 09:35:29 +0200 Subject: [PATCH] trustfence-stm-signtools: rework package so that the tools are accessible The STM signtools are precompiled binaries with a fixed RPATH to look for dynamic libraries. When the binaries are installed to the regular ${bindir} (either native or nativesdk), additional toolchain libraries in the regular ${libdir} folder confuse the binaries, resulting in segmentation faults when running them or missing symbols. The package has been reworked to place the directory structure expected by the binaries, in a subfolder "stm" within the ${bindir}. Two wrapper scripts with the names of the binaries (STM32MP_KeyGen_CLI and STM32MP_SigningTool_CLI) have been created to run the binaries in the new subfolder. Package version has been bumped to 1.1. While on it, remove the 'do_install' from trustfence-stm-signtools.inc which is not needed because the 'bin_package' class already provides the same functionality. Signed-off-by: Hector Palacios https://onedigi.atlassian.net/browse/DEL-8720 --- ...bb => nativesdk-trustfence-stm-signtools_1.1.bb} | 0 ....0.bb => trustfence-stm-signtools-native_1.1.bb} | 0 .../trustfence-stm-signtools.inc | 13 ++----------- 3 files changed, 2 insertions(+), 11 deletions(-) rename meta-digi-arm/recipes-bsp/trustfence-stm-signtools/{nativesdk-trustfence-stm-signtools_1.0.bb => nativesdk-trustfence-stm-signtools_1.1.bb} (100%) rename meta-digi-arm/recipes-bsp/trustfence-stm-signtools/{trustfence-stm-signtools-native_1.0.bb => trustfence-stm-signtools-native_1.1.bb} (100%) diff --git a/meta-digi-arm/recipes-bsp/trustfence-stm-signtools/nativesdk-trustfence-stm-signtools_1.0.bb b/meta-digi-arm/recipes-bsp/trustfence-stm-signtools/nativesdk-trustfence-stm-signtools_1.1.bb similarity index 100% rename from meta-digi-arm/recipes-bsp/trustfence-stm-signtools/nativesdk-trustfence-stm-signtools_1.0.bb rename to meta-digi-arm/recipes-bsp/trustfence-stm-signtools/nativesdk-trustfence-stm-signtools_1.1.bb diff --git a/meta-digi-arm/recipes-bsp/trustfence-stm-signtools/trustfence-stm-signtools-native_1.0.bb b/meta-digi-arm/recipes-bsp/trustfence-stm-signtools/trustfence-stm-signtools-native_1.1.bb similarity index 100% rename from meta-digi-arm/recipes-bsp/trustfence-stm-signtools/trustfence-stm-signtools-native_1.0.bb rename to meta-digi-arm/recipes-bsp/trustfence-stm-signtools/trustfence-stm-signtools-native_1.1.bb diff --git a/meta-digi-arm/recipes-bsp/trustfence-stm-signtools/trustfence-stm-signtools.inc b/meta-digi-arm/recipes-bsp/trustfence-stm-signtools/trustfence-stm-signtools.inc index 2c8e9d882..54540ab00 100644 --- a/meta-digi-arm/recipes-bsp/trustfence-stm-signtools/trustfence-stm-signtools.inc +++ b/meta-digi-arm/recipes-bsp/trustfence-stm-signtools/trustfence-stm-signtools.inc @@ -10,18 +10,9 @@ PKGNAME = "trustfence-stm-signtools" # tarball SRC_URI = "${DIGI_PKG_SRC}/${PKGNAME}-${PV}.tar.gz" -SRC_URI[md5sum] = "5621d99156b75e69eecbae721475463b" -SRC_URI[sha256sum] = "5c04b16934aa316d2586980f93680e90af1968bcb9b76c18b9cecddbcf5d6a1b" - -S = "${WORKDIR}/${PKGNAME}-${PV}" +SRC_URI[md5sum] = "38ce0cd682350b15e773e725ee842da4" +SRC_URI[sha256sum] = "cc349bdcaa764d5af25b12ee9e0c143f93dc80d531f42f8a57a735e170cd378b" inherit bin_package INSANE_SKIP:${PN} = "already-stripped" - -do_install() { - install -d ${D}${bindir} - install -m 0755 bin/* ${D}${bindir} - install -d ${D}${base_libdir} - install -m 0644 lib/* ${D}${base_libdir} -}