I am debugging an issue where my nRF9160 (NCS 2.7.0) rolls back to the previous firmware after a seemingly successful upgrade. I am not getting enough logs from MCUboot to understand the rollback reason.
Symptoms:
-
Firmware upgrade completes successfully.
-
After reboot, MCUboot attempts to boot the new image but then rolls back.
-
Looks like a version-related validation failure, but I cannot confirm due to limited logs.
MCUboot configuration (summary):
CONFIG_FW_INFO_FIRMWARE_VERSION=2
CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256=y
CONFIG_MCUBOOT_DOWNGRADE_PREVENTION=n
CONFIG_MCUBOOT_SERIAL=y
CONFIG_BOOT_SERIAL_NO_APPLICATION=y
CONFIG_BOOT_SERIAL_BOOT_MODE=y
CONFIG_RETAINED_MEM=y
CONFIG_RETENTION=y
CONFIG_RETENTION_BOOT_MODE=y
CONFIG_BOOT_MAX_IMG_SECTORS=216
CONFIG_SIZE_OPTIMIZATIONS=y
CONFIG_FLASH=y
CONFIG_FLASH_MAP=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FPROTECT=y
My questions:
-
What are the typical reasons MCUboot rolls back even when signature verification succeeds?
-
Is there any additional logging option for MCUboot in NCS 2.7.0 to see the exact failure reason?
-
Is there any known issue around
CONFIG_FW_INFO_FIRMWARE_VERSIONor version comparison in NCS 2.7.0 for nRF9160? -
How can I reliably debug when the bootloader decides that the new image is invalid or should be reverted?
Any guidance or recommended configs to increase verbosity or isolate version-validation issues would be very helpful.