Hi Sid-Ali,
On 29/03/2017 00:12, TEIR Sid-Ali wrote:
> Hi,
>
> I noticed that uboot environment variables are updated even if the image install has been skipped due to same installed version on the current active rootfs :
>
Yes, this is wanted. The install was not "skipped", it was "successful",
just it is noted that it is not necessary to reflash the storage. This
is mostly used in case of slow storage (NOR flashes) where erase/write
takes a very long time.
> I am using a derived version of this sw-description :
https://github.com/sbabic/swupdate/blob/master/examples/description/multi-copy
>
> example:
>
> - sw-description:
> software =
> {
> hardware-compatibility = [ "revA" ];
> stable:
> {
> alt:
> {
> images: (
> {
> filename = "rootfs.ext3";
> device = "/dev/mmcblk0p2";
> name = "rootfs";
> version = "0.1";
> install-if-different = true;
> }
> );
>
> uboot: (
> {
> name = "bootfs";
> value = "/dev/mmcblk0p2";
> }
> );
> };
> main:
> {
> [...] (same as above except with /dev/mmcblk0p1")
> };
> };
> }
>
> - /etc/sw-version:
> rootfs 0.1
>
> If I decide to install the update with " -e stable,alt", the rootfs image is skipped because the version is the same as /etc/sw-versions, however uboot environment variable "bootfs" is updated to /dev/mmcblk0p2 so I will have the system rebooting into the new rootfs partition even if no rootfs has been installed.
>
Yes - it is not important if it was written into /dev/mmcblk02. At the
end, the result is to have the required version installed into this
partition, and this is what you get. That means that the updater goes on
with next steps, and it calls the other handlers - in your case the
U-Boot handler.
Am I using the feature correctly ? or is this the correct behavior ?
You are using correctly and this is the correct behavior.
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone:
+49-8142-66989-53 Fax:
+49-8142-66989-80 Email:
sba...@denx.de
=====================================================================