Handling power failure - MPC5200

Wolfgang Denk wd at denx.de
Fri Nov 5 03:22:57 EST 2004


In message <OF368071C2.FBC6B7BC-ON00256F42.003F3DF3-00256F42.0044E8BB at marel.is> you wrote:
> 
> Capacitors on the supply provide me with some milliseconds to repond to 
> power failure, which I would
> like to use to do as much cleanup as possible before power is totally 
> gone.  In particular, I am concerned

How many is "some"? If it's not >100 or so it is probably  not  worht
the effort...

> with trying to prevent damage to filesystems.  The board has Compact Flash
> and onboard flash which
> are used as filesystems.  The board will be used as an industrial 
> controller.
> 
> Can anyone point me to examples of how this can be handled ?

Use the standard methods: use the CF card read-only  (many  CF  cards
can  be  damaged  [beyond  repair]  when  you power off while a write
operation is in progress). Use a filesystem  on  the  ob-board  flash
which knows how to handle a loss of power (i. e., use JFFS2).

> Can anyone share experience of a similar setup, which filesystems to 
> select etc ?

We usually use ext2 read-only on the CF, JFFS2 for the writable parts
on the on-board flash, cramfs for all  parts  that  need  not  to  be
written  on  a  regular  base (most of your root filesystem including
application  code,  libraries  etc.),  and  a  FiST   based   overlay
filesystem in case of software patches need to be added.

Best regards,

Wolfgang Denk

-- 
See us @ Embedded/Electronica Munich, Nov 09 - 12, Hall A.6 Booth 513
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
You don't have to stay up nights to succeed; you have to  stay  awake
days.



More information about the Linuxppc-embedded mailing list