Swupdate build with Yocto Fido doesn't find my sw-description

1,065 views
Skip to first unread message

Adrian McGrath

unread,
Apr 1, 2016, 6:02:44 AM4/1/16
to swup...@googlegroups.com, Adrian McGrath
Hi Stefano, all

I'm trying to build Swupdate for a Freescale SabreSD derived i.MX6Q board using Yocto Fido.

I cloned the git repo and used the beagleboard files as templates for my board files.

When invoking: $ MACHINE=imx6qswan bitbake swan-swu-image, I see:

Exception: IOError: [Errno 2] No such file or directory: '/xxx/yyy/zzz/yocto/build/tmp/work/imx6qswan-poky-linux-gnueabi/swan-swu-image/1.0-r1/sw-description'

ERROR: Function failed: do_swuimage

The error message clearly states that bitbake can't find my sw-description file.

From the exchanges between yourself and Bjorn, bitbake should find my sw-description file as I have used the same directory/file naming convention as you for the BBB example provided in the git repo.


My question is why is my sw-description file not found? Have I misunderstood something?


Many thanks and kind regards

Adrian


Supporting information below:

sources/meta-swupdate/recipes-extended/images/swan-swu-image.bb
DESCRIPTION = "Compound image for Swan "
SECTION = ""

PR = "r1"

SRC_URI_imx6qswan = "file://sw-description "
inherit swupdate

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

S = "${WORKDIR}"                   

IMAGE_DEPENDS = "swan-image"
SWUPDATE_IMAGES = " \
                swan-image \
                zImage \
                "
SWUPDATE_IMAGES_FSTYPES[swan-image] = ".ext3"

COMPATIBLE = "imx6qswan"



sources/meta-swan/recipes-swan/images/swan-image.bb
LICENSE = "CLOSED"
include recipes-fsl/images/fsl-image-gui.bb

PR = "r1"

IMAGE_INSTALL += "         \
                  iperf    \
                  pciutils \
                  kernel-modules "

export IMAGE_BASENAME = "swan-image"



sources/meta-swupdate/recipes-extended/images/swan-swu-image/imx6qswan/sw-description
software =
{
    version = "0.1.0";

    hardware-compatibility: [ "revA"];

    images: (
        {
            filename = "swan-image-imx6qswan.ext3";
            device = "/dev/mmcblk2p2";
            type = "raw";
        }
    );
}


Directory Tree: sources/meta-swupdate
$ tree
.
├── classes
│   └── swupdate.bbclass
├── conf
│   └── layer.conf
.
.
.
├── recipes-extended
│   └── images
│       ├── bbb-swu-image
│       │   └── beaglebone
│       │       └── sw-description
│       ├── bbb-swu-image.bb
│       ├── swan-swu-image
│       │   └── imx6qswan
│       │       └── sw-description        <== same directory layout as used for beaglebone
│       ├── swan-swu-image.bb
│       ├── swupdate-image.bb
└── recipes-support
    └── swupdate
        ├── swupdate
        │   ├── beaglebone
        │   │   └── defconfig
        │   ├── defconfig
        │   ├── swan
        │   │   └── defconfig        <== swan/defconfig is a copy of beaglebone/defconfig
        │   └── swupdate
        ├── swupdate_git.bb
        └── swupdate.inc


Stefano Babic

unread,
Apr 1, 2016, 6:38:48 AM4/1/16
to Adrian McGrath, swup...@googlegroups.com
Hi Adrian,

