SD card file system (from Baidu Library)

Source: Internet
Author: User

The architecture of the SD card is described here. It defines the logical structure of the data area. For the differences between data partitions, the first partition has a master startup record and a partition table. The SD card file system uses the FAT file system (ISO/IEC 9293) and supports the fat12 and fat16 File System formats.

 

 

File System Layer

PSN

LSN

 

Partition

 

Master startup record and Partition Table

0 to 38

 

 

User

System Section

Partition startup

39

0

 

File Allocation Table

40 to 63

1 to 24

 

Root directory

64 to 95

25 to 56

 

User

User Zone

96 to 129791

57 to 129752

 

 

 

 

 

 

 

 

 

 

Master startup record and Partition Table

BP

Length

File Name

Content

0

446

Master startup record

Unlimited

446

16

Partition Table (Part 1)

See the table below.

462

16

Partition Table (Part 2)

All 0x00

478

16

Partition Table (part 3)

All 0x00

494

16

Partition Table (part 4)

All 0x00

510

2

Signature word)

0x55, 0xaa

 

0 to 445 master startup records

This content is not described.

446-461 Partition Table (Part 1)

This section describes the information of the first partition in the system. This Partition means that users can use normal areas without mutual proof.

462-477 Partition Table (Part 2)

If the system has only one partition, the content of this partition is 0.

478-493 Partition Table (part 3)

If the system has only one partition, the content of this partition is 0.

494-509 Partition Table (part 4)

If the system has only one partition, the content of this partition is 0.

Signatureword)

0x55 (BP 510) and 0xaa are recorded here.

 

Partition Table

BP

Length

File Name

Content

0

1

Startup instructions

0x00 or 0x80

1

1

Start head

Value

2

2

Start cylinder and sector

Value

4

1

System ID

0x01 or 0x04 or 0x06

5

1

Terminated head

Value

6

2

Terminate the cylinder and sector

Value

8

4

Relative sector

Value

12

4

Total slice

Value

Bp0 start instruction

If the SD card is used as the boot (Disk), 0x80 is recorded; otherwise, 0x00 is recorded.

Bp1 start head

The starting head of the partition is described here.

Bp2 and 3 Start cylinder and fan Area

The START cylinder and sector of the partition are described here. 6 digits (0 to 5 digits in bp2) will be used as the start sector. 10 (6 and 7 in BP 2, 0 to 7 in bp3) will be used as the start cylindrical.

BP4 System ID

The file system type is described here. If the partition size is less than 32680 sectors, it is recorded as 0x01. If there are less than 65536 sectors, it will be recorded as 0x04. Otherwise, it will be recorded 0x06.

BP5 terminated head

The head is terminated here.

Bp6 and 7 terminate the cylinder and sector

The termination cylinder and sector are recorded here. 6 digits (0 in bp6 places 5 digits) as the end sector. 10 digits (6 and 7 digits in bp6, 0 to 7 digits in bp7) are used as the end cylinder.

BP8 to 11 Relative sector

This section describes the number of the starting slice of the partition.

Total BP12 to 15 sectors

The total number of sectors is recorded here.

 

Apply for allocation table (FAT)

Fat will contain a format ID and some items, indicating the cluster for each user region. These projects will be limited consecutively because 2 and the number of projects will ~ The number of corresponding clusters is equal. Each project indicates the corresponding cluster status in fat. The fat project will be used to identify the cluster group assigned to each file.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.