From: Tolunay Orkun <listmember@orkun.us>
To: Antonio Di Bacco <antonio.dibacco@aruba.it>
Cc: White <white@from-b.org>, linuxppc-embedded@ozlabs.org
Subject: Re: Upgrading cramfs root file system while running (DENX wrote that is not possible)
Date: Thu, 20 Apr 2006 23:10:39 -0500 [thread overview]
Message-ID: <44485B3F.8080308@orkun.us> (raw)
In-Reply-To: <200604202303.21680.antonio.dibacco@aruba.it>
If your bootloader is U-Boot and you are using standard bootm command to
boot, U-Boot decompresses the initrd image to RAM before passing the
file system to Linux. So, you are not working with flash copy and
updating the flash copy is not a problem at all. This applies to ext2,
cramfs or squashfs based initrd.
You can keep working as long as you like until it is time to reboot.
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
> 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?
>
> Bye,
> Antonio.
>
> On Thursday 20 April 2006 22:18, White wrote:
>> make it easy: if you start an application which do the flash and after
>> this a reset.. nothing should happen. I do it that way.
>> the application resist completly in RAM .. and all important libs are
>> in RAm or in Filesystem Cache.
>> It's only important that you pretend any Application from accessing
>> Datafiles or start of new application ...
>>
>> Alternativly, you can put it in a reserved RAM Area ( mark it not
>> usable by Linux) and put a Flash Code in your Bootloader (U-boot?)
>> after a reset....
>>
>> But overwrite a cramfs works for me on >100 times without problems.
>>
>> Am Thu, 20 Apr 2006 21:54:45 +0200 schrieb Antonio Di Bacco
>>
>> <antonio.dibacco@aruba.it> :
>>> Yes you are right, it is not a good idea to overwrite working cramfs
>>> filesystem. But what happens if I download the new cramfs plus kernel in
>>> RAM, do a checksum and then, completely in kernel mode, disabling all the
>>> interrupts, I write to flash? No process could complain that I am
>>> overwriting because no one is executing.
>>>
>>> Bye,
>>> Antonio.
>>>
>>> On Wednesday 19 April 2006 09:42, Wojciech Kromer wrote:
>>>> Dnia 2006-04-06 22:38, Użytkownik Antonio Di Bacco napisał:
>>>>> Hi,
>>>>>
>>>>> how could I upgrade my cramfs rootfs? I have a CGI in the rootfs that
>>>>> receives the new rootfs from a web interface and then tries to write
>>>>> it in the flash. While overwriting the old cramfs, the CGI will
>>>>> continue to work? something weird could happen?
>>>> Generally it's not a good idea to override working filesystem ( I've
>>>> tried to do it once).
>>>>
>>>> You can have two separate copies of filesystem, one to work with, and
>>>> another to overwrite, it requires more flash.
>>>> Another way is working in initrd, it requires more RAM.
>>>> You can also use jffs2 or jffs3 (experimental) to have read-write
>>>> filesystem, and change applications only, not whole filesystem (be
>>>> carefull with changing busybox or libraries!)
>>> _______________________________________________
>>> Linuxppc-embedded mailing list
>>> Linuxppc-embedded@ozlabs.org
>>> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>> _______________________________________________
>> Linuxppc-embedded mailing list
>> Linuxppc-embedded@ozlabs.org
>> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
next prev parent reply other threads:[~2006-04-21 4:10 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 [this message]
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
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=44485B3F.8080308@orkun.us \
--to=listmember@orkun.us \
--cc=antonio.dibacco@aruba.it \
--cc=linuxppc-embedded@ozlabs.org \
--cc=white@from-b.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.