[parted-devel] [RFC] Adding support for MTD flash

Per Andersson avtobiff at gmail.com
Fri Aug 7 11:56:02 UTC 2009


Hi!

I am working on adding support for MTD [0] flash to parted.
This started out as part of Google's Summer of Code
program for Debian, but that ends soon (two weeks or so),
and I doubt I will have it all finished within that timeframe.
Of course I am going to continue developing this after GSoC.

Anyway, when I have been fiddling around with parted sources
I have seen that it heavily expects devices to be block devices.
MTD can be accessed as character devices with mtdchar and
block devices with mtdblock.

I want to access MTD as character devices because I also
want to add support for UBI [1]. Justification: When an MTD
device is attached to UBI, this is done with the character
device file. (Read more about MTD and UBI at [2].)

My question is basically if it is OK to change parted's block
device centric behaviour to also accept (probably only MTD)
character device files.

I suppose that most of the changes will go into
libparted/arch/linux.c. The functions I have been looking at so
far are:
* linux_new
* read_device_sysfs_file
* sdmmc_init
* sdmmc_get_product_info


All the best,
Per

[0] Memory Technology Device
[1] Unsorted Block Images, sort of like LVM for MTD.
[2] http://linux-mtd.infradead.org/



More information about the parted-devel mailing list