SWUpdate layer

Hi,
I am trying to add layer SWUpdate into Open embedded 2.7b5 angstrom-qt5-x11-image and I got some errors while compiling the image.

If I use “master” branch of SWUpdate, then I got this error:

WARNING: /home/cominfo/oe-core/build/../layers/meta-swupdate/recipes-support/swupdate/swupdate_git.bb: Exception during build_dependencies for SRCREV
WARNING: /home/cominfo/oe-core/build/../layers/meta-swupdate/recipes-support/swupdate/swupdate_git.bb: Error during finalise of /home/cominfo/oe-core/build/../layers/meta-swupdate/recipes-support/swupdate/swupdate_git.bb
ERROR: ExpansionError during parsing /home/cominfo/oe-core/build/../layers/meta-swupdate/recipes-support/swupdate/swupdate_git.bb
Traceback (most recent call last):
bb.data_smart.ExpansionError: Failure expanding variable SRCREV, expression was ${@version_git(d)} which triggered exception TypeError: getVar() missing 1 required positional argument: 'expand'

ERROR: /home/cominfo/oe-core/build/../layers/meta-swupdate/recipes-extended/images/swupdate-image.bb: No IMAGE_CMD defined for IMAGE_FSTYPES entry 'ext4.gz.u-boot' - possibly invalid type name or missing support class

I read somewhere that this error is caused by incompatibility between Yocto branch and SWUpdate branch.

If I use “morty” branch of SWupdate, then I got this error:

ERROR: Multiple .bb files are due to be built which each provide u-boot-fw-utils:
  /home/cominfo/oe-core/build/../layers/meta-toradex-nxp/recipes-bsp/u-boot/u-boot-toradex-fsl-fw-utils_git.bb
  /home/cominfo/oe-core/build/../layers/openembedded-core/meta/recipes-bsp/u-boot/u-boot-fw-utils_2016.03.bb
A list of tasks depending on these providers is shown and may help explain where the dependency comes from.
/home/cominfo/oe-core/build/../layers/openembedded-core/meta/recipes-bsp/u-boot/u-boot-fw-utils_2016.03.bb has unique dependees:
  /home/cominfo/oe-core/build/../layers/meta-swupdate/recipes-support/swupdate/swupdate_2017.01.bb:do_package
  /home/cominfo/oe-core/build/../layers/meta-swupdate/recipes-support/swupdate/swupdate_2017.01.bb:do_build
  /home/cominfo/oe-core/build/../layers/meta-swupdate/recipes-support/swupdate/swupdate_2017.01.bb:do_configure
/home/cominfo/oe-core/build/../layers/meta-toradex-nxp/recipes-bsp/u-boot/u-boot-toradex-fsl-fw-utils_git.bb has unique dependees:
  
It could be that one recipe provides something the other doesn't and should. The following provider and runtime provider differences may be helpful.
/home/cominfo/oe-core/build/../layers/meta-toradex-nxp/recipes-bsp/u-boot/u-boot-toradex-fsl-fw-utils_git.bb has unique provides:
  u-boot-toradex-fsl-fw-utils
/home/cominfo/oe-core/build/../layers/meta-toradex-nxp/recipes-bsp/u-boot/u-boot-toradex-fsl-fw-utils_git.bb has unique rprovides:
  u-boot-toradex-fsl-fw-utils-dbg
  u-boot-toradex-fsl-fw-utils-locale
  u-boot-toradex-fsl-fw-utils-doc
  ^u-boot-toradex-fsl-fw-utils-locale-.*
  u-boot-toradex-fsl-fw-utils
  u-boot-toradex-fsl-fw-utils-staticdev
  u-boot-toradex-fsl-fw-utils-dev
/home/cominfo/oe-core/build/../layers/openembedded-core/meta/recipes-bsp/u-boot/u-boot-fw-utils_2016.03.bb has unique provides:
  
