From 5569afc1df366135ccf737b0e1d368d0b372bb7d Mon Sep 17 00:00:00 2001 From: Patrik Berglund Date: Wed, 26 Feb 2020 10:41:16 +0000 Subject: [PATCH] TF-A: Add git development version Change-Id: I7f734d2f89ad8da6eae55403691806b9d9106f15 Signed-off-by: Patrik Berglund Signed-off-by: Jon Mason --- .../trusted-firmware-a_git.bb | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a_git.bb diff --git a/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a_git.bb b/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a_git.bb new file mode 100644 index 00000000..4bf3ae5e --- /dev/null +++ b/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a_git.bb @@ -0,0 +1,38 @@ +# Trusted firmware-A points a commit rather a tag +# +# This is only a base receipt and should be bbextended with suitable SRCREV_tfa +# and SRCREV_MBEDTLS and target TFA_* variables + +# Never select this if another version is available +DEFAULT_PREFERENCE = "-1" + +require trusted-firmware-a.inc + +SRC_URI = "git://git.trustedfirmware.org/TF-A/trusted-firmware-a.git;protocol=https;name=tfa" +SRCREV_FORMAT = "tfa" +LIC_FILES_CHKSUM ?= "file://docs/license.rst;md5=189505435dbcdcc8caa63c46fe93fa89" + +# mbed TLS source +# Those are used in trusted-firmware-a.inc if TFA_MBEDTLS is set to 1 +SRC_URI_MBEDTLS = "git://github.com/ARMmbed/mbedtls.git;name=mbedtls;protocol=https;destsuffix=git/mbedtls" +LIC_FILES_CHKSUM_MBEDTLS ?= " \ + file://mbedtls/apache-2.0.txt;md5=3b83ef96387f14655fc854ddc3c6bd57 \ + file://mbedtls/LICENSE;md5=302d50a6369f5f22efdb674db908167a \ + " + +S = "${WORKDIR}/git" + +# The following hack is needed to fit properly in yocto build environment +# TFA is forcing the host compiler and its flags in the Makefile using := +# assignment for GCC and CFLAGS. +# To properly use the native toolchain of yocto and the right libraries we need +# to pass the proper flags to gcc. This is achieved here by creating a gcc +# script to force passing to gcc the right CFLAGS and LDFLAGS +do_compile_prepend() { + # Create an host gcc build parser to ensure the proper include path is used + mkdir -p bin + echo "#!/usr/bin/env bash" > bin/gcc + echo "$(which ${BUILD_CC}) ${BUILD_CFLAGS} ${BUILD_LDFLAGS} \$@" >> bin/gcc + chmod a+x bin/gcc + export PATH="$PWD/bin:$PATH" +}