Hi,
I'm doing some experimenting with the "dual image" feature. (see threads https://community.nxp.com/t5/i-MX-RT/RT117x-dual-image-boot-order/m-p/1768307 and https://community.nxp.com/t5/i-MX-RT/RT117x-what-is-ImageIndex/m-p/1769568)
Specifically, using the "image version" field I can make the rom bootloader choose which of the two images in the XIP he should run.
Consider that I am experimenting with encrypted and signed images. So if it fails decryption or signature verification of the selected image, the rom bootloader will recover to the other image.
Here the question arises: how does an image know if it is running because of the boot failure of another image?
To clarify further, I will try an example:
I have two images one with image version 5 and the other with image version 4. The bootloader chooses the image with higher version, so image_v5.
Then with an update the image_v4 is overwritten with image_v6.
The rom booloader would choose the image_v6. Suppose though that for some reason the image_v6 update was corrupted.
The rom bootloader falls back to image_v5 again.
So I have two cases where image_v5 is running:
- image_v5 is running as the first choice of the rom bootloader
- image_v5 is running as the second choice of the rom bootloader
How can a FW know whether it is running as the first or second choice of the rom bootloader?
best regards
Max