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

zheng shi neversetsun at gmail.com
Wed Mar 24 07:12:17 PDT 2010


Hi,
Why can't a mtd root be a block device?
In current embedded devices, two mainstream NAND file system can be
used: YAFFS and UBIFS.
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.

On Tue, Mar 23, 2010 at 6:14 PM, Eric W. Biederman
<ebiederm at xmission.com> wrote:
> zheng shi <neversetsun at gmail.com> writes:
>
>> Hi,
>> __makedev(0, 254) is used to invoke mount_mtd_root function.
>> But mount_mtd_root needs root_dev_name (/dev/mtdblockX) which is still
>> absent from /dev since udev is absent.
>> In fact mtdblockX has been created under /sys/block/ at the stage when
>> flash driver probes flash partitions.
>>
>> So I'm curious why mtd block devices have to treated specially as NFS
>> root device.
>> And it can be handled in "usr/kinit/name_to_dev.c"
>
> 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.
>
>
> Eric
>



-- 
Regards, Shizheng



More information about the klibc mailing list