IMX27 Spansion S29WS256P NOR JFFS2 problem

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

IMX27 Spansion S29WS256P NOR JFFS2 problem

1,438 次查看
jmcambs
Contributor I

Hi,

I suspect this is a Linux issue but maybe someone will be able to help - we have been attempting to get this to work for quite some time now.

We have a board using an IMX27 and Spansion NOR flash S29WS256P connected using WEIM.

The flash has been proven to work using /dev/mtdblockX with random data.

The problem occurs when writing a large file to a jffs2 partition, then re-mounting the partition, the file becomes corrupted: or lost sometimes:

flash_erase /dev/mtd4 0 0

mount -t jffs2 mtd4 /mnt/flash/

dd if=/dev/urandom of=/tmp/test.bin bs=1M count=2

2+0 records in

2+0 records out

cp /tmp/test.bin /mnt/flash/

md5sum /tmp/test.bin

0421170b11c920a5c898fab5bca2f981  /tmp/test.bin

md5sum /mnt/flash/test.bin

0421170b11c920a5c898fab5bca2f981  /mnt/flash/test.bin

umount /mnt/flash/

mount -t jffs2 mtd4 /mnt/flash/

md5sum /mnt/flash/test.bin

ba42d6eba9481c386876027514275a7c  /mnt/flash/test.bin <== corrupt

Kernel messages during the remount are:

[ 1862.430000] Empty flash at 0x0009106c ends at 0x00094140

[ 1862.440000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00094140: 0x586d instead

[ 1862.450000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00094144: 0x0086 instead

[ 1862.460000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00094148: 0x0066 instead

[ 1862.470000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0009414c: 0x81a4 instead

[ 1862.480000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00094154: 0x2000 instead

[ 1862.490000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00094158: 0xa9fd instead

[ 1862.490000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0009415c: 0xa9fd instead

[ 1862.500000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00094160: 0xa9fd instead

[ 1862.510000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00094164: 0x1000 instead

[ 1862.520000] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00094168: 0x1000 instead

[ 1862.530000] Further such events for this erase block will not be printed

[ 1862.540000] Empty flash at 0x00094e80 ends at 0x00094ec0

[ 1862.550000] Empty flash at 0x0009517c ends at 0x00095180

We are using linux-2.6.38.7. JFFS2 write buffering and summary support are both disabled.

Compiling the kernel with MTD/JFFS2 debug we have confirmed the correct CFI information is being obtained from the flash device.

Many thanks in advance,

John Mackenzie

标签 (2)
0 项奖励
回复
3 回复数

835 次查看
sinanakman
Senior Contributor III

Hi John, can you please upgrade to new kernel 3.10 and give this a try. There has been fixes on this area.

835 次查看
jmcambs
Contributor I

Hi,

thanks for your suggestion.

We may try the new kernel but in the immediate future we are limited to this version – it’s a legacy product that used a nand flash but had to be changed to nor after some modifications.

nor + jffs2 has been around for some time so I’m surprised there are issues.

John

0 项奖励
回复

835 次查看
jmcambs
Contributor I

This issue has come up again as the board is being resurrected.

We have tried the 3.16 kernel and still see the same error messages and have also tried ubifs but get similar results.

Any suggestions welcome!

0 项奖励
回复