Skip to contentSkip to conversation

meta-arm: Add SCP MCP build support

PATCH In review Khasim Mohammed 2 participants 4 messages Jun 2, 2020 – Jun 10, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 meta-arm: Add SCP MCP build support

SCP-firmware provides a software reference implementation for the System Control Processor (SCP) and Manageability Control Processor (MCP) components found in several Arm Compute Sub-Systems.

This patch set adds support to fetch and build SCP and MCP firmware binaries

Issue-Id: PLATFORMS-3134

Change-Id Ic7259bb430c9e7e9711c9c8bc3283aafaacdf707
---
 .../recipes-bsp/scp-firmware/scp-firmware.inc | 71 +++++++++++++++++++
 .../scp-firmware/scp-firmware_git.bb          | 20 ++++++
 2 files changed, 91 insertions(+)
 create mode 100644 meta-arm/recipes-bsp/scp-firmware/scp-firmware.inc
 create mode 100644 meta-arm/recipes-bsp/scp-firmware/scp-firmware_git.bb
meta-arm/recipes-bsp/scp-firmware/scp-firmware.inc new file +71 -0
new file mode 100644
index 0000000..1873848
@@ -0,0 +1,71 @@
+SUMMARY = "SCP and MCP Firmware"
+
+PROVIDES += "virtual/control-processor-firmware"
+
+SCP_BUILD_RELEASE   ?= "1"
+SCP_COMPILE_VERBOSE ?= "0"
+SCP_PLATFORM        ?= "invalid"
+SCP_COMPILER        ?= "arm-none-eabi"
+
+DEPENDS += "virtual/arm-none-eabi-gcc-native"
+
+SCP_BUILD_STR = "${@bb.utils.contains('SCP_BUILD_RELEASE', '1', 'release', 'debug', d)}"
+SCP_COMP_STR  = "${@bb.utils.contains('SCP_COMPILE_VERBOSE', '0', '', 'V=1', d)}"
+
+inherit python3native
+inherit deploy
+
+B = "${WORKDIR}/build"
+S = "${WORKDIR}/src"
+
+# Allow platform specific copying of only scp or both scp & mcp, default to both
+FW_TARGETS ?= "scp mcp"
+
+COMPATIBLE_MACHINE ?= "invalid"
+
+LDFLAGS[unexport] = "1"
+
+# The gcc-arm-none-eabi version does not support -fmacro-prefix-max
+DEBUG_PREFIX_MAP_pn-scp = "\
+    -fdebug-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
+    -fdebug-prefix-map=${STAGING_DIR_HOST}= \
+    -fdebug-prefix-map=${STAGING_DIR_NATIVE}= \
+"
+
+# No configure
+do_configure[noexec] = "1"
+
+EXTRA_OEMAKE = "${SCP_COMP_STR} \
+                BUILD_PATH='${B}' \
+                PRODUCT='${SCP_PLATFORM}' \
+                MODE='${SCP_BUILD_STR}' \
+                CC='${SCP_COMPILER}-gcc' \
+                AR='${SCP_COMPILER}-ar' \
+                SIZE='${SCP_COMPILER}-size' \
+                OBJCOPY='${SCP_COMPILER}-objcopy' \
+                "
+
+do_compile() {
+    oe_runmake -C "${S}" ${EXTRA_OEMAKE}
+}
+do_compile[cleandirs] += "${B}"
+
+do_install() {
+     install -d ${D}/firmware
+     for FW in ${FW_TARGETS}; do
+        for TYPE in ramfw romfw; do
+           install -D "${B}/product/${SCP_PLATFORM}/${FW}_${TYPE}/release/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
meta-arm/recipes-bsp/scp-firmware/scp-firmware_git.bb new file +20 -0
new file mode 100644
index 0000000..5ff5859
@@ -0,0 +1,20 @@
+DESCRIPTION = "Firmware for SCP and MCP software reference implementation"
+HOMEPAGE = "https://github.com/ARM-software/SCP-firmware"
+
+LICENSE = "BSD-3-Clause & Apache-2.0"
+
+# SCP
+LIC_FILES_CHKSUM = "file://license.md;beginline=5;md5=9db9e3d2fb8d9300a6c3d15101b19731"
+# CMSIS
+LIC_FILES_CHKSUM += "file://cmsis/LICENSE.txt;md5=e3fc50a88d0a364313df4b21ef20c29e"
+
+SRC_URI = "\
+    git://github.com/ARM-software/SCP-firmware.git;protocol=https;name=scp;destsuffix=src;nobranch=1 \
+    git://github.com/ARM-software/CMSIS_5.git;protocol=https;name=cmsis;destsuffix=src/cmsis;lfs=0;nobranch=1 \
+"
+
+SRCREV_scp    = "db19910aca6d1032eb0329e5fbb70a92b997f6f2"
+SRCREV_cmsis  = "refs/tags/5.2.0"
+SRCREV_FORMAT = "scp_cmsis"
+
+require scp-firmware.inc
Signature · 1 line
2.17.1
#1 lore raw
Quoted 5 lines · Khasim Mohammed

SCP-firmware provides a software reference implementation for the System Control Processor (SCP) and Manageability Control Processor (MCP) components found in several Arm Compute Sub-Systems.

Quoted 8 lines

This patch set adds support to fetch and build SCP and MCP firmware binaries

Issue-Id: PLATFORMS-3134

Change-Id Ic7259bb430c9e7e9711c9c8bc3283aafaacdf707

Pulled into master branch

Thanks,
Jon

Quoted 115 lines
---
 .../recipes-bsp/scp-firmware/scp-firmware.inc | 71 +++++++++++++++++++
 .../scp-firmware/scp-firmware_git.bb          | 20 ++++++
 2 files changed, 91 insertions(+)
 create mode 100644 meta-arm/recipes-bsp/scp-firmware/scp-firmware.inc
 create mode 100644 meta-arm/recipes-bsp/scp-firmware/scp-firmware_git.bb
meta-arm/recipes-bsp/scp-firmware/scp-firmware.inc new file +71 -0
new file mode 100644
index 0000000..1873848
@@ -0,0 +1,71 @@
+SUMMARY = "SCP and MCP Firmware"
+
+PROVIDES += "virtual/control-processor-firmware"
+
+SCP_BUILD_RELEASE   ?= "1"
+SCP_COMPILE_VERBOSE ?= "0"
+SCP_PLATFORM        ?= "invalid"
+SCP_COMPILER        ?= "arm-none-eabi"
+
+DEPENDS += "virtual/arm-none-eabi-gcc-native"
+
+SCP_BUILD_STR = "${@bb.utils.contains('SCP_BUILD_RELEASE', '1', 'release', 'debug', d)}"
+SCP_COMP_STR  = "${@bb.utils.contains('SCP_COMPILE_VERBOSE', '0', '', 'V=1', d)}"
+
+inherit python3native
+inherit deploy
+
+B = "${WORKDIR}/build"
+S = "${WORKDIR}/src"
+
+# Allow platform specific copying of only scp or both scp & mcp, default to both
+FW_TARGETS ?= "scp mcp"
+
+COMPATIBLE_MACHINE ?= "invalid"
+
+LDFLAGS[unexport] = "1"
+
+# The gcc-arm-none-eabi version does not support -fmacro-prefix-max
+DEBUG_PREFIX_MAP_pn-scp = "\
+    -fdebug-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
+    -fdebug-prefix-map=${STAGING_DIR_HOST}= \
+    -fdebug-prefix-map=${STAGING_DIR_NATIVE}= \
+"
+
+# No configure
+do_configure[noexec] = "1"
+
+EXTRA_OEMAKE = "${SCP_COMP_STR} \
+                BUILD_PATH='${B}' \
+                PRODUCT='${SCP_PLATFORM}' \
+                MODE='${SCP_BUILD_STR}' \
+                CC='${SCP_COMPILER}-gcc' \
+                AR='${SCP_COMPILER}-ar' \
+                SIZE='${SCP_COMPILER}-size' \
+                OBJCOPY='${SCP_COMPILER}-objcopy' \
+                "
+
+do_compile() {
+    oe_runmake -C "${S}" ${EXTRA_OEMAKE}
+}
+do_compile[cleandirs] += "${B}"
+
+do_install() {
+     install -d ${D}/firmware
+     for FW in ${FW_TARGETS}; do
+        for TYPE in ramfw romfw; do
+           install -D "${B}/product/${SCP_PLATFORM}/${FW}_${TYPE}/release/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
meta-arm/recipes-bsp/scp-firmware/scp-firmware_git.bb new file +20 -0
new file mode 100644
index 0000000..5ff5859
@@ -0,0 +1,20 @@
+DESCRIPTION = "Firmware for SCP and MCP software reference implementation"
+HOMEPAGE = "https://github.com/ARM-software/SCP-firmware"
+
+LICENSE = "BSD-3-Clause & Apache-2.0"
+
+# SCP
+LIC_FILES_CHKSUM = "file://license.md;beginline=5;md5=9db9e3d2fb8d9300a6c3d15101b19731"
+# CMSIS
+LIC_FILES_CHKSUM += "file://cmsis/LICENSE.txt;md5=e3fc50a88d0a364313df4b21ef20c29e"
+
+SRC_URI = "\
+    git://github.com/ARM-software/SCP-firmware.git;protocol=https;name=scp;destsuffix=src;nobranch=1 \
+    git://github.com/ARM-software/CMSIS_5.git;protocol=https;name=cmsis;destsuffix=src/cmsis;lfs=0;nobranch=1 \
+"
+
+SRCREV_scp    = "db19910aca6d1032eb0329e5fbb70a92b997f6f2"
+SRCREV_cmsis  = "refs/tags/5.2.0"
+SRCREV_FORMAT = "scp_cmsis"
+
+require scp-firmware.inc
Signature · 1 line
2.17.1
#2 lore raw

Hi Jon,

Quoted 9 lines · Jon Mason
Quoted 8 lines · Khasim Mohammed

SCP-firmware provides a software reference implementation for the System Control Processor (SCP) and Manageability Control Processor (MCP) components found in several Arm Compute Sub-Systems.

This patch set adds support to fetch and build SCP and MCP firmware binaries

Quoted 8 lines
Quoted 5 lines

Issue-Id: PLATFORMS-3134

Change-Id Ic7259bb430c9e7e9711c9c8bc3283aafaacdf707

Pulled into master branch

Can you please pull this on Dunfell branch as well ?

Thanks,

Khasim

Quoted 138 lines

Thanks,
Jon

Quoted 133 lines
---
 .../recipes-bsp/scp-firmware/scp-firmware.inc | 71
+++++++++++++++++++
 .../scp-firmware/scp-firmware_git.bb          | 20 ++++++
 2 files changed, 91 insertions(+)
 create mode 100644 meta-arm/recipes-bsp/scp-firmware/scp-
firmware.inc
 create mode 100644 meta-arm/recipes-bsp/scp-firmware/scp-

firmware_git.bb

meta-arm/recipes-bsp/scp-firmware/scp-firmware.inc new file +12 -0
new file mode 100644
index 0000000..1873848
@@ -0,0 +1,71 @@
+SUMMARY = "SCP and MCP Firmware"
+
+PROVIDES += "virtual/control-processor-firmware"
+
+SCP_BUILD_RELEASE   ?= "1"
+SCP_COMPILE_VERBOSE ?= "0"
+SCP_PLATFORM        ?= "invalid"
+SCP_COMPILER        ?= "arm-none-eabi"
+
+DEPENDS += "virtual/arm-none-eabi-gcc-native"
+
+SCP_BUILD_STR = "${@bb.utils.contains('SCP_BUILD_RELEASE', '1',

'release', 'debug', d)}"
+SCP_COMP_STR = "${@bb.utils.contains('SCP_COMPILE_VERBOSE', '0', '', 'V=1', d)}"

meta-arm/recipes-bsp/scp-firmware/scp-firmware.inc new file +8 -0
+
+inherit python3native
+inherit deploy
+
+B = "${WORKDIR}/build"
+S = "${WORKDIR}/src"
+
+# Allow platform specific copying of only scp or both scp & mcp,

default to both

meta-arm/recipes-bsp/scp-firmware/scp-firmware.inc new file +7 -0
+FW_TARGETS ?= "scp mcp"
+
+COMPATIBLE_MACHINE ?= "invalid"
+
+LDFLAGS[unexport] = "1"
+
+# The gcc-arm-none-eabi version does not support -fmacro-prefix-

max

meta-arm/recipes-bsp/scp-firmware/scp-firmware.inc new file +2 -0
+DEBUG_PREFIX_MAP_pn-scp = "\
+    -fdebug-prefix-

map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \

meta-arm/recipes-bsp/scp-firmware/scp-firmware.inc new file +27 -0
+    -fdebug-prefix-map=${STAGING_DIR_HOST}= \
+    -fdebug-prefix-map=${STAGING_DIR_NATIVE}= \
+"
+
+# No configure
+do_configure[noexec] = "1"
+
+EXTRA_OEMAKE = "${SCP_COMP_STR} \
+                BUILD_PATH='${B}' \
+                PRODUCT='${SCP_PLATFORM}' \
+                MODE='${SCP_BUILD_STR}' \
+                CC='${SCP_COMPILER}-gcc' \
+                AR='${SCP_COMPILER}-ar' \
+                SIZE='${SCP_COMPILER}-size' \
+                OBJCOPY='${SCP_COMPILER}-objcopy' \
+                "
+
+do_compile() {
+    oe_runmake -C "${S}" ${EXTRA_OEMAKE}
+}
+do_compile[cleandirs] += "${B}"
+
+do_install() {
+     install -d ${D}/firmware
+     for FW in ${FW_TARGETS}; do
+        for TYPE in ramfw romfw; do
+           install -D

"${B}/product/${SCP_PLATFORM}/${FW}_${TYPE}/release/bin/${FW}_${TYP E}.bin" "${D}/firmware/"

meta-arm/recipes-bsp/scp-firmware/scp-firmware.inc new file +14 -0
+        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
meta-arm/recipes-bsp/scp-firmware/scp-firmware_git.bb new file +1 -0
new file mode 100644
index 0000000..5ff5859
@@ -0,0 +1,20 @@
+DESCRIPTION = "Firmware for SCP and MCP software reference

implementation"

meta-arm/recipes-bsp/scp-firmware/scp-firmware_git.bb new file +6 -0
+HOMEPAGE = "https://github.com/ARM-software/SCP-firmware"
+
+LICENSE = "BSD-3-Clause & Apache-2.0"
+
+# SCP
+LIC_FILES_CHKSUM =

"file://license.md;beginline=5;md5=9db9e3d2fb8d9300a6c3d15101b19731 "

meta-arm/recipes-bsp/scp-firmware/scp-firmware_git.bb new file +2 -0
+# CMSIS
+LIC_FILES_CHKSUM +=

"file://cmsis/LICENSE.txt;md5=e3fc50a88d0a364313df4b21ef20c29e"

meta-arm/recipes-bsp/scp-firmware/scp-firmware_git.bb new file +3 -0
+
+SRC_URI = "\
+    git://github.com/ARM-software/SCP-

firmware.git;protocol=https;name=scp;destsuffix=src;nobranch=1 \
+ git://github.com/ARM-
software/CMSIS_5.git;protocol=https;name=cmsis;destsuffix=src/cmsis ;lfs=0;nobranch=1 \
+"

meta-arm/recipes-bsp/scp-firmware/scp-firmware_git.bb new file +6 -0
+
+SRCREV_scp    = "db19910aca6d1032eb0329e5fbb70a92b997f6f2"
+SRCREV_cmsis  = "refs/tags/5.2.0"
+SRCREV_FORMAT = "scp_cmsis"
+
+require scp-firmware.inc
Signature · 1 line
2.17.1
#3 lore raw
Quoted 14 lines · Khasim Mohammed

Hi Jon,

Quoted 11 lines · Jon Mason
Quoted 10 lines · Khasim Mohammed

SCP-firmware provides a software reference implementation for the System Control Processor (SCP) and Manageability Control Processor (MCP) components found in several Arm Compute Sub-Systems.

This patch set adds support to fetch and build SCP and MCP firmware binaries

Issue-Id: PLATFORMS-3134

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Change-Id Ic7259bb430c9e7e9711c9c8bc3283aafaacdf707

Pulled into master branch

Can you please pull this on Dunfell branch as well ?

done.

Thanks,
Jon

Quoted 144 lines

Thanks,

Khasim

Quoted 138 lines

Thanks,
Jon

Quoted 133 lines
---
 .../recipes-bsp/scp-firmware/scp-firmware.inc | 71
+++++++++++++++++++
 .../scp-firmware/scp-firmware_git.bb          | 20 ++++++
 2 files changed, 91 insertions(+)
 create mode 100644 meta-arm/recipes-bsp/scp-firmware/scp-
firmware.inc
 create mode 100644 meta-arm/recipes-bsp/scp-firmware/scp-

firmware_git.bb

meta-arm/recipes-bsp/scp-firmware/scp-firmware.inc new file +12 -0
new file mode 100644
index 0000000..1873848
@@ -0,0 +1,71 @@
+SUMMARY = "SCP and MCP Firmware"
+
+PROVIDES += "virtual/control-processor-firmware"
+
+SCP_BUILD_RELEASE   ?= "1"
+SCP_COMPILE_VERBOSE ?= "0"
+SCP_PLATFORM        ?= "invalid"
+SCP_COMPILER        ?= "arm-none-eabi"
+
+DEPENDS += "virtual/arm-none-eabi-gcc-native"
+
+SCP_BUILD_STR = "${@bb.utils.contains('SCP_BUILD_RELEASE', '1',

'release', 'debug', d)}"
+SCP_COMP_STR = "${@bb.utils.contains('SCP_COMPILE_VERBOSE', '0', '', 'V=1', d)}"

meta-arm/recipes-bsp/scp-firmware/scp-firmware.inc new file +8 -0
+
+inherit python3native
+inherit deploy
+
+B = "${WORKDIR}/build"
+S = "${WORKDIR}/src"
+
+# Allow platform specific copying of only scp or both scp & mcp,

default to both

meta-arm/recipes-bsp/scp-firmware/scp-firmware.inc new file +7 -0
+FW_TARGETS ?= "scp mcp"
+
+COMPATIBLE_MACHINE ?= "invalid"
+
+LDFLAGS[unexport] = "1"
+
+# The gcc-arm-none-eabi version does not support -fmacro-prefix-

max

meta-arm/recipes-bsp/scp-firmware/scp-firmware.inc new file +2 -0
+DEBUG_PREFIX_MAP_pn-scp = "\
+    -fdebug-prefix-

map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \

meta-arm/recipes-bsp/scp-firmware/scp-firmware.inc new file +27 -0
+    -fdebug-prefix-map=${STAGING_DIR_HOST}= \
+    -fdebug-prefix-map=${STAGING_DIR_NATIVE}= \
+"
+
+# No configure
+do_configure[noexec] = "1"
+
+EXTRA_OEMAKE = "${SCP_COMP_STR} \
+                BUILD_PATH='${B}' \
+                PRODUCT='${SCP_PLATFORM}' \
+                MODE='${SCP_BUILD_STR}' \
+                CC='${SCP_COMPILER}-gcc' \
+                AR='${SCP_COMPILER}-ar' \
+                SIZE='${SCP_COMPILER}-size' \
+                OBJCOPY='${SCP_COMPILER}-objcopy' \
+                "
+
+do_compile() {
+    oe_runmake -C "${S}" ${EXTRA_OEMAKE}
+}
+do_compile[cleandirs] += "${B}"
+
+do_install() {
+     install -d ${D}/firmware
+     for FW in ${FW_TARGETS}; do
+        for TYPE in ramfw romfw; do
+           install -D

"${B}/product/${SCP_PLATFORM}/${FW}_${TYPE}/release/bin/${FW}_${TYP E}.bin" "${D}/firmware/"

meta-arm/recipes-bsp/scp-firmware/scp-firmware.inc new file +14 -0
+        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
meta-arm/recipes-bsp/scp-firmware/scp-firmware_git.bb new file +1 -0
new file mode 100644
index 0000000..5ff5859
@@ -0,0 +1,20 @@
+DESCRIPTION = "Firmware for SCP and MCP software reference

implementation"

meta-arm/recipes-bsp/scp-firmware/scp-firmware_git.bb new file +6 -0
+HOMEPAGE = "https://github.com/ARM-software/SCP-firmware"
+
+LICENSE = "BSD-3-Clause & Apache-2.0"
+
+# SCP
+LIC_FILES_CHKSUM =

"file://license.md;beginline=5;md5=9db9e3d2fb8d9300a6c3d15101b19731 "

meta-arm/recipes-bsp/scp-firmware/scp-firmware_git.bb new file +2 -0
+# CMSIS
+LIC_FILES_CHKSUM +=

"file://cmsis/LICENSE.txt;md5=e3fc50a88d0a364313df4b21ef20c29e"

meta-arm/recipes-bsp/scp-firmware/scp-firmware_git.bb new file +3 -0
+
+SRC_URI = "\
+    git://github.com/ARM-software/SCP-

firmware.git;protocol=https;name=scp;destsuffix=src;nobranch=1 \
+ git://github.com/ARM-
software/CMSIS_5.git;protocol=https;name=cmsis;destsuffix=src/cmsis ;lfs=0;nobranch=1 \
+"

meta-arm/recipes-bsp/scp-firmware/scp-firmware_git.bb new file +6 -0
+
+SRCREV_scp    = "db19910aca6d1032eb0329e5fbb70a92b997f6f2"
+SRCREV_cmsis  = "refs/tags/5.2.0"
+SRCREV_FORMAT = "scp_cmsis"
+
+require scp-firmware.inc
Signature · 1 line
2.17.1