mcuboot
mcuboot copied to clipboard
Bootstrap feature is not working in overwrite mode in v2.0.0
Hi, I have observed one analysis in overwrite mode when MCUBOOT_BOOTSTRAP is enabled. I am using mcuboot version of v2.0.0 So here is the scenarios I tested.
- First I flashed boot binary to boot address and app binary to primary slot.
- Now mcuboot boots the primary slot image.
- Now I flashed new image to secondary slot.
- Now mcuboot does the firmware upgrade. So mcuboot copies the secondary slot to primary slot.
- Now secondary slot contains a copy and primary slot contains the same image.
- Now mcuboot boots from the primary.
- Now i flashed a corrupted binary to the primary slot.
- On reboot, i was expecting that primary slot is invalid and taking secondary slot copy again and booting with MCUBOOT_BOOTSTRAP being enabled.
- But I dont see that happening. I see that mcuboot is just validating the primary and not validating the secondary slot which should be the case when MCUBOOT_BOOTSTRAP is enabled.
- I also see that after firmware upgrade the mcuboot is erasing the secondary header and secondary trailer. I have attached the logs below.
So now I have two questions,
- Does the mcuboot not support BOOTSTRAP feature in overwrite mode?
- What is the need of erasing the secondary header and trailer after the firmware update? Can undestand of erasing the trailer. But what is the need of erasing secondary header?
MCUBoot validation logs saying primary is not valid when primary is corrupted and secondary has old good image. Can see here mcuboot not doing the validation of secondary slot. Checked this in code it is because of secondary slot header check is getting failed.
Debug Logs in overwrite mode saying erasing header and erasing trailer after firmware upgrade from secondary slot to primary slot.
From above information , can you clarify those questions and say BOOTSTRAP is not there in mcuboot overwrite mode or give a clear understanding if that feature is there.