Mount jffs2 on spi nor flash issue

Axel Lin axel.lin at ingics.com
Sun Dec 8 22:55:50 EST 2013


2013/12/9 Axel Lin <axel.lin at ingics.com>:
> 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:

> [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



More information about the linux-mtd mailing list