From: Alejandro Vazquez <avazquez....@gmail.com>

Trusted Firmware-A (TF-A) is a reference implementation of secure
world software for Arm A-Profile architectures.

Signed-off-by: Alejandro Vazquez <avazquez....@gmail.com>
---
 platforms/tfa.in | 56 +++++++++++++++++++++++++++++++++++++
 rules/tfa.make   | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 140 insertions(+)
 create mode 100644 platforms/tfa.in
 create mode 100644 rules/tfa.make

diff --git a/platforms/tfa.in b/platforms/tfa.in
new file mode 100644
index 0000000..d81f734
--- /dev/null
+++ b/platforms/tfa.in
@@ -0,0 +1,56 @@
+## SECTION=bootloader
+
+menuconfig TFA
+       depends on (ARCH_ARM || ARCH_ARM64)
+       prompt "Trusted Firmware-A (TF-A)     "
+       bool
+       help
+         Trusted Firmware-A (TF-A) is a reference implementation of secure
+         world software for Arm A-Profile architectures.
+
+if TFA
+
+choice
+       prompt "Major arch version"
+       default TFA_ARM_ARCH_MAJOR_7
+
+       config TFA_ARM_ARCH_MAJOR_7
+               bool
+               prompt "ARM v7"
+
+       config TFA_ARM_ARCH_MAJOR_8
+               bool
+               prompt "ARM v8"
+endchoice
+
+config TFA_ARCH32_SP
+       depends on ARCH_ARM
+       string
+       default "sp_min"
+       prompt "AArch32 Secure Payload"
+       help
+         The AArch32 Secure Payload component to be built as the
+         BL32 image
+
+config TFA_PLAT
+       string
+       prompt "Target platform"
+       help
+         Target plaform to build for.
+
+config TFA_ADDITIONAL_PARAMETERS
+       string
+       prompt "Additional parameters"
+       help
+         Additional parameters for the TF-A build
+         E.G. 'DEBUG=1 LOG_LEVEL=20'.
+
+config TFA_FIRMWARE_IMAGES
+       string
+       default "tf-a*.bin"
+       prompt "Binary boot images"
+       help
+         Names of generated image files that are installed in the
+         output images/ directory.  
+
+endif
diff --git a/rules/tfa.make b/rules/tfa.make
new file mode 100644
index 0000000..56ae98c
--- /dev/null
+++ b/rules/tfa.make
@@ -0,0 +1,84 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2020 by Alejandro Vazquez <avazquez....@gmail.com>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_TFA) += tfa
+
+#
+# Paths and names
+#
+TFA_VERSION    := 2.0
+TFA            := arm-trusted-firmware-$(TFA_VERSION)
+TFA_MD5                := 21038abbf572c273fa87d296bcd5dad2
+TFA_SUFFIX     := tar.gz
+TFA_URL                := 
https://github.com/ARM-software/arm-trusted-firmware/archive/v$(TFA_VERSION).$(TFA_SUFFIX)
+TFA_DIR                := $(BUILDDIR)/$(TFA)
+TFA_SOURCE     := $(SRCDIR)/$(TFA).$(TFA_SUFFIX)
+TFA_DIR                := $(BUILDDIR)/$(TFA)
+TFA_LICENSE    := BSD-3-Clause
+TFA_LICENSE_FILES := \
+       file://license.rst;md5=e927e02bca647e14efd87e9e914b2443
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+TFA_CONF_TOOL  := NO
+TFA_MAKE_ENV   := CROSS_COMPILE=$(BOOTLOADER_CROSS_COMPILE)
+
+ifdef PTXCONF_ARCH_ARM
+TFA_MAKE_OPT = ARCH=aarch32
+else
+TFA_MAKE_OPT = ARCH=aarch64
+endif
+
+ifdef PTXCONF_TFA_ARM_ARCH_MAJOR_7
+TFA_MAKE_OPT += ARM_ARCH_MAJOR=7
+else
+TFA_MAKE_OPT += ARM_ARCH_MAJOR=7
+endif
+
+ifdef PTXCONF_TFA_AARCH32_SP
+TFA_MAKE_OPT += AARCH32_SP=$(call remove_quotes, $(PTXCONF_TFA_AARCH32_SP))
+endif
+
+TFA_MAKE_OPT += \
+       PLAT=$(PTXCONF_TFA_PLAT) \
+       $(call remove_quotes, $(PTXCONF_TFA_ADDITIONAL_PARAMETERS))
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/tfa.install:
+       @$(call targetinfo)
+       @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/tfa.targetinstall:
+       @$(call targetinfo)
+       @$(foreach file, $(call remove_quotes, $(PTXCONF_TFA_FIRMWARE_IMAGES)), 
\
+            install -vD -m 0644 
$(TFA_DIR)/build/$(PTXCONF_TFA_PLAT)/release/$(file) \
+            $(IMAGEDIR))
+       @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/tfa.clean:
+       @$(call targetinfo)
+       @$(call clean_pkg, TFA)
+       @rm -f $(IMAGEDIR)/$(call remove_quotes, $(PTXCONF_TFA_FIRMWARE_IMAGES))
+
+# vim: syntax=make
-- 
1.9.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

Reply via email to