Skip to contentSkip to conversation

Mount jffs2 on spi nor flash issue

DISCUSSION Axel Lin 1 participant 2 messages Dec 9, 2013 Memory technology devices (MTD)

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

Hi list,
I'm trying to mount a jffs2 on a spi nor flash but I got hangup after below messages:

VFS: Mounted root (jffs2 filesystem) on device 31:1.
devtmpfs: mounted
Freeing unused kernel memory: 92K (00364000 - 0037b000)

( I can mount the jffs2 image on my host using mtdram to test mount. However, I got hang up when using jffs on my target machine. The nor-flash is compatible to MX25L3205D.)

After setting CONFIG_JFFS2_FS_DEBUG=1, I got below messages:

8,028 lines not shown · raw message

Part of this message is not shown here. View the raw message.

author
#1 lore raw

2013/12/9 Axel Lin <[email protected]>:

Quoted 13 lines

Hi list,
I'm trying to mount a jffs2 on a spi nor flash but I got hangup after below messages:

VFS: Mounted root (jffs2 filesystem) on device 31:1.
devtmpfs: mounted
Freeing unused kernel memory: 92K (00364000 - 0037b000)

( I can mount the jffs2 image on my host using mtdram to test mount. However, I got hang up when using jffs on my target machine. The nor-flash is compatible to MX25L3205D.)

After setting CONFIG_JFFS2_FS_DEBUG=1, I got below messages:

Quoted 8 lines

[JFFS2 DBG] (1) jffs2_build_inode_fragtree: Add 01e77160 (v 1, 0x0-0x1000, ov 0) to fragtree [JFFS2 DBG] (1) jffs2_add_full_dnode_to_inode: adding node 0x00-0x1000 @0x00000830 on flash, newfrag *01e5f078 [JFFS2 DBG] (1) jffs2_truncate_fragtree: truncating fragtree to 0x000b9dc4 bytes

Then my debug code shows it hangs at below while loop: (fs/jffs2/compr_zlib.c) while((ret = zlib_inflate(&inf_strm, Z_FINISH)) == Z_OK)

        ;

In my another test, the latest message shows "read_dnode: the node has no data."

[JFFS2 DBG] (37) jffs2_add_fd_to_list: add dirent "lib", ino #190 [JFFS2 DBG] (1) jffs2_truncate_fragtree: truncating fragtree to 0x000b9dc4 bytes [JFFS2 DBG] (37) jffs2_add_fd_to_list: add dirent "bin", ino #189 [JFFS2 DBG] (37) read_more: read more 28 bytes
[JFFS2 DBG] (37) read_dnode: the node has no data.

So it seems the hangup is because of reading "/bin/sh" fails. ( I pass init=/bin/sh to boot args ).

Regards,
Axel