Hi Adrian,
On 13/04/2016 10:27, Adrian McGrath wrote:
> Hi Stefano
>
> I had a look through the posts and didn't see an answer to this question
> so please accept my apologies if this question has been asked before.
>
Ok, it is..
>
> I've got my double-copy swupdate system configured with 4x partitions
> {boot, rootfs, rootfs-bkup and userdata} and it appears to be working well.
>
> The "active" rootfs being used is /dev/mmcblk2p2. When I create my .swu
> file it uses the sw-description file as shown below. As you can see the
> sw-description file states that updates should be downloaded into the
> currently "inactive" partition (/dev/mmcblk2p3).
>
> So long as the system continues to boot from /dev/mmcblk2p2 any update
> will work as intended.
>
> However, should a fault occur on /dev/mmcblk2p2 and the user switches to
> the back-up rootfs on /dev/mmcblk2p3 this .swu file update will fail.
> This will mean that a new .swu file will need to be generated to
> download into /dev/mmcblk2p2. This behaviour is not desirable as I do
> not want to have to interrogate a users system before performing an
> update and potentially have to create another .swu image.
This is not possible and should never be done - the user does not need
to know where the software runs. Just the target knows.
>
> My question is, /is it possible to edit the sw-description file so that
> the .swu file will ///automatically /download to the inactive partition? /
You have not set swupdate for double-copy, you have just set 4 partitions.
You have to write sw-description for "Software collection" - see in
documentation. swupdate must contains description for *both* copies.
This means you have to describe how software is installed in both cases:
how software must be installed on /dev/mmcblk2p2 and how on /dev/mmcblk2p3.
The active copy is never detected by swupdate and should be passed as
command line parameters (See -e <sel> in documentation). You pass with
"-e" which copy must be installed, that is you pass the stand-by copy.
Checks also "multi-copy" in the examples directory.
Best regards,
Stefano Babic
>
> Many thanks
>
> Adrian
>
>
> _*File: sw-description*_
> software =
> {
> version = "1.9.102";
>
> hardware-compatibility: [ "1.0", "1.1" ];
>
> images: (
> {
> filename = "vblade-image-imx6qswan.ext3";
> device = "/dev/mmcblk2p3";
> type = "raw";
> installed-directly = true;
> }
> );
> }
>
> --
> You received this message because you are subscribed to the Google
> Groups "swupdate" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
swupdate+u...@googlegroups.com
> <mailto:
swupdate+u...@googlegroups.com>.
> To post to this group, send email to
swup...@googlegroups.com
> <mailto:
swup...@googlegroups.com>.
> For more options, visit
https://groups.google.com/d/optout.
--
=====================================================================
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
=====================================================================