diff options
Diffstat (limited to 'dynamic-layers/openembedded-layer/recipes-devtools')
3 files changed, 93 insertions, 2 deletions
diff --git a/dynamic-layers/openembedded-layer/recipes-devtools/cst/files/0001-fix-err-msg-linking.patch b/dynamic-layers/openembedded-layer/recipes-devtools/cst/files/0001-fix-err-msg-linking.patch new file mode 100644 index 00000000..a3f5c828 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-devtools/cst/files/0001-fix-err-msg-linking.patch @@ -0,0 +1,56 @@ +NXP uses weaken to solve conflict in linking. +On Ubuntu 22.04(LTS) this fails to link cst with libcrypto. + +The patch fixes the conflict in the code itself. +It restricts the scope of err_msg to the module. + +Upstream-Status: Inappropriate [i.MX specific] +Signed-off-by: Walter Schweizer <walter.schweizer@siemens.com> +---- +diff --git a/code/cst/code/build/make/rules.mk b/code/cst/code/build/make/rules.mk +index 1c0842b..9c46cc4 100644 +--- a/code/cst/code/build/make/rules.mk ++++ b/code/cst/code/build/make/rules.mk +@@ -25,11 +25,11 @@ LFLAGS := -t + %.a: + @echo "Create archive $@" + $(AR) $(ARFLAGS) $@ $^ +-ifneq ($(OSTYPE),mingw32) +-ifneq ($(OSTYPE),osx) +- $(OBJCOPY) --weaken $@ +-endif +-endif ++#ifneq ($(OSTYPE),mingw32) ++#ifneq ($(OSTYPE),osx) ++# $(OBJCOPY) --weaken $@ ++#endif ++#endif + + %.exe: + @echo "Link $@" +diff --git a/code/cst/code/front_end/src/acst.c b/code/cst/code/front_end/src/acst.c +index fb1e8aa..1e993ee 100644 +--- a/code/cst/code/front_end/src/acst.c ++++ b/code/cst/code/front_end/src/acst.c +@@ -65,7 +65,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + /*=========================================================================== + LOCAL VARIABLES + =============================================================================*/ +-char err_msg[MAX_ERR_MSG_BYTES]; ++static char err_msg[MAX_ERR_MSG_BYTES]; + + /*=========================================================================== + LOCAL FUNCTION PROTOTYPES +diff --git a/code/cst/code/front_end/src/misc_helper.c b/code/cst/code/front_end/src/misc_helper.c +index 678dc17..9014b2a 100644 +--- a/code/cst/code/front_end/src/misc_helper.c ++++ b/code/cst/code/front_end/src/misc_helper.c +@@ -60,7 +60,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + /*=========================================================================== + LOCAL VARIABLES + =============================================================================*/ +-char err_msg[MAX_ERR_MSG_BYTES]; ++static char err_msg[MAX_ERR_MSG_BYTES]; + + /*=========================================================================== + LOCAL FUNCTION PROTOTYPES diff --git a/dynamic-layers/openembedded-layer/recipes-devtools/cst/imx-cst_3.3.1.bb b/dynamic-layers/openembedded-layer/recipes-devtools/cst/imx-cst_3.3.1.bb new file mode 100644 index 00000000..5f808a97 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-devtools/cst/imx-cst_3.3.1.bb @@ -0,0 +1,35 @@ +SUMMARY = "i.MX code signing tool" +DESCRIPTION = "Provides software code signing support designed that integrate the HABv4 and AHAB library" +SECTION = "cst" +LICENSE = "BSD-3-Clause" + +LIC_FILES_CHKSUM = "file://LICENSE.bsd3;md5=1fbcd66ae51447aa94da10cbf6271530" + +DEPENDS = "byacc-native flex-native openssl" + +# tag=debian/3.3.1+dfsg-2 +SRCREV = "e2c687a856e6670e753147aacef42d0a3c07891a" +SRC_URI = " \ + file://0001-fix-err-msg-linking.patch \ + git://gitlab.apertis.org/pkg/imx-code-signing-tool.git;protocol=https;branch=apertis/v2022pre \ +" + +S = "${WORKDIR}/git" + +EXTRA_OEMAKE = 'CC="${CC}" LD="${CC}" AR="${AR}" OBJCOPY="${OBJCOPY}"' + +do_compile() { + cd ${S}/code/cst + oe_runmake build OSTYPE=linux64 ENCRYPTION=yes COPTIONS="${CFLAGS} ${CPPFLAGS}" LDOPTIONS="${LDFLAGS}" + cd - + oe_runmake -C code/hab_csf_parser COPTS="${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" +} + +do_install () { + install -d ${D}${bindir} + install -m 755 ${S}/code/cst/code/obj.linux64/cst ${D}${bindir} + install -m 755 ${S}/code/cst/code/obj.linux64/srktool ${D}${bindir} + install -m 755 ${S}/code/hab_csf_parser/csf_parser ${D}${bindir} +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/dynamic-layers/openembedded-layer/recipes-devtools/luajit/luajit_%.bbappend b/dynamic-layers/openembedded-layer/recipes-devtools/luajit/luajit_%.bbappend index 8c6138c5..d07f8ae1 100644 --- a/dynamic-layers/openembedded-layer/recipes-devtools/luajit/luajit_%.bbappend +++ b/dynamic-layers/openembedded-layer/recipes-devtools/luajit/luajit_%.bbappend @@ -1,4 +1,4 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" +FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:" -SRC_URI_append_qoriq-ppc = " file://ppc-fixplt.patch " +SRC_URI:append:qoriq-ppc = " file://ppc-fixplt.patch " |