Hello Igorpadykov,
Is there any other way to detect it not using secure boot mechanism you have suggested?
Like as I said earlier, I am dealing with firmware recovery mechanism in our device and having trouble in detecting the Kernel Panic(Filesystem Mount failure - due to flash corruption) on u-boot for switching the boot path. The Processor doesnt support the power up event detection (like watchdog reset or power reset).
NAND Memory LAYOUT:
- SPL
- u-boot
- u-boot-bak
- u-boot-env
- kernel1
- kernel2
- rootfs1
- rootfs2
How to handle following boot flow:
1. power on the device
2. U-boot boots the PATH 1 (kernel1 and rootfs1)
3. Kernel1 boots but fails to mount Filesystem due to flash corruption
4. System resets after 10 seconds of panic as the PANIC=10 is in bootargs
5. u-boot started booting.
6. ??? How to know if the device now has to use PATH 2 (kernel2 and rootfs2) to boot.
Any suggestions will be helpful.
Regards,
Ankur