nand flash分区表

来源:互联网 发布:java 读取cer证书公钥 编辑:程序博客网 时间:2024/05/13 21:25

飞思卡尔在arch/arm/mach-mx5/mx53_ard.c中定义了nand flash的分区信息,如下:

因为mx53 ROM需要FCB/DBBT结构信息来支持从NAND分区启动,所以需要在Nand启动分区中更多的空间存储这些参数。

Partitions

   

Offset

   

Size

   

Address Range

   

Bootloader

   

0

   

16MB

   

0x0~0x100_0000-1           (0x0~0xFF_FFFF)

   

Nand.kernel

   

MDTPART_OFS_APPEND

   

5MB

   

0x100_0000~0x150_0000-1     (0x100_0000~0x14F_FFFF)

   

Nand.rootfs

   

MDTPART_OFS_APPEND

   

256MB

   

0x150_0000~0x1150_0000-1   (0x15_0000~0x114F_FFFF)

   

Nand.userfs1

   

MDTPART_OFS_APPEND

   

256MB

   

0x1150_0000~0x2150_0000-1   (0x1150_0000~0x214F_FFFF)

   

Nand.userfs2

   

MDTPART_OFS_APPEND

   

MTDPART_SIZ_FULL

   

0x2150_0000~0x1_0000_0000-1 (0x2150_0000~0xFFFF_FFFF)

 

include/linux/mtd/partitions.h中找到了如下的解释:

offset: absolute starting position withinthe master MTD device;if defined as MTDPART_OFS_APPEND,the partition will startwhere the previous one ended;if MTDPART_OFS_NXTBLK,at the next erase block.

Size:the partition size;if defined asMTDPART_SIZ_FULL,the partition will extended to the end of the master MTDdevice.

第一个分区bootloader从地址0x0开始,大小为16MB,则16MB=16*1024*1024=0x1000000,即地址范围为0x0~0x1000000

第二个分区nand.kernel紧接着上一分区,故起始地址为0x1000000,大小为5MB,故终止地址为0x1000000+5MB=0x1000000+0x500000=0x1500000

第三个分区nand.rootfs紧接着上一分区,故起始地址为0x1500000,大小为256MB,故终止地址为0x1500000+256MB=0x1500000+0x10000000=0x11500000

第四个分区nand.userfs1紧接上一分区,故起始地址为0x11500000,大小为256MB,故终止地址为0x11500000+256MB=0x11500000+0x10000000=0x21500000

第五个分区nand.userfs2紧接上一分区,故起始地址为0x21500000,大小为4GB-256MB-256MB-5MB-16MB=3563MB,故终止地址为0x21500000+3563MB=

0x21500000+0xdeb00000=0x100000000

原创粉丝点击