From: Kyungmin Park Date: Mon, 9 Mar 2009 12:08:43 +0900 Subject: [U-Boot] [PATCH] Seperate mtdpart command from jffs2 In-Reply-To: <200903061413.50906.sr@denx.de> References: <20090303050321.GA29890@july> <200903061413.50906.sr@denx.de> Message-ID: <9c9fda240903082008w1e68d1cfpeed2ad836dcd1f49@mail.gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Fri, Mar 6, 2009 at 10:13 PM, Stefan Roese wrote: > 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 >> --- >> 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? It's already done by Jean-Christophe PLAGNIOL-VILLARD. Isn't it? > > 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 > `id_parse' > 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 > `id_parse' > 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? In both case jffs2 and mtdpart, have id_parse as changed to static, so one of both should be non-static. I think remove static at cmd_jffs2.c Thank you, Kyungmin Park