On 01/04/2016 12:02, Adrian McGrath wrote:
> Hi Stefano, all
>
> I'm trying to build Swupdate for a Freescale SabreSD derived i.MX6Q
> board using Yocto Fido.
>
> I cloned the git repo and used the beagleboard files as templates for my
> board files.
>
> When invoking: $ MACHINE=imx6qswan bitbake swan-swu-image, I see:
>
> *Exception: IOError: [Errno 2] No such file or directory:
> '/xxx/yyy/zzz/yocto/build/tmp/work/imx6qswan-poky-linux-gnueabi/swan-swu-image/1.0-r1/sw-description'**
> *
> ERROR: Function failed: do_swuimage
>
> The error message clearly states that bitbake can't find my
> sw-description file.
>
> From the exchanges between yourself and Bjorn, bitbake should find my
> sw-description file as I have used the same directory/file naming
> convention as you for the BBB example provided in the git repo.
>
>
> /My question is why is my sw-description file not found? Have I
> misunderstood something?//
> //
>
> /Many thanks and kind regards
>
> Adrian
>
>
> Supporting information below:
>
> _*sources/meta-swupdate/recipes-extended/images/swan-swu-image.bb*_
> DESCRIPTION = "Compound image for Swan "
> SECTION = ""
>
> PR = "r1"
>
> SRC_URI_imx6qswan = "file://sw-description "

This is the line identifying sw-description. Can you try also without
target extension ?

SRC_URI = "file://sw-description"

IMHO file is copied simply by bitbake "fetch" task, and later it should
be find in working directory. You can check this running
MACHINE=imx6qswan bitbake -c fetch swan-swu-image

and then check in
/xxx/yyy/zzz/yocto/build/tmp/work/imx6qswan-poky-linux-gnueabi/swan-swu-image/1.0-r1/.
You should find sw-description, if not there is something wrong with the
SRC_URI (anyway, I cannot find an evident error).

Best regards,
Stefano Babic

