I'm facing two problems on mounting jffs2 on NOR flash:
I'm running a board with squashfs as rootfs and I tried to mount jffs2 on another mtdblock as below :
mount -t jffs2 /dev/mtdblock6 /tmp/jffs
After that I copy some files into /tmp/jffs but system gives the error when the files larger than 4096 bytes:
cp: write error: Input/output error
Then I unmount the mtdblock and re-mount it again, but the files I just copied has disappeared.
I confirmed the flash block has been written by dumping /dev/mtd6 or /dev/mtdblock6, but those files cannot be seen after remounting.
=====
I opened the printk log and have following message showed up when I put a file in mounted folder:
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00120814: 0x0219 instead
Node totlen on flash (0x0000000c) != totlen from node ref (0x00000044)
and below message appeared when I tried to re-mount the mtdblock:
JFFS2 notice: (608) jffs2_get_inode_nodes: Node header CRC failed at 0x0e0050. {0000,9600,01e88b11,01000000}
Very appreciate if there is any suggestion.
I met this problem in u-boot/kernel too. It's caused by address mode. SPI NOR flash 3 byte address mode is only used in 16MB or lower. Sizes over 16MB must add the property
SPI_NOR_4B_OPCODES
to the NOR flash definition inspi_nor_ids[]
define inspi-nor.c