I’m trying to include swupdate package in my target image using Yocto and meta-swupdate.
For swupdate there is a menuconfig available, where I can specify the configuration.
But, as stated here by Stefano Babic, the proper way is to use swupdate_%.bbappend file and use menuconfig only for finding options available and their naming. In my case I want to enable systemd feature for swupdate. As stated in previous link, that option has to be disabled in menuconfig (otherwise the bitbake command fails), and I should enable it by .bbappend file. Following that advice I have created folders structure:
swupdate
└── swupdate_%.bbappend
└── swupdate/
└── systemd.cfg
With .bbappend file content:
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
SRC_URI += "file://systemd.cfg"
And systemd.cfg content:
CONFIG_SYSTEMD=y
When I bitbake my project, with above included, and systemd manually disabled in menuconfig, then it works fine, and I can see swupdate status on my target device:
And now the part I don’t understand:
The systemd option is disabled by default for meta-swupdate (which I checked in defconfig file found in tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/swupdate/2024.05-r0).
But once I have built my target image with that .bbappend included, for each next build I have to manually check in menuconfig if that systemd option is disabled, because sometimes (I don’t understand when) it gets automatically enabled, and build fails.
Even when I clean swupdate with
bitbake -c cleanall swupdate
and as far as I understand everything should go back to default for swupdate,
I need to again manually disable systemd in menuconfig.
I would be grateful for explanation why this is happening