All of lore.kernel.org
 help / color / mirror / Atom feed
* ramfs/tmpfs for application partition
@ 2009-01-15 16:43 Jacob Avraham
  2009-01-15 16:55 ` Leisner, Martin
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Jacob Avraham @ 2009-01-15 16:43 UTC (permalink / raw)
  To: linux-embedded@vger.kernel.org


Hi,

I have a system with 128M RAM and a flash partitioned so that 10M is dedicated to initramfs image,
6M to application partition. And another 6M for JFFS2.
As I have plenty of RAM, I'd like to have my application directory mounted on RAM, from a pre-populated
filesystem that resides in the 6M application partition.
So basically I want to use the same mechanism as initramfs, but mounted on /my/app/partition instead of root.
Does it make sense? How do I go about and do that?


Jacob Avraham



 
 
************************************************************************************
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals & computer viruses.
************************************************************************************



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

* RE: ramfs/tmpfs for application partition
  2009-01-15 16:43 ramfs/tmpfs for application partition Jacob Avraham
@ 2009-01-15 16:55 ` Leisner, Martin
  2009-01-17  9:39   ` Jacob Avraham
  2009-01-15 17:04 ` Mike Frysinger
  2009-03-09  6:00 ` Aras Vaichas
  2 siblings, 1 reply; 7+ messages in thread
From: Leisner, Martin @ 2009-01-15 16:55 UTC (permalink / raw)
  To: Jacob Avraham, linux-embedded

Not sure I fully understand....

You basically want two blobs -- the initramfs and the application?

You can expand the initramfs by copying to it...so you mount the application and run a script to copy it to initramfs before running it.

marty

>   -----Original Message-----
>   From: linux-embedded-owner@vger.kernel.org [mailto:linux-embedded-
>   owner@vger.kernel.org] On Behalf Of Jacob Avraham
>   Sent: Thursday, January 15, 2009 11:43 AM
>   To: linux-embedded@vger.kernel.org
>   Subject: ramfs/tmpfs for application partition
>   
>   
>   Hi,
>   
>   I have a system with 128M RAM and a flash partitioned so that 10M is
>   dedicated to initramfs image,
>   6M to application partition. And another 6M for JFFS2.
>   As I have plenty of RAM, I'd like to have my application directory
>   mounted on RAM, from a pre-populated
>   filesystem that resides in the 6M application partition.
>   So basically I want to use the same mechanism as initramfs, but mounted
>   on /my/app/partition instead of root.
>   Does it make sense? How do I go about and do that?
>   
>   
>   Jacob Avraham
>   
>   
>   
>   
>   
>   ************************************************************************
>   ************
>   This footnote confirms that this email message has been scanned by
>   PineApp Mail-SeCure for the presence of malicious code, vandals &
>   computer viruses.
>   ************************************************************************
>   ************
>   
>   
>   
>   --
>   To unsubscribe from this list: send the line "unsubscribe linux-
>   embedded" in
>   the body of a message to majordomo@vger.kernel.org
>   More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: ramfs/tmpfs for application partition
  2009-01-15 16:43 ramfs/tmpfs for application partition Jacob Avraham
  2009-01-15 16:55 ` Leisner, Martin
@ 2009-01-15 17:04 ` Mike Frysinger
       [not found]   ` <4972E3F4.1020508@codefidence.com>
  2009-03-09  6:00 ` Aras Vaichas
  2 siblings, 1 reply; 7+ messages in thread
From: Mike Frysinger @ 2009-01-15 17:04 UTC (permalink / raw)
  To: Jacob Avraham; +Cc: linux-embedded@vger.kernel.org

On Thu, Jan 15, 2009 at 11:43, Jacob Avraham wrote:
> I have a system with 128M RAM and a flash partitioned so that 10M is dedicated to initramfs image,
> 6M to application partition. And another 6M for JFFS2.
> As I have plenty of RAM, I'd like to have my application directory mounted on RAM, from a pre-populated
> filesystem that resides in the 6M application partition.
> So basically I want to use the same mechanism as initramfs, but mounted on /my/app/partition instead of root.
> Does it make sense? How do I go about and do that?

`mount -t tmpfs tmpfs /my/app/partition` ?
-mike

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

* RE: ramfs/tmpfs for application partition
  2009-01-15 16:55 ` Leisner, Martin
@ 2009-01-17  9:39   ` Jacob Avraham
  2009-01-17 15:55     ` Marco
  0 siblings, 1 reply; 7+ messages in thread
From: Jacob Avraham @ 2009-01-17  9:39 UTC (permalink / raw)
  To: Leisner, Martin, linux-embedded@vger.kernel.org

>
> Not sure I fully understand....
>
> You basically want two blobs -- the initramfs and the application?
>
Yes, I want to keep on the flash a stable, rarely changed, OS image, which is in initramfs
format, and another application image, which is changing frequently.

> You can expand the initramfs by copying to it...so you mount the
> application and run a script to copy it to initramfs before running it.
>
When you say 'you mount the application' it means that the application
image on the flash has to be in some filesystem format, right? Like cramfs?
On the other hand, if I want the application directory tree to reside
in memory (and handle application persistency needs via the JFFS2 partition),
maybe all I need is to keep a compressed tar image of the application on the flash,
and untar it into /my/application/partition, which will be in initramfs?
So I don't need to create another tmpfs filesystem as suggested in another post?
Is there a better way to handle this?

> marty
>
> >
> >   Hi,
> >
> >   I have a system with 128M RAM and a flash partitioned so that 10M
> is
> >   dedicated to initramfs image,
> >   6M to application partition. And another 6M for JFFS2.
> >   As I have plenty of RAM, I'd like to have my application directory
> >   mounted on RAM, from a pre-populated
> >   filesystem that resides in the 6M application partition.
> >   So basically I want to use the same mechanism as initramfs, but
> mounted
> >   on /my/app/partition instead of root.
> >   Does it make sense? How do I go about and do that?
> >
> >
> >   Jacob Avraham
> >



 
 
************************************************************************************
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals & computer viruses.
************************************************************************************



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

* Re: ramfs/tmpfs for application partition
  2009-01-17  9:39   ` Jacob Avraham
@ 2009-01-17 15:55     ` Marco
  0 siblings, 0 replies; 7+ messages in thread
From: Marco @ 2009-01-17 15:55 UTC (permalink / raw)
  To: Jacob Avraham; +Cc: Leisner, Martin, linux-embedded@vger.kernel.org

Hi Jacob,

only another idea, why do you think to use a persistant ram filesystem
(like pramfs) mounted on /my/application/partition? If you use a simple
ram you can repopulate after a power off/on the directory with a simple
untar of the archive. In this way you haven't to repopulate the
filesystem after each reboot. What do you think about it? Could it be a
solution?

Marco

Jacob Avraham ha scritto:
>> Not sure I fully understand....
>>
>> You basically want two blobs -- the initramfs and the application?
>>
> Yes, I want to keep on the flash a stable, rarely changed, OS image, which is in initramfs
> format, and another application image, which is changing frequently.
> 
>> You can expand the initramfs by copying to it...so you mount the
>> application and run a script to copy it to initramfs before running it.
>>
> When you say 'you mount the application' it means that the application
> image on the flash has to be in some filesystem format, right? Like cramfs?
> On the other hand, if I want the application directory tree to reside
> in memory (and handle application persistency needs via the JFFS2 partition),
> maybe all I need is to keep a compressed tar image of the application on the flash,
> and untar it into /my/application/partition, which will be in initramfs?
> So I don't need to create another tmpfs filesystem as suggested in another post?
> Is there a better way to handle this?
> 
>> marty
>>
>>>   Hi,
>>>
>>>   I have a system with 128M RAM and a flash partitioned so that 10M
>> is
>>>   dedicated to initramfs image,
>>>   6M to application partition. And another 6M for JFFS2.
>>>   As I have plenty of RAM, I'd like to have my application directory
>>>   mounted on RAM, from a pre-populated
>>>   filesystem that resides in the 6M application partition.
>>>   So basically I want to use the same mechanism as initramfs, but
>> mounted
>>>   on /my/app/partition instead of root.
>>>   Does it make sense? How do I go about and do that?
>>>
>>>
>>>   Jacob Avraham
>>>
> 
> 
> 
>  
>  
> ************************************************************************************
> This footnote confirms that this email message has been scanned by
> PineApp Mail-SeCure for the presence of malicious code, vandals & computer viruses.
> ************************************************************************************
> 
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-embedded" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

* Re: ramfs/tmpfs for application partition
       [not found]     ` <FF584854D6FFE547AB2F7515A798AC3A045716A316@venus.imagineil.tv>
@ 2009-01-18 13:55       ` Gilad Ben-Yossef
  0 siblings, 0 replies; 7+ messages in thread
From: Gilad Ben-Yossef @ 2009-01-18 13:55 UTC (permalink / raw)
  To: Jacob Avraham; +Cc: Mike Frysinger, linux-embedded@vger.kernel.org

Jacob Avraham wrote:

> Gilad,
>
> Not out of the woods yet.
>
> I can’t just burn a tar ball straight into a raw mtd partition. When 
> I’ll try to untar it, if I’ll do:
>
> tar zxf /dev/mtd6
>
> tar will read the whole mtd partition, and I don’t think it’s a good 
> idea to use a raw device as tar file.
>
> So should I package the tar in a filesystem, like cramfs?
>
That's certainly possible - just make sure your tar file is smaller then 
the 256Mb file limit of cramfs (if memory serves me right) - otherwise 
just use squashfs.


I'll add that if you're already going to have a file system (and your 
reasons seems to make sense to me) I would have just forgot about the 
tar file and put the file in cramfs/squashfs to begin with and just copy 
them over the initramfs during boot (something like cp -a /mnt/mtd6/* /).

> In that case, I don’t need to compress the tar file, as cramfs is 
> compressed, right?
>
That is correct.


Gilad




-- 
Gilad Ben-Yossef 
Chief Coffee Drinker

Codefidence Ltd.
The code is free, your time isn't.(TM)

Web:    http://codefidence.com
Email:  gilad@codefidence.com
Office: +972-8-9316883 ext. 201
Fax:    +972-8-9316885
Mobile: +972-52-8260388

	The Doctor: Don't worry, Reinette, just a nightmare. 
	Everyone has nightmares. Even monsters from under the 
	bed have nightmares, don't you, monster?
	Reinette: What do monsters have nightmares about?
	The Doctor: Me! 

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

* Re: ramfs/tmpfs for application partition
  2009-01-15 16:43 ramfs/tmpfs for application partition Jacob Avraham
  2009-01-15 16:55 ` Leisner, Martin
  2009-01-15 17:04 ` Mike Frysinger
@ 2009-03-09  6:00 ` Aras Vaichas
  2 siblings, 0 replies; 7+ messages in thread
From: Aras Vaichas @ 2009-03-09  6:00 UTC (permalink / raw)
  To: Jacob Avraham; +Cc: linux-embedded@vger.kernel.org

Jacob Avraham wrote:
> Hi,
>
> I have a system with 128M RAM and a flash partitioned so that 10M is dedicated to initramfs image,
> 6M to application partition. And another 6M for JFFS2.
> As I have plenty of RAM, I'd like to have my application directory mounted on RAM, from a pre-populated
> filesystem that resides in the 6M application partition.
> So basically I want to use the same mechanism as initramfs, but mounted on /my/app/partition instead of root.
> Does it make sense? How do I go about and do that?
What about unionfs or Aufs?

I think you'd need to have your "original" as a proper filing system. 
Then you'd mount the unionfs over the top of it, but it would be in RAM. 
From the user's point of view, they'd had full read/write access to the 
whole filing system, but unionfs/Aufs would save the changes into RAM, 
not Flash.

This is how Linux Live CDs work. They allow you to "write" to the filing 
system on the CD using UnionsFS, but it's only temporary.

This should be be faster than uncompressing a compressed image into RAM, 
and the kernel will only cache the data that it needs as it accesses it. 
Since all write-backs will occur in RAM then this should be very fast.

Aras




______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

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

end of thread, other threads:[~2009-03-09  6:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-15 16:43 ramfs/tmpfs for application partition Jacob Avraham
2009-01-15 16:55 ` Leisner, Martin
2009-01-17  9:39   ` Jacob Avraham
2009-01-17 15:55     ` Marco
2009-01-15 17:04 ` Mike Frysinger
     [not found]   ` <4972E3F4.1020508@codefidence.com>
     [not found]     ` <FF584854D6FFE547AB2F7515A798AC3A045716A316@venus.imagineil.tv>
2009-01-18 13:55       ` Gilad Ben-Yossef
2009-03-09  6:00 ` Aras Vaichas

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.