[meta-arm,5/6] arm/scp-firmware: Add SCP v2.7.0

Submitted by Ross Burton on Nov. 25, 2020, 12:31 p.m. | Patch ID: 178258

Details

Message ID 20201125123127.3226384-5-ross.burton@arm.com
State New
Headers show

Commit Message

Ross Burton Nov. 25, 2020, 12:31 p.m.
From: Jon Mason <jon.mason@arm.com>


Add the latest version of SCP.  Not adding an inc file between them,
since the older one should be removed ASAP.

Change-Id: I0a1e58ffdb6d0d405b199e498587fe410076fc08
Signed-off-by: Jon Mason <jon.mason@arm.com>

---
 .../scp-firmware/scp-firmware_2.7.0.bb        | 74 +++++++++++++++++++
 1 file changed, 74 insertions(+)
 create mode 100644 meta-arm/recipes-bsp/scp-firmware/scp-firmware_2.7.0.bb

-- 
2.25.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#1446): https://lists.yoctoproject.org/g/meta-arm/message/1446
Mute This Topic: https://lists.yoctoproject.org/mt/78498347/1003190
Group Owner: meta-arm+owner@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/meta-arm/unsub [mhalstead@linuxfoundation.org]
-=-=-=-=-=-=-=-=-=-=-=-

Patch hide | download patch | download mbox

diff --git a/meta-arm/recipes-bsp/scp-firmware/scp-firmware_2.7.0.bb b/meta-arm/recipes-bsp/scp-firmware/scp-firmware_2.7.0.bb
new file mode 100644
index 0000000..13092f1
--- /dev/null
+++ b/meta-arm/recipes-bsp/scp-firmware/scp-firmware_2.7.0.bb
@@ -0,0 +1,74 @@ 
+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://cmsis/LICENSE.txt;md5=e3fc50a88d0a364313df4b21ef20c29e"
+
+SRC_URI = "gitsm://github.com/ARM-software/SCP-firmware.git;protocol=https"
+SRCREV  = "2c4f3af270024b85e1b38fd963050c58f6e9b865"
+
+PROVIDES += "virtual/control-processor-firmware"
+
+SCP_BUILD_RELEASE   ?= "1"
+SCP_PLATFORM        ?= "invalid"
+SCP_COMPILER        ?= "arm-none-eabi"
+SCP_LOG_LEVEL       ?= "WARN"
+
+DEPENDS += "virtual/arm-none-eabi-gcc-native"
+
+SCP_BUILD_STR = "${@bb.utils.contains('SCP_BUILD_RELEASE', '1', 'release', 'debug', d)}"
+
+inherit deploy
+
+B = "${WORKDIR}/build"
+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"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+COMPATIBLE_MACHINE ?= "invalid"
+
+LDFLAGS[unexport] = "1"
+
+# No configure
+do_configure[noexec] = "1"
+
+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_compile() {
+    oe_runmake -C "${S}"
+}
+do_compile[cleandirs] += "${B}"
+
+do_install() {
+     install -d ${D}/firmware
+     for FW in ${FW_TARGETS}; do
+        for TYPE in ${FW_INSTALL}; do
+           install -D "${B}/product/${SCP_PLATFORM}/${FW}_${TYPE}/${SCP_BUILD_STR}/bin/${FW}_${TYPE}.bin" "${D}/firmware/"
+        done
+     done
+}
+
+FILES_${PN} = "/firmware"
+SYSROOT_DIRS += "/firmware"
+# Skip QA check for relocations in .text of elf binaries
+INSANE_SKIP_${PN} = "textrel"
+
+do_deploy() {
+    # Copy the images to deploy directory
+    cp -rf ${D}/firmware/* ${DEPLOYDIR}/
+}
+addtask deploy after do_install