Legato framework seems to factory reset itself


Hi, I have an FX30s using 16.10.1.m3 R14 and am having a problem where is seems to be doing a factory reset on itself occasionally. i.e. user apps are removed and /home/root is empty after a restart.

What could cause this? (The reset button is definitely not depressed)



Have you checked if “legato status” is returning good system?


@jyijyi Thanks for the reply… Yes I just ran it and it report

root@fx30s:~# legato status
Systems installed:
  0 [good] <-- current
Legato framework is running.

Are any logs kept on why it might have been reset?


I mean just before it goes factory reset, not now.
It seems it undergoes rollback mechanism.


In the event of an error, Legato will occasionally roll back to the master firmware even if the system has been marked good.
The only way to prevent this is to use the swiflash tool or the fwupdate tool. Using these update tools updates the master firmware so it cannot be rolled back.

fwupdate download firmware.cwe

The update tool uses the same safety features that the OTA updates use with Airvantage.


My solution to this involved bundling my apps in to a cwe file, and bundling that together with the other firmware components in to an spk. I have never had a device roll back after doing this, I am not sure if it can still roll back when you only update part of the firmware.


Thanks @shib for your reply. I guess that makes sense. Although it is a bit concerning to think I can have devices in the field that roll back their FW and that I then have no way of updating them :/. I will look at creating a cwe file for my apps. I was hoping to avoid rolling my own FW and staying with the stock image, but hey ho… that does not seem feasible.



You can incorporate your app in to the stock image.
Use the systocwe tool to turn your app in to a cwe file.
Use the swicwe tool to create your new image.

You can probably do this:
swicwe -o my_firmware.spk -c stock_firmware.spk my_app.cwe

But I have downloaded all of the firmware components and do it like this:
swicwe -o my_firmware.spk -c carrier.spk yocto_linux.cwe legato.cwe my_app.cwe

Obviously those names are just for illustrative purposes, but you should get the idea.