[U-Boot] [PATCH] Can build with only jffs2 cmdline support

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.
Signed-off-by: Kyungmin Park kyungmin.park@samsung.com --- diff --git a/common/Makefile b/common/Makefile index f13cd11..18d76fa 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_jffs2.o COBJS-$(CONFIG_CMD_LICENSE) += cmd_license.o COBJS-y += cmd_load.o COBJS-$(CONFIG_LOGBUFFER) += cmd_log.o diff --git a/common/cmd_jffs2.c b/common/cmd_jffs2.c index d0a7cea..3af1bff 100644 --- a/common/cmd_jffs2.c +++ b/common/cmd_jffs2.c @@ -2005,6 +2005,7 @@ static struct part_info* jffs2_part_info(struct mtd_device *dev, unsigned int pa /* U-boot commands */ /***************************************************/
+#ifdef CONFIG_CMD_JFFS2 /** * Routine implementing fsload u-boot command. This routine tries to load * a requested file from jffs2/cramfs filesystem on a current partition. @@ -2144,6 +2145,7 @@ int do_jffs2_fsinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) } return 1; } +#endif /* CONFIG_CMD_JFFS2 */
/* command line only */ #ifdef CONFIG_JFFS2_CMDLINE @@ -2295,6 +2297,7 @@ int do_jffs2_mtdparts(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) #endif /* #ifdef CONFIG_JFFS2_CMDLINE */
/***************************************************/ +#ifdef CONFIG_CMD_JFFS2 U_BOOT_CMD( fsload, 3, 0, do_jffs2_fsload, "load binary file from a filesystem image", @@ -2314,6 +2317,7 @@ U_BOOT_CMD( "print information about filesystems", " - print information about filesystems\n" ); +#endif
#ifdef CONFIG_JFFS2_CMDLINE U_BOOT_CMD(

Hi Kyungmin,
On Friday 27 February 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.
Even though I like the idea of this patch, I would prefer if we could really split the mtdparts commandset from the jffs2 commandset. Meaning creating a new file (e.g. common/cmd_mtdparts) that can be enabled by CONFIG_CMD_MTDPARTS.
What do you think? Could you find the time to create such a patch?
Thanks.
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@denx.de =====================================================================

Hi Stefan,
On Fri, Feb 27, 2009 at 6:24 PM, Stefan Roese sr@denx.de wrote:
Hi Kyungmin,
On Friday 27 February 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.
Even though I like the idea of this patch, I would prefer if we could really split the mtdparts commandset from the jffs2 commandset. Meaning creating a new file (e.g. common/cmd_mtdparts) that can be enabled by CONFIG_CMD_MTDPARTS.
What do you think? Could you find the time to create such a patch?
Yes it's better, however there's some combination between jffs2 cmd and cmdline. it's some complicated. So I choose the simple method like this.
Okay I will try it but maybe I will start next week. since it's night at here.
Thank you, Kyungmin Park

On Friday 27 February 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.
Even though I like the idea of this patch, I would prefer if we could really split the mtdparts commandset from the jffs2 commandset. Meaning creating a new file (e.g. common/cmd_mtdparts) that can be enabled by CONFIG_CMD_MTDPARTS.
What do you think? Could you find the time to create such a patch?
Yes it's better, however there's some combination between jffs2 cmd and cmdline. it's some complicated.
Yes, I know. ;)
So I choose the simple method like this.
Okay I will try it but maybe I will start next week. since it's night at here.
Thanks. Really appreciated.
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@denx.de =====================================================================

Dear Kyungmin Park,
In message 20090227085736.GA5826@july you 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.
Signed-off-by: Kyungmin Park kyungmin.park@samsung.com
diff --git a/common/Makefile b/common/Makefile index f13cd11..18d76fa 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_jffs2.o
I think both the patch descriptin and the new CONFIG_JFFS2_CMDLINE variable name are misleading - additionally, CONFIG_JFFS2_CMDLINE needs to be documented in the READMe.
Best regards,
Wolfgang Denk

On Sat, Feb 28, 2009 at 11:20 PM, Wolfgang Denk wd@denx.de wrote:
Dear Kyungmin Park,
In message 20090227085736.GA5826@july you 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.
Signed-off-by: Kyungmin Park kyungmin.park@samsung.com
diff --git a/common/Makefile b/common/Makefile index f13cd11..18d76fa 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_jffs2.o
I think both the patch descriptin and the new CONFIG_JFFS2_CMDLINE variable name are misleading - additionally, CONFIG_JFFS2_CMDLINE needs to be documented in the READMe.
Yes it's right. the name is misleading. however I just leaved as before and generate patch at this time. Since I don't want to break the existing configurations.
Now I separate mtdpart command from jffs2. I will post it.
Thank you, Kyungmin Park
participants (3)
-
Kyungmin Park
-
Stefan Roese
-
Wolfgang Denk