Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
906 Views

Filesystem for compact flash

I want to install a fat filesystem on the compact flash. 

I am using the stratix evaluation board. 

Can somebody tell me if i can use the files existing in the microtronix linux for this purpose. 

If so how? 

Or else is some code available which will help me in this matter.
0 Kudos
8 Replies
Altera_Forum
Honored Contributor I
64 Views

Hi, 

 

Had to do a similar thing, file system on a onboard NAND flash. We did not end up using fat but you should take care of things like wear leveling etc. there is some stuff on toshiba web site somewhere with a name like simile or something also try these links. 

 

yaffs (http://www.aleph1.co.uk/yaffs/index.html

fat (http://freedos-32.sourceforge.net/fat.html)
Altera_Forum
Honored Contributor I
64 Views

Hi, 

 

If you are using Linux, sure you can use FAT. Since the Compactflash from Altera is pre-formated as FAT, you only need to enable FAT support in kernel configuration. I tried this on Stratix, it worked fine.
Altera_Forum
Honored Contributor I
64 Views

Hi, 

 

I have already installed the linux with the fat support enabled. 

I want to know how to make use of this in my application to create a FAT system. 

I have seen your e2fs application. 

But there are lot many codes for that. 

so i couldn't follow what was actually happening there. 

So please could you tell me in detail how to proceed with for creating the fat filesystem in compact flash.
Altera_Forum
Honored Contributor I
64 Views

When I tried FAT, the compact flash is a brand new one from Altera. I just simply mounted it and then copied files to it. I did not try to format a compact flash.

Altera_Forum
Honored Contributor I
64 Views

You could create the file system using 

 

mkdosfs -F 16 /dev/<your_dev> 

 

on any PC running Linux. 

 

For a Windows PC, I&#39;m not sure they give you the option of creating a FAT16 filesystem, though there may be some utilities that will do it... 

 

wentao is right, most CF cards come fully formatted already. 

 

Cheers, 

 

- slacker
Altera_Forum
Honored Contributor I
64 Views

I want to do the creation of the filesystem from an application ported on NIOS. 

i.e. it should be somewhat similar to the process we are following for creating an ext2 filesystem in the demo application. 

I don&#39;t want the pc side to do these.
Altera_Forum
Honored Contributor I
64 Views

I also wanted to know if there are some systems calls available for these functions. 

If so what is the header file to be included. 

I don&#39;w want the shell to do the function
Altera_Forum
Honored Contributor I
64 Views

Hi reju_r, 

If I were you, I would go to get the source code of similar utilities, such as mkdosfs, as slacker pointed out, and see how they did.
Reply