Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12746 Discussions

Design FDISK and FORMAT for CF card ?

Altera_Forum
Honored Contributor II
1,140 Views

If my CF card is 256MB 

and CIS(Identify_Device_Information) are 

Cylinder=03D4h(980) 

Head=10h(16) 

Sector_per_track=20h(32) 

Capacity=07A800h(501760) 

 

And I want to design can be auto FDISK create a FAT32 partition(MAX Capacity) 

 

~MBR~ 

BootIndicator:80 

StartHead:01 

StartSectorCylinder:0100 

SystemID:0C or OB 

EndHead:?? 

EndSectCylinder:???? 

AbsoluteFirstSect:????????(3F or 20?) 

Nbsect:???????? 

 

~BootSector~ 

BS_jmpBoot:EB3C90 

BS_OEMName:MSDOS5.0 

BPB_BytsPerSec:0002(512byte) 

BPB_SecPerClus:??(1~128) 

BPB_RsvdSecCnt:2000(32) 

BPB_NumFATs:02 

BPB_RootEntCnt:0000 

BPB_TotSec16:0000 

BPB_Media:F8  

BPB_FATSz16:0000 

BPB_SecPerTrk:3F00 

BPB_NumHeads:FF00 

BPB_HiddSec:20000000 

BPB_TotSec32:=MBR.Nbsect 

BPB_FATSz32:???????? 

BPB_ExtFlags:0000 

BPB_FSVer:0000 

BPB_RootClus:02000000 

BPB_FSInfo:0100 

BPB_BkBootSec:0600 

BPB_Reserved:000000000000000000000000 

BS_DrvNum:80 

BS_Reserved1:00 

BS_BootSig:29 

BS_VolID:???????? 

BS_VolLab:NO NAME 

BS_FilSysType:FAT32 

 

How can I computer number of field of ????
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
446 Views

You can try the source of dosfstools package.

0 Kudos
Reply