Reset image for FX30 Cat-M to clean overlay

Hello,
We are updating our current firmware for FX30 Cat-M from the SWI FW 9.1 to 14. Our FW .cwe is built with the full FW from the Yocto chain and the reset.cwe (copied from the IDE source).
The reset.cwe is used to reset the overlay and ensure that user’s data are the proper ones.
Unfortunately, it seem that the reset.cwe doesn’t work anymore:

root@fx30:~# fwupdate checkStatus
Connecting to service ...
Bad status (Bootloader failed), install not possible.

Are there any way to get or build that image so we can clean our system after a fwupdate?

Best regards,
Guillaume

Since FW R12 , it is not allowed to run the reset.cwe:

Thanks for your really fast answer!
Since we can’t use that cwe, what is the new official way to clean the overlay?

As said before, erasing user partition is not allowed now.
You need to downgrade to R11 of WP77 FW or before to perform this operation.

Downgrading from R14 to R9.1 is possible? I thought that since partition’s size changed in the R14 no downgrade to 9.1 can be done.
Ok, so we will create some custom startup scripts to remove elements from the overlay.

Hello and happy new year,
We are trying to create the script that allow us to upgrade the firmware and clean the overlay.

Currently we are using:
=> /legato/systems/current/bin/fwupdate download firmware_full.cwe
=> flash_erase /dev/mtd16 0 0

Unfortunately, it doesn’t’ work well since fwupdate download make the FX30 reboot immediately so flash_erase is not called…
If the flash_erase is performed first, we lose access to the legato commands (including fwupdate).

Are there any commands sequence that will work for us?

Regards,
Guillaume

How about

flash_erase /dev/mtd16 0 0
reboot
fwupdate download xxx.cwe

To explain a bit more what we are trying to do is updating our FX30 that are somewhere in the world (so no local connection is possible) running our 9.1 custom FW to R14.
Your solution will work with a local update and not in our case unfortunately.
Are there any way to delay the automatic reboot of fwupdate so the flasherase can be done?

Is /dev/mtd16 userapp partition in fw r9?

On the R9.1 the overlay can be erased with the reset.cwe so for now we use that.

Before downgrading to 9.1, I’m currently trying to fwupdate between 2 R14 FW to test if the commands work properly.

I tried on WP76, I can still use fwupdate after deleting the userapp partition:

root@swi-mdm9x28-wp:~# cat /proc/mtd|grep userapp -i
mtd15: 08300000 00040000 "userapp"
root@swi-mdm9x28-wp:~#
root@swi-mdm9x28-wp:~# fwupdate query
Connecting to service ...
Firmware Version: SWI9X07Y_02.28.03.03 000000 jenkins 2019/05/21 03:33:04
Bootloader Version: SWI9X07Y_02.28.03.03 000000 jenkins 2019/05/21 03:33:04
Linux Version: 3.18.131 #1 PREEMPT Mon Oct 19 01:35:30 UTC 2020
root@swi-mdm9x28-wp:~#
root@swi-mdm9x28-wp:~# flash_eraseall /dev/mtd15
flash_eraseall has been replaced by `flash_erase <mtddev> 0 0`; please use it
Erasing 256 Kibyte @ 82c0000 -- 100 % complete
root@swi-mdm9x28-wp:~#

root@swi-mdm9x28-wp:~# fwupdate query
[364619.800059] UBIFS error (ubi3:0 pid 918): ubifs_read_node: bad node type (255 but expected 2)
[364619.807853] UBIFS error (ubi3:0 pid 918): ubifs_read_node: bad node at LEB 470:110592, LEB mapping status 1
[364619.818980] Not a node, first 24 bytes:
[364619.821820] 00000000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff                          ........................
Connecting to service ...
Firmware Version: SWI9X07Y_02.28.03.03 000000 jenkins 2019/05/21 03:33:04
Bootloader Version: SWI9X07Y_02.28.03.03 000000 jenkins 2019/05/21 03:33:04
Linux Version: 3.18.131 #1 PREEMPT Mon Oct 19 01:35:30 UTC 2020