> inherit swupdate
>
> LICENSE = "MIT"
> LIC_FILES_CHKSUM =
> "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
>
> file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
>
> S = "${WORKDIR}"
>
> IMAGE_DEPENDS = "swan-image"
> SWUPDATE_IMAGES = " \
> swan-image \
> zImage \
> "
> SWUPDATE_IMAGES_FSTYPES[swan-image] = ".ext3"
>
> COMPATIBLE = "imx6qswan"
>
>
> _*sources/meta-swan/recipes-swan/images/swan-image.bb*_
> LICENSE = "CLOSED"
> include recipes-fsl/images/fsl-image-gui.bb
>
> PR = "r1"
>
> IMAGE_INSTALL += " \
> iperf \
> pciutils \
> kernel-modules "
>
> export IMAGE_BASENAME = "swan-image"
>
>
> _*_*sources/meta-swupdate/recipes-extended/images/swan-swu-image/imx6qswan/*_sw-description*_
> software =
> {
> version = "0.1.0";
>
> hardware-compatibility: [ "revA"];
>
> images: (
> {
> filename = "swan-image-imx6qswan.ext3";
> device = "/dev/mmcblk2p2";
> type = "raw";
> }
> );
> }
>
>
> _*Directory Tree: sources/meta-swupdate*_
> --
> 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
=====================================================================

amcg...@ad-holdings.co.uk

unread,
Apr 1, 2016, 6:49:07 AM4/1/16
to swupdate, amcg...@ad-holdings.co.uk
Hi Stefano

I get the same output using: SRC_URI = "file://sw-description " (swan-swu-image.bb)

Any ideas/suggestions gratefully received.

Thanks

Adrian

amcg...@ad-holdings.co.uk

unread,
Apr 1, 2016, 6:56:23 AM4/1/16
to swupdate, amcg...@ad-holdings.co.uk
Hi Stefano

I've just tried running:
$ MACHINE=imx6qswan bitbake -c fetch swan-swu-image

The output:
NOTE: Preparing RunQueue
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 1 tasks of which 1 didn't need to be rerun and all succeeded.

Summary: There was 1 WARNING message shown.

The warning message is regarding Ubuntu version 15.04

The directory tree at the location you mentioned:

$ pushd tmp/work/imx6qswan-poky-linux-gnueabi/swan-swu-image/
$ tree
.
└── 1.0-r1
└── temp
├── run.do_swuimage -> run.do_swuimage.7235
└── run.do_swuimage.7235

6 directories, 12 files



amcg...@ad-holdings.co.uk

unread,
Apr 1, 2016, 7:51:17 AM4/1/16
to swupdate, amcg...@ad-holdings.co.uk
Okay, I've played around with various permutations and have now managed to get a .swu file built (hurrah;)

The magic change appears to have been deliberately setting the "S" variable to the wrong value. This causes a Bitbake Warning (WARNING: /home/amcgrath/yocto-latest/build/tmp/work/imx6qswan-poky-linux-gnueabi/swan-swu-image/1.0-r1/imx6qswan ('S') doesn't exist, please set 'S' to a proper value) but a file ultimately produced.

swan-swu-image.bb
DESCRIPTION = "Compound image for Swan "
SECTION = ""

PR = "r1"

SRC_URI += "file://sw-description "

inherit swupdate

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

S = "${WORKDIR}/imx6qswan"                    <== This line is deliberately set incorrectly, presumably could be removed

Stefano Babic

unread,
Apr 1, 2016, 7:54:36 AM4/1/16
to amcg...@ad-holdings.co.uk, swupdate
Hi Adrian,

On 01/04/2016 13:51, amcg...@ad-holdings.co.uk wrote:
> Okay, I've played around with various permutations and have now managed
> to get a .swu file built (hurrah;)
>
> The magic change appears to have been deliberately setting the "S"
> variable to the wrong value.

You do not need at all - you can simply drop the line, because
swupdate_class already knows where to get the files.

> This causes a Bitbake Warning (WARNING:
> /home/amcgrath/yocto-latest/build/tmp/work/imx6qswan-poky-linux-gnueabi/swan-swu-image/1.0-r1/imx6qswan
> ('S') doesn't exist, please set 'S' to a proper value) but a file
> ultimately produced.
>
> _*swan-swu-image.bb*_
> DESCRIPTION = "Compound image for Swan "
> SECTION = ""
>
> PR = "r1"
>
> SRC_URI += "file://sw-description "
> inherit swupdate
>
> LICENSE = "MIT"
> LIC_FILES_CHKSUM =
> "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
>
> file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
>
> S = "${WORKDIR}/imx6qswan" <== This line is
> deliberately set incorrectly, presumably could be removed
>

You can remove it.

Best regards,
Stefano Babic

amcg...@ad-holdings.co.uk

unread,
Apr 1, 2016, 7:58:32 AM4/1/16
to swupdate, amcg...@ad-holdings.co.uk
Thanks, I'll remove that line.

Would be able to tell me if I can treat the .swu file in the same way that I would treat a .sdcard image generated by Bitbake? i.e. burn the .swu file to an SDcard, run it and then configure it? Apologies if this has been covered in other posts.

Stefano Babic

unread,
Apr 1, 2016, 8:02:33 AM4/1/16
to amcg...@ad-holdings.co.uk, swupdate
Hi,

On 01/04/2016 13:58, amcg...@ad-holdings.co.uk wrote:
> Thanks, I'll remove that line.
>
> Would be able to tell me if I can treat the .swu file in the same way
> that I would treat a .sdcard image generated by Bitbake?

???

sdcard does not foreseen any further processing, and it can be burned
into the storage. This can be done on your host, too.

.swu is an image for swupdate, it means that a swupdate running on the
target (not off-line) is responsible to process and install the
artifacts on the target.

amcg...@ad-holdings.co.uk

unread,
Apr 1, 2016, 8:10:38 AM4/1/16
to swupdate, amcg...@ad-holdings.co.uk, sba...@denx.de

I see, thanks for clearing that up for me.

I'll generate the base swupdate image an tryout that .swu file then.

By the way, is there a quick method to validate the .swu image?

Stefano Babic

unread,
Apr 1, 2016, 11:03:13 AM4/1/16
to amcg...@ad-holdings.co.uk, swupdate, sba...@denx.de
Hi Adrian,

On 01/04/2016 14:10, amcg...@ad-holdings.co.uk wrote:

>
> I see, thanks for clearing that up for me.
>
> I'll generate the base swupdate image an tryout that .swu file then.
>
> By the way, is there a quick method to validate the .swu image?

If you are thinking about syntax checking for sw-description, there is
not (yet) one. Anyway, the real validation occurs on the target, and
offline there is not a lot of things possible as syntax checking.

Anjali Krishna

unread,
Apr 19, 2022, 9:52:25 AM4/19/22
to swupdate
Helo All,
 
   I am facing similiar issue . I am trying to pack a sample txt file and a post_install script with  a corresponding sw-description file through Yocto build [ Zeus]

the tree structure is 

├── classes

│   ├── swupdate.bbclass

│   ├── swupdate-common.bbclass

│   ├── swupdate-enc.bbclass

│   └── swupdate-image.bbclass

├── recipes-extended

│   ├── cpio

│   │   ├── cpio_%.bbappend

│   │   └── files

│   │       └── 0001-Wrong-CRC-with-ASCII-CRC-for-large-files.patch

│   └── images

│       ├── obd-swu-image

│       │   └── imx6ull-iwg18m-sm

│       │       ├── post_install.sh

│       │       ├── single_file_test.txt

│       │       └── sw-description

│       ├── obd-swu-image_1.0.bb

│       ├── swupdate-gui-image.bb

│       ├── swupdate-image.bb

│       └── swupdate-image.inc


Under  images folder I have  obd-swu-image folder and inside obd-swu-image the  imx6ull-iwg18m-sm folder exists. The imx6ull-iwg18m-sm has sw-description,single_file_test.txt,post_install.sh

files. 
1. Whether the post_install.sh and  single_file_test.txt should be under imx6ull-iwg18m-sm folder ?
      I am getting : obd-swu-image-1.0-r1 do_swuimage: swupdate cannot find single_file_test.txt image file error . Where the files are supposed to be in the Yocto BSP?

The content of my obd-swu-image_1.0.bb  is

DESCRIPTION = "Recipe to generate swu archive"
LICENSE = "CLOSED"

SECTION = ""

PR = "r1"

inherit swupdate

SRC_URI += "\
    file://sw-description \
    file://post_install.sh \
    file://single_file_test.txt \
"

# images to build before building swupdate image
#IMAGE_DEPENDS = "core-image-full-cmdline"

# images and files that will be included in the .swu image
SWUPDATE_IMAGES = "single_file_test.txt post_install.sh"

SWUPDATE_IMAGES_FSTYPES[single_file_test] = ".txt"
SWUPDATE_IMAGES_FSTYPES[post_install] = ".sh"

COMPATIBLE="imx6ull-iwg18m-sm"
~                                                                                                                                                                                                          
~                                                                                                                                                                                                          
~                                    

Any help would be appreciated 

Stefano Babic

unread,
Apr 19, 2022, 10:13:08 AM4/19/22
to Anjali Krishna, swupdate
Hi Anjali,

On 19.04.22 15:52, Anjali Krishna wrote:
> Helo All,
>    I am facing similiar issue .

Do not steal a very old and archived thread - just start a new one. This
has nothing to do with the original subject and it is misleading. The
only common part is that zeus, like fido, has reached EOL and is obsolete.

> I am trying to pack a sample txt file
> and a post_install script with  a corresponding sw-description file
> through Yocto build [ Zeus]
>
> the tree structure is
>
> ├── classes
>
> │   ├── swupdate.bbclass
>
> │   ├── swupdate-common.bbclass
>
> │   ├── swupdate-enc.bbclass
>
> │   └── swupdate-image.bbclass
>
> ├── recipes-extended
>
> │   ├── cpio
>
> │   │   ├── cpio_%.bbappend
>
> │   │   └── files
>
> │   │       └── 0001-Wrong-CRC-with-ASCII-CRC-for-large-files.patch
>
> │   └── images
>
> │       ├── obd-swu-image
>
> │       │   └── imx6ull-iwg18m-sm
>
> │       │       ├── post_install.sh
>
> │       │       ├── single_file_test.txt
>
> │       │       └── sw-description
>
> │       ├── obd-swu-image_1.0.bb
>
> │       ├── swupdate-gui-image.bb
>
> │       ├── swupdate-image.bb
>
> │       └── swupdate-image.inc
>
>
> Under *images* folder I have *obd-swu-image* folder and inside
> obd-swu-image the*  imx6ull-iwg18m-sm* folder exists. The
> imx6ull-iwg18m-sm has sw-description,single_file_test.txt,post_install.sh
>
> files.
> 1. Whether the post_install.sh and  single_file_test.txt should be under
> imx6ull-iwg18m-sm folder ?
>       I am getting : obd-swu-image-1.0-r1 do_swuimage: swupdate cannot
> find single_file_test.txt image file error . Where the files are
> supposed to be in the Yocto BSP?
>
> The content of my obd-swu-image_1.0.bb  is
>
> DESCRIPTION = "Recipe to generate swu archive"
> LICENSE = "CLOSED"
> SECTION = ""
>
> PR = "r1"
>
> inherit swupdate
>
> SRC_URI += "\
>     file://sw-description \
>     file://post_install.sh \
>     file://single_file_test.txt \
> "
>
> # images to build before building swupdate image
> #IMAGE_DEPENDS = "core-image-full-cmdline"
>
> # images and files that will be included in the .swu image
> SWUPDATE_IMAGES = "single_file_test.txt post_install.sh"

This is your mistake. Fetched files (in SRC_URI) are automatically put
into SWU. SWUPDATE_IMAGES are searched into DEPLOYDIR, and of course,
they cannot be found. If you just comment this above, it will work.


>
> SWUPDATE_IMAGES_FSTYPES[single_file_test] = ".txt"
> SWUPDATE_IMAGES_FSTYPES[post_install] = ".sh"
>
> COMPATIBLE="imx6ull-iwg18m-sm"
> ~
> ~
> ~
>
> Any help would be appreciated
>

Best regards,
Stefano Babic

> On Friday, April 1, 2016 at 5:21:17 PM UTC+5:30
> amcg...@ad-holdings.co.uk wrote:
>
> Okay, I've played around with various permutations and have now
> managed to get a .swu file built (hurrah;)
>
> The magic change appears to have been deliberately setting the "S"
> variable to the wrong value. This causes a Bitbake Warning (WARNING:
> /home/amcgrath/yocto-latest/build/tmp/work/imx6qswan-poky-linux-gnueabi/swan-swu-image/1.0-r1/imx6qswan
> ('S') doesn't exist, please set 'S' to a proper value) but a file
> ultimately produced.
>
> _*swan-swu-image.bb <http://swan-swu-image.bb>*_
> DESCRIPTION = "Compound image for Swan "
> SECTION = ""
>
> PR = "r1"
>
> SRC_URI += "file://sw-description "
>
> inherit swupdate
>
> LICENSE = "MIT"
> LIC_FILES_CHKSUM =
> "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
>
> file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
>
> S = "${WORKDIR}/imx6qswan"                    <== This line is
> deliberately set incorrectly, presumably could be removed
>
>
> IMAGE_DEPENDS = "swan-image"
> SWUPDATE_IMAGES = " \
>                 swan-image \
>                 zImage \
>                 "
> SWUPDATE_IMAGES_FSTYPES[swan-image] = ".ext3"
>
> COMPATIBLE = "imx6qswan"
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/swupdate/69e55fcd-5d79-41fe-b7b6-32c9ff6ad1bfn%40googlegroups.com
> <https://groups.google.com/d/msgid/swupdate/69e55fcd-5d79-41fe-b7b6-32c9ff6ad1bfn%40googlegroups.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages