mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-06-28 09:31:32 +00:00
cmd: mtdparts: remove mandatory 'mtdparts=' prefix
All U-Boot users must define the mtdparts environment variable with: setenv mtdparts mtdparts=... While this may ease the partition declaration job to be passed to Linux, this is a pure software limitation and forcing this prefix is a complete non-sense. Let the user to declare manually the mtdparts variable without the prefix. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Acked-by: Jagan Teki <jagan@openedev.com> Reviewed-by: Stefan Roese <sr@denx.de>
This commit is contained in:
parent
00ac922db4
commit
d60aea94e9
1 changed files with 6 additions and 11 deletions
|
@ -44,7 +44,7 @@
|
||||||
*
|
*
|
||||||
* 'mtdparts' - partition list
|
* 'mtdparts' - partition list
|
||||||
*
|
*
|
||||||
* mtdparts=mtdparts=<mtd-def>[;<mtd-def>...]
|
* mtdparts=[mtdparts=]<mtd-def>[;<mtd-def>...]
|
||||||
*
|
*
|
||||||
* <mtd-def> := <mtd-id>:<part-def>[,<part-def>...]
|
* <mtd-def> := <mtd-id>:<part-def>[,<part-def>...]
|
||||||
* <mtd-id> := unique device tag used by linux kernel to find mtd device (mtd->name)
|
* <mtd-id> := unique device tag used by linux kernel to find mtd device (mtd->name)
|
||||||
|
@ -62,11 +62,11 @@
|
||||||
*
|
*
|
||||||
* 1 NOR Flash, with 1 single writable partition:
|
* 1 NOR Flash, with 1 single writable partition:
|
||||||
* mtdids=nor0=edb7312-nor
|
* mtdids=nor0=edb7312-nor
|
||||||
* mtdparts=mtdparts=edb7312-nor:-
|
* mtdparts=[mtdparts=]edb7312-nor:-
|
||||||
*
|
*
|
||||||
* 1 NOR Flash with 2 partitions, 1 NAND with one
|
* 1 NOR Flash with 2 partitions, 1 NAND with one
|
||||||
* mtdids=nor0=edb7312-nor,nand0=edb7312-nand
|
* mtdids=nor0=edb7312-nor,nand0=edb7312-nand
|
||||||
* mtdparts=mtdparts=edb7312-nor:256k(ARMboot)ro,-(root);edb7312-nand:-(home)
|
* mtdparts=[mtdparts=]edb7312-nor:256k(ARMboot)ro,-(root);edb7312-nand:-(home)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1099,9 +1099,6 @@ static int generate_mtdparts(char *buf, u32 buflen)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
strcpy(p, "mtdparts=");
|
|
||||||
p += 9;
|
|
||||||
|
|
||||||
list_for_each(dentry, &devices) {
|
list_for_each(dentry, &devices) {
|
||||||
dev = list_entry(dentry, struct mtd_device, link);
|
dev = list_entry(dentry, struct mtd_device, link);
|
||||||
|
|
||||||
|
@ -1572,11 +1569,9 @@ static int parse_mtdparts(const char *const mtdparts)
|
||||||
if (!p)
|
if (!p)
|
||||||
p = mtdparts;
|
p = mtdparts;
|
||||||
|
|
||||||
if (strncmp(p, "mtdparts=", 9) != 0) {
|
/* Skip the useless prefix, if any */
|
||||||
printf("mtdparts variable doesn't start with 'mtdparts='\n");
|
if (strncmp(p, "mtdparts=", 9) == 0)
|
||||||
return err;
|
p += 9;
|
||||||
}
|
|
||||||
p += 9;
|
|
||||||
|
|
||||||
while (*p != '\0') {
|
while (*p != '\0') {
|
||||||
err = 1;
|
err = 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue