mirror of
https://git.yoctoproject.org/meta-arm
synced 2026-04-20 11:29:54 +00:00
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 Signed-off-by: Patrik Berglund <patrik.berglund@arm.com> Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com> Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
committed by
Jon Mason
parent
426de565c3
commit
530bd40794
71
meta-arm/recipes-bsp/scp-firmware/scp-firmware.inc
Normal file
71
meta-arm/recipes-bsp/scp-firmware/scp-firmware.inc
Normal file
@@ -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
|
||||
20
meta-arm/recipes-bsp/scp-firmware/scp-firmware_git.bb
Normal file
20
meta-arm/recipes-bsp/scp-firmware/scp-firmware_git.bb
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user