[U-Boot] do_jffs2_ls fails

Hi,
I'm trying to execute ls command from u-boot shell, but it fails.
My board consists of an ARM926ej, 128MB of NOR flash (at 0x20000000 after remap) and 64MB of DDRII at 0x00000000.
u-boot is running perfectly appart from this. This means that it loads linux correctly when I have uImage in a specific /dev/mtdX partition, reserved only for this data. But I want to have this uImage file in linux filesystem, as I have it for other boards (NGW100 from Atmel, AVR32AP7 CPU).
Taking a look at the last lines, it seems there is a problem with malloc.
Any help would be greatly appreciated.
Thanks in advance, Ricardo
=> ls Scanning JFFS2 FS: / Unknown node type: 2005 len 24 offset 0x280000 .- Unknown node type: 2005 len 24 offset 0x2c0000 \ Unknown node type: 2005 len 24 offset 0x300000 ........| Unknown node type: 2005 len 24 offset 0x340000 ./ Unknown node type: 2005 len 24 offset 0x380000 - Unknown node type: 2005 len 24 offset 0x3c0000 \ Unknown node type: 2005 len 24 offset 0x400000 | Unknown node type: 2005 len 24 offset 0x440000 / Unknown node type: 2005 len 24 offset 0x480000 - Unknown node type: 2005 len 24 offset 0x4c0000 \ Unknown node type: 2005 len 24 offset 0x500000 | Unknown node type: 2005 len 24 offset 0x540000 / Unknown node type: 2005 len 24 offset 0x580000 - Unknown node type: 2005 len 24 offset 0x5c0000 \ Unknown node type: 2005 len 24 offset 0x600000 | Unknown node type: 2005 len 24 offset 0x640000 / Unknown node type: 2005 len 24 offset 0x680000 - Unknown node type: 2005 len 24 offset 0x6c0000 \ Unknown node type: 2005 len 24 offset 0x700000 | Unknown node type: 2005 len 24 offset 0x740000 / Unknown node type: 2005 len 24 offset 0x780000 - Unknown node type: 2005 len 24 offset 0x7c0000 \ Unknown node type: 2005 len 24 offset 0x800000 .| Unknown node type: 2005 len 24 offset 0x840000 / Unknown node type: 2005 len 24 offset 0x880000 - Unknown node type: 2005 len 24 offset 0x8c0000 \ Unknown node type: 2005 len 24 offset 0x900000 | Unknown node type: 2005 len 24 offset 0x940000 / Unknown node type: 2005 len 24 offset 0x980000 - Unknown node type: 2005 len 24 offset 0x9c0000 \ Unknown node type: 2005 len 24 offset 0xa00000 | Unknown node type: 2005 len 24 offset 0xa40000 / Unknown node type: 2005 len 24 offset 0xa80000 - Unknown node type: 2005 len 24 offset 0xac0000 \ Unknown node type: 2005 len 24 offset 0xb00000 add_node: malloc failed add_node failed! ls: Failed to scan JFFSv2 file structure

Dear =?iso-8859-1?Q?Ricardo_Mart=EDnez?=,
In message A25E5D6A481444C4BF45FE1156C648BD@teltronic.es you wrote:
I'm trying to execute ls command from u-boot shell, but it fails.
...
Taking a look at the last lines, it seems there is a problem with malloc.
...
add_node: malloc failed add_node failed! ls: Failed to scan JFFSv2 file structure
Indeed. So why don't you increase the size of your malloc arena?
Best regards,
Wolfgang Denk

Hi Wolfgang,
Thanks.
But "get_node_mem((u32)part->offset + offset)" in function "jffs2_1pass_build_lists(struct part_info * part)" in folder fs/jffs2, file jffs2_1pass.c called during do_jffs2_ls is still reading node->type = 0x2005
While I've checked types defined in jffs2.h and they are #define JFFS2_NODETYPE_DIRENT (JFFS2_FEATURE_INCOMPAT | JFFS2_NODE_ACCURATE | 1) // 0xE001 #define JFFS2_NODETYPE_INODE (JFFS2_FEATURE_INCOMPAT | JFFS2_NODE_ACCURATE | 2) // 0xE002 #define JFFS2_NODETYPE_CLEANMARKER (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 3) //0x2003 #define JFFS2_NODETYPE_PADDING (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 4) //0x2004
Then, 0x2005 is not defined. I'm not familiar with filesystems, no idea about what does this mean.
Any ideas? Ricardo
-----Mensaje original----- De: Wolfgang Denk [mailto:wd@denx.de] Enviado el: lunes, 26 de octubre de 2009 15:20 Para: Ricardo Martínez CC: u-boot@lists.denx.de Asunto: Re: [U-Boot] do_jffs2_ls fails
Dear =?iso-8859-1?Q?Ricardo_Mart=EDnez?=,
In message A25E5D6A481444C4BF45FE1156C648BD@teltronic.es you wrote:
I'm trying to execute ls command from u-boot shell, but it fails.
...
Taking a look at the last lines, it seems there is a problem with malloc.
...
add_node: malloc failed add_node failed! ls: Failed to scan JFFSv2 file structure
Indeed. So why don't you increase the size of your malloc arena?
Best regards,
Wolfgang Denk

Me again :)
Anyway, I've made malloc size huge (2MB), then scanning whole JFFS2 filesystem succeeds and, although I still have those horrible "Unknown node type" messages, I can load uImage from Filesystem.
I bet it is because I'm scanning from an offset where flash has NOT jffs2 format. Silly question and my fault.
Thank you very much for your help
-----Mensaje original----- De: Wolfgang Denk [mailto:wd@denx.de] Enviado el: lunes, 26 de octubre de 2009 15:20 Para: Ricardo Martínez CC: u-boot@lists.denx.de Asunto: Re: [U-Boot] do_jffs2_ls fails
Dear =?iso-8859-1?Q?Ricardo_Mart=EDnez?=,
In message A25E5D6A481444C4BF45FE1156C648BD@teltronic.es you wrote:
I'm trying to execute ls command from u-boot shell, but it fails.
...
Taking a look at the last lines, it seems there is a problem with malloc.
...
add_node: malloc failed add_node failed! ls: Failed to scan JFFSv2 file structure
Indeed. So why don't you increase the size of your malloc arena?
Best regards,
Wolfgang Denk
participants (2)
-
Ricardo Martínez
-
Wolfgang Denk