From: David Jander <david.jander@protonic.nl>
To: linuxppc-embedded@ozlabs.org
Subject: Re: Upgrading cramfs root file system while running (DENX wrote that is not possible)
Date: Fri, 21 Apr 2006 08:53:32 +0200 [thread overview]
Message-ID: <200604210853.32860.david.jander@protonic.nl> (raw)
In-Reply-To: <200604202303.21680.antonio.dibacco@aruba.it>
Hi,
On Thursday 20 April 2006 23:03, Antonio Di Bacco wrote:
> Yes, I also thought this too. Anything important should stay already in RAM
> but there is a chance that something bad could happen. Probably the best
What do you mean with "something bad could happen"?
The only thing I can think of is pulling the power plug while flash is being
erased or written. What else could go wrong?
We do the following: system running from read-only jffs2 partition. Sometimes
that partition is remounted read-write and single files are replaced, but in
some occasions we need to upgrade the whole fs. In that case a CGI lodas the
image into a ramdisk, and the upgrade process is started. For upgrade,
'eraseall' and 'dd' (from busybox) are needed. First, all unnecessary
processes are killed (the webserver stays alive to be able to report the
status when finished), then "dd" is called for a dummy operation (to have it
cached). After that the upgrade tool calls "eraseall" on the rootfs
partition, and then "dd" again to copy the image. At that point no critical
flash-read access should be requested since dd is already in cache (it's
busybox, so it's almost always in RAM anyway). When dd is finished, the only
other thing that's needed is to either be able to send some last html strings
to the web-server to complete the progress page and tell the user, that it's
ok to pull the plug, or reset the system, we don't care if the rest of the
system goes belly-up, since the fs was mounted read-only anyway, and the
upgrade is finished.
Of course this isn't failsafe, so there should always be a way to recover if
the rootfs gets trashed, but most of the time it's acceptable that service
personel is required in that situation. Until now, it has never been required
though.
> thing is what you suggested as second option but I have not so much ram. My
> CGI writes the downloaded new software in RAM and then I should directly
> jump to u-boot without leaving Linux the chance to mix things up and then
> u-boot should copy the RAM to the flash. It seems a strange procedure but
> what else could be done with 4MB flash and 16 MB ram?
Run from initrd? Maybe an uncomressed filesystem on a ramdisk to be able to do
XIP (execute in place)?
Greetings,
--
David Jander
next prev parent reply other threads:[~2006-04-21 6:51 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-06 20:38 Upgrading cramfs root file system Antonio Di Bacco
2006-04-19 7:42 ` Wojciech Kromer
2006-04-20 19:54 ` Antonio Di Bacco
2006-04-20 20:18 ` White
2006-04-20 21:03 ` Upgrading cramfs root file system while running (DENX wrote that is not possible) Antonio Di Bacco
2006-04-20 21:08 ` Antonio Di Bacco
2006-04-21 4:10 ` Tolunay Orkun
2006-04-21 5:51 ` antonio.dibacco
2006-04-21 16:57 ` Wolfgang Denk
2006-04-22 19:07 ` Tolunay Orkun
2006-04-21 16:55 ` Wolfgang Denk
2006-04-22 18:50 ` Tolunay Orkun
2006-04-21 6:53 ` David Jander [this message]
2006-04-21 20:23 ` Wolfgang Denk
2006-04-21 21:32 ` Antonio Di Bacco
2006-04-22 11:40 ` Stefan Eletzhofer
2006-04-22 19:21 ` Upgrading cramfs root file system while running (DENX wrote that is not possible)I Antonio Di Bacco
2006-04-22 19:53 ` Upgrading cramfs root file system while running (DENX wrote that is not possible) Tolunay Orkun
[not found] ` <20060420211120.GA3546@mail.gnudd.com>
2006-04-20 21:37 ` Antonio Di Bacco
2006-04-21 6:42 ` Upgrading cramfs root file system Wojciech Kromer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200604210853.32860.david.jander@protonic.nl \
--to=david.jander@protonic.nl \
--cc=linuxppc-embedded@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).