Search code examples
embedded-linuxyoctoswupdate

SWUpdate use copy-handler from Yocto meta-swupdate layer


Trying to copy /etc/machine-id from one partition to another using SWUpdate.

When running the .swu update I get the error ERROR : feature 'copy' required for '' in sw-description is absent!

I guess I'm supposed to modify swupdate_%.bbappend on Yocto, but I'm not sure what to add to the DEPENDS ?

Modified the sw-description to use the SWUpdate copy-handler

scripts : (
    {
    device = "/dev/mmcblk0p3";
    type = "copy";
    properties : {
            copyfrom = "/etc/machine-id";
            type = "postinstall";
            chain = "raw";
            create-destination = "true";
            }
    }
);

Log:

[add_properties] : Found properties for :
[add_properties_cb] : Property copyfrom: /etc/machine-id
[add_properties_cb] : Property type: postinstall
[add_properties_cb] : Property chain: raw
[add_properties_cb] : Property create-destination: true
[_parse_scripts] : Found Script:
[_parse_bootloader] : Bootloader var: swupdateboot = /dev/mmcblk0p3
ERROR : feature 'copy' required for '' in sw-description is absent!
ERROR : Compatible SW not found
ERROR : Writing to IPC fails due to Broken pipe
Image invalid or corrupted. Not installing ...

Solution

  • Using an older version of SWUpdate without the copy-handler support. Need to upgrade the meta-swupdate layer to a more recent version and in run bitbake -c menuconfig swupdate and enable Copy Handler so that defconfig has "CONFIG_COPY=y".