Unexpected automatic firmware upgrade

Hi,

I noticed that my Mangoh Red got automatically upgraded to a version that does not contain my custom app.

To be more precise, I developed my own app and flashed the mangoh Red with this firmware.
With app status I can see my app in the list.
legato status returns:

Systems installed:
156 [good] <– current
Legato framework is running.

So it looks like the firmware is correctly marked as good (I tried to run update --mark-good but it did not make any difference)
I let the device run on the battery until it gets fully discharged (takes ~10 hours)
The next day I power up the device with USB cable.
After the device fully boots I see with legato status that the firmware has been upgraded

Systems installed:
157 [good] <– current
Legato framework is running.

And my custom app is not listed in the app status list (as well as other apps that were previously there by default in my build)

I noticed some reboots and corrupted console logs when the battery is almost empty as well as when I plug the USB cable back on the board.

Is there some kind of automatic firmware upgrades? How can I disable it?

Thanks,

I have the same issue. Is there any way to update golden image with custom image?

Which vereions do you have?

It could be caused by the device rebooting multiple times in a row when the battery is almost dead. I’m not sure why would that caused a rollback though.

Is there any chance you could try again and capture the UART logs?

FYI: I directed this user here after they made a post on the mangOH forum about the same topic. I suspect @CoRfr is right that it is related to brown-out. I’m not really familiar with all of the details of the rollback code. @kdunwoody can you provide some insight on this issue?

@niladri: Yes, if you upgrade using FOTA (e.g. using fwupdate program), it will update the golden image.

@dfrey: @CoRfr is spot on – we need to know what Legato version this is. If it’s pre 18.07 the first step would be to try upgrading to Legato 18.09 using FOTA.

@kdunwoody My legato version is: 18.07.0-2

I uploaded my custom firmware using this command:
update build/update_files/red/mangOH.wp76xx.update 192.168.2.2
(after flashing WP76xx_Release9_GENERIC_SPK.spk through swiflash)

Can I use the fwupdate tool to install the same binary as a golden image? Or should I first create a more “complete” fw image?

Thanks for your help,
Julien.

You need to use a .cwe.

I used systocwe to convert the mangOH.wp76xx.update into .cwe files and flashed the legato.cwe file with fwupdate and it looks to work fine.
I ran the system on battery until it went down, plugged an USB cable to power it up and I still had the same firmware installed (with my custom app)

I will run more cycles to make sure it is now fixed.

Thanks,