SWUpdate : swupdate not changing the rootfs while update the software using Web server

910 views
Skip to first unread message

Radiya Dhaval

unread,
Jan 5, 2018, 6:56:30 AM1/5/18
to swup...@googlegroups.com

Hi,

I have integrated meta-swupdate Yocto layer to my Yocto Pyro branch for BeagleBone Black board and trying to updated the Rootfs using swupdate utility using Web server.  I have loaded my .swu image as per link "https://sbabic.github.io/swupdate/swupdate.html" but after successful software update, the rootfs had not change and remains the same. 

Please find below Status Messages from Web server : 

Waiting for requests...

[network_initializer] : Main thread sleep again !

SWUPDATE successful !

[install_single_image] : Found installer for stream swupdate-image-beaglebone.ext3.gz.u-boot raw

Installation in progress

[network_initializer] : Valid image found: copying to FLASH

[extract_files] : Found file: filename swupdate-image-beaglebone.ext3.gz.u-boot size 12293557 required

[parse_images] : Found Image : swupdate-image-beaglebone.ext3.gz.u-boot in device : /dev/mmcblk1p3 for handler raw

[extract_file_to_tmp] : Found file: filename sw-description size 202

Software Update started !

File information: core-image-full-cmdline-beaglebone-20180105113846.swu size:12294656 bytes

Logs from the serial console : 

X_FILENAME: core-image-full-cmdline-beaglebone-20180105113846.swu length: 12294656
[NOTIFY] : SWUPDATE running :  [network_thread] : Incoming network request: processing...
[NOTIFY] : SWUPDATE started :  Software Update started !
[NOTIFY] : SWUPDATE running :  [extract_file_to_tmp] : Found file:
        filename sw-description
        size 202
Version 0.0.0
[NOTIFY] : SWUPDATE running :  [parse_images] : Found Image  : swupdate-image-beaglebone.ext3.gz.u-boot in device : /dev/mmcblk1p3 for handler raw 

[NOTIFY] : SWUPDATE running :  [extract_files] : Found file:
        filename swupdate-image-beaglebone.ext3.gz.u-boot
        size 12293557 required
[NOTIFY] : SWUPDATE running :  [network_initializer] : Valid image found: copying to FLASH
Warning: Bad CRC, using default environment
[NOTIFY] : SWUPDATE running :  Installation in progress
[NOTIFY] : SWUPDATE running :  [install_single_image] : Found installer for stream swupdate-image-beaglebone.ext3.gz.u-boot raw
[NOTIFY] : SWUPDATE successful ! SWUPDATE successful !
[NOTIFY] : SWUPDATE running :  [network_initializer] : Main thread sleep again !
[NOTIFY] : No SWUPDATE running :  Waiting for requests...
Main loop Daemon

So, any suggestion or change to replace rootfs using swupdate utility.

Stefano Babic

unread,
Jan 5, 2018, 11:09:16 AM1/5/18
to Radiya Dhaval, swup...@googlegroups.com
Hi Radiya,

On 05/01/2018 12:56, Radiya Dhaval wrote:
> Hi,
>
> I have integrated meta-swupdate Yocto layer to my Yocto Pyro branch for
> BeagleBone Black board and trying to updated the Rootfs using swupdate
> utility using Web server.  I have loaded my .swu image as per link
> "https://sbabic.github.io/swupdate/swupdate.html" but after successful

Have you used meta-swupdate-boards ?

> software update, the rootfs had not change and remains the same. 
>
> Please find below Status Messages from Web server : 
>
> Waiting for requests...
>
> [network_initializer] : Main thread sleep again !
>
> SWUPDATE successful !
>
> [install_single_image] : Found installer for stream
> swupdate-image-beaglebone.ext3.gz.u-boot raw
>
> Installation in progress
>
> [network_initializer] : Valid image found: copying to FLASH
>
> [extract_files] : Found file: filename
> swupdate-image-beaglebone.ext3.gz.u-boot size 12293557 required
>
> [parse_images] : Found Image : swupdate-image-beaglebone.ext3.gz.u-boot
> in device : /dev/mmcblk1p3 for handler raw
>
> [extract_file_to_tmp] : Found file: filename sw-description size 202
>
> Software Update started !
>
> File
> information: *core-image-full-cmdline-beaglebone-20180105113846.swu* size:*12294656* bytes
SWUpdate has installed everything with success - you should then decide
how the system reboots. Example of switching rootfs for beaglebone is
done in meta-swupdate-boards.

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
=====================================================================

Radiya Dhaval

unread,
Jan 6, 2018, 4:26:20 AM1/6/18
to Stefano Babic, swup...@googlegroups.com

Hi,

Yes, I am also tried with meta-swupdate-boards with Yocto but the rootfs not changed in this case also. Please find the attached logs of Webserver Status messages ans Serial Console.

NOTE : I am first flash my actual rootfs to the sd-card and start the beaglebone. Then I have create partition of on board EMMC using one script (5 partitions : p1 to p5 ) and dump the sd-card partitions (p1-boot, p2-rootfs) into EMMC.

When I performed the Software upgrade, the utility uses the EMMC partition /dev/mmcblk1p3 as described in sw-desription file which is correct but not flash the image in to the partition because I saw this partition as empty (i.e. when I trying to mount the partition, it gives error).

Any suggestions ?

Serial_Console.txt
Webserver_Status_messages.txt

Stefano Babic

unread,
Jan 6, 2018, 5:31:42 AM1/6/18
to Radiya Dhaval, Stefano Babic, swup...@googlegroups.com
Hi Radiya,

