0

I am trying to build swupdate image by running bitbake swupdate-image but getting following errors,

ERROR: swupdate-2019.04-r0 do_package: SYSTEMD_SERVICE_swupdate value swupdate.service does not exist
ERROR: swupdate-2019.04-r0 do_package: 
ERROR: swupdate-2019.04-r0 do_package: Function failed: systemd_populate_packages
ERROR: Logfile of failure stored in: /home/panther2/warrior/build/tmp/work/corei7-64-poky-linux/swupdate/2019.04-r0/temp/log.do_package.22017
ERROR: Task (/home/panther2/warrior/sources/meta-swupdate/recipes-support/swupdate/swupdate_2019.04.bb:do_package) failed with exit code '1'

I am building for warrior yocto branch. Error indicates that swupdate.service does not exist but swupdate.service does exist under meta-swupdate/recipes-support/swupdate/swupdate. Any help is really appreciated. Thanks for your time.

Raxesh Oriya
  • 383
  • 6
  • 27
  • Do you use `systemd` as init system? – Nayfe Sep 16 '19 at 11:06
  • Yes. I use `systemd` – Raxesh Oriya Sep 16 '19 at 11:07
  • Can you try latest version with `PREFERRED_VERSION_swupdate = "git"` ? – Nayfe Sep 16 '19 at 11:56
  • Should I add into my own layer's `layer.conf` file? – Raxesh Oriya Sep 16 '19 at 12:05
  • I have added in my own layer's `layer.conf` now that error is gone but getting another error `swupdate-git-r0 do_package: QA Issue: swupdate: Files/directories were installed but not shipped in any package: /usr/lib/libswupdate.a /usr/lib/lua/5.3/lua_swupdate.so.0.1 Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install. swupdate: 2 installed and not shipped files. [installed-vs-shipped]` Should I post it as a different question? – Raxesh Oriya Sep 16 '19 at 12:09
  • Are you using Poky in warrior version too? Can you check `bitbake -e swupdate | grep ^FILES_swupdate-staticdev`, `libswupdate.a` should be included in it. No please keep this question thread. – Nayfe Sep 16 '19 at 12:17
  • It doesn't seem to be included. Here is the output `FILES_swupdate-staticdev="/usr/lib64/*.a /lib64/*.a /usr/lib64/swupdate/*.a"` – Raxesh Oriya Sep 16 '19 at 12:22
  • It seems swupdate doesn't like ${libdir} to be /usr/lib64 instead of /usr/lib, maybe you can add something like `do_install_append(){ mv ${D}/usr/lib/* ${D}${libdir}/ }` ? – Nayfe Sep 16 '19 at 12:34
  • Now it is saying same about `/usr/lib`. Here is the error, `swupdate-git-r0 do_package: QA Issue: swupdate: Files/directories were installed but not shipped in any package: /usr/lib Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install. swupdate: 1 installed and not shipped files. [installed-vs-shipped]` – Raxesh Oriya Sep 16 '19 at 12:48
  • `do_install_append(){ mv ${D}/usr/lib/* ${D}${libdir}/ rmdir ${D}/usr/lib }` – Nayfe Sep 16 '19 at 12:55
  • It worked. Just wow! struggled a lot..Thank you so much.. For this question, you could write an answer suggesting `PREFERRED_VERSION_swupdate = "git"` – Raxesh Oriya Sep 16 '19 at 12:59
  • I prefer not to add this workaround as an answer, I'm not sure why 2019.4 does not work – Nayfe Sep 16 '19 at 14:52
  • Sounds good.... – Raxesh Oriya Sep 17 '19 at 04:55

1 Answers1

0

swupdate-image is a rescue system - it generates a Ramdisk. Care was taken about footprint - it runs then with SystemV and not with systemd. If you want to buid swupdate-image with systemd as init, add your own swupdate-image.bbappend and rearrange the list of packages.

sbabic
  • 196
  • 1
  • 4