Put tmp in RAM when use ubifs on iMX28

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Put tmp in RAM when use ubifs on iMX28

786 Views
emanuelec
Contributor III

I need to put tmp direcotry in RAM. This because I use an embedded system iMX28 with 1GB UBI filesystem and I need to exchange message between application via temporary files. If I write in flash I think I damage it (these files are written every few seconds for all life of my device).

I created a ramdisk using this command:

mount -t ramfs -o size=5M ramfs /mnt/r

but ramdisk increase your size and may occupy all RAM.

So, I prefer use tmp file.

If I use jffs2 filesystem I can put some direcotry in RAM (in ltib menu under "Target Image Generation"); but this option depends on JFSS2 filesystem or filesystem read only:

(from LTIB search)

Symbol: SYSCFG_RAM_DIRS [=]

Prompt: Place these dirs in writable RAM 

Defined at ../../userspace/deployment.lkc:177

Depends on: SYSCFG_READONLY_FS || DEPLOYMENT_JFFS2


How can I put /tmp (and /var) in ram also if I use UBI filesystem?

Thanks

Emanuele

Labels (2)
0 Kudos
1 Reply

483 Views
emanuelec
Contributor III

SOLVED!

If you set Read Only Filesystem, etc, tmp and var are in RAM (see init.d/filesystem).


0 Kudos