All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/10] arm: Add hafnium support
@ 2021-01-12 15:20 arunachalam.ganapathy
  2021-01-12 15:20 ` [PATCH 02/10] arm/trusted-firmware-a: Add support for spmd build option arunachalam.ganapathy
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: arunachalam.ganapathy @ 2021-01-12 15:20 UTC (permalink / raw)
  To: meta-arm; +Cc: nd, Arunachalam Ganapathy

Initial recipe for hafnium[1]. This enables build for reference Secure
Partition Manager (SPM) for systems that implement the Armv8.4-A
Secure-EL2 extension.

Link: [1] https://www.trustedfirmware.org/projects/hafnium/

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: Ib256d8ca03c94131e308d962d786d5d6a656c256
---
 meta-arm/recipes-bsp/hafnium/hafnium_2.4.bb | 74 +++++++++++++++++++++
 1 file changed, 74 insertions(+)
 create mode 100644 meta-arm/recipes-bsp/hafnium/hafnium_2.4.bb

diff --git a/meta-arm/recipes-bsp/hafnium/hafnium_2.4.bb b/meta-arm/recipes-bsp/hafnium/hafnium_2.4.bb
new file mode 100644
index 0000000..3a52599
--- /dev/null
+++ b/meta-arm/recipes-bsp/hafnium/hafnium_2.4.bb
@@ -0,0 +1,74 @@
+SUMMARY = "Hafnium"
+DESCRIPTION = "A reference Secure Partition Manager (SPM) for systems that implement the Armv8.4-A Secure-EL2 extension"
+LICENSE = "BSD-3-Clause & GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=782b40c14bad5294672c500501edc103"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+inherit deploy python3native
+
+SRC_URI = "gitsm://git.trustedfirmware.org/hafnium/hafnium.git;protocol=https"
+SRCREV = "410a3acaf669c12d41fb4c57fcaf3ecee6fdba61"
+S = "${WORKDIR}/git"
+
+COMPATIBLE_MACHINE ?= "invalid"
+
+# Default build 'reference'
+HAFNIUM_PROJECT ?= "reference"
+
+# Platform must be set for each machine
+HAFNIUM_PLATFORM ?= "invalid"
+
+# hafnium build directory
+# Append _clang as the build rule in hafnium adds this to the platform name.
+HAFNIUM_BUILD_DIR_PLAT = "out/${HAFNIUM_PROJECT}/${HAFNIUM_PLATFORM}_clang"
+
+# do_deploy will install everything listed in this variable. It is set by
+# default to hafnium
+HAFNIUM_INSTALL_TARGET ?= "hafnium"
+
+DEPENDS = "bison-native bc-native"
+
+# set project to build
+EXTRA_OEMAKE += "PROJECT=${HAFNIUM_PROJECT}"
+
+do_compile_prepend() {
+    # Hafnium expects 'python'. Create symlink python to python3
+    real=$(which ${PYTHON})
+    ln -snf $real $(dirname $real)/python
+}
+
+do_install() {
+    install -d -m 755 ${D}/firmware
+    for bldfile in ${HAFNIUM_INSTALL_TARGET}; do
+        processed="0"
+        if [ -f ${S}/${HAFNIUM_BUILD_DIR_PLAT}/$bldfile.bin ]; then
+            echo "Install $bldfile.bin"
+            install -m 0755 ${S}/${HAFNIUM_BUILD_DIR_PLAT}/$bldfile.bin \
+                ${D}/firmware/$bldfile-${HAFNIUM_PLATFORM}.bin
+            ln -sf $bldfile-${HAFNIUM_PLATFORM}.bin ${D}/firmware/$bldfile.bin
+            processed="1"
+        fi
+        if [ -f ${S}/${HAFNIUM_BUILD_DIR_PLAT}/$bldfile.elf ]; then
+            echo "Install $bldfile.elf"
+            install -m 0755 ${S}/${HAFNIUM_BUILD_DIR_PLAT}/$bldfile.elf \
+                ${D}/firmware/$bldfile-${HAFNIUM_PLATFORM}.elf
+            ln -sf $bldfile-${HAFNIUM_PLATFORM}.elf ${D}/firmware/$bldfile.elf
+            processed="1"
+        fi
+        if [ "$processed" = "0" ]; then
+            bberror "Unsupported HAFNIUM_INSTALL_TARGET target $bldfile"
+            exit 1
+        fi
+    done
+}
+
+FILES_${PN} = "/firmware"
+SYSROOT_DIRS += "/firmware"
+# skip QA tests: {'ldflags'}
+INSANE_SKIP_${PN} = "ldflags"
+
+do_deploy() {
+    cp -rf ${D}/firmware/* ${DEPLOYDIR}/
+}
+addtask deploy after do_install
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-01-14 19:24 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-12 15:20 [PATCH 01/10] arm: Add hafnium support arunachalam.ganapathy
2021-01-12 15:20 ` [PATCH 02/10] arm/trusted-firmware-a: Add support for spmd build option arunachalam.ganapathy
2021-01-12 15:20 ` [PATCH 03/10] arm-bsp/tc0: Add hafnium support Arunachalam Ganapathy
2021-01-12 15:20 ` [PATCH 04/10] arm-bsp/tc0: Add support for optee Arunachalam Ganapathy
2021-01-12 15:20 ` [PATCH 05/10] arm-bsp/tc0: Add tc0 platform support patches " Arunachalam Ganapathy
2021-01-12 15:20 ` [PATCH 06/10] arm-bsp/tc0: Enable optee core with SPMC at SEL2 Arunachalam Ganapathy
2021-01-12 15:20 ` [PATCH 07/10] arm-bsp/linux: add ffa driver to TC0 Arunachalam Ganapathy
2021-01-12 15:20 ` [PATCH 08/10] arm-bsp/linux: enable ffa driver for TC0 Arunachalam Ganapathy
2021-01-12 15:20 ` [PATCH 09/10] arm-bsp/linux: add ffa transport in optee " Arunachalam Ganapathy
2021-01-12 15:20 ` [PATCH 10/10] arm-bsp/tc0: Enable spmd and SEL2 SPMC with optee as SEL1 SP Arunachalam Ganapathy
2021-01-14 19:23 ` [meta-arm] [PATCH 01/10] arm: Add hafnium support Jon Mason

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.