mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] PTXCONF_RAUC_COMPATIBLE location
@ 2021-08-18 13:17 Robin van der Gracht
  2021-08-18 13:52 ` Bastian Krause
  0 siblings, 1 reply; 11+ messages in thread
From: Robin van der Gracht @ 2021-08-18 13:17 UTC (permalink / raw)
  To: ptxdist; +Cc: ejo, bst

Hi!

We're building an OS for multiple platforms. The platforms aren't compatible.
So we have a single ptxconfig and multiple platformconfig files.

The rauc compatible string (PTXCONF_RAUC_COMPATIBLE) is set in the ptxconfig
file.

Is there a special reason for the PTXCONF_RAUC_COMPATIBLE being in the
ptxconfig (menuconfig) or would it be fine to move it to the platformconfig
(next to the platform specific description PTXCONF_IMAGE_RAUC_DESCRIPTION)?

Best regards,
Robin van der Gracht

-- 
Protonic Holland
Factorij 36
1689AL Zwaag
+31 (0)229 212928
https://www.protonic.nl

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


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

* Re: [ptxdist] PTXCONF_RAUC_COMPATIBLE location
  2021-08-18 13:17 [ptxdist] PTXCONF_RAUC_COMPATIBLE location Robin van der Gracht
@ 2021-08-18 13:52 ` Bastian Krause
  2021-08-18 14:16   ` Robin van der Gracht
  0 siblings, 1 reply; 11+ messages in thread
From: Bastian Krause @ 2021-08-18 13:52 UTC (permalink / raw)
  To: robin, ptxdist; +Cc: ejo


Hi Robin,

On 8/18/21 3:17 PM, Robin van der Gracht wrote:
> We're building an OS for multiple platforms. The platforms aren't
> compatible.

Is the system.conf supposed to be identical on both platforms - apart
from the compatible?

Regards,
Bastian

-- 
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
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


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

* Re: [ptxdist] PTXCONF_RAUC_COMPATIBLE location
  2021-08-18 13:52 ` Bastian Krause
@ 2021-08-18 14:16   ` Robin van der Gracht
  2021-08-23  4:27     ` Denis Osterland-Heim
  0 siblings, 1 reply; 11+ messages in thread
From: Robin van der Gracht @ 2021-08-18 14:16 UTC (permalink / raw)
  To: Bastian Krause; +Cc: ejo, ptxdist

Hi Bastian,

On 2021-08-18 15:52, Bastian Krause wrote:
> Hi Robin,
> 
> On 8/18/21 3:17 PM, Robin van der Gracht wrote:
>> We're building an OS for multiple platforms. The platforms aren't
>> compatible.
> 
> Is the system.conf supposed to be identical on both platforms - apart
> from the compatible?

If you mean the ptxconfig file (generated by `ptxdist menuconfig`) then yes.

We've refreshed the hardware of an existing product but want the OS to stay
the same.

Best regards,
Robin van der Gracht

-- 
Protonic Holland
Factorij 36
1689AL Zwaag
+31 (0)229 212928
https://www.protonic.nl

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


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

* Re: [ptxdist] PTXCONF_RAUC_COMPATIBLE location
  2021-08-18 14:16   ` Robin van der Gracht
@ 2021-08-23  4:27     ` Denis Osterland-Heim
  2021-08-23  6:54       ` Robin van der Gracht
  0 siblings, 1 reply; 11+ messages in thread
From: Denis Osterland-Heim @ 2021-08-23  4:27 UTC (permalink / raw)
  To: robin; +Cc: ptxdist

Hi Robin,

You may simply add the platform name to the compatibility string.

PTXCONF_RAUC_COMPATIBLE="${PTXCONF_PROJECT_VENDOR} ${PTXCONF_PROJECT} ${PTXCONF_PLATFORM}"

Regards Denis

Am Mittwoch, den 18.08.2021, 16:16 +0200 schrieb Robin van der Gracht:
> Hi Bastian,
>
> On 2021-08-18 15:52, Bastian Krause wrote:
> > Hi Robin,
> >
> > On 8/18/21 3:17 PM, Robin van der Gracht wrote:
> > > We're building an OS for multiple platforms. The platforms aren't
> > > compatible.
> >
> > Is the system.conf supposed to be identical on both platforms - apart
> > from the compatible?
>
> If you mean the ptxconfig file (generated by `ptxdist menuconfig`) then yes.
>
> We've refreshed the hardware of an existing product but want the OS to stay
> the same.
>
> Best regards,
> Robin van der Gracht
>
Diehl Connectivity Solutions GmbH
Geschäftsführung: Horst Leonberger
Sitz der Gesellschaft: Nürnberg - Registergericht: Amtsgericht
Nürnberg: HRB 32315

________________________________

Der Inhalt der vorstehenden E-Mail ist nicht rechtlich bindend. Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen.
Informieren Sie uns bitte, wenn Sie diese E-Mail faelschlicherweise erhalten haben. Bitte loeschen Sie in diesem Fall die Nachricht.
Jede unerlaubte Form der Reproduktion, Bekanntgabe, Aenderung, Verteilung und/oder Publikation dieser E-Mail ist strengstens untersagt.

- Informationen zum Datenschutz, insbesondere zu Ihren Rechten, erhalten Sie unter:

https://www.diehl.com/group/de/transparenz-und-informationspflichten/

The contents of the above mentioned e-mail is not legally binding. This e-mail contains confidential and/or legally protected information. Please inform us if you have received this e-mail by
mistake and delete it in such a case. Each unauthorized reproduction, disclosure, alteration, distribution and/or publication of this e-mail is strictly prohibited.

- For general information on data protection and your respective rights please visit:

https://www.diehl.com/group/en/transparency-and-information-obligations/


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

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

* Re: [ptxdist] PTXCONF_RAUC_COMPATIBLE location
  2021-08-23  4:27     ` Denis Osterland-Heim
@ 2021-08-23  6:54       ` Robin van der Gracht
  2021-08-23  7:41         ` Denis Osterland-Heim
  0 siblings, 1 reply; 11+ messages in thread
From: Robin van der Gracht @ 2021-08-23  6:54 UTC (permalink / raw)
  To: Denis Osterland-Heim; +Cc: ptxdist

Hi Dennis,

On 2021-08-23 06:27, Denis Osterland-Heim wrote:
> Hi Robin,
> 
> You may simply add the platform name to the compatibility string.
> 
> PTXCONF_RAUC_COMPATIBLE="${PTXCONF_PROJECT_VENDOR} ${PTXCONF_PROJECT}
> ${PTXCONF_PLATFORM}"

Thank you for your reply.

I've been doing so for some time now. But recently I had to rename my
platforms but I'd like to keep the compatible string the same. That is when
I starded questioning the location.

Kind regards,
Robin van der Gracht

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


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

* Re: [ptxdist] PTXCONF_RAUC_COMPATIBLE location
  2021-08-23  6:54       ` Robin van der Gracht
@ 2021-08-23  7:41         ` Denis Osterland-Heim
  2021-08-23  9:13           ` Roland Hieber
  0 siblings, 1 reply; 11+ messages in thread
From: Denis Osterland-Heim @ 2021-08-23  7:41 UTC (permalink / raw)
  To: robin; +Cc: ptxdist

Hi Robin,

I see. It is not perfect, that image-rauc uses the variables from rauc silently.

I would suggest:

diff --git a/platforms/image-rauc.in b/platforms/image-rauc.in
index 1f9427b40..bfbe4a18a 100644
--- a/platforms/image-rauc.in
+++ b/platforms/image-rauc.in
@@ -26,4 +26,26 @@ config IMAGE_RAUC_DESCRIPTION
 help
   Optional description that will be placed in the Bundles metadata.

+config IMAGE_RAUC_COMPATIBLE
+string
+prompt "RAUC Bundle Compatible"
+default "${PTXCONF_RAUC_COMPATIBLE}"
+help
+  An explicit identification string that RAUC uses to assure an update
+  bundle matches with the correct root filesystem on the target.
+  .
+  Only if the compatible in the targets RAUC system.conf file and those
+  in the Bundle's manifest match exactly, an update will be performed.
+  .
+  This must match the client configuration.
+
+config IMAGE_RAUC_BUNDLE_VERSION
+string
+prompt "RAUC Bundle Version"
+default "${PTXDIST_RAUC_BUNDLE_VERSION}"
+help
+  Overwrite the bundle version if needed.
+  .
+  This must match the client configuration.
+
 endif
diff --git a/rules/image-rauc.make b/rules/image-rauc.make
index fe1b0e89b..1fd810f71 100644
--- a/rules/image-rauc.make
+++ b/rules/image-rauc.make
@@ -28,8 +28,8 @@ ifdef PTXCONF_IMAGE_RAUC

 IMAGE_RAUC_ENV= \
 $(CODE_SIGNING_ENV) \
-RAUC_BUNDLE_COMPATIBLE="$(call remove_quotes,$(PTXCONF_RAUC_COMPATIBLE))" \
-RAUC_BUNDLE_VERSION="$(call remove_quotes, $(PTXCONF_RAUC_BUNDLE_VERSION))" \
+RAUC_BUNDLE_COMPATIBLE="$(call remove_quotes,$(PTXCONF_IMAGE_RAUC_COMPATIBLE))" \
+RAUC_BUNDLE_VERSION="$(call remove_quotes, $(PTXCONF_IMAGE_RAUC_BUNDLE_VERSION))" \
 RAUC_BUNDLE_BUILD=$(call ptx/sh, date +%FT%T%z) \
 RAUC_BUNDLE_DESCRIPTION=$(PTXCONF_IMAGE_RAUC_DESCRIPTION) \
 RAUC_KEY="$(shell cs_get_uri update)" \

Upstream and in your configuration:

PTXCONF_RAUC_COMPATIBLE="${PTXCONF_IMAGE_RAUC_COMPATIBLE}"

and in your platformconfigs:

PTXCONF_IMAGE_RAUC_COMPATIBLE="what ever you want"

This change would be transparent for all existing use-cases and give additional flexibility.

Regards, Denis


Am Montag, den 23.08.2021, 08:54 +0200 schrieb Robin van der Gracht:
> Hi Dennis,
>
> On 2021-08-23 06:27, Denis Osterland-Heim wrote:
> > Hi Robin,
> >
> > You may simply add the platform name to the compatibility string.
> >
> > PTXCONF_RAUC_COMPATIBLE="${PTXCONF_PROJECT_VENDOR} ${PTXCONF_PROJECT}
> > ${PTXCONF_PLATFORM}"
>
> Thank you for your reply.
>
> I've been doing so for some time now. But recently I had to rename my
> platforms but I'd like to keep the compatible string the same. That is when
> I starded questioning the location.
>
> Kind regards,
> Robin van der Gracht
Diehl Connectivity Solutions GmbH
Geschäftsführung: Horst Leonberger
Sitz der Gesellschaft: Nürnberg - Registergericht: Amtsgericht
Nürnberg: HRB 32315

________________________________

Der Inhalt der vorstehenden E-Mail ist nicht rechtlich bindend. Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen.
Informieren Sie uns bitte, wenn Sie diese E-Mail faelschlicherweise erhalten haben. Bitte loeschen Sie in diesem Fall die Nachricht.
Jede unerlaubte Form der Reproduktion, Bekanntgabe, Aenderung, Verteilung und/oder Publikation dieser E-Mail ist strengstens untersagt.

- Informationen zum Datenschutz, insbesondere zu Ihren Rechten, erhalten Sie unter:

https://www.diehl.com/group/de/transparenz-und-informationspflichten/

The contents of the above mentioned e-mail is not legally binding. This e-mail contains confidential and/or legally protected information. Please inform us if you have received this e-mail by
mistake and delete it in such a case. Each unauthorized reproduction, disclosure, alteration, distribution and/or publication of this e-mail is strictly prohibited.

- For general information on data protection and your respective rights please visit:

https://www.diehl.com/group/en/transparency-and-information-obligations/


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

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

* Re: [ptxdist] PTXCONF_RAUC_COMPATIBLE location
  2021-08-23  7:41         ` Denis Osterland-Heim
@ 2021-08-23  9:13           ` Roland Hieber
  2021-08-24  6:44             ` Denis Osterland-Heim
  0 siblings, 1 reply; 11+ messages in thread
From: Roland Hieber @ 2021-08-23  9:13 UTC (permalink / raw)
  To: Denis Osterland-Heim; +Cc: robin, ptxdist

On Mon, Aug 23, 2021 at 07:41:24AM +0000, Denis Osterland-Heim wrote:
> Hi Robin,
> 
> I see. It is not perfect, that image-rauc uses the variables from rauc silently.

… and IMAGE_RAUC cannot depend on RAUC because one is in the
platformconfig menu and one is in the ptxconfig menu. But it will work
this way nevertheless because at the time that IMAGE_RAUC_ENV is
assigned in rules/image-rauc.make, the kconfig variables from both menus
are already available in make.

> I would suggest:
> 
> diff --git a/platforms/image-rauc.in b/platforms/image-rauc.in
> index 1f9427b40..bfbe4a18a 100644
> --- a/platforms/image-rauc.in
> +++ b/platforms/image-rauc.in
> @@ -26,4 +26,26 @@ config IMAGE_RAUC_DESCRIPTION
>  help
>    Optional description that will be placed in the Bundles metadata.
> 
> +config IMAGE_RAUC_COMPATIBLE
> +string
> +prompt "RAUC Bundle Compatible"
> +default "${PTXCONF_RAUC_COMPATIBLE}"
> +help
> +  An explicit identification string that RAUC uses to assure an update
> +  bundle matches with the correct root filesystem on the target.
> +  .
> +  Only if the compatible in the targets RAUC system.conf file and those
> +  in the Bundle's manifest match exactly, an update will be performed.
> +  .
> +  This must match the client configuration.
> +
> +config IMAGE_RAUC_BUNDLE_VERSION
> +string
> +prompt "RAUC Bundle Version"
> +default "${PTXDIST_RAUC_BUNDLE_VERSION}"
> +help
> +  Overwrite the bundle version if needed.
> +  .
> +  This must match the client configuration.
> +

This has the disadvantage that the menu item is duplicated, and we
cannot make sure the values entered in the ptxconfig menu are the same
as in the platformconfig menu. So I'd rather leave it like it is now.
The image build will fail anyways with "Failed to create bundle:
Missing value for key 'compatible'" if RAUC is disabled. So maybe add a
short snippet in the image-rauc help text that rauc must be
enabled?

 - Roland


>  endif
> diff --git a/rules/image-rauc.make b/rules/image-rauc.make
> index fe1b0e89b..1fd810f71 100644
> --- a/rules/image-rauc.make
> +++ b/rules/image-rauc.make
> @@ -28,8 +28,8 @@ ifdef PTXCONF_IMAGE_RAUC
> 
>  IMAGE_RAUC_ENV= \
>  $(CODE_SIGNING_ENV) \
> -RAUC_BUNDLE_COMPATIBLE="$(call remove_quotes,$(PTXCONF_RAUC_COMPATIBLE))" \
> -RAUC_BUNDLE_VERSION="$(call remove_quotes, $(PTXCONF_RAUC_BUNDLE_VERSION))" \
> +RAUC_BUNDLE_COMPATIBLE="$(call remove_quotes,$(PTXCONF_IMAGE_RAUC_COMPATIBLE))" \
> +RAUC_BUNDLE_VERSION="$(call remove_quotes, $(PTXCONF_IMAGE_RAUC_BUNDLE_VERSION))" \
>  RAUC_BUNDLE_BUILD=$(call ptx/sh, date +%FT%T%z) \
>  RAUC_BUNDLE_DESCRIPTION=$(PTXCONF_IMAGE_RAUC_DESCRIPTION) \
>  RAUC_KEY="$(shell cs_get_uri update)" \
> 
> Upstream and in your configuration:
> 
> PTXCONF_RAUC_COMPATIBLE="${PTXCONF_IMAGE_RAUC_COMPATIBLE}"
> 
> and in your platformconfigs:
> 
> PTXCONF_IMAGE_RAUC_COMPATIBLE="what ever you want"
> 
> This change would be transparent for all existing use-cases and give additional flexibility.
> 
> Regards, Denis
> 
> 
> Am Montag, den 23.08.2021, 08:54 +0200 schrieb Robin van der Gracht:
> > Hi Dennis,
> >
> > On 2021-08-23 06:27, Denis Osterland-Heim wrote:
> > > Hi Robin,
> > >
> > > You may simply add the platform name to the compatibility string.
> > >
> > > PTXCONF_RAUC_COMPATIBLE="${PTXCONF_PROJECT_VENDOR} ${PTXCONF_PROJECT}
> > > ${PTXCONF_PLATFORM}"
> >
> > Thank you for your reply.
> >
> > I've been doing so for some time now. But recently I had to rename my
> > platforms but I'd like to keep the compatible string the same. That is when
> > I starded questioning the location.
> >
> > Kind regards,
> > Robin van der Gracht
> Diehl Connectivity Solutions GmbH
> Geschäftsführung: Horst Leonberger
> Sitz der Gesellschaft: Nürnberg - Registergericht: Amtsgericht
> Nürnberg: HRB 32315
> 
> ________________________________
> 
> Der Inhalt der vorstehenden E-Mail ist nicht rechtlich bindend. Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen.
> Informieren Sie uns bitte, wenn Sie diese E-Mail faelschlicherweise erhalten haben. Bitte loeschen Sie in diesem Fall die Nachricht.
> Jede unerlaubte Form der Reproduktion, Bekanntgabe, Aenderung, Verteilung und/oder Publikation dieser E-Mail ist strengstens untersagt.
> 
> - Informationen zum Datenschutz, insbesondere zu Ihren Rechten, erhalten Sie unter:
> 
> https://www.diehl.com/group/de/transparenz-und-informationspflichten/
> 
> The contents of the above mentioned e-mail is not legally binding. This e-mail contains confidential and/or legally protected information. Please inform us if you have received this e-mail by
> mistake and delete it in such a case. Each unauthorized reproduction, disclosure, alteration, distribution and/or publication of this e-mail is strictly prohibited.
> 
> - For general information on data protection and your respective rights please visit:
> 
> https://www.diehl.com/group/en/transparency-and-information-obligations/
> 
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
> To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

-- 
Roland Hieber, Pengutronix e.K.          | r.hieber@pengutronix.de     |
Steuerwalder Str. 21                     | https://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
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

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

* Re: [ptxdist] PTXCONF_RAUC_COMPATIBLE location
  2021-08-23  9:13           ` Roland Hieber
@ 2021-08-24  6:44             ` Denis Osterland-Heim
  2021-08-24  7:39               ` Robin van der Gracht
  2021-08-24 13:03               ` rhi
  0 siblings, 2 replies; 11+ messages in thread
From: Denis Osterland-Heim @ 2021-08-24  6:44 UTC (permalink / raw)
  To: rhi; +Cc: robin, ptxdist

Hi Roland,

Am Montag, den 23.08.2021, 11:13 +0200 schrieb Roland Hieber:
> On Mon, Aug 23, 2021 at 07:41:24AM +0000, Denis Osterland-Heim wrote:
> > Hi Robin,
> >
> > I see. It is not perfect, that image-rauc uses the variables from rauc silently.
>
> … and IMAGE_RAUC cannot depend on RAUC because one is in the
> platformconfig menu and one is in the ptxconfig menu. But it will work
> this way nevertheless because at the time that IMAGE_RAUC_ENV is
> assigned in rules/image-rauc.make, the kconfig variables from both menus
> are already available in make.
>
> > I would suggest:
> >
> > diff --git a/platforms/image-rauc.in b/platforms/image-rauc.in
> > index 1f9427b40..bfbe4a18a 100644
> > --- a/platforms/image-rauc.in
> > +++ b/platforms/image-rauc.in
> > @@ -26,4 +26,26 @@ config IMAGE_RAUC_DESCRIPTION
> >  help
> >    Optional description that will be placed in the Bundles metadata.
> >
> > +config IMAGE_RAUC_COMPATIBLE
> > +string
> > +prompt "RAUC Bundle Compatible"
> > +default "${PTXCONF_RAUC_COMPATIBLE}"
> > +help
> > +  An explicit identification string that RAUC uses to assure an update
> > +  bundle matches with the correct root filesystem on the target.
> > +  .
> > +  Only if the compatible in the targets RAUC system.conf file and those
> > +  in the Bundle's manifest match exactly, an update will be performed.
> > +  .
> > +  This must match the client configuration.
> > +
> > +config IMAGE_RAUC_BUNDLE_VERSION
> > +string
> > +prompt "RAUC Bundle Version"
> > +default "${PTXDIST_RAUC_BUNDLE_VERSION}"
> > +help
> > +  Overwrite the bundle version if needed.
> > +  .
> > +  This must match the client configuration.
> > +
>
> This has the disadvantage that the menu item is duplicated, and we
> cannot make sure the values entered in the ptxconfig menu are the same
> as in the platformconfig menu. So I'd rather leave it like it is now.
> The image build will fail anyways with "Failed to create bundle:
> Missing value for key 'compatible'" if RAUC is disabled. So maybe add a
> short snippet in the image-rauc help text that rauc must be
> enabled?
Would be welcome.

So if the flexibility to define the compatibility string in menu- or platformconfig is not welcome,
we are back at the discussion, if compatibility string should resident in menu- or platformconfig.
I believe that there are more applications that use multiple different images on one platform.
This would give a tendency to menuconfig, but with variables it does not matter where it is technically.
Robins core problem seems to be, that there is no place where he can store the compatibility platform name (the old one).

Robin, it looks like it would be the best solution that you add `platforms/compatibility-name.in` to you BSP
and use its variable in RAUC_COMPATIBLE.

Regards, Denis

>
>  - Roland
>
>
> >  endif
> > diff --git a/rules/image-rauc.make b/rules/image-rauc.make
> > index fe1b0e89b..1fd810f71 100644
> > --- a/rules/image-rauc.make
> > +++ b/rules/image-rauc.make
> > @@ -28,8 +28,8 @@ ifdef PTXCONF_IMAGE_RAUC
> >
> >  IMAGE_RAUC_ENV= \
> >  $(CODE_SIGNING_ENV) \
> > -RAUC_BUNDLE_COMPATIBLE="$(call remove_quotes,$(PTXCONF_RAUC_COMPATIBLE))" \
> > -RAUC_BUNDLE_VERSION="$(call remove_quotes, $(PTXCONF_RAUC_BUNDLE_VERSION))" \
> > +RAUC_BUNDLE_COMPATIBLE="$(call remove_quotes,$(PTXCONF_IMAGE_RAUC_COMPATIBLE))" \
> > +RAUC_BUNDLE_VERSION="$(call remove_quotes, $(PTXCONF_IMAGE_RAUC_BUNDLE_VERSION))" \
> >  RAUC_BUNDLE_BUILD=$(call ptx/sh, date +%FT%T%z) \
> >  RAUC_BUNDLE_DESCRIPTION=$(PTXCONF_IMAGE_RAUC_DESCRIPTION) \
> >  RAUC_KEY="$(shell cs_get_uri update)" \
> >
> > Upstream and in your configuration:
> >
> > PTXCONF_RAUC_COMPATIBLE="${PTXCONF_IMAGE_RAUC_COMPATIBLE}"
> >
> > and in your platformconfigs:
> >
> > PTXCONF_IMAGE_RAUC_COMPATIBLE="what ever you want"
> >
> > This change would be transparent for all existing use-cases and give additional flexibility.
> >
> > Regards, Denis
> >
> >
> > Am Montag, den 23.08.2021, 08:54 +0200 schrieb Robin van der Gracht:
> > > Hi Dennis,
> > >
> > > On 2021-08-23 06:27, Denis Osterland-Heim wrote:
> > > > Hi Robin,
> > > >
> > > > You may simply add the platform name to the compatibility string.
> > > >
> > > > PTXCONF_RAUC_COMPATIBLE="${PTXCONF_PROJECT_VENDOR} ${PTXCONF_PROJECT}
> > > > ${PTXCONF_PLATFORM}"
> > >
> > > Thank you for your reply.
> > >
> > > I've been doing so for some time now. But recently I had to rename my
> > > platforms but I'd like to keep the compatible string the same. That is when
> > > I starded questioning the location.
> > >
> > > Kind regards,
> > > Robin van der Gracht
> >
> > Diehl Connectivity Solutions GmbH
> > Geschäftsführung: Horst Leonberger
> > Sitz der Gesellschaft: Nürnberg - Registergericht: Amtsgericht
> > Nürnberg: HRB 32315
> >
> > ________________________________
> >
> > Der Inhalt der vorstehenden E-Mail ist nicht rechtlich bindend. Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen.
> > Informieren Sie uns bitte, wenn Sie diese E-Mail faelschlicherweise erhalten haben. Bitte loeschen Sie in diesem Fall die Nachricht.
> > Jede unerlaubte Form der Reproduktion, Bekanntgabe, Aenderung, Verteilung und/oder Publikation dieser E-Mail ist strengstens untersagt.
> >
> > - Informationen zum Datenschutz, insbesondere zu Ihren Rechten, erhalten Sie unter:
> >
> > https://www.diehl.com/group/de/transparenz-und-informationspflichten/
> >
> > The contents of the above mentioned e-mail is not legally binding. This e-mail contains confidential and/or legally protected information. Please inform us if you have received this e-mail by
> > mistake and delete it in such a case. Each unauthorized reproduction, disclosure, alteration, distribution and/or publication of this e-mail is strictly prohibited.
> >
> > - For general information on data protection and your respective rights please visit:
> >
> > https://www.diehl.com/group/en/transparency-and-information-obligations/
> >
> >
> > _______________________________________________
> > ptxdist mailing list
> > ptxdist@pengutronix.de
> > To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
>
>
Diehl Connectivity Solutions GmbH
Geschäftsführung: Horst Leonberger
Sitz der Gesellschaft: Nürnberg - Registergericht: Amtsgericht
Nürnberg: HRB 32315

________________________________

Der Inhalt der vorstehenden E-Mail ist nicht rechtlich bindend. Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen.
Informieren Sie uns bitte, wenn Sie diese E-Mail faelschlicherweise erhalten haben. Bitte loeschen Sie in diesem Fall die Nachricht.
Jede unerlaubte Form der Reproduktion, Bekanntgabe, Aenderung, Verteilung und/oder Publikation dieser E-Mail ist strengstens untersagt.

- Informationen zum Datenschutz, insbesondere zu Ihren Rechten, erhalten Sie unter:

https://www.diehl.com/group/de/transparenz-und-informationspflichten/

The contents of the above mentioned e-mail is not legally binding. This e-mail contains confidential and/or legally protected information. Please inform us if you have received this e-mail by
mistake and delete it in such a case. Each unauthorized reproduction, disclosure, alteration, distribution and/or publication of this e-mail is strictly prohibited.

- For general information on data protection and your respective rights please visit:

https://www.diehl.com/group/en/transparency-and-information-obligations/


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

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

* Re: [ptxdist] PTXCONF_RAUC_COMPATIBLE location
  2021-08-24  6:44             ` Denis Osterland-Heim
@ 2021-08-24  7:39               ` Robin van der Gracht
  2021-08-24 13:03               ` rhi
  1 sibling, 0 replies; 11+ messages in thread
From: Robin van der Gracht @ 2021-08-24  7:39 UTC (permalink / raw)
  To: Denis Osterland-Heim; +Cc: ptxdist, rhi

Hi Dennis,

On 2021-08-24 08:44, Denis Osterland-Heim wrote:
> Hi Roland,
> 
> Am Montag, den 23.08.2021, 11:13 +0200 schrieb Roland Hieber:
>> On Mon, Aug 23, 2021 at 07:41:24AM +0000, Denis Osterland-Heim wrote:
>> > Hi Robin,
>> >
>> > I see. It is not perfect, that image-rauc uses the variables from rauc silently.
>> 
>> … and IMAGE_RAUC cannot depend on RAUC because one is in the
>> platformconfig menu and one is in the ptxconfig menu. But it will work
>> this way nevertheless because at the time that IMAGE_RAUC_ENV is
>> assigned in rules/image-rauc.make, the kconfig variables from both menus
>> are already available in make.
>> 
>> > I would suggest:
>> >
>> > diff --git a/platforms/image-rauc.in b/platforms/image-rauc.in
>> > index 1f9427b40..bfbe4a18a 100644
>> > --- a/platforms/image-rauc.in
>> > +++ b/platforms/image-rauc.in
>> > @@ -26,4 +26,26 @@ config IMAGE_RAUC_DESCRIPTION
>> >  help
>> >    Optional description that will be placed in the Bundles metadata.
>> >
>> > +config IMAGE_RAUC_COMPATIBLE
>> > +string
>> > +prompt "RAUC Bundle Compatible"
>> > +default "${PTXCONF_RAUC_COMPATIBLE}"
>> > +help
>> > +  An explicit identification string that RAUC uses to assure an update
>> > +  bundle matches with the correct root filesystem on the target.
>> > +  .
>> > +  Only if the compatible in the targets RAUC system.conf file and those
>> > +  in the Bundle's manifest match exactly, an update will be performed.
>> > +  .
>> > +  This must match the client configuration.
>> > +
>> > +config IMAGE_RAUC_BUNDLE_VERSION
>> > +string
>> > +prompt "RAUC Bundle Version"
>> > +default "${PTXDIST_RAUC_BUNDLE_VERSION}"
>> > +help
>> > +  Overwrite the bundle version if needed.
>> > +  .
>> > +  This must match the client configuration.
>> > +
>> 
>> This has the disadvantage that the menu item is duplicated, and we
>> cannot make sure the values entered in the ptxconfig menu are the same
>> as in the platformconfig menu. So I'd rather leave it like it is now.
>> The image build will fail anyways with "Failed to create bundle:
>> Missing value for key 'compatible'" if RAUC is disabled. So maybe add a
>> short snippet in the image-rauc help text that rauc must be
>> enabled?
> Would be welcome.
> 
> So if the flexibility to define the compatibility string in menu- or
> platformconfig is not welcome,
> we are back at the discussion, if compatibility string should resident in
> menu- or platformconfig.
> I believe that there are more applications that use multiple different 
> images
> on one platform.
> This would give a tendency to menuconfig, but with variables it does not
> matter where it is technically.
> Robins core problem seems to be, that there is no place where he can store
> the compatibility platform name (the old one).
> 
> Robin, it looks like it would be the best solution that you add
> `platforms/compatibility-name.in` to you BSP
> and use its variable in RAUC_COMPATIBLE.

Agreed. This is probably best for my situation in which I want something
different than PTXCONF_PLATFORM. I see that it's not something we need to
'fix' upstream.

Than we'll leave it at this. Thanks you all for sharing your thoughts.

Robin


> 
> Regards, Denis
> 
>> 
>>  - Roland
>> 
>> 
>> >  endif
>> > diff --git a/rules/image-rauc.make b/rules/image-rauc.make
>> > index fe1b0e89b..1fd810f71 100644
>> > --- a/rules/image-rauc.make
>> > +++ b/rules/image-rauc.make
>> > @@ -28,8 +28,8 @@ ifdef PTXCONF_IMAGE_RAUC
>> >
>> >  IMAGE_RAUC_ENV= \
>> >  $(CODE_SIGNING_ENV) \
>> > -RAUC_BUNDLE_COMPATIBLE="$(call remove_quotes,$(PTXCONF_RAUC_COMPATIBLE))" \
>> > -RAUC_BUNDLE_VERSION="$(call remove_quotes, $(PTXCONF_RAUC_BUNDLE_VERSION))" \
>> > +RAUC_BUNDLE_COMPATIBLE="$(call remove_quotes,$(PTXCONF_IMAGE_RAUC_COMPATIBLE))" \
>> > +RAUC_BUNDLE_VERSION="$(call remove_quotes, $(PTXCONF_IMAGE_RAUC_BUNDLE_VERSION))" \
>> >  RAUC_BUNDLE_BUILD=$(call ptx/sh, date +%FT%T%z) \
>> >  RAUC_BUNDLE_DESCRIPTION=$(PTXCONF_IMAGE_RAUC_DESCRIPTION) \
>> >  RAUC_KEY="$(shell cs_get_uri update)" \
>> >
>> > Upstream and in your configuration:
>> >
>> > PTXCONF_RAUC_COMPATIBLE="${PTXCONF_IMAGE_RAUC_COMPATIBLE}"
>> >
>> > and in your platformconfigs:
>> >
>> > PTXCONF_IMAGE_RAUC_COMPATIBLE="what ever you want"
>> >
>> > This change would be transparent for all existing use-cases and give additional flexibility.
>> >
>> > Regards, Denis
>> >
>> >
>> > Am Montag, den 23.08.2021, 08:54 +0200 schrieb Robin van der Gracht:
>> > > Hi Dennis,
>> > >
>> > > On 2021-08-23 06:27, Denis Osterland-Heim wrote:
>> > > > Hi Robin,
>> > > >
>> > > > You may simply add the platform name to the compatibility string.
>> > > >
>> > > > PTXCONF_RAUC_COMPATIBLE="${PTXCONF_PROJECT_VENDOR} ${PTXCONF_PROJECT}
>> > > > ${PTXCONF_PLATFORM}"
>> > >
>> > > Thank you for your reply.
>> > >
>> > > I've been doing so for some time now. But recently I had to rename my
>> > > platforms but I'd like to keep the compatible string the same. That is when
>> > > I starded questioning the location.
>> > >
>> > > Kind regards,
>> > > Robin van der Gracht
>> >
>> > Diehl Connectivity Solutions GmbH
>> > Geschäftsführung: Horst Leonberger
>> > Sitz der Gesellschaft: Nürnberg - Registergericht: Amtsgericht
>> > Nürnberg: HRB 32315
>> >
>> > ________________________________
>> >
>> > Der Inhalt der vorstehenden E-Mail ist nicht rechtlich bindend. Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen.
>> > Informieren Sie uns bitte, wenn Sie diese E-Mail faelschlicherweise erhalten haben. Bitte loeschen Sie in diesem Fall die Nachricht.
>> > Jede unerlaubte Form der Reproduktion, Bekanntgabe, Aenderung, Verteilung und/oder Publikation dieser E-Mail ist strengstens untersagt.
>> >
>> > - Informationen zum Datenschutz, insbesondere zu Ihren Rechten, erhalten Sie unter:
>> >
>> > https://www.diehl.com/group/de/transparenz-und-informationspflichten/
>> >
>> > The contents of the above mentioned e-mail is not legally binding. This e-mail contains confidential and/or legally protected information. Please inform us if you have received this e-mail by
>> > mistake and delete it in such a case. Each unauthorized reproduction, disclosure, alteration, distribution and/or publication of this e-mail is strictly prohibited.
>> >
>> > - For general information on data protection and your respective rights please visit:
>> >
>> > https://www.diehl.com/group/en/transparency-and-information-obligations/
>> >
>> >
>> > _______________________________________________
>> > ptxdist mailing list
>> > ptxdist@pengutronix.de
>> > To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
>> 
>> 
> Diehl Connectivity Solutions GmbH
> Geschäftsführung: Horst Leonberger
> Sitz der Gesellschaft: Nürnberg - Registergericht: Amtsgericht
> Nürnberg: HRB 32315
> 
> ________________________________
> 
> Der Inhalt der vorstehenden E-Mail ist nicht rechtlich bindend. Diese E-Mail
> enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen.
> Informieren Sie uns bitte, wenn Sie diese E-Mail faelschlicherweise erhalten
> haben. Bitte loeschen Sie in diesem Fall die Nachricht.
> Jede unerlaubte Form der Reproduktion, Bekanntgabe, Aenderung, Verteilung
> und/oder Publikation dieser E-Mail ist strengstens untersagt.
> 
> - Informationen zum Datenschutz, insbesondere zu Ihren Rechten, erhalten Sie 
> unter:
> 
> https://www.diehl.com/group/de/transparenz-und-informationspflichten/
> 
> The contents of the above mentioned e-mail is not legally binding. This
> e-mail contains confidential and/or legally protected information. Please
> inform us if you have received this e-mail by
> mistake and delete it in such a case. Each unauthorized reproduction,
> disclosure, alteration, distribution and/or publication of this e-mail is
> strictly prohibited.
> 
> - For general information on data protection and your respective rights 
> please visit:
> 
> https://www.diehl.com/group/en/transparency-and-information-obligations/

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

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

* Re: [ptxdist] PTXCONF_RAUC_COMPATIBLE location
  2021-08-24  6:44             ` Denis Osterland-Heim
  2021-08-24  7:39               ` Robin van der Gracht
@ 2021-08-24 13:03               ` rhi
  2021-09-03 14:36                 ` Michael Olbrich
  1 sibling, 1 reply; 11+ messages in thread
From: rhi @ 2021-08-24 13:03 UTC (permalink / raw)
  To: Denis Osterland-Heim; +Cc: robin, ptxdist

On Tue, Aug 24, 2021 at 06:44:55AM +0000, Denis Osterland-Heim wrote:
> Hi Roland,
> 
> Am Montag, den 23.08.2021, 11:13 +0200 schrieb Roland Hieber:
> > On Mon, Aug 23, 2021 at 07:41:24AM +0000, Denis Osterland-Heim wrote:
> > > Hi Robin,
> > >
> > > I see. It is not perfect, that image-rauc uses the variables from rauc silently.
> >
> > … and IMAGE_RAUC cannot depend on RAUC because one is in the
> > platformconfig menu and one is in the ptxconfig menu. But it will work
> > this way nevertheless because at the time that IMAGE_RAUC_ENV is
> > assigned in rules/image-rauc.make, the kconfig variables from both menus
> > are already available in make.
> >
> > > I would suggest:
> > >
> > > diff --git a/platforms/image-rauc.in b/platforms/image-rauc.in
> > > index 1f9427b40..bfbe4a18a 100644
> > > --- a/platforms/image-rauc.in
> > > +++ b/platforms/image-rauc.in
> > > @@ -26,4 +26,26 @@ config IMAGE_RAUC_DESCRIPTION
> > >  help
> > >    Optional description that will be placed in the Bundles metadata.
> > >
> > > +config IMAGE_RAUC_COMPATIBLE
> > > +string
> > > +prompt "RAUC Bundle Compatible"
> > > +default "${PTXCONF_RAUC_COMPATIBLE}"
> > > +help
> > > +  An explicit identification string that RAUC uses to assure an update
> > > +  bundle matches with the correct root filesystem on the target.
> > > +  .
> > > +  Only if the compatible in the targets RAUC system.conf file and those
> > > +  in the Bundle's manifest match exactly, an update will be performed.
> > > +  .
> > > +  This must match the client configuration.
> > > +
> > > +config IMAGE_RAUC_BUNDLE_VERSION
> > > +string
> > > +prompt "RAUC Bundle Version"
> > > +default "${PTXDIST_RAUC_BUNDLE_VERSION}"
> > > +help
> > > +  Overwrite the bundle version if needed.
> > > +  .
> > > +  This must match the client configuration.
> > > +
> >
> > This has the disadvantage that the menu item is duplicated, and we
> > cannot make sure the values entered in the ptxconfig menu are the same
> > as in the platformconfig menu. So I'd rather leave it like it is now.
> > The image build will fail anyways with "Failed to create bundle:
> > Missing value for key 'compatible'" if RAUC is disabled. So maybe add a
> > short snippet in the image-rauc help text that rauc must be
> > enabled?
> Would be welcome.
> 
> So if the flexibility to define the compatibility string in menu- or platformconfig is not welcome,
> we are back at the discussion, if compatibility string should resident in menu- or platformconfig.

Ah yes, I lost track of the original question…

> I believe that there are more applications that use multiple different images on one platform.
> This would give a tendency to menuconfig, but with variables it does not matter where it is technically.
> Robins core problem seems to be, that there is no place where he can store the compatibility platform name (the old one).

Hmm yes, these could both be valid use cases.

Yesterday I noticed that when you define the same variable in menuconfig
and platformconfig, the value from the platform gets priority. I don't
know if that is by design, but if it is, maybe we could do something
like this (and RAUC_BUNDLE_VERSION should be in platforms/image-rauc.in in any
case):

diff --git a/platforms/image-rauc.in b/platforms/image-rauc.in
index 1f9427b40f42..4b194b6fa287 100644
--- a/platforms/image-rauc.in
+++ b/platforms/image-rauc.in
@@ -19,6 +19,14 @@ menuconfig IMAGE_RAUC
 
 if IMAGE_RAUC
 
+config IMAGE_RAUC_OVERRIDE_PTXCONFIG
+       bool
+       prompt "override compatible from ptxconfig"
+
+if IMAGE_RAUC_OVERRIDE_PTXCONFIG
+source "platforms/rauc-compatible.in"
+endif
+
 config IMAGE_RAUC_DESCRIPTION
        prompt "RAUC Bundle Description"
        string
diff --git a/platforms/rauc-compatible.in b/platforms/rauc-compatible.in
new file mode 100644
index 000000000000..01fde16c35d5
--- /dev/null
+++ b/platforms/rauc-compatible.in
@@ -0,0 +1,10 @@
+config RAUC_COMPATIBLE
+       string
+       prompt "RAUC Compatible"
+       default "${PTXCONF_PROJECT_VENDOR}\ ${PTXCONF_PROJECT}"
+       help
+         An explicit identification string that RAUC uses to assure an update
+         bundle matches with the correct root filesystem on the target.
+
+         Only if the compatible in the targets RAUC system.conf file and those
+         in the Bundle's manifest match exactly, an update will be performed
diff --git a/rules/rauc.in b/rules/rauc.in
index 744bc95d9d6d..6d0e224b181b 100644
--- a/rules/rauc.in
+++ b/rules/rauc.in
@@ -63,16 +63,7 @@ config RAUC_CONFIGURATION
 
 if RAUC_CONFIGURATION
 
-config RAUC_COMPATIBLE
-       string
-       prompt "RAUC Compatible"
-       default "${PTXCONF_PROJECT_VENDOR}\ ${PTXCONF_PROJECT}"
-       help
-         An explicit identification string that RAUC uses to assure an update
-         bundle matches with the correct root filesystem on the target.
-
-         Only if the compatible in the targets RAUC system.conf file and those
-         in the Bundle's manifest match exactly, an update will be performed
+source "platforms/rauc-compatible.in"
 
 config RAUC_BUNDLE_VERSION
        string


-- 
Roland Hieber, Pengutronix e.K.          | r.hieber@pengutronix.de     |
Steuerwalder Str. 21                     | https://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
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

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

* Re: [ptxdist] PTXCONF_RAUC_COMPATIBLE location
  2021-08-24 13:03               ` rhi
@ 2021-09-03 14:36                 ` Michael Olbrich
  0 siblings, 0 replies; 11+ messages in thread
From: Michael Olbrich @ 2021-09-03 14:36 UTC (permalink / raw)
  To: rhi; +Cc: Denis Osterland-Heim, ptxdist, robin

On Tue, Aug 24, 2021 at 03:03:04PM +0200, rhi@pengutronix.de wrote:
> On Tue, Aug 24, 2021 at 06:44:55AM +0000, Denis Osterland-Heim wrote:
> > Hi Roland,
> > 
> > Am Montag, den 23.08.2021, 11:13 +0200 schrieb Roland Hieber:
> > > On Mon, Aug 23, 2021 at 07:41:24AM +0000, Denis Osterland-Heim wrote:
> > > > Hi Robin,
> > > >
> > > > I see. It is not perfect, that image-rauc uses the variables from rauc silently.
> > >
> > > … and IMAGE_RAUC cannot depend on RAUC because one is in the
> > > platformconfig menu and one is in the ptxconfig menu. But it will work
> > > this way nevertheless because at the time that IMAGE_RAUC_ENV is
> > > assigned in rules/image-rauc.make, the kconfig variables from both menus
> > > are already available in make.
> > >
> > > > I would suggest:
> > > >
> > > > diff --git a/platforms/image-rauc.in b/platforms/image-rauc.in
> > > > index 1f9427b40..bfbe4a18a 100644
> > > > --- a/platforms/image-rauc.in
> > > > +++ b/platforms/image-rauc.in
> > > > @@ -26,4 +26,26 @@ config IMAGE_RAUC_DESCRIPTION
> > > >  help
> > > >    Optional description that will be placed in the Bundles metadata.
> > > >
> > > > +config IMAGE_RAUC_COMPATIBLE
> > > > +string
> > > > +prompt "RAUC Bundle Compatible"
> > > > +default "${PTXCONF_RAUC_COMPATIBLE}"
> > > > +help
> > > > +  An explicit identification string that RAUC uses to assure an update
> > > > +  bundle matches with the correct root filesystem on the target.
> > > > +  .
> > > > +  Only if the compatible in the targets RAUC system.conf file and those
> > > > +  in the Bundle's manifest match exactly, an update will be performed.
> > > > +  .
> > > > +  This must match the client configuration.
> > > > +
> > > > +config IMAGE_RAUC_BUNDLE_VERSION
> > > > +string
> > > > +prompt "RAUC Bundle Version"
> > > > +default "${PTXDIST_RAUC_BUNDLE_VERSION}"
> > > > +help
> > > > +  Overwrite the bundle version if needed.
> > > > +  .
> > > > +  This must match the client configuration.
> > > > +
> > >
> > > This has the disadvantage that the menu item is duplicated, and we
> > > cannot make sure the values entered in the ptxconfig menu are the same
> > > as in the platformconfig menu. So I'd rather leave it like it is now.
> > > The image build will fail anyways with "Failed to create bundle:
> > > Missing value for key 'compatible'" if RAUC is disabled. So maybe add a
> > > short snippet in the image-rauc help text that rauc must be
> > > enabled?
> > Would be welcome.
> > 
> > So if the flexibility to define the compatibility string in menu- or platformconfig is not welcome,
> > we are back at the discussion, if compatibility string should resident in menu- or platformconfig.
> 
> Ah yes, I lost track of the original question…
> 
> > I believe that there are more applications that use multiple different images on one platform.
> > This would give a tendency to menuconfig, but with variables it does not matter where it is technically.
> > Robins core problem seems to be, that there is no place where he can store the compatibility platform name (the old one).
> 
> Hmm yes, these could both be valid use cases.
> 
> Yesterday I noticed that when you define the same variable in menuconfig
> and platformconfig, the value from the platform gets priority. I don't
> know if that is by design, but if it is, maybe we could do something
> like this (and RAUC_BUNDLE_VERSION should be in platforms/image-rauc.in in any
> case):

RAUC_COMPATIBLE is a string. It can contain other variables. So you could
set it like this:

PTXCONF_RAUC_COMPATIBLE="${PTXCONF_MY_COMPATIBLE}"

and add

config MY_COMPATIBLE
	string
	...

Somewhere to in the platformconfig. No need to overwrite any existing
rules.

> 
> diff --git a/platforms/image-rauc.in b/platforms/image-rauc.in
> index 1f9427b40f42..4b194b6fa287 100644
> --- a/platforms/image-rauc.in
> +++ b/platforms/image-rauc.in
> @@ -19,6 +19,14 @@ menuconfig IMAGE_RAUC
>  
>  if IMAGE_RAUC
>  
> +config IMAGE_RAUC_OVERRIDE_PTXCONFIG
> +       bool
> +       prompt "override compatible from ptxconfig"
> +
> +if IMAGE_RAUC_OVERRIDE_PTXCONFIG
> +source "platforms/rauc-compatible.in"
> +endif
> +
>  config IMAGE_RAUC_DESCRIPTION
>         prompt "RAUC Bundle Description"
>         string
> diff --git a/platforms/rauc-compatible.in b/platforms/rauc-compatible.in
> new file mode 100644
> index 000000000000..01fde16c35d5
> --- /dev/null
> +++ b/platforms/rauc-compatible.in
> @@ -0,0 +1,10 @@
> +config RAUC_COMPATIBLE
> +       string
> +       prompt "RAUC Compatible"
> +       default "${PTXCONF_PROJECT_VENDOR}\ ${PTXCONF_PROJECT}"
> +       help
> +         An explicit identification string that RAUC uses to assure an update
> +         bundle matches with the correct root filesystem on the target.
> +
> +         Only if the compatible in the targets RAUC system.conf file and those
> +         in the Bundle's manifest match exactly, an update will be performed
> diff --git a/rules/rauc.in b/rules/rauc.in
> index 744bc95d9d6d..6d0e224b181b 100644
> --- a/rules/rauc.in
> +++ b/rules/rauc.in
> @@ -63,16 +63,7 @@ config RAUC_CONFIGURATION
>  
>  if RAUC_CONFIGURATION
>  
> -config RAUC_COMPATIBLE
> -       string
> -       prompt "RAUC Compatible"
> -       default "${PTXCONF_PROJECT_VENDOR}\ ${PTXCONF_PROJECT}"
> -       help
> -         An explicit identification string that RAUC uses to assure an update
> -         bundle matches with the correct root filesystem on the target.
> -
> -         Only if the compatible in the targets RAUC system.conf file and those
> -         in the Bundle's manifest match exactly, an update will be performed
> +source "platforms/rauc-compatible.in"

Now we have two versions of the same variable with possibly different
values. Not a good idea. And I'm not certain if ptx- and platformconfig are
always evaluated in the same order.

Michael

>  
>  config RAUC_BUNDLE_VERSION
>         string
> 
> 
> -- 
> Roland Hieber, Pengutronix e.K.          | r.hieber@pengutronix.de     |
> Steuerwalder Str. 21                     | https://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
> To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

-- 
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
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

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

end of thread, other threads:[~2021-09-03 14:36 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-18 13:17 [ptxdist] PTXCONF_RAUC_COMPATIBLE location Robin van der Gracht
2021-08-18 13:52 ` Bastian Krause
2021-08-18 14:16   ` Robin van der Gracht
2021-08-23  4:27     ` Denis Osterland-Heim
2021-08-23  6:54       ` Robin van der Gracht
2021-08-23  7:41         ` Denis Osterland-Heim
2021-08-23  9:13           ` Roland Hieber
2021-08-24  6:44             ` Denis Osterland-Heim
2021-08-24  7:39               ` Robin van der Gracht
2021-08-24 13:03               ` rhi
2021-09-03 14:36                 ` Michael Olbrich

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