Once I boot from Image 1, is there an attribute that I can programmatically check to indicate that I booted from Image 1 and an update image should be written to Image 0?
Dual Boot and the Secure Provisioning Tool both work great!
Solved! Go to Solution.
Hi John,
it should be possible to read image version stored in the image.
Got it. All I have to do is check the PC.
static __inline__ void * get_pc(void) {
void *pc;
asm("mov %0, pc" : "=r"(pc));
return pc;
}
Thanks for your reply.
The question is, in a dual boot configuration, how can i determine which image i booted from, 0 or 1.
If I booted from Image 0, then I know that I should load the new firmware into Image 1, or vise versa.
I could read and compare the versions in both Images, but if the validation failed on the new Image 0, then I would fallback to Image 1, but comparing the header data, I would think I booted from Image 0.
Not a show stopper, I'll find a workaround.
Thank you.
Hi John,
it should be possible to read image version stored in the image.