public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] Fail Safe: Redundant U-boot Images in Flash??? ?
@ 2005-09-23 19:35 Roberts, John
  2005-09-23 19:40 ` Frank
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Roberts, John @ 2005-09-23 19:35 UTC (permalink / raw)
  To: u-boot

 

>It is impossible - there is only one reset entry point.
>How would you determine which image to boot?

>What you typically do (assuming the hardware supports it) is to  have
>two  banks  of  flash memory that can be swapped using some jumper or
>switch or so.

The code at the entry point needs to be small, reliable and never require an
upgrade in the field. This code would run a CRC on the primary U-boot image
to determine if it's safe to boot, upon CRC failure verify then run the
backup image.

For remote systems we need to resolve the issue of upgrade failure without
human intervention - or perhaps remote human intervention. 

-John Roberts  (Engineer, not Judge)

^ permalink raw reply	[flat|nested] 16+ messages in thread
* [U-Boot-Users] Fail Safe: Redundant U-boot Images in Flash??? ?
@ 2005-09-23 21:40 Eisenhut, Daniel
  2005-09-23 22:29 ` Frank
  0 siblings, 1 reply; 16+ messages in thread
From: Eisenhut, Daniel @ 2005-09-23 21:40 UTC (permalink / raw)
  To: u-boot

> > The code at the entry point needs to be small, reliable and never require an
> > upgrade in the field. This code would run a CRC on the primary U-boot image
>
> THe code at the  entry  point  that  is  small,  reliable  and  never
> requires  an upgrade in the field is U-Boot. Just don't touch it. You
> don't have to.

...insert bullet, spin cylinder, point at foot, pull trigger...

Hopefully, we will never need to update.  But if we do, it'd be nice
to be able to reduce the risk of updating as much as possible.

> What you typically do (assuming the hardware supports it) is to  have
> two  banks  of  flash memory that can be swapped using some jumper or
> switch or so.

When it costs a grand just to have a service tech walk in the door, this
becomes an unacceptable option.

^ permalink raw reply	[flat|nested] 16+ messages in thread
* [U-Boot-Users] Fail Safe: Redundant U-boot Images in Flash??? ?
@ 2005-09-23 21:34 Eisenhut, Daniel
  2005-09-23 22:23 ` Frank
  0 siblings, 1 reply; 16+ messages in thread
From: Eisenhut, Daniel @ 2005-09-23 21:34 UTC (permalink / raw)
  To: u-boot

> > 
> > > So what happens if the CRC is correct, but the new image has
> > a
> > > bug (functional ?) in it....
> > 
> > Then you should of tested your code before you released it. 
> > If the
> > CRC passes, then it is the same as what you tested.
> > 
> Famous last words. Sometimes corner cases are missed. I don't
> know about you, but I realized a long time ago I am not perfect
> and make mistakes. So what do you do when the hardware reboots
> because of some unforseen proble? Just sit in a loop and reboot
> forever?

No, no one is perfect.  But to imply that we should forgo implementing
fail safes to protect against the power failing right as we are
programming flash or flash becoming corrupt just because we might
still have a bug in our code, is just plain foolish.

^ permalink raw reply	[flat|nested] 16+ messages in thread
* [U-Boot-Users] Fail Safe: Redundant U-boot Images in Flash??? ?
@ 2005-09-23 21:09 Eisenhut, Daniel
  2005-09-23 21:19 ` Frank
  2005-09-23 21:22 ` Frank
  0 siblings, 2 replies; 16+ messages in thread
From: Eisenhut, Daniel @ 2005-09-23 21:09 UTC (permalink / raw)
  To: u-boot

> So what happens if the CRC is correct, but the new image has a
> bug (functional ?) in it....

Then you should of tested your code before you released it.  If the
CRC passes, then it is the same as what you tested.

^ permalink raw reply	[flat|nested] 16+ messages in thread
* [U-Boot-Users] Fail Safe: Redundant U-boot Images in Flash????
@ 2005-09-23 18:52 Eisenhut, Daniel
  2005-09-23 19:06 ` Wolfgang Denk
  0 siblings, 1 reply; 16+ messages in thread
From: Eisenhut, Daniel @ 2005-09-23 18:52 UTC (permalink / raw)
  To: u-boot

> Has anyone ever implemented duel U-boot images in flash as a
> fail safe mechanism? A primary U-boot image, and a backup U-boot
> image incase the primary image is invalid.
>
> I understand there needs to be a single boot point with
> verification to determine which image to boot from. Is there a
> mechanism already in U-boot that can do this?

We're looking at doing something similar on an MPC860 with a
first-stage U-Boot that just checksums and jumps to one of two
second-stage U-Boot images that are stored in flash.  This would
allow us to update U-Boot in the field without risk of losing our
bootloader and being left with a dead system.  Of course, this
assumes we keep the initial U-Boot very simple so that we can get
away with never updating it. We haven't started working on it yet,
just discussing at a high level.  Might have some issues with
vectors.

Dan

^ permalink raw reply	[flat|nested] 16+ messages in thread
* [U-Boot-Users] Fail Safe: Redundant U-boot Images in Flash????
@ 2005-09-23 17:02 Roberts, John
  2005-09-23 18:56 ` Wolfgang Denk
  0 siblings, 1 reply; 16+ messages in thread
From: Roberts, John @ 2005-09-23 17:02 UTC (permalink / raw)
  To: u-boot


Has anyone ever implemented duel U-boot images in flash as a fail safe
mechanism? A primary U-boot image, and a backup U-boot image incase the
primary image is invalid.

I understand there needs to be a single boot point with verification to
determine which image to boot from. Is there a mechanism already in U-boot
that can do this?

Any information is appreciated.

(440gx)
> -John Roberts
> 
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20050923/41222c67/attachment.htm 

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2005-09-23 22:29 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-23 19:35 [U-Boot-Users] Fail Safe: Redundant U-boot Images in Flash??? ? Roberts, John
2005-09-23 19:40 ` Frank
2005-09-23 20:02 ` [U-Boot-Users] Fail Safe: Redundant U-boot Images in Flash???? Thomas Lange
2005-09-23 20:43 ` [U-Boot-Users] Fail Safe: Redundant U-boot Images in Flash??? ? Wolfgang Denk
  -- strict thread matches above, loose matches on Subject: below --
2005-09-23 21:40 Eisenhut, Daniel
2005-09-23 22:29 ` Frank
2005-09-23 21:34 Eisenhut, Daniel
2005-09-23 22:23 ` Frank
2005-09-23 21:09 Eisenhut, Daniel
2005-09-23 21:19 ` Frank
2005-09-23 21:22 ` Frank
2005-09-23 18:52 [U-Boot-Users] Fail Safe: Redundant U-boot Images in Flash???? Eisenhut, Daniel
2005-09-23 19:06 ` Wolfgang Denk
2005-09-23 17:02 Roberts, John
2005-09-23 18:56 ` Wolfgang Denk
2005-09-23 19:22   ` Dan Malek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox