Linux / 软件积累 · 2023年8月8日

如何配置NAND分区【9X07】

一. 分区表的详细解析内容如下:

The file common\build\partition_nand.xml specifies all the partitions. You can modify
file to add or delete a partition. KB Solution 00026274 provides partition specification
this XML file.
Each partition is described with following fields.
 <name> field specify the name of the partition.
 <size_kb> is the size of the partition in KB.
 <pad_kb> is the extra space to accommodate bad blocks in this partition.
 <which_flash> is the device_id of that partition. Multiple clients can access the
partition and each client gets separate device_id for this partition. These IDs are
given dynamically and are “0” in XML.
Each partition has four attribute fields, and each attribute field is a byte size value
(0 to 0xFF):
 Type of flash. Must be set to 0xFF.
 Type of ECC to be used for the partition.
 Use driver default – 0xFF
 ECC on main only – 0x0
 ECC on main and spare – 0x1
 Image upgrade through QPST
 Set to 0 – If the partition is an image partition and the image must be downloaded
via QPST.
 Default to 0xFF – Required if QPST is not used for image upgrades.

 

二.分区表的构成:

20 <partition>
21 <name length=”16″ type=”string”>0:MIBIB</name>
22 <size_blks length=”4″>0x6</size_blks>
23 <pad_blks length=”4″>0x4</pad_blks>
24 <which_flash>0</which_flash>
25 <attr>0xFF</attr>
26 <attr>0x01</attr>
27 <attr>0xFF</attr>
28 <attr>0xFE</attr>
29 <img_name type=”string”>partition.mbn</img_name>
30 </partition>
31 <partition>
32 <name length=”16″ type=”string”>0:EFS2</name>
33 <size_kb length=”4″>11264</size_kb>
34 <pad_kb length=”4″>1024</pad_kb>
35 <which_flash>0</which_flash>
36 <attr>0xFF</attr>
37 <attr>0x01</attr>
38 <attr>0xFF</attr>
39 <attr>0xFF</attr>
40 </partition>

打赏作者