一、Nor flash(drivers\mtd\maps\at91rm9200_nor.c)
static struct mtd_partition partitions[] = {
{
.name = "Bootloader",
.size = 0x00040000,
.offset = 0,
.mask_flags = MTD_WRITEABLE /* force read-only */
},{
.name = "Kernel",
.size = 0x001C0000,
.offset = 0x00040000,
},{
.name = "Filesystem",
.size = MTDPART_SIZ_FULL,
.offset = 0x00200000
}
};
二、Nand flash (drivers/at91/mtd/at91_nand.c)
static struct mtd_partition partition_info64k[] = {
{
.name = "AT91 NAND partition 1, boot",
.offset = 0,
.size = 1 * SZ_256K
},
{
.name = "AT91 NAND partition 2, kernel",
.offset = 1 * SZ_256K,
.size = 2 * SZ_1M - 1 * SZ_256K
},
{
.name = "AT91 NAND partition 3, filesystem",
.offset = 2 * SZ_1M,
.size = 14 * SZ_1M
},
{
.name = "AT91 NAND partition 4, storage",
.offset = 16 * SZ_1M,
.size = 16 * SZ_1M
},
{
.name = "AT91 NAND partition 5, ext-fs",
.offset = 32 * SZ_1M,
.size = 32 * SZ_1M
},
};