0

I am trying to use BitBake variable expansion (e.g., using @@VARIABLE@@) to update version numbers of several components in sw-description file. Here is example of my sw-description file:

software =
{
    version = "@@DISTRO_VERSION@@";
    description = "Firmware update for Titan";
    
    imx8mm-lpddr4-cdl = {
        p1: {
            files: (
                {
                    name = "fpga";
                    version = "@@BB_VERSION@@";
                    install-if-different = true;
                    .......
                },
..........

However, I can not get it to work. Once I build the .swu image, sw-description file stay unchanged with those "@@...@@" for versions. I believe values like DISTRO_VERSION & BB_VERSION are there by default. My end goal with this is to update version of each component from the handler (.bb Yocto recipe file) that pulls several different repositories during build.

Version of my swupdate is 2018.11.

Does anyone know how this can be fixed?

22332112
  • 2,337
  • 5
  • 21
  • 42
  • Similarly... I can not get `@SWU_AUTO_VERSION` in sw-description to work. The only thing that works is generation of sha256 (via @filename). `version = "@fpga.bin.enc"` - this successfully generates sha256, but I would rather use version numbers from my git repositories. – 22332112 Jul 27 '23 at 19:45
  • 1
    Which version of `meta-swupdate` layer do you use? – skandigraun Jul 29 '23 at 17:19
  • Yes, the `meta-swupdate` version is most likely the problem. It is from 2018 (commit from Sep 6, 2018). Commit `51af7972c0e5aeab35697d3ea91cfc90ead7a6fa`. I guess this version doesn't have anything like variable expansion or `SWU_AUTO_VERSION`. – 22332112 Jul 31 '23 at 16:24
  • 2
    Yepp, that's going to be the problem. Variable expansion was introduced in commit `9cc678109330f5b3e2b76918d4bb916bd187e500`, about a month after your commit. – skandigraun Jul 31 '23 at 16:41
  • 1
    If you are mandated to use this specific version of meta-swupdate for some reason, you can always create your own classes (or just tasks) where you "cherry-pick" these extra changes with a delicate copy-paste, and bolt it on top of the existing recipe. – skandigraun Jul 31 '23 at 16:47
  • @skandigraun Thank you! I was able to `git cherry-pick` that next commit (Sep 30. 2018) with variable expansion into my branch and it is all working now. – 22332112 Aug 02 '23 at 17:14

0 Answers0