Explicitly overwriting overlay Legato with base Legato

Hello,

As stated in the title, is there a way to explicitly overwrite the overlay Legato system with the base? I’ve noticed that when I supply a base legato system through a .cwe file for an update the overlay Legato system gets overwritten only if the new base Legato is different from the old one. Sometimes I end up making changes to the overlay apps that I want to rollback by giving it the base legato cwe file. However if that cwe is the same as before the overlay system remains unaffected. So I end up having to update with a different base legato cwe first and then the cwe that I actually want. Is there a better way to do this? The documentation talks about erasing and reformatting the user data partition but doesn’t have any more details.

Hi ktanikel,
I think the question is how to clear the overlay during .cwe upgrade?

The current design is to keep user data, thus the overlay remains during .cwe flashing.

As you may know, we may use swiflash tool to clear the overlay user partition.

We can do one more step, use swicwe to join the reset.cwe (bundle in swiflash for product) with the .cwe file you generated.
So whenever we apply the custom .cwe, it will also erase the user partition overlay.

Please refer to more details in the instruction:
https://source.sierrawireless.com/resources/airprime/software/swiflash/
https://source.sierrawireless.com/resources/airprime/software/swicwe/

Hope it helps.
Thx

Thanks @lotam, that does answer my question.

On a somewhat unrelated note, in the link for swicwe you provided there is an example that uses a configFile.cwe

swicwe --output /tmp/image.spk --cat boot.cwe modemz.cwe boot-yocto.cwe legatoz.cwe configFile.cwe

Is this the config data that gets written in the config tree? If so, how is this file generated?

Hi ktanikel,

No, I don’t think it is relate to config tree data.
It is more for config file for modem.

I am not sure about config tree, seems the best is to use config tree API in app or via target tool “config”.
If necessary, please raise a dedicated thread for this so others can advise.

Thanks!