mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH 1/2] optee: support empty OPTEE_PLATFORM_FLAVOUR
@ 2023-11-22 19:05 Ahmad Fatoum
  2023-11-22 19:05 ` [ptxdist] [PATCH 2/2] optee: make version configurable Ahmad Fatoum
  2023-11-28  8:36 ` [ptxdist] [APPLIED] optee: support empty OPTEE_PLATFORM_FLAVOUR Michael Olbrich
  0 siblings, 2 replies; 6+ messages in thread
From: Ahmad Fatoum @ 2023-11-22 19:05 UTC (permalink / raw)
  To: ptxdist; +Cc: Ahmad Fatoum

Some platforms like the stm32mp, support PLATFORM_FLAVOR to be
empty and extract the information from other variables, e.g.
CFG_EMBED_DTB_SOURCE_FILE.

Support this use case by skipping appending of -$(OPTEE_PLATFORM_FLAVOUR)
to the PLATFORM= variable whenever empty.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 rules/optee.make | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/rules/optee.make b/rules/optee.make
index 11ec68a0ef0e..a3735dc0f605 100644
--- a/rules/optee.make
+++ b/rules/optee.make
@@ -33,12 +33,16 @@ OPTEE_DEVPKG	:= NO
 OPTEE_WRAPPER_BLACKLIST := \
 	$(PTXDIST_LOWLEVEL_WRAPPER_BLACKLIST)
 
+OPTEE_PLATFORM		:= $(call remove_quotes,$(PTXCONF_OPTEE_PLATFORM))
+OPTEE_PLATFORM_FLAVOUR	:= $(call remove_quotes,$(PTXCONF_OPTEE_PLATFORM_FLAVOUR))
+OPTEE_PLATFORM_FLAVOUR	:= $(if $(OPTEE_PLATFORM_FLAVOUR),-$(OPTEE_PLATFORM_FLAVOUR))
+
 OPTEE_CONF_TOOL := NO
 OPTEE_MAKE_ENV += \
 	PATH=$(CROSS_PATH) \
 	CROSS_COMPILE=$(COMPILER_PREFIX) \
 	$(call ptx/ifdef,PTXCONF_ARCH_ARM64,CFG_ARM64_core=y) \
-	PLATFORM=$(call remove_quotes,$(PTXCONF_OPTEE_PLATFORM))-$(call remove_quotes,$(PTXCONF_OPTEE_PLATFORM_FLAVOUR)) \
+	PLATFORM=$(OPTEE_PLATFORM)$(OPTEE_PLATFORM_FLAVOUR) \
 	$(call remove_quotes,$(PTXCONF_OPTEE_CFG))
 
 # ----------------------------------------------------------------------------
-- 
2.39.2




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ptxdist] [PATCH 2/2] optee: make version configurable
  2023-11-22 19:05 [ptxdist] [PATCH 1/2] optee: support empty OPTEE_PLATFORM_FLAVOUR Ahmad Fatoum
@ 2023-11-22 19:05 ` Ahmad Fatoum
  2023-11-27 16:35   ` Michael Olbrich
  2023-11-28  8:36 ` [ptxdist] [APPLIED] optee: support empty OPTEE_PLATFORM_FLAVOUR Michael Olbrich
  1 sibling, 1 reply; 6+ messages in thread
From: Ahmad Fatoum @ 2023-11-22 19:05 UTC (permalink / raw)
  To: ptxdist; +Cc: Ahmad Fatoum

Other bootloaders and firmware already have Kconfig-able version, so add
these options to optee as well.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 platforms/optee.in | 8 ++++++++
 rules/optee.make   | 4 ++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/platforms/optee.in b/platforms/optee.in
index 371f5b237ffa..81f8a08b13aa 100644
--- a/platforms/optee.in
+++ b/platforms/optee.in
@@ -19,6 +19,14 @@ menuconfig OPTEE
 
 if OPTEE
 
+config OPTEE_VERSION
+	string "OP-TEE Version"
+	default "3.20.0"
+
+config OPTEE_MD5
+	string "OP-TEE Source MD5"
+	default "4ffc0d561f9db90180575992beac5a9d"
+
 config OPTEE_PLATFORM
 	string
 	prompt "OP-TEE Platform"
diff --git a/rules/optee.make b/rules/optee.make
index a3735dc0f605..d246a6922099 100644
--- a/rules/optee.make
+++ b/rules/optee.make
@@ -16,8 +16,8 @@ endif
 #
 # Paths and names
 #
-OPTEE_VERSION	:= 3.20.0
-OPTEE_MD5	:= 4ffc0d561f9db90180575992beac5a9d
+OPTEE_VERSION	:= $(call ptx/config-version, PTXCONF_OPTEE)
+OPTEE_MD5	:= $(call ptx/config-md5, PTXCONF_OPTEE)
 OPTEE		:= optee-$(OPTEE_VERSION)
 OPTEE_SUFFIX	:= tar.gz
 OPTEE_URL	:= https://github.com/OP-TEE/optee_os/archive/$(OPTEE_VERSION).$(OPTEE_SUFFIX)
-- 
2.39.2




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] [PATCH 2/2] optee: make version configurable
  2023-11-22 19:05 ` [ptxdist] [PATCH 2/2] optee: make version configurable Ahmad Fatoum
