Q: Cramfs Vs. Ubifs

Ricard Wanderlof ricard.wanderlof at axis.com
Wed Jun 13 02:55:13 EDT 2012


On Tue, 12 Jun 2012, Ran Shalit wrote:

>> Most systems can't execute directly from NAND flash, so that is not really
>> an option either way. In fact, since NAND flash cannot be mapped to an
>> address space, there is no way to directly execute from NAND flash, however,
>> one could imagine a system with some form of memory managment scheme which
>> buffers the data so that the flash appears to be directly addressable. I
>> don't know if there is such a system though; I've never heard of one (but
>> that's not saying much).
>>
>> The 'copy to RAM' is nothing one normally has to worry about; all the
>> binaries are on the flash and loaded into RAM when run. Execute in place is
>> a special situation that must be explicitly enabled (and I'm very hazy on
>> that subject as I've never worked with it).

> If I start several executable from ubifs in some start point, Is it
> right to assume that all of them are running in RAM, and there is no
> access to flash after this start point of execution ?

As someone else mentioned on the mtd list, Linux is demand paged which 
means that the code is loaded into memory when needed. If there's a chunk 
of code (Linux uses a page size of 4 kbytes so that's the granularity of 
the paging) that is not used until after a while after the start of 
execution, it won't be loaded until it is actually run.

I don't know if there's a way to force it all into memory when execution 
starts; there probably is.

/Ricard
-- 
Ricard Wolf Wanderlöf                           ricardw(at)axis.com
Axis Communications AB, Lund, Sweden            www.axis.com
Phone +46 46 272 2016                           Fax +46 46 13 61 30



More information about the linux-mtd mailing list