[meta-arm,7/9] arm-bsp/scp-firmware: adding scp support for corstone700 platform

Submitted by abdellatif.elkhlifi@arm.com on Aug. 7, 2020, 9:25 a.m. | Patch ID: 175112

Details

Message ID 20200807092553.18876-8-abdellatif.elkhlifi@arm.com
State Superseded
Headers show

Commit Message

abdellatif.elkhlifi@arm.com Aug. 7, 2020, 9:25 a.m.
From: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>

Extend the scp recipe to support corstone700 plaform.

The scp runs on the boot processor (Secure Enclave).

Change-Id: I24289533a72367ebd2d2150c5230d9f435b4212f
Signed-off-by: Rui Miguel Silva <rui.silva@arm.com>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
---
 .../conf/machine/include/corstone700.inc      | 10 ++++-
 .../scp-firmware/scp-firmware-corstone700.inc | 37 +++++++++++++++++++
 .../scp-firmware/scp-firmware_%.bbappend      |  1 +
 3 files changed, 47 insertions(+), 1 deletion(-)
 create mode 100644 meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware-corstone700.inc

--
2.17.1

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#974): https://lists.yoctoproject.org/g/meta-arm/message/974
Mute This Topic: https://lists.yoctoproject.org/mt/76045800/3617530
Group Owner: meta-arm+owner@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/meta-arm/unsub  [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-

Patch hide | download patch | download mbox

diff --git a/meta-arm-bsp/conf/machine/include/corstone700.inc b/meta-arm-bsp/conf/machine/include/corstone700.inc
index 6b02415..91f290f 100644
--- a/meta-arm-bsp/conf/machine/include/corstone700.inc
+++ b/meta-arm-bsp/conf/machine/include/corstone700.inc
@@ -14,7 +14,15 @@  PREFERRED_VERSION_linux-stable ?= "5.6%"
 PREFERRED_PROVIDER_virtual/trusted-firmware-a ?= "trusted-firmware-a"
 PREFERRED_VERSION_trusted-firmware-a ?= "2.3%"

-EXTRA_IMAGEDEPENDS += "virtual/trusted-firmware-a external-system u-boot"
+PREFERRED_PROVIDER_virtual/control-processor-firmware ?= "scp-firmware"
+PREFERRED_VERSION_control-processor-firmware ?= "2.6.0"
+
+EXTRA_IMAGEDEPENDS += " \
+                      virtual/trusted-firmware-a          \
+                      external-system                     \
+                      u-boot                              \
+                      virtual/control-processor-firmware  \
+                      "

 WKS_FILE_DEPENDS_append = " ${EXTRA_IMAGEDEPENDS}"

diff --git a/meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware-corstone700.inc b/meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware-corstone700.inc
new file mode 100644
index 0000000..16437c5
--- /dev/null
+++ b/meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware-corstone700.inc
@@ -0,0 +1,37 @@ 
+# Corstone700 specific SCP configurations and build instructions
+
+SUMMARY = "Boot Processor firmware"
+DESCRIPTION = "Boot Processor firmware"
+DEPENDS += "virtual/trusted-firmware-a"
+
+LIC_FILES_CHKSUM = "file://license.md;md5=e44b2531cd6ffe9dece394dbe988d9a0 \
+                    file://cmsis/LICENSE.txt;md5=e3fc50a88d0a364313df4b21ef20c29e"
+
+COMPATIBLE_MACHINE = "(corstone700-*)"
+SCP_PLATFORM = "corstone-700"
+
+# boot-firmware project is a fork of scp-firmware
+SRC_URI = "gitsm://git.linaro.org/landing-teams/working/arm/boot-firmware.git;protocol=https;branch=master"
+SRCREV = "a4dd1b60218b5172a94e6f44c96384b84a77588c"
+PV = "0.1.0~git${SRCPV}"
+
+B = "${WORKDIR}/build"
+
+EXTRA_OEMAKE = "PRODUCT='${SCP_PLATFORM}' \
+                BUILD_PATH=${B} \
+                CROSS_COMPILE='arm-none-eabi-' \
+               "
+do_compile_append() {
+   oe_runmake -C ${S}/tools/spitoc CC=${BUILD_CC} clean all
+}
+
+do_install() {
+    install -D -p -m 0644 ${B}/product/${SCP_PLATFORM}/se_ramfw/release/bin/firmware.bin ${D}/firmware/se_ramfw.bin
+    install -D -p -m 0644 ${B}/product/${SCP_PLATFORM}/se_romfw/release/bin/firmware.bin ${D}/firmware/se_romfw.bin
+    ${S}/tools/spitoc/spitoc \
+    --seram ${D}/firmware/se_ramfw.bin \
+    --offset 1  \
+    --fip ${RECIPE_SYSROOT}/firmware/fip.bin-${TFA_PLATFORM} \
+    --offset  33 \
+    --out ${D}/firmware/spitoc.bin
+}
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..c971c5c 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_corstone700 = "scp-firmware-corstone700.inc"

 require ${MACHINE_SCP_REQUIRE}

Comments

abdellatif.elkhlifi@arm.com Aug. 7, 2020, 10:42 p.m.
This is a system generated Comment: Patch 175112 was automatically marked as superseded by patch 175126.