[U-Boot] [RFC/PATCH] jffs2/mtdparts: Fix problem with usage from JFFS2 and MTDPARTS together

Wolfgang Denk wd at denx.de
Thu May 28 21:27:05 CEST 2009


Dear Stefan Roese,

In message <1242468262-25814-1-git-send-email-sr at denx.de> you wrote:
> Currently using JFFS2 with MTDPARTS enabled doesn't work. This is because
> mtdparts_init() is available in both files, cmd_mtdparts.c and
> cmd_jffs2.c. Please note that in the original cmd_jffs2.c file (before
> the jffs2/mtdparts command/file split those 2 different versions
> already existed. So this is nothing new. The main problem is that the
> variables "current_dev" and "current_partnum" are declared in both
> files now. This doesn't work.
> 
> This patch now changes the names of those variable to more specific
> names: "current_mtd_dev" and "current_mtd_partnum". This is because
> this patch also changes the declaration from static to global, so
> that they can be used from both files.
> 
> Please note that my first tests were not successful. The MTD devices
> selected via mtdparts are now accessed but I'm failing to see the
> directory listed via the "ls" command. Nothing is displayed. Perhaps
> I didn't generate the JFFS2 image correctly (I never used JFFS2 in
> U-Boot before). Not sure. Perhaps somebody else could take a look at
> this as well. I'll continue looking into this on Monday.
> 
> Signed-off-by: Stefan Roese <sr at denx.de>
> Cc: Wolfgang Denk <wd at denx.de>
> Cc: Detlev Zundel <dzu at denx.de>
> Cc: Ilya Yanok <yanok at emcraft.com>
> Cc: Renaud barbier <renaud.barbier at ge.com>
> ---
> Renaud, you reported this problem on 05-04-2009 [mtdparts and JFFS2]. Could you
> please take a look at my patch. Does this work for you? Or what else is missing?
> 
> Thank,
> Stefan.
> 
>  common/cmd_jffs2.c    |   44 ++++++++++++++++++-----------
>  common/cmd_mtdparts.c |   74 ++++++++++++++++++++++++------------------------
>  2 files changed, 64 insertions(+), 54 deletions(-)

Applied to master, thanks.

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
It would be illogical to assume that all conditions remain stable
	-- Spock, "The Enterprise" Incident", stardate 5027.3


More information about the U-Boot mailing list