Use the include files to create a bb recipe and use the new versioning scheme.
Signed-off-by: Pawel Zalewski pzalewski@thegoodpenguin.co.uk --- ....bbappend => scp-firmware_morello-2.10.bb} | 65 ++++++++++++++++--- ...pend => trusted-firmware-a_morello-2.7.bb} | 3 +- 2 files changed, 57 insertions(+), 11 deletions(-) rename meta-morello/recipes-bsp/scp-firmware/{scp-firmware_2.10.%.bbappend => scp-firmware_morello-2.10.bb} (51%) rename meta-morello/recipes-bsp/trusted-firmware-a/{trusted-firmware-a_2.%.bbappend => trusted-firmware-a_morello-2.7.bb} (96%)
diff --git a/meta-morello/recipes-bsp/scp-firmware/scp-firmware_2.10.%.bbappend b/meta-morello/recipes-bsp/scp-firmware/scp-firmware_morello-2.10.bb similarity index 51% rename from meta-morello/recipes-bsp/scp-firmware/scp-firmware_2.10.%.bbappend rename to meta-morello/recipes-bsp/scp-firmware/scp-firmware_morello-2.10.bb index 69fdd1d..cbb8ec4 100644 --- a/meta-morello/recipes-bsp/scp-firmware/scp-firmware_2.10.%.bbappend +++ b/meta-morello/recipes-bsp/scp-firmware/scp-firmware_morello-2.10.bb @@ -1,36 +1,77 @@ -inherit cmake +inherit cmake deploy + +SUMMARY = "SCP and MCP Firmware" +DESCRIPTION = "Firmware for SCP and MCP software reference implementation" +HOMEPAGE = "https://github.com/ARM-software/SCP-firmware" + +LICENSE = "BSD-3-Clause & Apache-2.0" +LIC_FILES_CHKSUM = "file://license.md;beginline=5;md5=9db9e3d2fb8d9300a6c3d15101b19731 \ + file://contrib/cmsis/git/LICENSE.txt;md5=e3fc50a88d0a364313df4b21ef20c29e"
COMPATIBLE_MACHINE = "morello" OUTPUTS_NAME = "scp-firmware" SECTION = "firmware"
+PACKAGE_ARCH = "${MACHINE_ARCH}" + +TOOLCHAIN = "gcc" + MACHINE_SCP_REQUIRE ?= "" MACHINE_SCP_REQUIRE:morello-fvp = "scp-firmware-morello-fvp.inc" MACHINE_SCP_REQUIRE:morello-soc = "scp-firmware-morello-soc.inc" require ${MACHINE_SCP_REQUIRE}
-DEPENDS += "virtual/board-firmware" +INHIBIT_DEFAULT_DEPS = "1"
+DEPENDS += "virtual/arm-none-eabi-gcc-native virtual/board-firmware" PROVIDES += "virtual/${OUTPUTS_NAME}"
SRC_URI = "gitsm://git.morello-project.org/morello/scp-firmware.git;protocol=https;branch=${SRCBRANCH}" SRCREV = "758aad2f0c522d2dd7b8f84eca5d9d71fa2d9359" -PV = "2.10.0+git${SRCPV}" +PV = "morello-2.10.0+git${SRCPV}"
SRCBRANCH = "morello/master"
-SCP_PLATFORM = "morello" -SCP_LOG_LEVEL = "INFO" +SCP_BUILD_RELEASE ?= "1" +SCP_COMPILER ?= "arm-none-eabi" +SCP_PLATFORM ?= "morello" +SCP_LOG_LEVEL ?= "INFO"
SENSOR = "${RECIPE_SYSROOT}/board-firmware/LIB/sensor.a" B = "${WORKDIR}/build/morello" +S = "${WORKDIR}/git" + +# Allow platform specific copying of only scp or both scp & mcp, default to both +FW_TARGETS ?= "scp mcp" +FW_INSTALL ?= "ramfw romfw" + + +LDFLAGS[unexport] = "1"
-FW_TARGETS = "scp mcp"
-unset do_configure[noexec] -unset do_compile[cleandirs] +EXTRA_OEMAKE = "V=1 \ + BUILD_PATH='${B}' \ + PRODUCT='${SCP_PLATFORM}' \ + MODE='${SCP_BUILD_STR}' \ + LOG_LEVEL='${SCP_LOG_LEVEL}' \ + CC='${SCP_COMPILER}-gcc' \ + AR='${SCP_COMPILER}-ar' \ + SIZE='${SCP_COMPILER}-size' \ + OBJCOPY='${SCP_COMPILER}-objcopy' \ + " + do_configure[depends] += "board-firmware:do_install"
+FILES:${PN} = "/firmware" +SYSROOT_DIRS += "/firmware" + +FILES:${PN}-dbg += "/firmware/*.elf" + +# Skip QA check for relocations in .text of elf binaries +INSANE_SKIP:${PN}-dbg = "arch textrel" +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" +INHIBIT_PACKAGE_STRIP = "1" + do_configure() {
cd ${S} @@ -76,4 +117,10 @@ do_install() { cp -rf "${B}/${target}/bin/"*.bin "${D}/firmware/${target}.bin" done done -} \ No newline at end of file +} + +do_deploy() { + # Copy the images to deploy directory + cp -rf ${D}/firmware/* ${DEPLOYDIR}/ +} +addtask deploy after do_install \ No newline at end of file diff --git a/meta-morello/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.%.bbappend b/meta-morello/recipes-bsp/trusted-firmware-a/trusted-firmware-a_morello-2.7.bb similarity index 96% rename from meta-morello/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.%.bbappend rename to meta-morello/recipes-bsp/trusted-firmware-a/trusted-firmware-a_morello-2.7.bb index c4bfc69..f16f12a 100644 --- a/meta-morello/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.%.bbappend +++ b/meta-morello/recipes-bsp/trusted-firmware-a/trusted-firmware-a_morello-2.7.bb @@ -1,5 +1,5 @@
- +require recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc COMPATIBLE_MACHINE = "morello" SUMMARY = "TF-A to be compiled with LLVM Morello" OUTPUTS_NAME = "trusted-firmware-a" @@ -17,7 +17,6 @@ PROVIDES += "virtual/${OUTPUTS_NAME}"
SRC_URI = "gitsm://git.morello-project.org/morello/trusted-firmware-a;protocol=https;name=tfa;branch=${SRCBRANCH}" SRCREV_tfa = "3ce2815936774fe924ec7538151b71085c2f18d9" -PV = "2.7+git${SRCPV}"
SRCBRANCH = "morello/master" LIC_FILES_CHKSUM = "file://docs/license.rst;md5=b2c740efedc159745b9b31f88ff03dde"