[U-Boot-Users] How to recover kernel and root file system if it crashes

Hi All,
I have couple of questions
If kernel and / or root file system gets corrupted on target due to one of the following reasons
1, power cycle 2, bad crc , 3,bitmask 4,,incorrect inode
or any other issues /similar errors
At this point of time i can do CRC check of the kernel image before it boots up.
If the CRC is bad or image header is bad i am loading secondary kernel image.
How can we recover incase of root file system failure?
How do we let uboot know that the root file system didn't come up properly.
What should be the solution ?

In message 41483bfe0711271359x4315d9bbsc03a3ce88542c014@mail.gmail.com you wrote:
If kernel and / or root file system gets corrupted on target due to one of the following reasons
...
If the CRC is bad or image header is bad i am loading secondary kernel image.
OK.
How can we recover incase of root file system failure?
Use a watchdog that get's only triggered when your application starts up correctly. Combine it with the boot counter feature.
How do we let uboot know that the root file system didn't come up properly.
By not resetting the boot counter by your application code, so after N unseccesful boot attempts it will run the alternative boot command.
Best regards,
Wolfgang Denk
participants (2)
-
harsh poshtiwala
-
Wolfgang Denk