From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1j02a1-0003XN-Bq for ptxdist@pengutronix.de; Fri, 07 Feb 2020 13:17:54 +0100 Received: by mail-wm1-x341.google.com with SMTP id s10so2354723wmh.3 for ; Fri, 07 Feb 2020 04:17:53 -0800 (PST) From: avazquez.dev@gmail.com Date: Fri, 7 Feb 2020 13:17:34 +0100 Message-Id: <1581077854-12034-1-git-send-email-avazquez.dev@gmail.com> Subject: [ptxdist] [PATCH tfa: New package] List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de Cc: Alejandro Vazquez From: Alejandro Vazquez Trusted Firmware-A (TF-A) is a reference implementation of secure world software for Arm A-Profile architectures. Signed-off-by: Alejandro Vazquez --- 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 +# +# 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