[U-Boot] [PATCH] Seperate mtdpart command from jffs2

Stefan Roese sr at denx.de
Fri Mar 6 14:13:50 CET 2009

Hi Kyungmin,

On Tuesday 03 March 2009, Kyungmin Park wrote:
> Some program such as UBI only used the mtdpart only.
> however current jffs2 cmdline has dependent with jffs2 cmd
> This patch make a build only jffs2 cmdline without jffs2 cmd dependency.

I tried to rephrase this description a little bit:

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.

If you don't have any objections I suggest to use this description in your 
next patch version.

Please find some more comments below.

> Signed-off-by: Kyungmin Park <kyungmin.park at samsung.com>
> ---
> diff --git a/common/Makefile b/common/Makefile
> index f13cd11..53ca648 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_JFFS2_CMDLINE) += cmd_mtdparts.o

Shouldn't we change this define (CONFIG_JFFS2_CMDLINE) to something else now, 
since it's not really JFFS2 specific anymore? I suggest to change it to 
CONFIG_CMD_MTDPARTS. This seems more logical to me.

What do you think? 

This patch also breaks (at least some) boards with JFFS2 support:

[stefan at kubuntu u-boot (master)]$ ./MAKEALL fx12mm
Configuring for fx12mm board...
cmd_jffs2.c:164: warning: 'device_validate' defined but not used
cmd_jffs2.c:220: warning: 'id_parse' defined but not used
common/libcommon.a(cmd_flash.o): In function `do_protect':
/home/stefan/git/u-boot/u-boot/common/cmd_flash.c:568: undefined reference to 
common/libcommon.a(cmd_flash.o): In function `do_flerase':
/home/stefan/git/u-boot/u-boot/common/cmd_flash.c:362: undefined reference to 
make: *** [u-boot] Error 1
ppc_4xx-size: './u-boot': No such file

I didn't try to solve this problem (yet). Perhaps you have an idea?


Best regards,

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