Clarification of IMFS

Joel Sherrill joel.sherrill at oarcorp.com
Fri Jun 9 13:54:32 UTC 2006


Steven Johnson wrote:

>Hi,
>
>Can I just confirm that my understanding of an aspect of the IMFS is
>correct.
>
>IMFS has a file type called "LINEAR_FILE" and it is used primarily for
>the "TAR" loader.  My understanding is, the TAR image is in memory
>somewhere, and the IMFS just points to the data of each file in the TAR,
>but doesn't contain the actual data itself, in the standard file blocks
>(of 128 bytes).  Is there a size limit, for example, does the file block
>size, which normally limits the size of a file in the IMFS limit the
>maximum size of the LINEAR_FILE in the TAR, or is it unbounded.
>
>  
>

The data stays in the linear format -- see imfs_load_tar.c around line 159.
It is treated as one chunk of data in the header. 

If you ever open it successfully for write, it will be converted into a 
regular
RAM file.  See memfile.c around 115.  The file size limit would kick in 
here.

This was a really clever trick to support a "ROM fs" without a special
tool to create the image. :)

>The reason why I ask, is I want to implement my own loader, the file
>data in my system is not in TAR format, but it is linear.  I would like
>to switch over to a traditional file system model, and linking them as
>LINEAR files seems like the expedient thing to do.  The files, in this
>case, are read only.
>
>Thanks,
>Steven J
>
>
>  
>




More information about the users mailing list