1. Uboot沒有對Nandflash進行分區,通過bootargs參數將file system信息傳遞給kernel
2. 在kernel中對Nandflash分區信息:
arch/arm/mach-s3c6410/mach-smdk6410.c中
struct mtd_partition s3c_partition_info[] = {
{
.name = "Bootloader",
.offset = 0,
.size = (512*SZ_1K),
/* .mask_flags = MTD_CAP_NANDFLASH, */
},
{
.name = "Kernel",
.offset = (512*SZ_1K),
.size = (8*SZ_1M),
/* .mask_flags = MTD_CAP_NANDFLASH, */
},
{
.name = "File System",
.offset = (8*SZ_1M + 512*SZ_1K),
.size = (128*SZ_1M),
},
{
.name = "User",
.offset = MTDPART_OFS_APPEND,
.size = MTDPART_SIZ_FULL,
}
};
struct s3c_nand_mtd_info s3c_nand_mtd_part_info = {
.chip_nr = 1,
.mtd_part_nr = ARRAY_SIZE(s3c_partition_info),
.partition = s3c_partition_info,
};
3. 分區信息存放在Nandflash的最後一塊