Swupdate successful but no change to rootfs

1,349 views
Skip to first unread message

Adrian Mcgrath

unread,
Aug 26, 2016, 7:53:24 AM8/26/16
to swup...@googlegroups.com, Adrian Mcgrath
Hi Stefano

I'm using Swupdate (v2016.10.0-rc1) on another project and I've encountered a situation where the update states that it has been performed successfully but the rootfs that I have updated remains unchanged.

Before running the update I issue the command
$ swupdate -e stable,mmcblk2p2
to select the partition to install to (sw-description file contents are at the bottom of the email).

Looking closer at the output there is a comment in the [extract_files] section regarding "Not required, skipping".

Please could you suggest reasons why the file would be skipped?

The output of the update is shown below:

Waiting for requests...

[network_initializer] : Main thread sleep again !

SWUPDATE successful !

Installation in progress

[network_initializer] : Valid image found: copying to FLASH

[extract_files] : Found file: filename plugin-image-imx6fimx.ext3 size 872415232 Not required: skipping

[check_hw_compatibility] : Hardware compatibility verified

[check_hw_compatibility] : Hardware fimx Revision: 1.0

[parse_hw_compatibility] : Accepted Hw Revision : 1.1

[parse_hw_compatibility] : Accepted Hw Revision : 1.0

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

Software Update started !

File information: fimx-swu-image-imx6fimx.swu size: 872416256 bytes


Any advice is gratefully received.

Kind regards

Adrian


sw-description file
software =
{
version = "1.9.53";

hardware-compatibility: [ "1.0", "1.1" ];

stable = {
mmcblk2p2: {
images: (
{
filename = "plugin-image-imx6fimx.ext3";
device = "/dev/mmcblk2p2";
type = "raw";
installed-directly = true;
}
);
}

mmcblk2p3: {
images: (
{
filename = "plugin-image-imx6fimx.ext3";
device = "/dev/mmcblk2p3";
type = "raw";
installed-directly = true;
}
);
}

};
}

Stefano Babic

unread,
Aug 26, 2016, 8:13:33 AM8/26/16
to Adrian Mcgrath, swup...@googlegroups.com
Hi Adrian,

On 26/08/2016 13:53, Adrian Mcgrath wrote:
> Hi Stefano
>
> I'm using Swupdate (v2016.10.0-rc1) on another project and I've
> encountered a situation where the update states that it has been
> performed successfully but the rootfs that I have updated remains unchanged.
>

This happens when the selection you pass with -e is not found. The
entries in sw-description are not parsed and SWUpdate just reports that
it was successful, because it had nothing to do.

> Before running the update I issue the command
> $ swupdate -e stable,mmcblk2p2
> to select the partition to install to (sw-description file contents are
> at the bottom of the email).
>
> Looking closer at the output there is a comment in the [extract_files]
> section regarding "Not required, skipping".

This is another symptom: images in your -swu are found but they are
skipped because no entry with this filename was found in sw-description.

