From 4b84b124ccbfb95856417dca73d38eddfb401e01 Mon Sep 17 00:00:00 2001 From: Diego Sueiro Date: Tue, 21 Apr 2020 08:33:53 +0100 Subject: [PATCH] meta-arm-bsp: Introduce the scp-firmware-juno recipe The scp-firmware-juno recipe is used to fetch the System Control Processor (SCP) firmware in binary form for Juno. Also update the trusted-firmware-a for juno to make usage of the the SCP firmware binary from scp-firmware-juno recipe. Change-Id: I2a7e517e06c3bbac6b0ffa3f28e0848d8f30589f Issue-Id: SCM-754 SCM-888 Signed-off-by: Diego Sueiro Reviewed-By: Bertrand Marquis Signed-off-by: Jon Mason --- .../firmware/scp-firmware-juno_19.06.bb | 38 +++++++++++++++++++ .../trusted-firmware-a-juno.inc | 4 +- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 meta-arm-bsp/recipes-bsp/firmware/scp-firmware-juno_19.06.bb diff --git a/meta-arm-bsp/recipes-bsp/firmware/scp-firmware-juno_19.06.bb b/meta-arm-bsp/recipes-bsp/firmware/scp-firmware-juno_19.06.bb new file mode 100644 index 00000000..a6ac9caa --- /dev/null +++ b/meta-arm-bsp/recipes-bsp/firmware/scp-firmware-juno_19.06.bb @@ -0,0 +1,38 @@ +DESCRIPTION = "System Control Processor (SCP) firmware for Juno" +HOMEPAGE = "https://github.com/ARM-software/SCP-firmware" +LICENSE = "BSD-3-Clause" +SECTION = "firmware" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +COMPATIBLE_MACHINE = "juno" + +PROVIDES += "virtual/scp-firmware" + +# For now, for juno we retrieve the SCP firmware in binary format +# from Linaro Releases. +SRC_URI = "http://releases.linaro.org/members/arm/platforms/${PV}/juno-latest-oe-uboot.zip;subdir=${UNPACK_DIR}" + +SRC_URI[md5sum] = "01b662b81fa409d55ff298238ad24003" +SRC_URI[sha256sum] = "b8a3909bb3bc4350a8771b863193a3e33b358e2a727624a77c9ecf13516cec82" + +UNPACK_DIR = "juno-firmware" + +S = "${WORKDIR}/${UNPACK_DIR}" + +SCP_FIRMWARE_BINARIES = "scp_bl1.bin scp_bl2.bin" + +inherit nopackages + +do_configure[noexec] = "1" +do_configure[compile] = "1" + +do_install() { + install -d ${D}/firmware + for file in ${SCP_FIRMWARE_BINARIES}; do + install -m 644 ${S}/SOFTWARE/${file} ${D}/firmware + done +} + +SYSROOT_DIRS += "/firmware" diff --git a/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-juno.inc b/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-juno.inc index c62197d9..4a034c85 100644 --- a/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-juno.inc +++ b/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-juno.inc @@ -23,8 +23,10 @@ SRC_URI_append_juno = " \ file://images-r2.txt \ file://uEnv.txt \ " +# Juno needs the System Control Processor Firmware +DEPENDS += "virtual/scp-firmware" -EXTRA_OEMAKE_append_juno = " SCP_BL2=${WORKDIR}/juno-oe-uboot/SOFTWARE/scp_bl2.bin" +EXTRA_OEMAKE_append = " SCP_BL2=${RECIPE_SYSROOT}/firmware/scp_bl2.bin" # Build dependencies only for Juno and add them # doing it with do_deploy_juno[depends] does not work