From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: ptxdist@pengutronix.de, avazquez.dev@gmail.com
Subject: Re: [ptxdist] [PATCH tfa: New package]
Date: Mon, 10 Feb 2020 17:16:51 +0100 [thread overview]
Message-ID: <4cce06fe-dada-54f5-9921-f738cc678965@pengutronix.de> (raw)
In-Reply-To: <1581077854-12034-1-git-send-email-avazquez.dev@gmail.com>
Hello Alejandro,
On 2/7/20 1:17 PM, avazquez.dev@gmail.com wrote:
> 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.
I'm using a TF-A rule locally as well, but it's a bit more general than yours.
I just sent it to the mailing list.
Could you take a look if it suffices for your use case?
Cheers
Ahmad
>
> 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
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
prev parent reply other threads:[~2020-02-10 16:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-07 12:17 avazquez.dev
2020-02-10 16:16 ` Ahmad Fatoum [this message]
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=4cce06fe-dada-54f5-9921-f738cc678965@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=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