[meta-arm,1/2] arm-bsp/scp-firmware: build SCP firmware for juno

Submitted by Damodar Santhapuri on Aug. 10, 2020, 3:02 a.m. | Patch ID: 175167

Details

Message ID 20200810030216.24798-1-damodar.santhapuri@arm.com
State New
Headers show

Commit Message

Damodar Santhapuri Aug. 10, 2020, 3:02 a.m.
- Remove scp-firmware-juno_19.06.bb
- Enable v2.6 support for juno
- Add juno machine specific to scp-firmware
- Use romfw_bypass as scp_bl1.bin

Change-Id: Ib3f92e170a4e5701f6c6d18695541eae763de464
Signed-off-by: Damodar Santhapuri <damodar.santhapuri@arm.com>
---
 .../firmware/scp-firmware-juno_19.06.bb       | 38 -------------------
 .../recipes-bsp/images/firmware-image-juno.bb |  5 ++-
 .../scp-firmware/scp-firmware-juno.inc        |  7 ++++
 .../scp-firmware/scp-firmware_%.bbappend      |  1 +
 .../trusted-firmware-a-juno.inc               |  4 +-
 5 files changed, 14 insertions(+), 41 deletions(-)
 delete mode 100644 meta-arm-bsp/recipes-bsp/firmware/scp-firmware-juno_19.06.bb
 create mode 100644 meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware-juno.inc

Patch hide | download patch | download mbox

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
deleted file mode 100644
index a6ac9ca..0000000
--- a/meta-arm-bsp/recipes-bsp/firmware/scp-firmware-juno_19.06.bb
+++ /dev/null
@@ -1,38 +0,0 @@ 
-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/images/firmware-image-juno.bb b/meta-arm-bsp/recipes-bsp/images/firmware-image-juno.bb
index b0ad14f..a79bab5 100644
--- a/meta-arm-bsp/recipes-bsp/images/firmware-image-juno.bb
+++ b/meta-arm-bsp/recipes-bsp/images/firmware-image-juno.bb
@@ -5,7 +5,7 @@  LICENSE = "BSD-3-Clause"
 SECTION = "firmware"
 LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9"
 
-DEPENDS = "virtual/trusted-firmware-a virtual/kernel"
+DEPENDS = "virtual/trusted-firmware-a virtual/kernel virtual/control-processor-firmware"
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
@@ -39,6 +39,9 @@  do_install() {
     cp -f ${RECIPE_SYSROOT}/firmware/fip-juno.bin \
         ${D}/${UNPACK_DIR}/SOFTWARE/fip.bin
 
+    cp -f ${RECIPE_SYSROOT}/firmware/scp_romfw_bypass.bin \
+        ${D}/${UNPACK_DIR}/SOFTWARE/scp_bl1.bin
+
     # u-boot environment file
     cp -f ${WORKDIR}/uEnv.txt ${D}/${UNPACK_DIR}/SOFTWARE/
 
diff --git a/meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware-juno.inc b/meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware-juno.inc
new file mode 100644
index 0000000..9e1e1c2
--- /dev/null
+++ b/meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware-juno.inc
@@ -0,0 +1,7 @@ 
+# juno specific SCP configuration
+
+COMPATIBLE_MACHINE = "juno"
+
+SCP_PLATFORM = "juno"
+FW_TARGETS = "scp"
+FW_INSTALL_append = " romfw_bypass"
diff --git a/meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware_%.bbappend b/meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware_%.bbappend
index 33ae7fe..97dcc05 100644
--- a/meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware_%.bbappend
+++ b/meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware_%.bbappend
@@ -4,5 +4,6 @@  MACHINE_SCP_REQUIRE ?= ""
 
 MACHINE_SCP_REQUIRE_n1sdp = "scp-firmware-n1sdp.inc"
 MACHINE_SCP_REQUIRE_tc0 = "scp-firmware-tc0.inc"
+MACHINE_SCP_REQUIRE_juno = "scp-firmware-juno.inc"
 
 require ${MACHINE_SCP_REQUIRE}
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 2f1559c..a6d8ded 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
@@ -8,6 +8,6 @@  TFA_UBOOT = "1"
 TFA_BUILD_TARGET = "bl1 fip"
 
 # Juno needs the System Control Processor Firmware
-DEPENDS += "virtual/scp-firmware"
+DEPENDS += "virtual/control-processor-firmware"
 
-EXTRA_OEMAKE_append = " SCP_BL2=${RECIPE_SYSROOT}/firmware/scp_bl2.bin"
+EXTRA_OEMAKE_append = " SCP_BL2=${RECIPE_SYSROOT}/firmware/scp_ramfw.bin"