HW :IMX8QXP EVK
Yocto :5.10.52
Step 1 : Enable systemd support in swupdate:
bitbke -c menuconfig swupdate
Swupdate Setting--->
General Configuration---->
enable systemd support
Step2: bitbake swupdate,will show error :
| /home/wzg/8TB/Yocto/L5.10.52/build-xwayland/tmp/work/cortexa35-poky-linux/swupdate/2021.11-r0/git/core/notifier.c:27:10: fatal error: systemd/sd-daemon.h: No such file or directory
| 27 | #include <systemd/sd-daemon.h>
| | ^~~~~~~~~~~~~~~~~~~~~
| compilation terminated.
| make[2]: *** [/home/wzg/8TB/Yocto/L5.10.52/build-xwayland/tmp/work/cortexa35-poky-linux/swupdate/2021.11-r0/git/scripts/Makefile.build:168: core/notifier.o] Error 1
| make[2]: *** Waiting for unfinished jobs....
| /home/wzg/8TB/Yocto/L5.10.52/build-xwayland/tmp/work/cortexa35-poky-linux/swupdate/2021.11-r0/git/core/swupdate.c:53:10: fatal error: systemd/sd-daemon.h: No such file or directory
| 53 | #include <systemd/sd-daemon.h>
| | ^~~~~~~~~~~~~~~~~~~~~
| compilation terminated.
| make[2]: *** [/home/wzg/8TB/Yocto/L5.10.52/build-xwayland/tmp/work/cortexa35-poky-linux/swupdate/2021.11-r0/git/scripts/Makefile.build:168: core/swupdate.o] Error 1
| /home/wzg/8TB/Yocto/L5.10.52/build-xwayland/tmp/work/cortexa35-poky-linux/swupdate/2021.11-r0/git/core/network_thread.c:37:10: fatal error: systemd/sd-daemon.h: No such file or directory
| 37 | #include <systemd/sd-daemon.h>
| | ^~~~~~~~~~~~~~~~~~~~~
| compilation terminated.
| make[2]: *** [/home/wzg/8TB/Yocto/L5.10.52/build-xwayland/tmp/work/cortexa35-poky-linux/swupdate/2021.11-r0/git/scripts/Makefile.build:168: core/network_thread.o] Error 1
| make[1]: *** [/home/wzg/8TB/Yocto/L5.10.52/build-xwayland/tmp/work/cortexa35-poky-linux/swupdate/2021.11-r0/git/Makefile:515: core] Error 2
| make[1]: *** Waiting for unfinished jobs....
| make: *** [Makefile:97: sub-make] Error 2
| WARNING: exit code 1 from a shell command.
How to fix the error :
fatal error: systemd/sd-daemon.h: No such file or directory
FYI. You could follow the steps in AN13872 to build the swupdate.