SWUPDATE failed [0] ERROR : HW compatibility not found

4,307 views
Skip to first unread message

do...@horizonemb.com

unread,
Oct 25, 2018, 11:30:33 AM10/25/18
to swupdate
Hi There,
I'm experimenting with getting SWUpdate to work on a RaspberryPi Compute module 3 using yocto and a slightly updated version of meta-swupdate-boards.
However, when I try to use the swu file on the target I get errors, see below.
Any suggestions on how to debug and resolve this?
BR,
Donal

root@raspberrypi2:/media# swupdate -i ./usb_drive/update-image-raspberrypi2-20181025090549.swu
Swupdate v2018.3.0


Licensed under GPLv2. See source distribution for detailed copyright notices.


Registered handlers:
        archive
        tar
        raw
        rawfile
        lua
        shellscript
        preinstall
        postinstall
        remote
        uboot
        bootloader
[ERROR] : SWUPDATE failed [0] ERROR : HW compatibility not found


[ERROR] : SWUPDATE failed [0] ERROR : Found nothing to install


[ERROR] : SWUPDATE failed [0] ERROR : JSON File corrupted


[ERROR] : SWUPDATE failed [0] ERROR : no parser available to parse sw-description!


[ERROR] : SWUPDATE failed [0] ERROR : failed to parse sw-description!

Stefano Babic

unread,
Oct 25, 2018, 11:40:38 AM10/25/18
to do...@horizonemb.com, swupdate
Hi,

On 25/10/18 17:30, do...@horizonemb.com wrote:
> Hi There,
> I'm experimenting with getting SWUpdate to work on a RaspberryPi Compute
> module 3 using yocto and a slightly updated version of meta-swupdate-boards.
> However, when I try to use the swu file on the target I get errors, see
> below.
> Any suggestions on how to debug and resolve this?

I strongly suggest you run the example as in meta-swupdate-boards, and
then you go on doing all changes you plan to do. meta-swupdate-boards
has exactly the goal to show examples and to have a reference. If you
use it, it should work, and in fact you see:

> BR,
> Donal
>
> |
> root@raspberrypi2:/media# swupdate -i
> ./usb_drive/update-image-raspberrypi2-20181025090549.swu
> Swupdatev2018.3.0
>
>
> Licensedunder GPLv2.Seesource distribution fordetailed copyright notices.
>
>
> Registeredhandlers:
>         archive
>         tar
>         raw
>         rawfile
>         lua
>         shellscript
>         preinstall
>         postinstall
>         remote
>         uboot
>         bootloader
> [ERROR]:SWUPDATE failed [0]ERROR :HW compatibility notfound
>

The error tells you what happens: you put a Hw compatibility string in
sw-description that does not match with name / revision of the board.
In fact, if you see here:

https://github.com/sbabic/meta-swupdate-boards/blob/master/recipes-support/swupdate/swupdate/raspberrypi3/swupdate#L76

The example starts swupdate on a RPI3, telling SWUpdate that it runs on
rpi3 and rev1.0 (even if it does not really exists). You do not pass the
info to SWUpdate and it reports error.

>
> [ERROR]:SWUPDATE failed [0]ERROR :Foundnothing to install
>
>
> [ERROR]:SWUPDATE failed [0]ERROR :JSON Filecorrupted
>
>
> [ERROR]:SWUPDATE failed [0]ERROR :noparser available to parse
> sw-description!
>
>
> [ERROR]:SWUPDATE failed [0]ERROR :failed to parse sw-description!
> |
>
>
> The content of this e-mail, including any attachments it may contain, is
> intended only for the recipient(s) named above. It may contain
> information that is confidential, subject to copyright, or otherwise
> legally protected against disclosure. If you have received this e-mail
> in error please notify the author and delete it from your system

I notify the author, mail won't be deleted....


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

do...@horizonemb.com

unread,
Oct 25, 2018, 1:24:14 PM10/25/18
to swupdate
Hi Stefano,
Thank you for your help.

I think the documentation should be updated, as it suggests you can check the contents of swu file without specifying the hardware version: https://sbabic.github.io/swupdate/swupdate.html#building-a-single-image

I'm sure I've configured my new sw-description file correctly in the yocto build for the raspberrypi2 target:
exec $DAEMON -v -H raspberrypi2:1.0 ${selection} -f /etc/swupdate.cfg -u "$EXTRA_ARGS" -w "" &

Now that I'm specifying the target and version, I am getting further:

root@raspberrypi2:/media# swupdate  -i  ./usb_drive/update-image-raspberrypi2-20181025090549.swu -H raspberrypi2:1.0 -v
Swupdate v2018.3.0

Licensed under GPLv2. See source distribution for detailed copyright notices.

Running on raspberrypi2 Revision 1.0
Registered handlers:
        archive
        tar
        raw
        rawfile
        lua
        shellscript
        preinstall
        postinstall
        remote
        uboot
        bootloader
