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的最后一块