Skip to main content.
Navigation:
DENX
>
DULG
>
PersistentRAMFileSystem
Translations:
Edit
|
Attach
|
Raw
|
Ref-By
|
Printable
|
More
DULG
Sections of this site:
DENX Home
|
DULG
|
ELDK-5
|
Know
|
Training
|
U-Boot
|
U-Bootdoc
Topics
DULG Home
BoardSelect
Manual
FAQ
Application Notes
Changes
Index
List of pages in DULG
Search
%SECTION0{name=FilesystemPRAMFS}% The Persistent RAM File system (PRAMFS) The =pramfs= file system supports persistent memory devices such as SRAM. Instead of having a block emulation layer over such a memory area and using a normal file system on top of that, =pramfs= seeks to induce minimal overhead in this situation. Most important in this respect is that the normal block layer caching of the Linux kernel is circumvented in =pramfs=. %SECTION1{name=MountParameters}% Mount Parameters The most important parameters for normal usage are * =physaddr=: The physical address of the static memory. * =init=: When given, it will initialize the file system to that size. %SECTION1{name=Example}% Example We will show a sample usage of =pramfs= in this section using normal DRAM on a board with at least 256MB of memory. For =pramfs= we reserve the upper 32MB by appending =mem=224M= to the kernel command line. First off we generate some testdata on a persistent file system (=/tmp=) to demonstrate that =pramfs= survives a reboot (of course with power always applied to keep the DRAM refreshed): <verbatim> bash-3.00# dd if=/dev/urandom bs=1M count=8 of=/tmp/testdata 8+0 records in 8+0 records out bash-3.00# </verbatim> Next we mount the 32MB that we reserved and initialize it to be 32MB in size and copy the testfile. A final compare shows that the copy was indeed successful so we can reboot: <verbatim> bash-3.00# mount -t pramfs -o physaddr=0xe000000,init=0x2000000 none /mnt bash-3.00# cp /tmp/testdata /mnt bash-3.00# cmp /tmp/testdata /mnt/testdata bash-3.00# reboot </verbatim> Having rebooted (using =mem=224M= on the kernel command line again of course) we mount the file system but this time without the =init= parameter because it is preinitialized. We then check the contents again: <verbatim> bash-3.00# mount -t pramfs -o physaddr=0xe000000 none /mnt bash-3.00# ls /mnt testdata bash-3.00# cmp /tmp/testdata /mnt/testdata bash-3.00# </verbatim>
9.7. Overlay File Systems
1. Abstract
10. Debugging
Prev
Home
Next