/home/cominfo/oe-core/build/../layers/openembedded-core/meta/recipes-bsp/u-boot/u-boot-fw-utils_2016.03.bb has unique rprovides:
  u-boot-fw-utils-doc
  u-boot-fw-utils-dbg
  u-boot-fw-utils-dev
  ^u-boot-fw-utils-locale-.*
  u-boot-fw-utils-locale
  u-boot-fw-utils-staticdev

Which branch of SWUpdate I have to use and how to fix those errors?

Hi

I guess with SWUpdate layer you mean this. Note that we never did something with this layer.

I further guess that you did change the image recipe somehow to include what ever is needed for the SWUpdate but I do not know what exactly you did change from your post.

One usually uses the layer branch matching openembedded core, i.e. for 2.7 that would be morty.

The error message says:

 ERROR: Multiple .bb files are due to be built which each provide u-boot-fw-utils:
   /home/cominfo/oe-core/build/../layers/meta-toradex-nxp/recipes-bsp/u-boot/u-boot-toradex-fsl-fw-utils_git.bb
   /home/cominfo/oe-core/build/../layers/openembedded-core/meta/recipes-bsp/u-boot/u-boot-fw-utils_2016.03.bb

This means that you have to tell the build system which of the recipes should be used to provide u-boot-fw-utils. E.g. add the following to your build/conf/local.conf:

PREFERRED_RPROVIDER_u-boot-fw-utils = "u-boot-toradex-fsl-fw-utils"

Max

Hi,
I added PREFERRED_RPROVIDER_u-boot-fw-utils = "u-boot-toradex-fsl-fw-utils" into local.conf. It end with same error as before. I can see this “NOTE” at very early stage of compilation
NOTE: multiple providers are available for u-boot-fw-utils (u-boot-fw-utils, u-boot-toradex-fsl-fw-utils)
NOTE: consider defining a PREFERRED_PROVIDER entry to match u-boot-fw-utils

It looks like my “PREFERED_PROVIDER” selction to do nothing.

And of course, I executed bitbake -c cleansstate angstrom-qt5-x11-image before re-compilation.

Can I just delete recipe u-boot-fw-utils_2016.03.bb from openembedded-core?

Hi

Looks like I have a typo in PREFERRED_PROVIDER, does it work for you when you fix that in your local.conf?

PREFERRED_PROVIDER_u-boot-fw-utils = "u-boot-toradex-fsl-fw-utils"

Probably deleting the u-boot-fw-utils_2016.03.bb from openembedded-core will fix the error also, however that will make it harder to update openembedded-core.

Max

Hi,
I asked for help on swupdate mailing list and I have solution now.

Problem is the name “u-boot-toradex-fsl-fw-utils”. This is not a official yocto package name. Due to this some installation script located at “/meta-swupdate/recipes-bsp/u-boot/u-boot-fw-utils%.bbappend” was not executed.

I solved this by adding content of that file at the end of file “/meta-toradex-nxp/recipes-bsp/u-boot/u-boot-toradex-fsl-fw-utils_git.bb”

do_install_append() {
    install -d ${D}${libdir}
    install -m 644  ${S}/tools/env/lib.a ${D}${libdir}/libubootenv.a
}

And of course, I must have this lines in the local.conf:

IMAGE_INSTALL_append = " swupdate swupdate-www"
PREFERRED_PROVIDER_u-boot-fw-utils = "u-boot-toradex-fsl-fw-utils"

Now the image with meta-swupdate is compiled without errors.

Perfect, thanks for letting us know!

Hi,
recipes-support/swupdate/swupdate.inc selects the dependency to builds.
Another solution is customize swupdate defconfig to not use libubootenv.

   if 'CONFIG_UBOOT=y\n' in features:
        depends = d.getVar('DEPENDS', False)
        if 'CONFIG_UBOOT_NEWAPI=y\n' in features:
            d.setVar('DEPENDS', depends + ' libubootenv')
        else:
            d.setVar('DEPENDS', depends + ' u-boot-fw-utils')

Simone

HI @simocn77

Thanks for your Input.

Best regards,
Jaski