[U-Boot] [PATCH v2] Separate mtdparts command from jffs2
Wolfgang Denk
wd at denx.de
Thu Mar 19 10:19:12 CET 2009
Dear Stefan Roese,
In message <1237451843-8870-1-git-send-email-sr at denx.de> you wrote:
> Currently the mtdparts commands are included in the jffs2 command support.
> This doesn't make sense anymore since other commands (e.g. UBI) use this
> infrastructure as well now. This patch separates the mtdparts commands from
> the jffs2 commands making it possible to only select mtdparts when no JFFS2
> support is needed.
>
> Signed-off-by: Stefan Roese <sr at denx.de>
> Signed-off-by: Kyungmin Park <kyungmin.park at samsung.com>
...
> 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.
> 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.
> 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?
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Gewöhnlich glaubt der Mensch, wenn er nur Worte hört, es müsse sich
dabei doch auch was denken lassen. -- Goethe, Faust I
More information about the U-Boot
mailing list