RFS on the Flash device

ali nasir supremenasir at yahoo.com
Fri Sep 23 11:09:17 UTC 2011


Hi,

Is there a minimum size limit for the flash device? for eg is it possible to have the RFS implemented in a single sector of 64K size?

What is the use of compact_segs and avail_compact_segs in the struct rtems_flashdisk_config? Are they related to the device?

Regards,
Ali

On Wed, 21 Sep 2011 12:09 IST Chris Johns wrote:

>On 21/09/11 4:29 PM, ali nasir wrote:
>> Hi RTEMS users,
>> We plan to use the RFS on the flash device which we have on board. I got hold of a sample initialization code from http://www.rtems.org/ftp/pub/rtems/people/chrisj/file-system/rfs-20100603.tar.gz
>> 
>> I noticed that the initialization code only does the registration of the rtems_flashdisk_io_ops via the rtems_io_register_driver. It does mount or format the flash disk.
>> 
>> Questions:
>> 1. Is the rtems_fsmount() required to be done? I guess yes.
>
>In the case of the test code it used the shell to mount. Check the shell-init code. I did this because it was easier to edit the shell script file than change code. I was using 3 architectures to test on.
>
>> 2. When we run the RFS for the first time on flash device, i guess we will also have to format the same using the rtems_rfs_format() function call. Am i right? If yes, how do i prevent the format at every start up? Since format would erase all the data and we need the data in the flash device persistent.
>
>You need to format the the disk only when it is needed. This depends on the application you are developing, ie a command a user issues, or you could attempt to mount it and if it fails format it then attempt to mount it.
>
>Chris




More information about the users mailing list