From mboxrd@z Thu Jan 1 00:00:00 1970 From: Renaud barbier Date: Mon, 01 Jun 2009 09:59:16 +0100 Subject: [U-Boot] [RFC/PATCH] jffs2/mtdparts: Fix problem with usage from JFFS2 and MTDPARTS together In-Reply-To: <20090528192705.A8814832E416@gemini.denx.de> References: <1242468262-25814-1-git-send-email-sr@denx.de> <20090528192705.A8814832E416@gemini.denx.de> Message-ID: <4A239864.1000408@ge.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Wolfgang Denk wrote: > Dear Stefan Roese, > > In message <1242468262-25814-1-git-send-email-sr@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 >> Cc: Wolfgang Denk >> Cc: Detlev Zundel >> Cc: Ilya Yanok >> Cc: Renaud barbier >> --- >> 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? >> This works for me. I had the "ls" problem before when current_mtd_dev was not declare global. This was because as a static current_mtd_dev. was NULL. >> 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 > >