1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-05-07 04:58:57 +00:00

arm-bsp/boot-firmware: add firmware recipe for corstone700

Previously corstone700 used the scp-firmware recipe to build
boot-firmware, which is based on scp-firmware but doesn't share the
build system.

As the differences are not insignificant, extract a dedicated
boot-firmware recipe.  Also set PV appropriately as boot-firmware now
has dated tags.

Change-Id: I3b60172e145be571aa465afb81473b9d79e9e425
Signed-off-by: Ross Burton <ross.burton@arm.com>
This commit is contained in:
Ross Burton
2020-11-23 11:30:20 +00:00
parent e18ee052f7
commit f8fc3b463d
4 changed files with 63 additions and 40 deletions
@@ -14,8 +14,7 @@ PREFERRED_VERSION_linux-yocto ?= "5.6%"
PREFERRED_PROVIDER_virtual/trusted-firmware-a ?= "trusted-firmware-a"
PREFERRED_VERSION_trusted-firmware-a ?= "2.3%"
PREFERRED_PROVIDER_virtual/control-processor-firmware ?= "scp-firmware"
PREFERRED_VERSION_control-processor-firmware ?= "2.6.0"
PREFERRED_PROVIDER_virtual/control-processor-firmware ?= "boot-firmware"
EXTRA_IMAGEDEPENDS += " \
virtual/trusted-firmware-a \
@@ -0,0 +1,62 @@
SUMMARY = "Boot Processor firmware for Corstone700"
DESCRIPTION = "Boot Processor firmware"
LICENSE = "BSD-3-Clause & Apache-2.0"
LIC_FILES_CHKSUM = "file://license.md;md5=e44b2531cd6ffe9dece394dbe988d9a0 \
file://cmsis/LICENSE.txt;md5=e3fc50a88d0a364313df4b21ef20c29e"
SRC_URI = "gitsm://git.linaro.org/landing-teams/working/arm/boot-firmware.git;protocol=https"
# This is two commits on from CORSTONE-700-2020.02.10
SRCREV = "a4dd1b60218b5172a94e6f44c96384b84a77588c"
PV = "2020.02.10+git${SRCPV}"
PROVIDES += "virtual/control-processor-firmware"
DEPENDS = "virtual/arm-none-eabi-gcc-native virtual/trusted-firmware-a"
inherit deploy
B = "${WORKDIR}/build"
S = "${WORKDIR}/git"
PACKAGE_ARCH = "${MACHINE_ARCH}"
COMPATIBLE_MACHINE = "(corstone700-*)"
SCP_PLATFORM = "corstone-700"
LDFLAGS[unexport] = "1"
do_configure[noexec] = "1"
EXTRA_OEMAKE = "PRODUCT='${SCP_PLATFORM}' \
BUILD_PATH=${B} \
CROSS_COMPILE='arm-none-eabi-' \
V=y \
"
do_compile() {
oe_runmake -C ${S}/tools/spitoc CC=${BUILD_CC} all
oe_runmake -C ${S}
}
do_compile[cleandirs] += "${B}"
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
}
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
@@ -1,37 +0,0 @@
# 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
}
@@ -6,6 +6,5 @@ MACHINE_SCP_REQUIRE_n1sdp = "scp-firmware-n1sdp.inc"
MACHINE_SCP_REQUIRE_tc0 = "scp-firmware-tc0.inc"
MACHINE_SCP_REQUIRE_juno = "scp-firmware-juno.inc"
MACHINE_SCP_REQUIRE_sgi575 = "scp-firmware-sgi575.inc"
MACHINE_SCP_REQUIRE_corstone700 = "scp-firmware-corstone700.inc"
require ${MACHINE_SCP_REQUIRE}