>
> Please could you suggest reasons why the file would be skipped?
>
> The output of the update is shown below:
>
> Waiting for requests...
>
> [network_initializer] : Main thread sleep again !
>
> SWUPDATE successful !
>
> Installation in progress
>
> [network_initializer] : Valid image found: copying to FLASH
>
> [extract_files] : Found file: filename plugin-image-imx6fimx.ext3 size
> 872415232 Not required: skipping
>
> [check_hw_compatibility] : Hardware compatibility verified
>
> [check_hw_compatibility] : Hardware fimx Revision: 1.0
>
> [parse_hw_compatibility] : Accepted Hw Revision : 1.1
>
> [parse_hw_compatibility] : Accepted Hw Revision : 1.0
>
> [extract_file_to_tmp] : Found file: filename sw-description size 462
>
> Software Update started !
>
> File information: fimx-swu-image-imx6fimx.swu size: 872416256 bytes
>
>
> Any advice is gratefully received.
>
> Kind regards
>
> Adrian
>
>
> *sw-description file*
> software =
> {
> version = "1.9.53";
>
> hardware-compatibility: [ "1.0", "1.1" ];
>
> stable = {

Shouldn't it be :

stable : {



> mmcblk2p2: {

As here, the ":" marks a selection.

> images: (
> {
> filename = "plugin-image-imx6fimx.ext3";
> device = "/dev/mmcblk2p2";
> type = "raw";
> installed-directly = true;
> }
> );
> }
>
> mmcblk2p3: {
> images: (
> {
> filename = "plugin-image-imx6fimx.ext3";
> device = "/dev/mmcblk2p3";
> type = "raw";
> installed-directly = true;
> }
> );
> }
>
> };
> }
>

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

Adrian Mcgrath

unread,
Aug 30, 2016, 5:04:52 AM8/30/16
to Stefano Babic, swup...@googlegroups.com
Hi Stefano

Thanks for your comments.

My sw-description file was based upon what I saw at: https://sbabic.github.io/swupdate/swupdate.html#overview

Following your comments I have updated my sw-description file to be: 

software = 
{
version = "1.9.56";

hardware-compatibility: [ "1.0", "1.1" ];

stable : {
mmcblk2p2: {
images: (
{
filename = "plugin-image-imx6fimx.ext3";
device = "/dev/mmcblk2p2";
type = "raw";
installed-directly = true;
}
);
}

mmcblk2p3: {
images: (
{
filename = "plugin-image-imx6fimx.ext3";
device = "/dev/mmcblk2p3";
type = "raw";
installed-directly = true;
}
);
}

};
}

Your previous email suggests that Swupdate cannot find the "plugin-image-imx6fimx.ext3" file.

My Yocto bb file is:

# Start Yocto BB
DESCRIPTION = "Compound image for FIMX running Linux"
SECTION = ""

PR = "r2"

# Note: sw-description is mandatory
SRC_URI += "file://sw-description "
inherit swupdate

LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
                    file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"

# IMAGE_DEPENDS: list of Yocto images that contains a root filesystem
# it will be ensured they are built before creating swupdate image
IMAGE_DEPENDS = "plugin-image"

# SWUPDATE_IMAGES: list of images that will be part of the compound image
# the list can have any binaries - images must be in the DEPLOY directory
SWUPDATE_IMAGES = " \
                plugin-image \
                "

# Images can have multiple formats - define which image must be
# taken to be put in the compound image
SWUPDATE_IMAGES_FSTYPES[plugin-image] = ".ext3"

COMPATIBLE = "imx6fimx"
# End Yocto BB


When I try to upgrade I see the same effect as before, i.e. "[extract_files] : Found file: filename plugin-image-imx6fimx.ext3  size 872415232 Not required: skipping".


Is my Yocto BB file incorrect then? Any suggestions for how to correct?



Stefano Babic

unread,
Aug 30, 2016, 6:52:29 AM8/30/16
to Adrian Mcgrath, Stefano Babic, swup...@googlegroups.com
Hi Adrian,
Yocto recipe is correct. The reason is in the sw-description. I checked
with your sw-description and image is skipped as you report.
The reason is that you use "selections", and for them a suitable path in
the sw-description must be found. That means, starting from the root of
the document, a board -> release -> path, and in your sw-description the
part related to the board is missing.

I adjusted your sw-description in this way, supposing that your board's
name is "imx6fimx":

software =
{
version = "1.9.53";

imx6fimx : {
hardware-compatibility: [ "1.0", "1.1" ];
stable : {
mmcblk2p2: {
images: (
{
filename = "plugin-image-imx6fimx.ext3";
device = "/dev/mmcblk2p2";
type = "raw";
installed-directly = true;
}
);
};

mmcblk2p3: {
images: (
{
filename = "plugin-image-imx6fimx.ext3";
device = "/dev/mmcblk2p3";
type = "raw";
installed-directly = true;
}
);
};
};
}
}

With current SWUpdate you can check the correctness your SWU on the
host. I ran then:

./swupdate -v -H imx6fimx:1.0 -c -e "stable,mmcblk0p2" -i
tests/auto/boards/pc/test1/software_pc_test1.swu


And this is the output:

Swupdate v2016.10.0-rc1

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

Searching for custom LUA handlers :[string "require
("swupdate_handlers")"]:1: module 'swupdate_handlers' not found:
no field package.preload['swupdate_handlers']
no file '/usr/local/share/lua/5.2/swupdate_handlers.lua'
no file '/usr/local/share/lua/5.2/swupdate_handlers/init.lua'
no file '/usr/local/lib/lua/5.2/swupdate_handlers.lua'
no file '/usr/local/lib/lua/5.2/swupdate_handlers/init.lua'
no file '/usr/share/lua/5.2/swupdate_handlers.lua'
no file '/usr/share/lua/5.2/swupdate_handlers/init.lua'
no file './swupdate_handlers.lua'
no file '/usr/local/lib/lua/5.2/swupdate_handlers.so'
no file '/usr/lib/x86_64-linux-gnu/lua/5.2/swupdate_handlers.so'
no file '/usr/lib/lua/5.2/swupdate_handlers.so'
no file '/usr/local/lib/lua/5.2/loadall.so'
no file './swupdate_handlers.so'
Custom handlers not found, no error, skipping...

Running on imx6fimx Revision 1.0
Registered handlers:
archive
tar
flash
raw
rawfile
ubivol
ubipartition
lua
shellscript
preinstall
postinstall
remote
uboot
software set: stable mode: mmcblk0p2
[NOTIFY] : SWUPDATE running : [extract_sw_description] : Found file:
filename sw-description
size 527
checksum 0x889e VERIFIED

Version 1.9.53
[NOTIFY] : SWUPDATE running : [parse_hw_compatibility] : Accepted Hw
Revision : 1.0
[NOTIFY] : SWUPDATE running : [parse_hw_compatibility] : Accepted Hw
Revision : 1.1
[NOTIFY] : SWUPDATE running : [check_hw_compatibility] : Hardware
imx6fimx Revision: 1.0
[NOTIFY] : SWUPDATE running : [check_hw_compatibility] : Hardware
compatibility verified
[NOTIFY] : SWUPDATE running : [cpio_scan] : Found file:
filename core-image-full-cmdline-beaglebone.ext3
size 99340288
not required

successfully checked 'tests/auto/boards/pc/test1/software_pc_test1.swu'

Adrian Mcgrath

unread,
Aug 30, 2016, 6:56:50 AM8/30/16
to Stefano Babic, swup...@googlegroups.com
​Hi Stefano

Thank you for the detailed explanation and turning the light bulb on for me.

I will try that now.

Kind regards

Adrian

Stefano Babic

unread,
Aug 30, 2016, 7:04:34 AM8/30/16
to Adrian Mcgrath, Stefano Babic, swup...@googlegroups.com
On 30/08/2016 12:56, Adrian Mcgrath wrote:
> ​Hi Stefano
>
> Thank you for the detailed explanation and turning the light bulb on for me.
>

I have appended the wrong log - the correct one is:

./swupdate -v -H imx6fimx:1.0 -c -e "stable,mmcblk2p2" -i
tests/auto/boards/pc/test1/software_pc_test1.swu
software set: stable mode: mmcblk2p2
[NOTIFY] : SWUPDATE running : [extract_sw_description] : Found file:
filename sw-description
size 527
checksum 0x889e VERIFIED

Version 1.9.53
[NOTIFY] : SWUPDATE running : [parse_hw_compatibility] : Accepted Hw
Revision : 1.0
[NOTIFY] : SWUPDATE running : [parse_hw_compatibility] : Accepted Hw
Revision : 1.1
[NOTIFY] : SWUPDATE running : [parse_images] : Found Image :
core-image-full-cmdline-beaglebone.ext3 in device : /dev/mmcblk2p2 for
handler raw (installed from stream)

[NOTIFY] : SWUPDATE running : [check_hw_compatibility] : Hardware
imx6fimx Revision: 1.0
[NOTIFY] : SWUPDATE running : [check_hw_compatibility] : Hardware
compatibility verified
[NOTIFY] : SWUPDATE running : [cpio_scan] : Found file:
filename core-image-full-cmdline-beaglebone.ext3
size 99340288
REQUIRED

successfully checked 'tests/auto/boards/pc/test1/software_pc_test1.swu'

You see that the image becomes "REQUIRED".

You issue let me think that returning from the parser without errors if
the selection (or the board) is not found is not the best way. This can
lead that a switch takes place, but no new software was installed.

It is maybe better to return with error if the selection is not found.

> I will try that now.


Adrian Mcgrath

unread,
Sep 16, 2016, 7:33:39 AM9/16/16
to Stefano Babic, swup...@googlegroups.com
​Hi Stefano

Huge apologies for taking so long to report back.

Okay, so I've just got back to looking at this again and have managed to replicate the successful checking of the .swu file on the host as you demonstrated (thank you;)

# swupdate -v -H imx6fimx:1.0 -c -e "stable,mmcblk2p3" -i /mnt/plugin-swu-image-imx6fimx.swu 
Swupdate v2016.10.0-rc1

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

Searching for custom LUA handlers :[string "require ("swupdate_handlers")"]:1: module 'swupdate_handlers' not found:
        no field package.preload['swupdate_handlers']
        no file '/usr/share/lua/5.2/swupdate_handlers.lua'
        no file '/usr/share/lua/5.2/swupdate_handlers/init.lua'
        no file '/usr/lib/lua/5.2/swupdate_handlers.lua'
        no file '/usr/lib/lua/5.2/swupdate_handlers/init.lua'
        no file './swupdate_handlers.lua'
        no file '/usr/lib/lua/5.2/swupdate_handlers.so'
        no file '/usr/lib/lua/5.2/loadall.so'
        no file './swupdate_handlers.so'
Custom handlers not found, no error, skipping...

Running on imx6fimx Revision 1.0
Registered handlers:
        flash
        raw
        rawfile
        lua
        shellscript
        preinstall
        postinstall
        uboot
software set: stable mode: mmcblk2p3
[NOTIFY] : SWUPDATE running :  [extract_sw_description] : Found file:
        filename sw-description
        size 486
        checksum 0x7f23 VERIFIED

Version 1.9.60
[NOTIFY] : SWUPDATE running :  [parse_hw_compatibility] : Accepted Hw Revision : 1.0
[NOTIFY] : SWUPDATE running :  [parse_hw_compatibility] : Accepted Hw Revision : 1.1
[NOTIFY] : SWUPDATE running :  [parse_images] : Found Image  : plugin-image-imx6fimx.ext3 in device : /dev/mmcblk2p3 for handler raw (installed from stream) 

[NOTIFY] : SWUPDATE running :  [check_hw_compatibility] : Hardware imx6fimx Revision: 1.0
[NOTIFY] : SWUPDATE running :  [check_hw_compatibility] : Hardware compatibility verified
[NOTIFY] : SWUPDATE running :  [cpio_scan] : Found file:
        filename plugin-image-imx6fimx.ext3
        size 872415232
        REQUIRED

successfully checked '/mnt/plugin-swu-image-imx6fimx.swu'


All okay I thought. Before doing a web upgrade I ran the following command on the host so swupdate knows what I want to do:

# swupdate -v -H imx6fimx:1.0 -e "stable,mmcblk2p3"   <== Same command as before without the check/filename switches      

Swupdate outputs the below in the console: 
                                
Swupdate v2016.10.0-rc1

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

Searching for custom LUA handlers :[string "require ("swupdate_handlers")"]:1: module 'swupdate_handlers' not found:
        no field package.preload['swupdate_handlers']
        no file '/usr/share/lua/5.2/swupdate_handlers.lua'
        no file '/usr/share/lua/5.2/swupdate_handlers/init.lua'
        no file '/usr/lib/lua/5.2/swupdate_handlers.lua'
        no file '/usr/lib/lua/5.2/swupdate_handlers/init.lua'
        no file './swupdate_handlers.lua'
        no file '/usr/lib/lua/5.2/swupdate_handlers.so'
        no file '/usr/lib/lua/5.2/loadall.so'
        no file './swupdate_handlers.so'
Custom handlers not found, no error, skipping...

Running on imx6fimx Revision 1.0
Registered handlers:
        flash
        raw
        rawfile
        lua
        shellscript
        preinstall
        postinstall
        uboot
software set: stable mode: mmcblk2p3

So far so good, this output matches that shown above (except for the notify checking steps). 
Next I upload my file .swu file using the web interface and see the output below (web output shown first, console output shown second):

Web output
Waiting for requests...

[network_initializer] : Main thread sleep again !

SWUPDATE successful !

Installation in progress

[network_initializer] : Valid image found: copying to FLASH

[extract_files] : Found file: filename plugin-image-imx6fimx.ext3 size 872415232 Not required: skipping

[check_hw_compatibility] : Hardware compatibility verified

[check_hw_compatibility] : Hardware imx6fimx Revision: 1.0

[parse_hw_compatibility] : Accepted Hw Revision : 1.1

[parse_hw_compatibility] : Accepted Hw Revision : 1.0

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

Software Update started !

File information: plugin-swu-image-imx6fimx.swu size: 872416256 bytes

Console output
X_FILENAME: plugin-swu-image-imx6fimx.swu length: 872416256
[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 486
Version 1.9.60
[NOTIFY] : SWUPDATE running :  [parse_hw_compatibility] : Accepted Hw Revision : 1.0
[NOTIFY] : SWUPDATE running :  [parse_hw_compatibility] : Accepted Hw Revision : 1.1
[NOTIFY] : SWUPDATE running :  [check_hw_compatibility] : Hardware imx6fimx Revision: 1.0
[NOTIFY] : SWUPDATE running :  [check_hw_compatibility] : Hardware compatibility verified
[NOTIFY] : SWUPDATE running :  [extract_files] : Found file:
        filename plugin-image-imx6fimx.ext3
        size 872415232 Not required: skipping
[NOTIFY] : SWUPDATE running :  [network_initializer] : Valid image found: copying to FLASH
[NOTIFY] : SWUPDATE running :  Installation in progress
[NOTIFY] : SWUPDATE successful ! SWUPDATE successful !
[NOTIFY] : SWUPDATE running :  [network_initializer] : Main thread sleep again !
[NOTIFY] : No SWUPDATE running :  Waiting for requests...
Main loop Daemon


As you can see when performing an upgrade via the web interface I still see the same effect, i.e. [extract_files] : Found file: filename plugin-image-imx6fimx.ext3 size 872415232 Not required: skipping.

I'm pretty confused at this point. 

Is my swupdate command string incorrect? Is there a step I've missed?

Any suggestions as to what is going on?



Many thanks


Adrian



P.s.
My sw-description file is shown below and has been verified by the .swu file check shown at the head of the email:

software =
{
version = "1.9.60";

imx6fimx: {
hardware-compatibility: [ "1.0", "1.1" ];
stable: {
mmcblk2p3: {
images: (
{
filename = "plugin-image-imx6fimx.ext3";
device = "/dev/mmcblk2p3";
type = "raw";
installed-directly = true;
}
);
}

mmcblk2p5: {
images: (
{
filename = "plugin-image-imx6fimx.ext3";
device = "/dev/mmcblk2p5";
};
};
}

Stefano Babic

unread,
Sep 16, 2016, 7:41:07 AM9/16/16
to Adrian Mcgrath, Stefano Babic, swup...@googlegroups.com
Hi Adrian,
ok
What are you expecting ? You do not pass any command (neither -i nor -w
nor -s..), and SWUpdate does what you have commanded to do: nothing.

> Next I upload my file .swu file using the web interface and see the
> output below (web output shown first, console output shown second):
>

And how do you start it ? This is missing....

> *Web output*
> Waiting for requests...
>
> [network_initializer] : Main thread sleep again !
>
> SWUPDATE successful !
>
> Installation in progress
>
> [network_initializer] : Valid image found: copying to FLASH
>
> [extract_files] : Found file: filename plugin-image-imx6fimx.ext3 size
> 872415232 Not required: skipping
>
> [check_hw_compatibility] : Hardware compatibility verified
>
> [check_hw_compatibility] : Hardware imx6fimx Revision: 1.0
>
> [parse_hw_compatibility] : Accepted Hw Revision : 1.1
>
> [parse_hw_compatibility] : Accepted Hw Revision : 1.0
>
> [extract_file_to_tmp] : Found file: filename sw-description size 486
>
> Software Update started !
>
> File information: plugin-swu-image-imx6fimx.swu size: 872416256 bytes
>
> *Console output*
I do not know becaus eI do not see. It seems that the selection is not
passed when you use the webserver.


Best regards,
Stefano Babic
> --
> 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.

Adrian Mcgrath

unread,
Sep 16, 2016, 8:07:56 AM9/16/16
to swup...@googlegroups.com
Hi Stefano

Thank you for the pointer, the "-s" was the missing information I needed. 

The console command: 

# swupdate -v -H imx6fimx:1.0 -s -e "stable,mmcblk2p3"

Resolves the issue.

Thank you for your time, I owe you a beer or three.

Have a great weekend

Kind regards

Adrian


Stefano Babic

unread,
Sep 16, 2016, 9:19:36 AM9/16/16
to Adrian Mcgrath, swup...@googlegroups.com
Hi Adrian,

On 16/09/2016 14:07, Adrian Mcgrath wrote:
> Hi Stefano
>
> Thank you for the pointer, the "-s" was the missing information I needed.
>
> The console command:
>
> # swupdate -v -H imx6fimx:1.0 -s-e "stable,mmcblk2p3"
>
> Resolves the issue.
>
> Thank you for your time, I owe you a beer or three.
>

Noted, I will not forget :-D

Best regards,
Stefano Babic
Reply all
Reply to author
Forward
0 new messages