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

Mike Waychison mikew at google.com
Sun Mar 21 23:26:21 PDT 2010

On 2/25/10 1:13 AM, zheng shi wrote:
> Hi,
> I'm wondering when /proc/cmdline has "root=/dev/mtdblockX",
> name_to_dev_t_real will return __makedev(0,254) for root device's device
> number
> which is weired. I think we need to create the device on the fly from
> information in sysfs.

This dev_t is a special one internal to kinit that is used internally to 
special case mtdblock root command lines.  It's an implementation 
artifact that is a little confusing when looking at the output, but it 
should work..

I believe the use of /dev/mtdblockX requires the device node to be 
already present in the initramfs fwiw.

> Maybe I have mistaken something. Is there any clue?
> --
> Regards, Shizheng
> _______________________________________________
> klibc mailing list
> klibc at zytor.com
> http://www.zytor.com/mailman/listinfo/klibc

More information about the klibc mailing list