[meta-arm,2/6] arm-bsp/boot-firmware: add firmware recipe for corstone700
Submitted by Ross Burton on Nov. 25, 2020, 12:31 p.m.
|
Patch ID: 178155
Details
Commit Message
@@ -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 \
new file mode 100644
@@ -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
deleted file mode 100644
@@ -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}
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> --- .../conf/machine/include/corstone700.inc | 3 +- .../boot-firmware/boot-firmware_git.bb | 62 +++++++++++++++++++ .../scp-firmware/scp-firmware-corstone700.inc | 37 ----------- .../scp-firmware/scp-firmware_%.bbappend | 1 - 4 files changed, 63 insertions(+), 40 deletions(-) create mode 100644 meta-arm-bsp/recipes-bsp/boot-firmware/boot-firmware_git.bb delete mode 100644 meta-arm-bsp/recipes-bsp/scp-firmware/scp-firmware-corstone700.inc -- 2.25.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#1443): https://lists.yoctoproject.org/g/meta-arm/message/1443 Mute This Topic: https://lists.yoctoproject.org/mt/78498344/1003190 Group Owner: meta-arm+owner@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/meta-arm/unsub [mhalstead@linuxfoundation.org] -=-=-=-=-=-=-=-=-=-=-=-