[U-Boot] Switch to backup image after failure to boot

Correct me if I'm wrong, but I thought I read in some document that you can set some environment variable that will load the image from an alternate location (address) after failing to boot the image at the primary location. I was just wondering if someone could give me some details about this as I can't remember where I read it, or if this is even possible. Thanks.

Correct me if I'm wrong, but I thought I read in some document that you can set some environment variable that will load the image from an alternate location (address) after failing to boot the image at the primary location. I was just wondering if someone could give me some details about this as I can't remember where I read it, or if this is even possible. Thanks.
Hello
You may try something like this :
boot2=disk 0x400000 1:6 boot1=if disk 0x400000 0:6; then; else run boot2; fi myboot=ide reset; run boot1; bootm 0x400000;
Rgds

Dear Thibault VINCENT,
In message 20090819205433.45384upebz0ijmg9@mail.tibal.info you wrote:
Correct me if I'm wrong, but I thought I read in some document that you can set some environment variable that will load the image from an alternate location (address) after failing to boot the image at the primary location. I was just wondering if someone could give me some details about this as I can't remember where I read it, or if this is even possible. Thanks.
Hello
You may try something like this :
boot2=disk 0x400000 1:6 boot1=if disk 0x400000 0:6; then; else run boot2; fi myboot=ide reset; run boot1; bootm 0x400000;
Well, this will help if the image itself is corrupted.
It will not help if for example the image is intact, so it starts to boot but then for example hangs...
Best regards,
Wolfgang Denk

Dear dbrazeau,
In message 25047967.post@talk.nabble.com you wrote:
Correct me if I'm wrong, but I thought I read in some document that you can set some environment variable that will load the image from an alternate location (address) after failing to boot the image at the primary location. I was just wondering if someone could give me some details about this as I can't remember where I read it, or if this is even possible. Thanks.
As usual it depends on architecturew, CPU and board if this featuresis available and enabled for your hardware. What you are looking for is the "boot count limit". See http://www.denx.de/wiki/view/DULG/UBootBootCountLimit
Best regards,
Wolfgang Denk
participants (3)
-
dbrazeau
-
Thibault VINCENT
-
Wolfgang Denk