On 06/01/2018 10:26, Radiya Dhaval wrote:
> Hi,
>
> Yes, I am also tried with meta-swupdate-boards with Yocto but the rootfs
> not changed in this case also.

Because you are not using meta-swupdate-boards recipes, as I can see
from LOG.

> Please find the attached logs of
> Webserver Status messages ans Serial Console.
>
> NOTE : I am first flash my actual rootfs to the sd-card and start the
> beaglebone. Then I have create partition of on board EMMC using one
> script (5 partitions : p1 to p5 ) and dump the sd-card partitions
> (p1-boot, p2-rootfs) into EMMC.
>
> When I performed the Software upgrade, the utility uses the EMMC
> partition /dev/mmcblk1p3 as described in sw-desription file which is
> correct

Your description in sw-description is surely buggy - see in the log. Try
as done in meta-swupdate-boards or fix your sw-description.


> but not flash the image in to the partition because I saw this
> partition as empty

The LOG is telling you that image is not flashed at all.

[NOTIFY] : SWUPDATE running : [extract_files] : Found file:
filename swupdate-image-beaglebone.ext3.gz
size 31634357 Not required: skipping

It does what it was asked: image is skipped. Review your sw-description
file and check inside documentation in the chapter regarding sw-description-

Your sw-description is just saying to SWUpdate that it has nothing to
install - and it does don install anything.

Best regards,
Stefano Babic

>(i.e. when I trying to mount the partition, it gives
> error).
>
> Any suggestions ?
>
>
> On Jan 5, 2018 9:39 PM, "Stefano Babic" <sba...@denx.de
> sba...@denx.de <mailto:sba...@denx.de>
> =====================================================================
>
> --
> 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.

Radiya Dhaval

unread,
Jan 9, 2018, 3:38:47 AM1/9/18
to Stefano Babic, swup...@googlegroups.com
Hi Stefano,

I have used meta-swupdate-boards with my yocto environment with beaglebone black. 

As per the sw-description file, swupdate utility parse the file and update the u-boot environment and next time it will boot from upgrade copy (copy2) , device /dev/mmcblk1p3.

But when I reboot the BBB, it boots from the copy1 and at upgrade time swupdate utility not set the u-boot environment.

So, any change needed in the u-boot source code???

I am using u-boot 2017.01 version.

Thanks.


> To post to this group, send email to swup...@googlegroups.com

Stefano Babic

unread,
Jan 9, 2018, 5:20:16 AM1/9/18
to Radiya Dhaval, Stefano Babic, swup...@googlegroups.com
Hi Radiya,

On 09/01/2018 09:38, Radiya Dhaval wrote:
> Hi Stefano,
>
> I have used meta-swupdate-boards with my yocto environment with
> beaglebone black. 
>
> As per the sw-description file, swupdate utility parse the file and
> update the u-boot environment and next time it will boot from upgrade
> copy (copy2) , device /dev/mmcblk1p3.
>
> But when I reboot the BBB, it boots from the copy1 and at upgrade time
> swupdate utility not set the u-boot environment.
>

This is a signe that user space and U-Boot are not updating the same
storage area. They must be synchonized, of course. U-Boot for beaglebone
can be set to store the environment on different storages and on
different offsets. In meta-swupdate-boards, they are using
/dev/mmcblkXboot. Be sure that setup is consistent between U-Boot and
Yocto (you have a fw_env.config). You can test it installing
u-boot-fw-utils in your image. If you can set a variabel with fw_setenv
and the variable shows up in u-boot with "printenv", your setup is correct.

Best regards,
Stefano Babic


> So, any change needed in the u-boot source code???
>
> I am using u-boot 2017.01 version.
>
> Thanks.
>
> On 06-Jan-2018 4:01 PM, "Stefano Babic" <sba...@denx.de
> >     sba...@denx.de <mailto:sba...@denx.de> <mailto:sba...@denx.de
> <mailto:sba...@denx.de>>
> >   
>  =====================================================================
> >
> > --
> > 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%2Bunsu...@googlegroups.com>
> > <mailto:swupdate+u...@googlegroups.com
> <mailto:swupdate%2Bunsu...@googlegroups.com>>.
> > To post to this group, send email to swup...@googlegroups.com
> <mailto:swup...@googlegroups.com>
> > <mailto:swup...@googlegroups.com <mailto:swup...@googlegroups.com>>.
> > For more options, visit https://groups.google.com/d/optout
> <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 <mailto:sba...@denx.de>
> =====================================================================
>
> --
> 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>.

Radiya Dhaval

unread,
Jan 9, 2018, 7:34:40 AM1/9/18
to Stefano Babic, swup...@googlegroups.com
Hi Stefano,

I have already installed u-boot-fw-utils in the actual image and upgrade image. Also, the file /etc/fw_env.config has /dev/mmcblk1boot1 as a device as you described.

But when firmware upgrade happened and I reboot the device, it boots with same image, not the upgrade image.

When I manually set the bootargs available in sw-description file with tag "value" , it boots from upgrade image.

So, please suggest what change should be appropriate to synchronise boot device?




>     > To post to this group, send email to swup...@googlegroups.com
>     <mailto:swupdate@googlegroups.com>
>     > <mailto:swupdate@googlegroups.com <mailto:swupdate@googlegroups.com>>.

>     > For more options, visit https://groups.google.com/d/optout
>     <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 <mailto:sba...@denx.de>
>     =====================================================================
>
> --
> 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

> To post to this group, send email to swup...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages