[PATCH][MTD][MTD-UTILS]MTD Utility for Runtime Partioning Support
Rohit Hassan Sathyanarayan
rohit.hs at samsung.com
Thu Jul 29 07:30:59 EDT 2010
We are releasing MTD runtime partitioning support in MTD. We will release two
Patches(1. MTD Utils Patch 2. Kernel patch for adding IOCTLs).
For detailed understanding of runtime partitioning utility please refer below:
mtd utility - mtdpart
MTD partition utility parses user partitions from the command shell.
ioctls in kernel are used to create(MTDPARTITIONCREATE),
for changing permissions(MTDPARTITIONSETPERMISSION)
of MTD partitions.
Enables to partition MTD devices on runtime by providing user following
a. Creating MTD Partition on registered MTD device.
creates runtime partition on MTD device and parent partition will be
deleted. If user partitions size is less than parent partition size
"FREE" partition is created with read-write permission with remaining
Syntax -- mtdpart c /dev/mtd4
Prompts user for number of partitions and each partition information.
b. Deleting the existing MTD Partition.
Syntax -- mtdpart d /dev/mtd7
Deletes MTD partition 7.
c. Merging two adjacent MTD Partitions.
Syntax -- mtdpart j /dev/mtd4 /dev/mtd5
Merges MTD partition 4 and 5.
d. Changing the permission of MTD Partition.
Syntax -- mtdpart p /dev/mtd4 wr
Changes MTD partition 4 permission to read-write.
Syntax -- mtdpart p /dev/mtd4 ro
Changes MTD partition 4 permission to read-only.
Note: Non-contiguous partitions are not handled in creating partition.
Non-contiguous MTD partition permission can be changed and can be
1.Need to implement storing and restoring of the user created
MTD partitions on POR(PowerOnReset).
2.To handle Non-contiguous MTD Partitions.
1. /dev/mtd0 is used as entry point, hence this node should be untouched.
2. Supports only two MTD partitions to be merged.
Rohit HS & Vivek Dalal
More information about the linux-mtd