Re: [uCsimm] Implementing updateable ramdisk

From: Greg Ungerer (gerg@lineo.com)
Date: Wed May 09 2001 - 03:32:46 EDT


Hi Ashwin,

Ashwin wrote:
> I have a problem. Some of my applications need to store some
> intialisation variables in files these variables can be updated i.e any
> changes made to them should be reflected the next time the system boots.
> How do I go about doing it?
> I have thought of a scheme where in I seperate the ramdisk.img from the
> romdisk directory and keep it seperately in flash say after ramdisk as a
> different partition.So when my system boots I expand the ramdisk partiton
> in ram and mount it.Now when I need to update the ramdisk I give a command
> which makes new a ramfs and compress it and write it back to the flash.
> How is the scheme does anybody have a different sugestion?
>
> The next problem would be knowing where to write the new image and how to
> write it.
> I found a utiltiy in the userland directory named flashwrite there is no
> documentation of the same can I use it for writing purpose?

I wrote a daemon that pretty much does exactly what you describe,
called flatfsd. It is distributed with the uCLinux/ColdFire
distribution.

It "archives" a small RAM filesystem to a /dev/romX device.
It will also recreate the RAM disk at boot time. Currently
you send it a SIGUSR to tell it to save away the contents of
the RAM disk to FLASH. Others have modified the sash shell
built in "sync" command to do this too.

Regards
Greg

------------------------------------------------------------------------
Greg Ungerer -- Chief Software Wizard EMAIL: gerg@lineo.com
Lineo (Integrated Products Group) PHONE: +61 7 3435 2888
825 Stanley St, FAX: +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia WEB: www.lineo.com
This message resent by the ucsimm@uclinux.com list server http://www.uClinux.com/



This archive was generated by hypermail 2b30 : Sun Apr 07 2002 - 00:01:43 EST