This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: FATFS Problems to read the partition table on compact flash >128MB


> -----Original Message-----
> From: ecos-patches-owner@sources.redhat.com [mailto:ecos-patches-
> owner@sources.redhat.com] On Behalf Of Savin Zlobec
> Sent: Wednesday, January 19, 2005 1:19 PM
> To: Per Hedblom
> Cc: ecos-patches@sources.redhat.com
> Subject: Re: FATFS Problems to read the partition table on compact flash
> >128MB
> 
> Per Hedblom wrote:
> 
> >Hi,
> >
> >My fatfs could not create windows compatible fat files on my 256Mb
> compact
> >flash card. The disk works fine within eCos but the files newer shows up
> on
> >my windows machine. A 128 mb card works fine. I traced down the problem
> to
> >how the partition table is read. The current implementation uses the two
> >C/H/S fields to find the start and end of each disk partition (offset 1
> and
> >5).
> >
> >My 256Mb compact flash works if I change the code to read the absolute
> start
> >position and size fields (offset 8 and 12). Se patch below.
> >
> >I don't know how read the partition table in a correct way so it would be
> >nice If someone could suggest a more generally applicable code change.
> >
> >
> Several people had problems with CHS partition info before...  and using
> LBA (like you do)
> solved the problem.  The question is how to choose which entry to use -
> CHS or LBA.
> Maybe the best way is to always use the LBA entry - is there any format
> tool which doesn't
> set the LBA correctly ?
> 
> How are the CHS fields set on your 256Mb CF ?
> 
> savin

I don't remember the CHS fields right now and I can not easily rerun my test
before 31 January. 

I found a website 
http://www.win.tue.nl/~aeb/partitions/partition_types-2.html#ss2.2
describing some values used for the not usefull chs values.

I believe that the LBA method is Ok for all modern software. But my
experience is limited to few days...
/Per



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]