From: avazquez.dev@gmail.com
To: ptxdist@pengutronix.de
Cc: Alejandro Vazquez <avazquez.dev@gmail.com>
Subject: [ptxdist] [PATCH tfa: New package]
Date: Fri, 7 Feb 2020 13:17:34 +0100 [thread overview]
Message-ID: <1581077854-12034-1-git-send-email-avazquez.dev@gmail.com> (raw)
From: Alejandro Vazquez <avazquez.dev@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.dev@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.dev@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
next reply other threads:[~2020-02-07 12:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-07 12:17 avazquez.dev [this message]
2020-02-10 16:16 ` Ahmad Fatoum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1581077854-12034-1-git-send-email-avazquez.dev@gmail.com \
--to=avazquez.dev@gmail.com \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox