Using mtdblock as root device
Hi,
I just tried to build a system that uses jffs on /dev/mtdblock0 as root fs. This didn't work right away because the kernel did not honor the option "root=/dev/mtdblock0" . This is because mtdblock devices are not listed in the list of known root devices in the kernel (see "root_dev_names" in file init/main.c). After applying the attached patch, using mtdblock as rootfs worked nicely.
Now my question is: is there any particular reason (other than "nobody has told Linus") why this is not already in the standard kernel ?
If there isn't, should I go ahead and submit my patch to Linus ?
Cheers
Rob
----------------------------------------------------------------
Robert Kaiser email: [email protected]
SYSGO RTS GmbH
Am Pfaffenstein 14 phone: (49) 6136 9948-762
D-55270 Klein-Winternheim / Germany fax: (49) 6136 9948-10
init/main.c renamed from init/main.c.orig +18 -0
@@ -273,6 +273,24 @@ #ifdef CONFIG_NFTL { "nftla", 0x5d00 }, #endif +#ifdef CONFIG_MTD + { "mtdblock0", 0x1f00 }, + { "mtdblock1", 0x1f01 }, + { "mtdblock2", 0x1f02 }, + { "mtdblock3", 0x1f03 }, + { "mtdblock4", 0x1f04 }, + { "mtdblock5", 0x1f05 }, + { "mtdblock6", 0x1f06 }, + { "mtdblock7", 0x1f07 }, + { "mtdblock8", 0x1f08 }, + { "mtdblock9", 0x1f09 }, + { "mtdblock10", 0x1f0a }, + { "mtdblock11", 0x1f0b }, + { "mtdblock12", 0x1f0c }, + { "mtdblock13", 0x1f0d }, + { "mtdblock14", 0x1f0e }, + { "mtdblock15", 0x1f0f }, +#endif { NULL, 0 } };
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi,
Quoted 6 lines · On Die, 06 M�r 2001 you wrote:
It's been submitted many many times. If you do submit it again, please add nftl[bcd] and ftl[abcd] too, and I don't think you actually need anything more than
{"mtdblock", 0x1f00},for the mtdblock devices, because they're handled just like partitions.
Hmm, I for one have two mtd devices on my platform, both of which I'd like to be able to use as root device. But I agree that 16 is probably a bit overkill. How about:
{"mtdblock0", 0x1f00},
{"mtdblock1", 0x1f01},
or:
{"mtdblock", 0x1f00},
{"mtdblock0", 0x1f00},
{"mtdblock1", 0x1f01},Rob
----------------------------------------------------------------
Robert Kaiser email: [email protected]
SYSGO RTS GmbH
Am Pfaffenstein 14 phone: (49) 6136 9948-762
D-55270 Klein-Winternheim / Germany fax: (49) 6136 9948-10
To unsubscribe, send "unsubscribe mtd" to [email protected]
Quoted 14 lines · Robert Kaiser
Hi,
Quoted 6 lines · On Die, 06 Mär 2001 you wrote:
It's been submitted many many times. If you do submit it again, please add nftl[bcd] and ftl[abcd] too, and I don't think you actually need anything more than
{"mtdblock", 0x1f00},for the mtdblock devices, because they're handled just like partitions.
Hmm, I for one have two mtd devices on my platform, both of which I'd like to be able to use as root device. But I agree that 16 is probably a bit overkill. How about:
Quoted 6 lines
{"mtdblock0", 0x1f00},
{"mtdblock1", 0x1f01},
or:
{"mtdblock", 0x1f00},
{"mtdblock0", 0x1f00},
{"mtdblock1", 0x1f01},Just {"mtdblock", 0x1f00} will suffice, because any number appended will be converted to an integer and be added to the base number given.
Check the implementation of name_to_kdev_t in init/main.c for details.
dave...
To unsubscribe, send "unsubscribe mtd" to [email protected]