@ 2023-11-27 16:35   ` Michael Olbrich
  2023-11-27 16:41     ` Ahmad Fatoum
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Olbrich @ 2023-11-27 16:35 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: ptxdist

On Wed, Nov 22, 2023 at 08:05:25PM +0100, Ahmad Fatoum wrote:
> Other bootloaders and firmware already have Kconfig-able version, so add
> these options to optee as well.

What about the optee-* packages. They seem to have the same version. I'm
pretty sure they should be updated together, so they should probably share
the version but have an _MD5 option each.

> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
>  platforms/optee.in | 8 ++++++++
>  rules/optee.make   | 4 ++--
>  2 files changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/platforms/optee.in b/platforms/optee.in
> index 371f5b237ffa..81f8a08b13aa 100644
> --- a/platforms/optee.in
> +++ b/platforms/optee.in
> @@ -19,6 +19,14 @@ menuconfig OPTEE
>  
>  if OPTEE
>  
> +config OPTEE_VERSION
> +	string "OP-TEE Version"
> +	default "3.20.0"
> +
> +config OPTEE_MD5
> +	string "OP-TEE Source MD5"
> +	default "4ffc0d561f9db90180575992beac5a9d"
> +
>  config OPTEE_PLATFORM
>  	string
>  	prompt "OP-TEE Platform"
> diff --git a/rules/optee.make b/rules/optee.make
> index a3735dc0f605..d246a6922099 100644
> --- a/rules/optee.make
> +++ b/rules/optee.make
> @@ -16,8 +16,8 @@ endif
>  #
>  # Paths and names
>  #
> -OPTEE_VERSION	:= 3.20.0
> -OPTEE_MD5	:= 4ffc0d561f9db90180575992beac5a9d
> +OPTEE_VERSION	:= $(call ptx/config-version, PTXCONF_OPTEE)
> +OPTEE_MD5	:= $(call ptx/config-md5, PTXCONF_OPTEE)
>  OPTEE		:= optee-$(OPTEE_VERSION)
>  OPTEE_SUFFIX	:= tar.gz
>  OPTEE_URL	:= https://github.com/OP-TEE/optee_os/archive/$(OPTEE_VERSION).$(OPTEE_SUFFIX)
> -- 
> 2.39.2
> 
> 
> 

