Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Etienne CARRIERE - foss <etienne.carriere@foss.st.com>
To: Kory Maincent <kory.maincent@bootlin.com>,
	"buildroot@buildroot.org" <buildroot@buildroot.org>
Cc: "thomas.petazzoni@bootlin.com" <thomas.petazzoni@bootlin.com>
Subject: Re: [Buildroot] [PATCH 3/3] package/optee-examples: Add support for custom tarball
Date: Thu, 4 Jul 2024 14:50:55 +0000	[thread overview]
Message-ID: <957c75fa652a40ce9abeb198788639cd@foss.st.com> (raw)
In-Reply-To: <20240620143853.1259543-4-kory.maincent@bootlin.com>

On Mon, Thursday, June 20, 2024, Kory Maincent wrote:
> OP-TEE OS supports custom tarballs. If the OP-TEE OS custom tarball version
> does not match the latest optee-examples version supported by Buildroot,
> optee-examples might not build or run properly. This patch adds support for
> an optee-examples custom tarball URL to address this potential issue.
> 
> Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
> ---
>  package/optee-examples/Config.in         | 42 ++++++++++++++++++++++++
>  package/optee-examples/optee-examples.mk | 26 +++++++++++++--
>  2 files changed, 66 insertions(+), 2 deletions(-)
> 

Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>


> diff --git a/package/optee-examples/Config.in b/package/optee-examples/Config.in
> index eb6ee16502..83a1e9cb09 100644
> --- a/package/optee-examples/Config.in
> +++ b/package/optee-examples/Config.in
> @@ -26,3 +26,45 @@ comment "optee-examples needs a toolchain w/ threads, dynamic library, headers >
>         depends on BR2_USE_MMU
>         depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS || \
>                 !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
> +
> +if BR2_PACKAGE_OPTEE_EXAMPLES
> +
> +choice
> +       prompt "optee-examples version"
> +       default BR2_PACKAGE_OPTEE_EXAMPLES_LATEST
> +       help
> +         Select the version of optee-examples you want to use
> +
> +config BR2_PACKAGE_OPTEE_EXAMPLES_LATEST
> +       bool "4.2.0"
> +       help
> +         Use the latest release tag from the optee-examples official
> +         Git repository.
> +
> +config BR2_PACKAGE_OPTEE_EXAMPLES_CUSTOM_TARBALL
> +       bool "Custom tarball"
> +       help
> +         This option allows to specify a URL pointing to an
> +         optee-examples source tarball. This URL can use any protocol
> +         recognized by Buildroot, like http://, ftp://, file:// or
> +         scp://.
> +
> +         When pointing to a local tarball using file://, you may want
> +         to use a make variable like $(TOPDIR) to reference the root of
> +         the Buildroot tree.
> +
> +endchoice
> +
> +if BR2_PACKAGE_OPTEE_EXAMPLES_CUSTOM_TARBALL
> +
> +config BR2_PACKAGE_OPTEE_EXAMPLES_CUSTOM_TARBALL_LOCATION
> +       string "URL of custom optee-examples tarball"
> +
> +endif
> +
> +config BR2_PACKAGE_OPTEE_EXAMPLES_VERSION
> +       string
> +       default "4.2.0"         if BR2_PACKAGE_OPTEE_EXAMPLES_LATEST
> +       default "custom"        if BR2_PACKAGE_OPTEE_EXAMPLES_CUSTOM_TARBALL
> +
> +endif # BR2_PACKAGE_OPTEE_EXAMPLES
> diff --git a/package/optee-examples/optee-examples.mk b/package/optee-examples/optee-examples.mk
> index 7d52a277d2..2e20dc4dd4 100644
> --- a/package/optee-examples/optee-examples.mk
> +++ b/package/optee-examples/optee-examples.mk
> @@ -4,10 +4,26 @@
>  #
>  ################################################################################
> 
> -OPTEE_EXAMPLES_VERSION = 4.2.0
> -OPTEE_EXAMPLES_SITE = $(call github,linaro-swg,optee_examples,$(OPTEE_EXAMPLES_VERSION))
> +OPTEE_EXAMPLES_VERSION = $(call qstrip,$(BR2_PACKAGE_OPTEE_EXAMPLES_VERSION))
>  OPTEE_EXAMPLES_LICENSE = BSD-2-Clause
> +ifeq ($(BR2_PACKAGE_OPTEE_EXAMPLES_LATEST),y)
>  OPTEE_EXAMPLES_LICENSE_FILES = LICENSE
> +endif
> +
> +ifeq ($(BR2_PACKAGE_OPTEE_EXAMPLES_CUSTOM_TARBALL),y)
> +OPTEE_EXAMPLES_TARBALL = $(call qstrip,$(BR2_PACKAGE_OPTEE_EXAMPLES_CUSTOM_TARBALL_LOCATION))
> +OPTEE_EXAMPLES_SITE = $(patsubst %/,%,$(dir $(OPTEE_EXAMPLES_TARBALL)))
> +OPTEE_EXAMPLES_SOURCE = $(notdir $(OPTEE_EXAMPLES_TARBALL))
> +else ifeq ($(BR2_PACKAGE_OPTEE_EXAMPLES_CUSTOM_GIT),y)
> +OPTEE_EXAMPLES_SITE = $(call qstrip,$(BR2_PACKAGE_OPTEE_EXAMPLES_CUSTOM_REPO_URL))
> +OPTEE_EXAMPLES_SITE_METHOD = git
> +else
> +OPTEE_EXAMPLES_SITE = $(call github,linaro-swg,optee_examples,$(OPTEE_EXAMPLES_VERSION))
> +endif
> +
> +ifeq ($(BR2_PACKAGE_OPTEE_EXAMPLES):$(BR2_PACKAGE_OPTEE_EXAMPLES_LATEST),y:)
> +BR_NO_CHECK_HASH_FOR += $(OPTEE_EXAMPLES_SOURCE)
> +endif
> 
>  OPTEE_EXAMPLES_DEPENDENCIES = optee-client optee-os
> 
> @@ -28,4 +44,10 @@ endef
>  OPTEE_EXAMPLES_POST_BUILD_HOOKS += OPTEE_EXAMPLES_BUILD_TAS
>  OPTEE_EXAMPLES_POST_INSTALL_TARGET_HOOKS += OPTEE_EXAMPLES_INSTALL_TAS
> 
> +ifeq ($(BR2_PACKAGE_OPTEE_EXAMPLES_CUSTOM_TARBALL)$(BR_BUILDING),yy)
> +ifeq ($(call qstrip,$(BR2_PACKAGE_OPTEE_EXAMPLES_CUSTOM_TARBALL_LOCATION)),)
> +$(error No tarball location specified. Please check BR2_PACKAGE_OPTEE_EXAMPLES_CUSTOM_TARBALL_LOCATION)
> +endif
> +endif
> +
>  $(eval $(cmake-package))
> --
> 2.25.1
> 
> 
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2024-07-04 15:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-20 14:38 [Buildroot] [PATCH 0/3] Support custom tarball for OP-TEE related projects Kory Maincent via buildroot
2024-06-20 14:38 ` [Buildroot] [PATCH 1/3] package/optee-client: Add support for custom tarball Kory Maincent via buildroot
2024-07-04 14:50   ` Etienne CARRIERE - foss
2024-08-02 20:06   ` Thomas Petazzoni via buildroot
2024-06-20 14:38 ` [Buildroot] [PATCH 2/3] package/optee-test: " Kory Maincent via buildroot
2024-07-04 14:50   ` Etienne CARRIERE - foss
2024-06-20 14:38 ` [Buildroot] [PATCH 3/3] package/optee-examples: " Kory Maincent via buildroot
2024-07-04 14:50   ` Etienne CARRIERE - foss [this message]
2024-06-24  7:00 ` [Buildroot] [PATCH 0/3] Support custom tarball for OP-TEE related projects Etienne CARRIERE - foss
2024-06-28 13:55   ` Kory Maincent via buildroot

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=957c75fa652a40ce9abeb198788639cd@foss.st.com \
    --to=etienne.carriere@foss.st.com \
    --cc=buildroot@buildroot.org \
    --cc=kory.maincent@bootlin.com \
    --cc=thomas.petazzoni@bootlin.com \
    /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