This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Help -- Creating a FAT Filesystem on a NOR Flash Device
- From: "Ramgopal Kota" <rkota at broadcom dot com>
- To: "ecos-discuss at ecos dot sourceware dot org" <ecos-discuss at ecos dot sourceware dot org>
- Date: Wed, 9 Sep 2009 08:34:43 -0700
- Subject: [ECOS] Help -- Creating a FAT Filesystem on a NOR Flash Device
- References: <1252509791.12728.ezmlm@ecos.sourceware.org>
Hi,
I am new to ecos development .. Please bear with me if these are very novice questions...
I am working on a MIPS Malta board with 16MB NOR Flash device.
I want to create a FAT Filesystem of 2MB size from an offset.
I pulled in the required packages for FAT FS and IO.
I created a device /dev/flash2 in the cdl file.
When I am doing a mount from my ecos application using ..
err = mount( "/dev/flash2/", "/", "fatfs" );
I am getting err as -1 ...
Do I have to use synthetic linux driver for this purpose as shown in the readme ?
Currently flash is empty how to create a FATFS header so that mount will recognise ?
Is there a way to detect a FATFS at that device ? If it is not there can I create one all using application.
Ramgopal Kota
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
cdl_component CYGDAT_IO_FLASH_BLOCK_DEVICE_NAME_2 {
display "Name of flash device 1 block device"
flavor data
default_value { "\"/dev/flash2\"" }
cdl_option CYGNUM_IO_FLASH_BLOCK_OFFSET_2 {
display "Start offset from flash base"
flavor data
default_value 0x220000
description "
This gives the offset from the base of flash which this
block device corresponds to."
}
cdl_option CYGNUM_IO_FLASH_BLOCK_LENGTH_2 {
display "Length"
flavor data
default_value 0x200000
description "
This gives the length of the region of flash given over
to this block device."
}
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss