[klibc] why mtd root device number is __makedev(0,254)

zheng shi neversetsun at gmail.com
Wed Mar 24 08:52:56 PDT 2010


On Wed, Mar 24, 2010 at 11:14 PM, Andrea Adami <andrea.adami at gmail.com> wrote:
>> Why can't a mtd root be a block device?
> Flash are MTD...not block devices
Thanks for correcting me. I meant mtdblock device could also be root device.

>
>> In current embedded devices, two mainstream NAND file system can be
>> used: YAFFS and UBIFS.
> Well, you're forgetting JFFS2
>
Huh. Since NAND flash is larger and larger, I nearly forget this. :-)

>> 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 would like initramfs to be as small as possible, which only contains
init(kinit) itself.
In fact in mount_block_root, /dev/root can be created with the right
device major number and minor number.
So I think my fix should be OK for mtdblock devices.

MMC device name is /dev/mmcblockX.
Would you please tell me how mtdblock and mmcblock devices get conflicted?
I'm a little confused.

>
>>> 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."
>
> see: http://www.linux-mtd.infradead.org/faq/general.html
>
> Regards
>
> Andrea
>
> _______________________________________________
> klibc mailing list
> klibc at zytor.com
> http://www.zytor.com/mailman/listinfo/klibc
>



-- 
Regards, Shizheng



More information about the klibc mailing list