
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 sr@denx.de Cc: Wolfgang Denk wd@denx.de Cc: Detlev Zundel dzu@denx.de Cc: Ilya Yanok yanok@emcraft.com Cc: Renaud barbier renaud.barbier@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?
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