-- 
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 |



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] [PATCH 2/2] optee: make version configurable
  2023-11-27 16:35   ` Michael Olbrich
@ 2023-11-27 16:41     ` Ahmad Fatoum
  2023-12-01 14:42       ` Michael Olbrich
  0 siblings, 1 reply; 6+ messages in thread
From: Ahmad Fatoum @ 2023-11-27 16:41 UTC (permalink / raw)
  To: ptxdist

On 27.11.23 17:35, Michael Olbrich wrote:
> On Wed, Nov 22, 2023 at 08:05:25PM +0100, Ahmad Fatoum wrote:
>> Other bootloaders and firmware already have Kconfig-able version, so add
>> these options to optee as well.
> 
> What about the optee-* packages. They seem to have the same version. I'm
> pretty sure they should be updated together, so they should probably share
> the version but have an _MD5 option each.

It doesn't really hurt if they are older than OP-TEE itself. They should
remain compatible. Is it possible for them to share a version (across
platformconfig/ptxconfig), but still have their own MD5..?

I'd prefer just to change optee itself though.

Thanks,
Ahmad

> 
>> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
>> ---
>>  platforms/optee.in | 8 ++++++++
>>  rules/optee.make   | 4 ++--
>>  2 files changed, 10 insertions(+), 2 deletions(-)
>>
>> diff --git a/platforms/optee.in b/platforms/optee.in
>> index 371f5b237ffa..81f8a08b13aa 100644
>> --- a/platforms/optee.in
>> +++ b/platforms/optee.in
>> @@ -19,6 +19,14 @@ menuconfig OPTEE
>>  
>>  if OPTEE
>>  
>> +config OPTEE_VERSION
>> +	string "OP-TEE Version"
>> +	default "3.20.0"
>> +
>> +config OPTEE_MD5
>> +	string "OP-TEE Source MD5"
>> +	default "4ffc0d561f9db90180575992beac5a9d"
>> +
>>  config OPTEE_PLATFORM
>>  	string
>>  	prompt "OP-TEE Platform"
>> diff --git a/rules/optee.make b/rules/optee.make
>> index a3735dc0f605..d246a6922099 100644
>> --- a/rules/optee.make
>> +++ b/rules/optee.make
>> @@ -16,8 +16,8 @@ endif
>>  #
>>  # Paths and names
>>  #
>> -OPTEE_VERSION	:= 3.20.0
>> -OPTEE_MD5	:= 4ffc0d561f9db90180575992beac5a9d
>> +OPTEE_VERSION	:= $(call ptx/config-version, PTXCONF_OPTEE)
>> +OPTEE_MD5	:= $(call ptx/config-md5, PTXCONF_OPTEE)
>>  OPTEE		:= optee-$(OPTEE_VERSION)
>>  OPTEE_SUFFIX	:= tar.gz
>>  OPTEE_URL	:= https://github.com/OP-TEE/optee_os/archive/$(OPTEE_VERSION).$(OPTEE_SUFFIX)
>> -- 
>> 2.39.2
>>
>>
>>
> 

-- 
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 |




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] [APPLIED] optee: support empty OPTEE_PLATFORM_FLAVOUR
  2023-11-22 19:05 [ptxdist] [PATCH 1/2] optee: support empty OPTEE_PLATFORM_FLAVOUR Ahmad Fatoum
  2023-11-22 19:05 ` [ptxdist] [PATCH 2/2] optee: make version configurable Ahmad Fatoum
@ 2023-11-28  8:36 ` Michael Olbrich
  1 sibling, 0 replies; 6+ messages in thread
From: Michael Olbrich @ 2023-11-28  8:36 UTC (permalink / raw)
  To: ptxdist; +Cc: Ahmad Fatoum

Thanks, applied as 1fa2e0b2aac3cc2eb109dc8a7e0cb8691a88f506.

Michael

[sent from post-receive hook]

On Tue, 28 Nov 2023 09:36:52 +0100, Ahmad Fatoum <a.fatoum@pengutronix.de> wrote:
> Some platforms like the stm32mp, support PLATFORM_FLAVOR to be
> empty and extract the information from other variables, e.g.
> CFG_EMBED_DTB_SOURCE_FILE.
> 
> Support this use case by skipping appending of -$(OPTEE_PLATFORM_FLAVOUR)
> to the PLATFORM= variable whenever empty.
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> Message-Id: <20231122190525.2114139-1-a.fatoum@pengutronix.de>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> 
> diff --git a/rules/optee.make b/rules/optee.make
> index 11ec68a0ef0e..a3735dc0f605 100644
> --- a/rules/optee.make
> +++ b/rules/optee.make
> @@ -33,12 +33,16 @@ OPTEE_DEVPKG	:= NO
>  OPTEE_WRAPPER_BLACKLIST := \
>  	$(PTXDIST_LOWLEVEL_WRAPPER_BLACKLIST)
>  
> +OPTEE_PLATFORM		:= $(call remove_quotes,$(PTXCONF_OPTEE_PLATFORM))
> +OPTEE_PLATFORM_FLAVOUR	:= $(call remove_quotes,$(PTXCONF_OPTEE_PLATFORM_FLAVOUR))
> +OPTEE_PLATFORM_FLAVOUR	:= $(if $(OPTEE_PLATFORM_FLAVOUR),-$(OPTEE_PLATFORM_FLAVOUR))
> +
>  OPTEE_CONF_TOOL := NO
>  OPTEE_MAKE_ENV += \
>  	PATH=$(CROSS_PATH) \
>  	CROSS_COMPILE=$(COMPILER_PREFIX) \
>  	$(call ptx/ifdef,PTXCONF_ARCH_ARM64,CFG_ARM64_core=y) \
> -	PLATFORM=$(call remove_quotes,$(PTXCONF_OPTEE_PLATFORM))-$(call remove_quotes,$(PTXCONF_OPTEE_PLATFORM_FLAVOUR)) \
> +	PLATFORM=$(OPTEE_PLATFORM)$(OPTEE_PLATFORM_FLAVOUR) \
>  	$(call remove_quotes,$(PTXCONF_OPTEE_CFG))
>  
>  # ----------------------------------------------------------------------------



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] [PATCH 2/2] optee: make version configurable
  2023-11-27 16:41     ` Ahmad Fatoum
