Formatting DOSFS volume

Bogdan Vacaliuc bvacaliuc at ngit.com
Thu Oct 14 14:40:05 UTC 2004


Hi Etienne,

Ok.  Give me a day or so to create a patch against Philip's distribution, and I will post it on the list.  To start with, you can
use his distribution to integrate the code that does the actual formatting.  That would let you easily format 1.44MB filesystems

Then with the upcoming patch to format FAT12/FAT16 filesystems (up to 2GB), finally extending that to FAT32.  I've found the code to
be easily extensible.

> Question: Should the code be put in libfs/src/dosfs OR as a little
> librarie that you link with RTEMS? 

That's a good question.  IMHO, the filesystem should provide you with the code necessary to format itself, but the call of this code
is a user-level operation.  (i.e. unmount/format/mount, etc).

If we look at IMFS, there is an implicit formatting at (mini)IMFS_initialize(), and then it is mounted/unmounted as necessary,
possibly followed by a rtems_tarfs_load() to populate it.

For DOSFS, fat_init_volume_info() does the work of setting up the fat_fs_info_t, which validates it.  I think what we would like is
a fat_format_volume(rtems_filesystem_mount_table_entry_t *mt_entry) type of function implementd in fat.c.  It would have a similar
setup to fat_init_volume_info(), but would perform write()'s instead of read()'s.

I would expect that Eugeny would have a more authoritative opinion on this.

-bogdan


On Thursday, October 14, 2004 9:00 AM, Etienne Fortin wrote:

> Hi Bogdan,
> Yeah, it would be great to collaborate on that. I was out for the
> last two days but now I'll start working on that. Do you have the
> code you were talking about?  
> 
> Question: Should the code be put in libfs/src/dosfs OR as a little
> librarie that you link with RTEMS? 
> 
> Have a nice day.
> 
> Etienne
> Sensio
> 
> 
> -----Message d'origine-----
> De : Bogdan Vacaliuc [mailto:bvacaliuc at ngit.com]
> Envoyé : 12 octobre, 2004 13:20
> À : 'Thomas Doerfler'; 'Eugeny S. Mints'; 'Etienne Fortin' Objet :
> RE: RE : Formatting DOSFS volume 
> 
> 
> Greetings Everyone,
> 
> I was on vacation until today, so am joining you all a bit late.
> 
> I have code and some resources for a FAT12/FAT16 format but it is not
> under RTEMS.  I also plan to port this code into RTEMS for my project
> in approximately the same time frame as Thomas.  
> 
> Shall we collaborate?  I also have a MIPS-based CSB350 which can be
> used to carry out tests. 
> 
> To start with, here are some references:
> 
> http://download.microsoft.com/download/1/6/1/161ba512-40e2-4cc9-843a-923143f3456c/fatgen103.pdf
> http://my.execpc.com/~geezer/osd/fs/
> 
> My code is based on Philip Erdelsky's "Reentrant DOS Compatible File
> System v2.0": http://alumnus.caltech.edu/~pje/rdcf2.txt 
> 
> I have extended it in the following ways:
> 
> + Extended FAT16 support to 2GB
> + Implemented dynamic BPB parameter generation based on Microsoft's
> + specifications. Implemented bad sector detection and mapping (useful
> + for NAND flash).
> 
> Let me know if you are interested in code snippets from my project
> (It wont use RTEMS function calls, but RDCF2 function calls, etc.). 
> 
> Also, what RTEMS distribution are you all working off of?  (Probably
> the CVS tree-right?  I have been working with the official 4.6.1
> patched with the CSB350 BSP from Jay.  
> 
> Best Regards,
> 
> -bogdan
> 
> 
> On Friday, October 08, 2004 12:46 PM, Thomas Doerfler wrote:
> 
>> Hi,
>> 
>> so now we are two volunteers :-) Actually I have
>> already been contracted by a customer to create a
>> partitioner/formatter for DOSFS, and it is in my schedule for the
>> next 
> 
>> four weeks to implement it :-)
>> 
>> Etienne, what are your schedule plans about it?
>> 
>> wkr,
>> Thomas.
>> 
>>> Great!:)
>>> 
>>> But probably it's a good idea to get at least one more feedback
>>> since 
> 
>>> there is a little chance I missed something and somebody has already
>>> done a tool for DOSFS formatting. But most porbably if does not
>>> exist. 
>>> 
>>> Etienne Fortin wrote:
>>>> That's exactly what I'm intending to do ;)
>>>> 
>>>> Etienne
>>>> 
>>>> -----Message d'origine-----
>>>> De : Eugeny S. Mints [mailto:emints at ru.mvista.com]
>>>> Envoyé : 8 octobre, 2004 10:04
>>>> À : Etienne Fortin
>>>> Cc : rtems-users at rtems.com
>>>> Objet : Re: Formatting DOSFS volume
>>>> 
>>>> 
>>>> Hi Etienne,
>>>> 
>>>> Unfortunately there is no yet:(
>>>> You are welcome to implement:)
>>>> 
>>>> 			Eugeny Mints
>>>> 
>>>> Etienne Fortin wrote:
>>>> 
>>>>> Hi,
>>>>> Is there any utility or code snippet out there for RTEMS that can
>>>>> be used to format a volume in the DOSFS file system? Or is there
>>>>> anything
>>>> 
>>>> 
>>>>> built-in to RTEMS that does just that?
>>>>> 
>>>>> Thanks,
>>>>> 
>>>>> Etienne Fortin
>>>>> Sensio
>>>>> 
>>>>> 
>>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>> 
>> 
>> --------------------------------------------
>> IMD Ingenieurbuero fuer Microcomputertechnik
>> Thomas Doerfler           Herbststrasse 8
>> D-82178 Puchheim          Germany
>> email:    Thomas.Doerfler at imd-systems.de
>> PGP public key available at: http://www.imd- systems.de/pgp_keys.htm




More information about the users mailing list