joelguittet / mender-mcu-client

Mender client for MCU, just because it's cool to have it
MIT License
31 stars 4 forks source link

updates: support update of "modules" #40

Closed joelguittet closed 1 month ago

joelguittet commented 2 months ago

The purpose of this ticket is to integrate capability to update "modules". This can be used to update images, embedded files, etc... The Zephyr example will be updated to show how this feature can be used to load and execute LLEXT modules.

The artifact format is defined by mender and it is created with mender-artifact tool. It will embed all files of the wanted module in the 0000 entry. The artifact type is specified during its creation so any string is allowed. Particularly it is possible to use the string "rootfs-image", but the mender server sanity check will refuse to upload the artifact so using this trick will not work. Also note that the type mender-configure is reserved for configure add-on deployments.

Solution: the function mender_client_download_artifact_callback should be able to handle other types of artifacts customized for each application. A single application should be able to use multiple types as well (depending of the module to be updated, configuration files, images, etc) and should still be able to use the default rootfs-image type to perform software upgrade. Note the application can also be upgraded using module artifact if required.

References:

joelguittet commented 1 month ago

This enhancement has been integrated in https://github.com/joelguittet/mender-mcu-client/pull/43