@ 2023-12-01 14:42       ` Michael Olbrich
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Olbrich @ 2023-12-01 14:42 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: ptxdist

On Mon, Nov 27, 2023 at 05:41:34PM +0100, Ahmad Fatoum wrote:
> On 27.11.23 17:35, Michael Olbrich wrote:
> > On Wed, Nov 22, 2023 at 08:05:25PM +0100, Ahmad Fatoum wrote:
> >> Other bootloaders and firmware already have Kconfig-able version, so add
> >> these options to optee as well.
> > 
> > What about the optee-* packages. They seem to have the same version. I'm
> > pretty sure they should be updated together, so they should probably share
> > the version but have an _MD5 option each.
> 
> It doesn't really hurt if they are older than OP-TEE itself. They should
> remain compatible. Is it possible for them to share a version (across
> platformconfig/ptxconfig), but still have their own MD5..?
> 
> I'd prefer just to change optee itself though.

So the API is guaranteed to be backwards and forward compatible? That seems
unlikely.

And it's a maintenance problem. If you can just configure the optee version
the config then the other packages are never touched at all or I'll have to
do blind updates myself because I have no easy way to test it.

Michael

> >> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> >> ---
> >>  platforms/optee.in | 8 ++++++++
> >>  rules/optee.make   | 4 ++--
> >>  2 files changed, 10 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/platforms/optee.in b/platforms/optee.in
> >> index 371f5b237ffa..81f8a08b13aa 100644
> >> --- a/platforms/optee.in
> >> +++ b/platforms/optee.in
> >> @@ -19,6 +19,14 @@ menuconfig OPTEE
> >>  
> >>  if OPTEE
> >>  
> >> +config OPTEE_VERSION
> >> +	string "OP-TEE Version"
> >> +	default "3.20.0"
> >> +
> >> +config OPTEE_MD5
> >> +	string "OP-TEE Source MD5"
> >> +	default "4ffc0d561f9db90180575992beac5a9d"
> >> +
> >>  config OPTEE_PLATFORM
> >>  	string
> >>  	prompt "OP-TEE Platform"
> >> diff --git a/rules/optee.make b/rules/optee.make
> >> index a3735dc0f605..d246a6922099 100644
> >> --- a/rules/optee.make
> >> +++ b/rules/optee.make
> >> @@ -16,8 +16,8 @@ endif
> >>  #
> >>  # Paths and names
> >>  #
> >> -OPTEE_VERSION	:= 3.20.0
> >> -OPTEE_MD5	:= 4ffc0d561f9db90180575992beac5a9d
> >> +OPTEE_VERSION	:= $(call ptx/config-version, PTXCONF_OPTEE)
> >> +OPTEE_MD5	:= $(call ptx/config-md5, PTXCONF_OPTEE)
> >>  OPTEE		:= optee-$(OPTEE_VERSION)
> >>  OPTEE_SUFFIX	:= tar.gz
> >>  OPTEE_URL	:= https://github.com/OP-TEE/optee_os/archive/$(OPTEE_VERSION).$(OPTEE_SUFFIX)
> >> -- 
> >> 2.39.2
> >>
> >>
> >>
> > 
> 
> -- 
> 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 |
> 
> 
> 

-- 
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 |



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-12-01 14:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-22 19:05 [ptxdist] [PATCH 1/2] optee: support empty OPTEE_PLATFORM_FLAVOUR Ahmad Fatoum
2023-11-22 19:05 ` [ptxdist] [PATCH 2/2] optee: make version configurable Ahmad Fatoum
2023-11-27 16:35   ` Michael Olbrich
2023-11-27 16:41     ` Ahmad Fatoum
2023-12-01 14:42       ` Michael Olbrich
2023-11-28  8:36 ` [ptxdist] [APPLIED] optee: support empty OPTEE_PLATFORM_FLAVOUR Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox