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. | [email protected] |
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
[email protected]
To unsubscribe, send a mail with subject "unsubscribe" to
[email protected]