public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* RE: [ECOS] Failsafe Firmware Updates
@ 2006-05-16 12:52 Doyle, Patrick
  0 siblings, 0 replies; 8+ messages in thread
From: Doyle, Patrick @ 2006-05-16 12:52 UTC (permalink / raw)
  To: 'Andrew Lunn'; +Cc: ecos-discuss

> 
> Also, what is your definition of a boot failling? The kernel failed to
> load? The kernel failed to initialize? The root filesystem failed to
> mount? init failed to spawn? Tetris could not be found?
> 
So where does one find the Tetris module?  It doesn't seem to be in the 2.0
download for eCos.

--wpd

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS] Failsafe Firmware Updates
  2006-05-16 11:48 Àlex Bueno Guarner
@ 2006-05-17  0:19 ` Stewart Heitmann
  0 siblings, 0 replies; 8+ messages in thread
From: Stewart Heitmann @ 2006-05-17  0:19 UTC (permalink / raw)
  To: ecos-discuss; +Cc: Àlex Bueno Guarner, Andrew Lunn

> 	I think that when Linux starts, RedBoot is not executed any more.

sure. What I meant is that Redboot will use the fallback linux image on all subsequent boots.
 

> In my opinion, you need a watchdog.

I do, but that's only part of the story.
A watchdog will reboot me when things go bad, but it wont stop me continually rebooting the same bad linux image.

-- 
Stewart Heitmann


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* RE: [ECOS] Failsafe Firmware Updates
@ 2006-05-16 11:48 Àlex Bueno Guarner
  2006-05-17  0:19 ` Stewart Heitmann
  0 siblings, 1 reply; 8+ messages in thread
From: Àlex Bueno Guarner @ 2006-05-16 11:48 UTC (permalink / raw)
  To: Stewart Heitmann, Andrew Lunn; +Cc: ecos-discuss


>At some point after my new linux image is up and running I want it to set some kind of flag in flash that informs Redboot >that the image should be regarded as suitable for booting in future.
>If Redboot sees that flag is not set then it will fallback to booting the second linux image.

	I think that when Linux starts, RedBoot is not executed any more. Only if linux was aware of the fail and returned to it, it would be possible to "recover" RedBoot. I think. 

	I have a program which executes before loading linux kernel. This program checks the CRC of the linux image, and compares it with the correct one, saved at the end of the image. If the kernel is not correct, it tries to restore it with the backup image.

	Again, it doesn't work if, for any reason, the kernel fails. In my opinion, you need a watchdog.

	Alex Bueno


	 

-----Mensaje original-----
De: ecos-discuss-owner@ecos.sourceware.org [mailto:ecos-discuss-owner@ecos.sourceware.org] En nombre de Stewart Heitmann
Enviado el: martes, 16 de mayo de 2006 13:35
Para: Andrew Lunn
CC: ecos-discuss@ecos.sourceware.org
Asunto: Re: [ECOS] Failsafe Firmware Updates

> Actually, there is kind of support for conditional actions. If the 
> load fails, the exec will do nothing. So you build a chain
> 
> load -m file /boot/vmlinuz
> exec
> load -m file /boot/vmlinuz.old
> exec
> 

Nice idea, but as you say, it only covers failure to load an image not failure to boot, start, and successfully find tetris (which is what I want).

At some point after my new linux image is up and running I want it to set some kind of flag in flash that informs Redboot that the image should be regarded as suitable for booting in future.
If Redboot sees that flag is not set then it will fallback to booting the second linux image.
--
Stewart Heitmann


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS] Failsafe Firmware Updates
  2006-05-16  6:48 ` Andrew Lunn
@ 2006-05-16 11:35   ` Stewart Heitmann
  0 siblings, 0 replies; 8+ messages in thread
From: Stewart Heitmann @ 2006-05-16 11:35 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: ecos-discuss

> Actually, there is kind of support for conditional actions. If the
> load fails, the exec will do nothing. So you build a chain
> 
> load -m file /boot/vmlinuz
> exec
> load -m file /boot/vmlinuz.old
> exec
> 

Nice idea, but as you say, it only covers failure to load an image
not failure to boot, start, and successfully find tetris (which is what I want).

