MTD Patition table MTD分区表

/*
* Partition definition structure:
*
* An array of struct partition is passed along with a MTD object to
* add_mtd_partitions() to create them.
*
* For each partition, these fields are available:
* name: string that will be used to label the partition's MTD device.
* size: the partition size; if defined as MTDPART_SIZ_FULL, the partition
* will extend to the end of the master MTD device.
* offset: absolute starting position within the master MTD device; if
* defined as MTDPART_OFS_APPEND, the partition will start where the
* previous one ended; if MTDPART_OFS_NXTBLK, at the next erase block.
* mask_flags: contains flags that have to be masked (removed) from the
* master MTD flag set for the corresponding MTD partition.
* For example, to force a read-only partition, simply adding
* MTD_WRITEABLE to the mask_flags will do the trick.
*
* Note: writeable partitions require their size and offset be
* erasesize aligned (e.g. use MTDPART_OFS_NEXTBLK).
*/

struct mtd_partition {
char *name;    /* identifier string */
u_int32_t size;    /* partition size */
u_int32_t offset;   /* offset within the master MTD space */
u_int32_t mask_flags;   /* master MTD flags to mask out for this partition */
struct nand_ecclayout *ecclayout; /* out of band layout for this partition (NAND only)*/
struct mtd_info **mtdp;   /* pointer to store the MTD object */
};

static struct mtd_partition c2_nfc_parts[] = {
    {"boot\0",    0x1000000, MTDPART_OFS_NXTBLK, 0, NULL, NULL},
    {"setting\0", 0x1000000, MTDPART_OFS_NXTBLK, 0, NULL, NULL},
    {"rootfs\0", 0x1800000, MTDPART_OFS_NXTBLK, 0, NULL, NULL},
    {"home\0",    0x8000000, MTDPART_OFS_NXTBLK, 0, NULL, NULL},
    {"storage\0", MTDPART_SIZ_FULL, MTDPART_OFS_NXTBLK, 0, NULL, NULL},
};

基于NAND的YAFFS文件系统在嵌入式系统中的应用 http://wenku.baidu.com/view/ba5ceabff121dd36a32d827d.html

关于VIVI的bon命令与part命令   http://blog.csdn.net/dayidson/archive/2009/12/21/5048867.aspx

嵌入式Linux中基于MTD的文件系统的结构框架图 http://blog.sina.com.cn/s/blog_5d9051c00100ij93.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值