[TRACE] : SWUPDATE running :  [listener_create] : creating socket at /tmp/swupdateprog
[TRACE] : SWUPDATE running :  [network_initializer] : Main loop Daemon
[TRACE] : SWUPDATE running :  [listener_create] : creating socket at /tmp/sockinstctrl
[TRACE] : SWUPDATE running :  [extract_sw_description] : Found file:
        filename sw-description
        size 1166
        checksum 0xf494 VERIFIED
[TRACE] : SWUPDATE running :  [parse_cfg] : Version 0.1.0
[TRACE] : SWUPDATE running :  [parse_hw_compatibility] : Accepted Hw Revision : 1.0
[ERROR] : SWUPDATE failed [0] ERROR parser/parser.c : parser : 665 : Found nothing to install
[ERROR] : SWUPDATE failed [0] ERROR parser/parser.c : parse_json : 760 : JSON File corrupted
[ERROR] : SWUPDATE failed [0] ERROR core/parser.c : parse : 196 : no parser available to parse sw-description!
[ERROR] : SWUPDATE failed [0] ERROR core/swupdate.c : install_from_file : 307 : failed to parse sw-description!
root@raspberrypi2:/media# 

It's saying that there is nothing to install. The swu file I am trying to install with is from the same yocto build which I programmed the flash with. Will swupdate only update if there is a difference in the "version" field in the swu's sw-description file?

Thank you,
Donal
Message has been deleted

do...@horizonemb.com

unread,
Oct 26, 2018, 4:44:23 AM10/26/18
to swupdate
Hi Lakshmi,
I'm using the SWUpdate Yocto meta layers to add SWUpdate to the CM3 board.

I do not have any internet on the board yet.

The swupdate command is being installed properly on the board as part of the yocto build. When I boot the board I can see the swupdate service running.

BR,
Donal

On Friday, October 26, 2018 at 5:33:00 AM UTC+1, Darapuneni Lakshminaidu wrote:
Hi Stefano & Donal,

Sorry for the interrupting. I have some questions. Please clarify these

1.How did you install SWupdate on board?

2.Do you have Internet on your raspberrypi board  if yes then how did you enable network on board.

Because without installing SWupdate on board we can't run SWupdate command. My board is PHYTEC AM57xx. It does not have Internet.

Anyone Please clarify these doubts.

Thanks,
Lakshmi Naidu.

do...@horizonemb.com

unread,
Oct 26, 2018, 7:17:08 AM10/26/18
to swupdate
Hi There,
Still struggling with this.

Had a look through the source code and the error message "Found nothing to install" appears to suggest that there is no image/kerne/bootloader/scripts available in the swu file.

root@raspberrypi2:/media# swupdate  -i  ./update-image-raspberrypi2-20181025090549.swu -H raspberrypi2:1.0 -v


However, looking at the swu file, it has three components:
root@raspberrypi2:/media# cpio -itv <update-image-raspberrypi2-20181025090549.swu
-rw-r--r--   1 1000     1000         1166 Oct 25 09:07 sw-description
-rw-r--r--   1 1000     1000         1692 Oct 25 09:07 emmcsetup.lua
-rw-r--r--   1 1000     1000     27201911 Oct 25 09:07 core-image-full-cmdline-raspberrypi2.ext4.gz
53136 blocks


The following is my sw-description file:

root@raspberrypi2:/media# cat sw-description
software =
{
        version = "0.1.0";


        raspberrypi2 = {
                hardware-compatibility: [ "1.0"];
                stable : {
                        copy1 : {
                                images: (
                                        {
                                                filename = "core-image-full-cmdline-raspberrypi2.ext4.gz";
                                                type = "raw";
                                                compressed = true;
                                                device = "/
dev/mmcblk0p2";
                                        }
                                );
                                scripts: (
                                        {
                                                filename = "
emmcsetup.lua";
                                                type = "
lua";
                                        }
                                );
                                uboot: (
                                        {
                                                name = "
rpipart";
                                                value = "
2";
                                        }
                                );


                        };
                        copy2 : {
                                images: (
                                        {
                                                filename = "
core-image-full-cmdline-raspberrypi2.ext4.gz";
                                                type = "
raw";
                                                compressed = true;
                                                device = "
/dev/mmcblk0p3";
                                        }
                                );
                                scripts: (
                                        {
                                                filename = "
emmcsetup.lua";
                                                type = "
lua";
                                        }
                                );
                                uboot: (
                                        {
                                                name = "
rpipart";
                                                value = "
3";
                                        }
                                );
                        };
                };
        }
}

