[klibc] why mtd root device number is __makedev(0,254)
andrea.adami at gmail.com
Wed Mar 24 08:14:37 PDT 2010
> Why can't a mtd root be a block device?
Flash are MTD...not block devices
> In current embedded devices, two mainstream NAND file system can be
> used: YAFFS and UBIFS.
Well, you're forgetting JFFS2
> YAFFS uses /dev/mtdblockX (for example in Android) and UBIFS use a
> specific naming spec (Android may transfer to UBIFS).
> I think klibc may add support for these platforms.
UBI/UBIFS seems the logical move
In OpenEmbedded we added vfat and jffs2 detection to klibc fstypes.
Jffs2 one is awfully slow so perhaps we would need better examples to
add ubifs 'magic' detection...
>>> absent from /dev since udev is absent.
Well, it depends on how your initramfs device table is populated: in
the kexecboot project (this binary itself is the init) we recreate
dinamically the nodes on the fly (mtdblockX included) during init.
This has nothing to do wrt MTD, though, was necessary because of some
numbering changes for MMC after 2.6.22
>> I don't know about /dev/mtdblockX. I do know that a typical mtd root
>> won't be on a block device, which is why mtd root tends to be a
>> special case.
"There is an extremely simple FTL layer in Linux MTD subsystem -
mtdblock. It emulates block devices over MTD devices."
More information about the klibc