At some point after my new linux image is up and running I want it to set some
kind of flag in flash that informs Redboot that the image should be regarded as
suitable for booting in future.
If Redboot sees that flag is not set then it will fallback to booting the
second linux image.
-- 
Stewart Heitmann


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS] Failsafe Firmware Updates
  2006-05-16  0:40 Stewart Heitmann
  2006-05-16  3:03 ` Tim michals
@ 2006-05-16  6:48 ` Andrew Lunn
  2006-05-16 11:35   ` Stewart Heitmann
  1 sibling, 1 reply; 8+ messages in thread
From: Andrew Lunn @ 2006-05-16  6:48 UTC (permalink / raw)
  To: Stewart Heitmann; +Cc: ecos-discuss

On Tue, May 16, 2006 at 10:40:21AM +1000, Stewart Heitmann wrote:
> Can Redboot be setup to boot a second linux image
> in case the first one fails to boot?
> 
> I want to be able to upgrade my firware in the field,
> and if the new firmware fails to boot then I would
> like Redboot to revert to a factory-default firmware
> image as a fallback position (on the next power-up).
> 
> So how can Redboot tell if the previous boot failed?
> And if it can tell, how does it then change its own
> config settings? The boot scripts don't appear to
> support conditional statements of any kind.

Actually, there is kind of support for conditional actions. If the
load fails, the exec will do nothing. So you build a chain

load -m file /boot/vmlinuz
exec
load -m file /boot/vmlinuz.old
exec

I don't know is if linux itself can return. The z in vmlimunz means it
is compressed. If the decompression fails i don't know if it just
panic's or does it return back to the caller? 

Also, what is your definition of a boot failling? The kernel failed to
load? The kernel failed to initialize? The root filesystem failed to
mount? init failed to spawn? Tetris could not be found?

What solution you adopt will depend on how you define failed to
boot...

        Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS] Failsafe Firmware Updates
  2006-05-16  3:03 ` Tim michals
@ 2006-05-16  3:42   ` Stewart Heitmann
  0 siblings, 0 replies; 8+ messages in thread
From: Stewart Heitmann @ 2006-05-16  3:42 UTC (permalink / raw)
  To: ecos-discuss; +Cc: Tim michals

> you can create your own command and use FIS to store
> results

Hmm, good idea.
thanks
-- 
Stewart Heitmann


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS] Failsafe Firmware Updates
  2006-05-16  0:40 Stewart Heitmann
@ 2006-05-16  3:03 ` Tim michals
  2006-05-16  3:42   ` Stewart Heitmann
  2006-05-16  6:48 ` Andrew Lunn
  1 sibling, 1 reply; 8+ messages in thread
From: Tim michals @ 2006-05-16  3:03 UTC (permalink / raw)
  To: Stewart Heitmann, ecos-discuss

you can create your own command and use FIS to store
results

--- Stewart Heitmann <stewart@heitmann.id.au> wrote:

> Can Redboot be setup to boot a second linux image
> in case the first one fails to boot?
> 
> I want to be able to upgrade my firware in the
> field,
> and if the new firmware fails to boot then I would
> like Redboot to revert to a factory-default firmware
> image as a fallback position (on the next power-up).
> 
> So how can Redboot tell if the previous boot failed?
> And if it can tell, how does it then change its own
> config settings? The boot scripts don't appear to
> support conditional statements of any kind.
> 
> Any ideas?
> -- 
> Stewart Heitmann
> 
> 
> -- 
> Before posting, please read the FAQ:
> http://ecos.sourceware.org/fom/ecos
> and search the list archive:
> http://ecos.sourceware.org/ml/ecos-discuss
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam
protection around 
http://mail.yahoo.com 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* [ECOS] Failsafe Firmware Updates
@ 2006-05-16  0:40 Stewart Heitmann
  2006-05-16  3:03 ` Tim michals
  2006-05-16  6:48 ` Andrew Lunn
  0 siblings, 2 replies; 8+ messages in thread
From: Stewart Heitmann @ 2006-05-16  0:40 UTC (permalink / raw)
  To: ecos-discuss

Can Redboot be setup to boot a second linux image
in case the first one fails to boot?

I want to be able to upgrade my firware in the field,
and if the new firmware fails to boot then I would
like Redboot to revert to a factory-default firmware
image as a fallback position (on the next power-up).

So how can Redboot tell if the previous boot failed?
And if it can tell, how does it then change its own
config settings? The boot scripts don't appear to
support conditional statements of any kind.

Any ideas?
-- 
Stewart Heitmann


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

end of thread, other threads:[~2006-05-17  0:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-16 12:52 [ECOS] Failsafe Firmware Updates Doyle, Patrick
  -- strict thread matches above, loose matches on Subject: below --
2006-05-16 11:48 Àlex Bueno Guarner
2006-05-17  0:19 ` Stewart Heitmann
2006-05-16  0:40 Stewart Heitmann
2006-05-16  3:03 ` Tim michals
2006-05-16  3:42   ` Stewart Heitmann
2006-05-16  6:48 ` Andrew Lunn
2006-05-16 11:35   ` Stewart Heitmann

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 read-only IMAP folder(s) and NNTP newsgroup(s).