[U-Boot] [PATCH v2] Separate mtdparts command from jffs2
Stefan Roese
sr at denx.de
Thu Mar 19 10:41:45 CET 2009
On Thursday 19 March 2009, Wolfgang Denk wrote:
> > diff --git a/README b/README
> > index 43fb1c0..c59652d 100644
> > --- a/README
> > +++ b/README
> > @@ -633,6 +633,7 @@ The following options need to be configured:
> > CONFIG_CMD_MII * MII utility commands
> > CONFIG_CMD_NAND * NAND support
> > CONFIG_CMD_NET bootp, tftpboot, rarpboot
> > + CONFIG_CMD_MTDPARTS * MTD partition support
>
> Please keep list sorted.
OK.
> > diff --git a/common/Makefile b/common/Makefile
> > index f13cd11..6a8a541 100644
> > --- a/common/Makefile
> > +++ b/common/Makefile
> > @@ -98,6 +98,7 @@ COBJS-$(CONFIG_CMD_IMMAP) += cmd_immap.o
> > COBJS-$(CONFIG_CMD_IRQ) += cmd_irq.o
> > COBJS-$(CONFIG_CMD_ITEST) += cmd_itest.o
> > COBJS-$(CONFIG_CMD_JFFS2) += cmd_jffs2.o
> > +COBJS-$(CONFIG_CMD_MTDPARTS) += cmd_mtdparts.o
> > COBJS-$(CONFIG_CMD_LICENSE) += cmd_license.o
>
> Please keep list sorted.
OK.
> > diff --git a/common/cmd_jffs2.c b/common/cmd_jffs2.c
> > index d0a7cea..05aaca5 100644
> > --- a/common/cmd_jffs2.c
> > +++ b/common/cmd_jffs2.c
> > @@ -136,40 +136,6 @@
> > * field for read-only partitions */
> > #define MTD_WRITEABLE_CMD 1
> >
> > -#ifdef CONFIG_JFFS2_CMDLINE
> > -/* default values for mtdids and mtdparts variables */
> > -#if defined(MTDIDS_DEFAULT)
> > -static const char *const mtdids_default = MTDIDS_DEFAULT;
> > -#else
> > -#warning "MTDIDS_DEFAULT not defined!"
> > -static const char *const mtdids_default = NULL;
> > -#endif
> > -
> > -#if defined(MTDPARTS_DEFAULT)
> > -static const char *const mtdparts_default = MTDPARTS_DEFAULT;
> > -#else
> > -#warning "MTDPARTS_DEFAULT not defined!"
> > -static const char *const mtdparts_default = NULL;
> > -#endif
> > -
> > -/* copies of last seen 'mtdids', 'mtdparts' and 'partition' env
> > variables */ -#define MTDIDS_MAXLEN 128
> > -#define MTDPARTS_MAXLEN 512
> > -#define PARTITION_MAXLEN 16
> > -static char last_ids[MTDIDS_MAXLEN];
> > -static char last_parts[MTDPARTS_MAXLEN];
> > -static char last_partition[PARTITION_MAXLEN];
> > -
> > -/* low level jffs2 cache cleaning routine */
> > -extern void jffs2_free_cache(struct part_info *part);
> > -
> > -/* mtdids mapping list, filled by parse_ids() */
> > -struct list_head mtdids;
> > -
> > -/* device/partition list, parse_cmdline() parses into here */
> > -struct list_head devices;
> > -#endif /* #ifdef CONFIG_JFFS2_CMDLINE */
> > -
>
> Hm... here and downwards the whole mtdparts code gets deleted. But I
> see no place where that functionality gets added again?
>
> You can see this also from the patch statistics:
>
> 81 files changed, 131 insertions(+), 2223 deletions(-)
>
> We drop > 2000 lines of code here, which represents a lot of important
> functions.
>
> I wonder if this patch has ever been tested?
Yes, it has.
I generated this patch with the "find-copies-harder" option. This makes the
status output harder to read. I'll send an updated patch in short while.
Best regards,
Stefan
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
More information about the U-Boot
mailing list