Message ID | 20221110124503.274124-6-Quirin.Gylstorff@siemens.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | SWUpdate abort on installing indentical image | expand |
On 10.11.22 13:45, Quirin Gylstorff wrote: > From: Quirin Gylstorff <quirin.gylstorff@siemens.com> > > Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com> > --- > recipes-core/images/files/sw-description.tmpl | 1 + > recipes-core/images/swupdate.inc | 5 ++++- > 2 files changed, 5 insertions(+), 1 deletion(-) > > diff --git a/recipes-core/images/files/sw-description.tmpl b/recipes-core/images/files/sw-description.tmpl > index 1c0db02..a9a6069 100644 > --- a/recipes-core/images/files/sw-description.tmpl > +++ b/recipes-core/images/files/sw-description.tmpl > @@ -20,6 +20,7 @@ software = > filesystem = "ext4"; > properties: { > subtype = "image"; > + uuidcheck = "${TARGET_IMAGE_UUID}"; > }; > sha256 = "${ROOTFS_PARTITION_NAME}-sha256"; > }); > diff --git a/recipes-core/images/swupdate.inc b/recipes-core/images/swupdate.inc > index 6cf9bb1..0ba3a0e 100644 > --- a/recipes-core/images/swupdate.inc > +++ b/recipes-core/images/swupdate.inc > @@ -23,6 +23,9 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/files:" > SRC_URI += "file://sw-description.tmpl" > TEMPLATE_FILES += "sw-description.tmpl" > > -TEMPLATE_VARS += "ROOTFS_PARTITION_NAME" > +do_transform_template[vardeps] += "TARGET_IMAGE_UUID" This continues my question on patch 4: Does that work as one would expect, ie. TARGET_IMAGE_UUID is executed again, right before do_transform_template is supposed to be run (or skipped)? Jan > +addtask do_transform_template before do_swupdate_binary after do_generate_image_uuid > + > +TEMPLATE_VARS += "ROOTFS_PARTITION_NAME TARGET_IMAGE_UUID" > > SWU_ADDITIONAL_FILES += "linux.efi ${ROOTFS_PARTITION_NAME}"
On 11/10/22 14:58, Jan Kiszka wrote: > On 10.11.22 13:45, Quirin Gylstorff wrote: >> From: Quirin Gylstorff <quirin.gylstorff@siemens.com> >> >> Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com> >> --- >> recipes-core/images/files/sw-description.tmpl | 1 + >> recipes-core/images/swupdate.inc | 5 ++++- >> 2 files changed, 5 insertions(+), 1 deletion(-) >> >> diff --git a/recipes-core/images/files/sw-description.tmpl b/recipes-core/images/files/sw-description.tmpl >> index 1c0db02..a9a6069 100644 >> --- a/recipes-core/images/files/sw-description.tmpl >> +++ b/recipes-core/images/files/sw-description.tmpl >> @@ -20,6 +20,7 @@ software = >> filesystem = "ext4"; >> properties: { >> subtype = "image"; >> + uuidcheck = "${TARGET_IMAGE_UUID}"; >> }; >> sha256 = "${ROOTFS_PARTITION_NAME}-sha256"; >> }); >> diff --git a/recipes-core/images/swupdate.inc b/recipes-core/images/swupdate.inc >> index 6cf9bb1..0ba3a0e 100644 >> --- a/recipes-core/images/swupdate.inc >> +++ b/recipes-core/images/swupdate.inc >> @@ -23,6 +23,9 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/files:" >> SRC_URI += "file://sw-description.tmpl" >> TEMPLATE_FILES += "sw-description.tmpl" >> >> -TEMPLATE_VARS += "ROOTFS_PARTITION_NAME" >> +do_transform_template[vardeps] += "TARGET_IMAGE_UUID" > > This continues my question on patch 4: Does that work as one would > expect, ie. TARGET_IMAGE_UUID is executed again, right before > do_transform_template is supposed to be run (or skipped)? The TARGET_IMAGE_UUID is executed right before do_transform_template. Quirin > > Jan > >> +addtask do_transform_template before do_swupdate_binary after do_generate_image_uuid >> + >> +TEMPLATE_VARS += "ROOTFS_PARTITION_NAME TARGET_IMAGE_UUID" >> >> SWU_ADDITIONAL_FILES += "linux.efi ${ROOTFS_PARTITION_NAME}" >
diff --git a/recipes-core/images/files/sw-description.tmpl b/recipes-core/images/files/sw-description.tmpl index 1c0db02..a9a6069 100644 --- a/recipes-core/images/files/sw-description.tmpl +++ b/recipes-core/images/files/sw-description.tmpl @@ -20,6 +20,7 @@ software = filesystem = "ext4"; properties: { subtype = "image"; + uuidcheck = "${TARGET_IMAGE_UUID}"; }; sha256 = "${ROOTFS_PARTITION_NAME}-sha256"; }); diff --git a/recipes-core/images/swupdate.inc b/recipes-core/images/swupdate.inc index 6cf9bb1..0ba3a0e 100644 --- a/recipes-core/images/swupdate.inc +++ b/recipes-core/images/swupdate.inc @@ -23,6 +23,9 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/files:" SRC_URI += "file://sw-description.tmpl" TEMPLATE_FILES += "sw-description.tmpl" -TEMPLATE_VARS += "ROOTFS_PARTITION_NAME" +do_transform_template[vardeps] += "TARGET_IMAGE_UUID" +addtask do_transform_template before do_swupdate_binary after do_generate_image_uuid + +TEMPLATE_VARS += "ROOTFS_PARTITION_NAME TARGET_IMAGE_UUID" SWU_ADDITIONAL_FILES += "linux.efi ${ROOTFS_PARTITION_NAME}"