Could it be something to do with the partitions on my eMMC?
root@raspberrypi2:/media# ls -l /dev/mmcblk0*
brw
-rw---- 1 root disk 179,  0 Jan  1  1970 /dev/mmcblk0
brw
-rw---- 1 root disk 179, 32 Jan  1  1970 /dev/mmcblk0boot0
brw
-rw---- 1 root disk 179, 64 Jan  1  1970 /dev/mmcblk0boot1
brw
-rw---- 1 root disk 179,  1 Jan  1  1970 /dev/mmcblk0p1
brw
-rw---- 1 root disk 179,  2 Jan  1  1970 /dev/mmcblk0p2
brw
-rw---- 1 root disk 179, 96 Jan  1  1970 /dev/mmcblk0rpmb

I appear to be missing mmcblk0p3, would this be created by swupdate during the first firmware upgrade?

Cheers,
Donal

Stefano Babic

unread,
Oct 26, 2018, 7:22:15 AM10/26/18
to do...@horizonemb.com, swupdate
Hi Donal,

On 26/10/18 13:17, do...@horizonemb.com wrote:
> Hi There,
> Still struggling with this.
>
> Had a look through the source code and the error message "Found nothing
> to install" appears to suggest that there is no
> image/kerne/bootloader/scripts available in the swu file.
>
> |
> root@raspberrypi2:/media# swupdate  -i
>  ./update-image-raspberrypi2-20181025090549.swu-H raspberrypi2:1.0-v
> Swupdatev2018.3.0
>
> Licensedunder GPLv2.Seesource distribution fordetailed copyright notices.
>
> Runningon raspberrypi2 Revision1.0
> Registeredhandlers:
>         archive
>         tar
>         raw
>         rawfile
>         lua
>         shellscript
>         preinstall
>         postinstall
>         remote
>         uboot
>         bootloader
> [TRACE]:SWUPDATE running : [listener_create]:creating socket at
> /tmp/swupdateprog
> [TRACE]:SWUPDATE running : [network_initializer]:Mainloop Daemon
> [TRACE]:SWUPDATE running : [listener_create]:creating socket at
> /tmp/sockinstctrl
> [TRACE]:SWUPDATE running : [extract_sw_description]:Foundfile:
>         filename sw-description
>         size 1166
>         checksum 0xf494VERIFIED
>
>
> [TRACE]:SWUPDATE running : [parse_cfg]:Version0.1.0
> [TRACE]:SWUPDATE running : [parse_hw_compatibility]:AcceptedHwRevision:1.0
> [ERROR]:SWUPDATE failed [0]ERROR parser/parser.c :parser
> :665:Foundnothing to install
No, it looks you are not looking at the examples how it should be done.

https://github.com/sbabic/meta-swupdate-boards/blob/master/recipes-support/swupdate/swupdate/raspberrypi3/swupdate#L76

If you have multiple selections in sw-description and you have a
dual-copy approach, you have to inform SWUpdate which is the
standby-copy where it mus install.

If you are running on /dev/mmcblk0p2:

swupdate -e stable, copy2 -i
./update-image-raspberrypi2-20181025090549.swu -H raspberrypi2:1.0 -v

do...@horizonemb.com

unread,
Oct 26, 2018, 7:43:55 AM10/26/18
to swupdate
Hi Stefano,
That worked, thank you for your help!

I could share the changes to add support for the raspberry PI 2 (also the same as the Compute Module 3) to meta-swupdate-boards. If you would like me to do this, should I share a patch here in this mailing list or create a pull request in the github repo?

Also, it might be worth me updating the documentation to include an example of using the stand-along functionality to use swupdate to flash an swu file?

best regards,
Donal
Message has been deleted

Stefano Babic

unread,
Oct 26, 2018, 9:39:42 AM10/26/18
to do...@horizonemb.com, swupdate
Hi Donal,

On 26/10/18 13:43, do...@horizonemb.com wrote:
> Hi Stefano,
> That worked, thank you for your help!
>
> I could share the changes to add support for the raspberry PI 2 (also
> the same as the Compute Module 3) to meta-swupdate-boards.

I thought meta-swupdate-boards as a community meta-layer where everybody
can share his experience with SWUpdate and push his own example. The
only constraint here for a merge is no breakage for other boards.

> If you would
> like me to do this, should I share a patch here in this mailing list

Mailing list

> or
> create a pull request in the github repo?

This is forbidden for this project.

>
> Also, it might be worth me updating the documentation to include an
> example of using the stand-along functionality to use swupdate to flash
> an swu file?

I do not know, ther eis already example - just post your changes /
patches, they will be reviewd and discussed here - thanks !

Best regards,
Stefano Babic

>
> best regards,
> Donal
>
> On Friday, October 26, 2018 at 12:22:15 PM UTC+1, Stefano Babic wrote:
>
> Hi Donal,
>
> sba...@denx.de <javascript:>
> =====================================================================
>
>
> The content of this e-mail, including any attachments it may contain, is
> intended only for the recipient(s) named above. It may contain
> information that is confidential, subject to copyright, or otherwise
> legally protected against disclosure. If you have received this e-mail
> in error please notify the author and delete it from your system.
>
> --
> 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.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages