This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: FAT16
- From: Savin Zlobec <savin at elatec dot si>
- To: Nelu <nelu at iv dot ro>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Tue, 30 Sep 2003 08:52:38 +0200
- Subject: [ECOS] Re: FAT16
- References: <200309291943.53558.nelu@iv.ro>
Nelu wrote:
Hi,
I am trying to use the experimental FAT16 filesystem package for eCos with a
MMC card. I've noticed that the function:
static int
read_boot_record(fatfs_disk_t *disk, fat_boot_record_t *fbr)
is trying to read the FBR from first block and in my case this fails because
the MMC I use has a MBR sector and the FBR starts only at block 32.
err = cyg_blib_read(&disk->blib, (void*)data, &len, 0, 0);
Do you have any ideas and/or patches on how this could be changed to make use
of the MBR info to correctly determine the start of FBR.
Offset 0 here means the first block of the device or partition :
/dev/disk0/0 is the device handle - offset 0 means the first block of device
/dev/disk0/[1-4] are partition handles - here offset 0 is the first
block of the partition
to get the detected partitions info use cyg_io_get_config with
CYG_IO_GET_CONFIG_DISK_INFO key.
You should have enabled the MBR support for your device with setting the
mbr_support to true. This
is done when you define DISK_CHANNEL.
And please CC to ecos-discuss.
savin
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss