linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Failsafe bootloader
@ 2003-06-04 13:51 Callebaut Benoit
  2003-06-04 14:13 ` Wolfgang Denk
  0 siblings, 1 reply; 15+ messages in thread
From: Callebaut Benoit @ 2003-06-04 13:51 UTC (permalink / raw)
  To: linuxppc-embedded mailing list


Hi,
We use small part of our flash to hold config data (last sector of the flash)
and which image must be started. PPCBoot read this and start the right image.
when upgrading , we change the kernel option to the failsafe kernel, do the
update of the second kernel (the working one) and after that we change the
kernel option again and we try to start the new one. We use also a kind of
watchdog feature in case of system lockout.

Benoit Callebaut
Barco NV
www.barco.com


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread
* RE: Failsafe bootloader
@ 2003-06-04 13:15 Johnson, Stephen
  2003-06-04 14:11 ` Wolfgang Denk
  0 siblings, 1 reply; 15+ messages in thread
From: Johnson, Stephen @ 2003-06-04 13:15 UTC (permalink / raw)
  To: 'Sam Ravnborg', linuxppc-embedded


We implemented a verification feature to ppcboot for products that performs
a crc32 check before branching to an image. If the crc32 fails to match a
stored checksum, it will check a secondary image, if that one fails too then
we usually default to a tftp from a well known tftp server that we have
accessible. One could take this to as much extreme as desired, but that's up
to the system designers to deem what's reasonable and what's overkill. The
key is the primitives to do such are in place.

Obviously, we put some resources into this for our products. You have to
expect to add some value to your products.

ppcboot allows this to be quite easy since the bootcmd can contain several
commands.




-----Original Message-----
From: Sam Ravnborg [mailto:sam@ravnborg.org]
Sent: Tuesday, June 03, 2003 2:29 PM
To: linuxppc-embedded@lists.linuxppc.org
Subject: Failsafe bootloader



Hi all.

We are developing an application for an embedded target that will be
located in some rural areas. We foresee a need to update the target
with a new version of the application or a new kernel from time to time.

A few of the added requirements on top of that are:
1) The target shall boot up in the old kernel, if a bogus kernel is loaded
2) The target shall boot up in the old application, if a bogus
	application is loaded
3) On the management side an update shall be handled as a single file,
	the target may decide to 'unpack' it when received.

We have looked all over the net, but none of the bootloaders found
so far could meet the above demands.
The boot loaders usually have an interactive mode used to select
between different configurations - and there are no feedback from
the application side if the reboot actually went well.
The interactiviness does not fit well with an embedded target.

Do you know of a boot loader that partially or fully meets the above
requirements?

Background information
Today we are using VxWorks - for which we have made our own boot loader.
The boot laoder allows the boot loader itself, and the application part
to be upgraded - and if a restart is failed the old version will
be activated on a subsequent build.
I want the same behaviour in the Linux based target.

	Thanks in advance,

	Sam


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread
[parent not found: <00048177.C22236@nokia.com>]
* RE: Failsafe bootloader
@ 2003-06-04 12:33 Darin.Johnson
  0 siblings, 0 replies; 15+ messages in thread
From: Darin.Johnson @ 2003-06-04 12:33 UTC (permalink / raw)
  To: linuxppc-embedded


> Of course, this still doesn't protect you from loading a new
> bootrom that
> has a valid checksum but a fatal problem (doh-doh-doh).
> Fortunately, in
> that case the idiot is ourselves and we deserve the pain involved, and
> hopefully learn from it ;-).

The problems we had were first that upgrades could be done
transparently without the user knowing, so you can't
really protect from the user unplugging (though we were
supposed to be an always-on-don't-turn-off product).
Second, have an image with a good checksum that boots
up ok is only part of the story, we have to make sure that
it can communicate correctly on its network.  Ie, the application
software has to communicate to the boot loader that the new
image can be kept.

Also from experience, I've really lost a lot of hair in
situations with other products that say "do not turn off the
power until this update is finished", only to have the product
crash, or the computer that is talking to it crashes.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread
[parent not found: <00048074.C22236@opensource.se>]
* RE: Failsafe bootloader
@ 2003-06-04  6:47 Darin.Johnson
  2003-06-04 10:16 ` Magnus Damm
  0 siblings, 1 reply; 15+ messages in thread
From: Darin.Johnson @ 2003-06-04  6:47 UTC (permalink / raw)
  To: linuxppc-embedded


We had a similar scheme for upgrades.  There was an "approved" image, and a "current" image.  If the current image wasn't working it would revert to the approved image automatically.  If the running image appeared to be ok, the operator could then mark it as the "approved" version.  In addition, there was a "factory installed" image that could be used if the operator messed the system up badly.

The drawback is that this takes more Flash space, which can be important when the goals turn from "make a product that works" into "save an extra $5 on the board cost".  Thus, for a later product we got rid of the factory image.

It also could be very nice if you could upgrade the lowest level of software, the boot loader or system initializer (ppcboot, etc).  We had found a bug in our loader at one point, and because many registers are "write once" it was difficult to fix these settings from the application software.  But finding a foolproof and reliable way to upgrade the boot loader software is difficult, especially if you are relying on customers and operators to do the upgrading.

Darin Johnson

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread
[parent not found: <00047C13.C22236@ravnborg.org>]
* Failsafe bootloader
@ 2003-06-03 19:28 Sam Ravnborg
  2003-06-03 19:47 ` Mark Hatle
  2003-06-03 20:05 ` Wolfgang Denk
  0 siblings, 2 replies; 15+ messages in thread
From: Sam Ravnborg @ 2003-06-03 19:28 UTC (permalink / raw)
  To: linuxppc-embedded


Hi all.

We are developing an application for an embedded target that will be
located in some rural areas. We foresee a need to update the target
with a new version of the application or a new kernel from time to time.

A few of the added requirements on top of that are:
1) The target shall boot up in the old kernel, if a bogus kernel is loaded
2) The target shall boot up in the old application, if a bogus
	application is loaded
3) On the management side an update shall be handled as a single file,
	the target may decide to 'unpack' it when received.

We have looked all over the net, but none of the bootloaders found
so far could meet the above demands.
The boot loaders usually have an interactive mode used to select
between different configurations - and there are no feedback from
the application side if the reboot actually went well.
The interactiviness does not fit well with an embedded target.

Do you know of a boot loader that partially or fully meets the above
requirements?

Background information
Today we are using VxWorks - for which we have made our own boot loader.
The boot laoder allows the boot loader itself, and the application part
to be upgraded - and if a restart is failed the old version will
be activated on a subsequent build.
I want the same behaviour in the Linux based target.

	Thanks in advance,

	Sam

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

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

end of thread, other threads:[~2003-06-04 14:13 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-04 13:51 Failsafe bootloader Callebaut Benoit
2003-06-04 14:13 ` Wolfgang Denk
  -- strict thread matches above, loose matches on Subject: below --
2003-06-04 13:15 Johnson, Stephen
2003-06-04 14:11 ` Wolfgang Denk
     [not found] <00048177.C22236@nokia.com>
2003-06-04 12:54 ` Jerry Van Baren
2003-06-04 12:33 Darin.Johnson
     [not found] <00048074.C22236@opensource.se>
2003-06-04 12:04 ` Jerry Van Baren
2003-06-04  6:47 Darin.Johnson
2003-06-04 10:16 ` Magnus Damm
     [not found] <00047C13.C22236@ravnborg.org>
2003-06-03 20:10 ` Jerry Van Baren
2003-06-03 21:51   ` Wolfgang Denk
2003-06-03 19:28 Sam Ravnborg
2003-06-03 19:47 ` Mark Hatle
2003-06-03 20:07   ` Wolfgang Denk
2003-06-03 20:05 ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).