Hi all, Qiang_FSL
I have a Winbond nor flash on my board, W25Q256. After seeing the site: How to enable SPI NOR boot for i.MX28 (Spansion s25fl256s) I want to use the jffs2 too.
But when mounting jffs2 during kernel starting, I keep seeing lots of jffs2 error,
mxs-rtc mxs-rtc.0: setting system clock to 1970-01-01 00:00:34 UTC (34)
VFS: Mounted root (jffs2 filesystem) on device 31:1.
Freeing init memory: 176K
JFFS2 notice: (999) read_dnode: node CRC failed on dnode at 0x1be007c: read 0xb08d1054, calculated 0x8b624504
JFFS2 notice: (1) read_dnode: node CRC failed on dnode at 0x1b8000c: read 0xb08d1054, calculated 0x8b624504
JFFS2 warning: (999) jffs2_do_read_inode_internal: no data nodes found for ino #2
Returned error for crccheck of ino #2. Expect badness...
JFFS2 notice: (999) jffs2_get_inode_nodes: Node header CRC failed at 0x1be01ec. {5e78,975c,e5148c7f,d9dfc719}
Node totlen on flash (0xb91b6f6d) != totlen from node ref (0x0000004c)
JFFS2 warning: (999) jffs2_do_read_inode_internal: no data nodes found for ino #4
Returned error for crccheck of ino #4. Expect badness...
JFFS2 notice: (999) jffs2_get_inode_nodes: Node header CRC failed at 0x1be02b4. {5e78,5794,c8e353ef,cbaf9d11}
Node totlen on flash (0x55546c69) != totlen from node ref (0x0000004c)
JFFS2 warning: (999) jffs2_do_read_inode_internal: no data nodes found for ino #5
Returned error for crccheck of ino #5. Expect badness...
JFFS2 notice: (1) read_dnode: node CRC failed on dnode at 0x17be924: read 0x3e803e8, calculated 0x9920efca
JFFS2 notice: (999) jffs2_get_inode_nodes: Node header CRC failed at 0x1be0448. {5e78,d62c,dd943879,5b7007ff}
Node totlen on flash (0xebd63f87) != totlen from node ref (0x0000004c)
JFFS2 warning: (999) jffs2_do_read_inode_internal: no data nodes found for ino #7
Returned error for crccheck of ino #7. Expect badness...
Data CRC d8358eb0 != calculated CRC 0e70dd3e for node at 017591a8
JFFS2 notice: (999) jffs2_get_inode_nodes: Node header CRC failed at 0x1be0510. {5e78,975c,d5956c0f,fbcfc015}
Node totlen on flash (0x5754684f) != totlen from node ref (0x0000004c)
JFFS2 warning: (999) jffs2_do_read_inode_internal: no data nodes found for ino #8
Returned error for crccheck of ino #8. Expect badness...
JFFS2 notice: (999) jffs2_get_inode_nodes: Node header CRC failed at 0x1be05d4. {5e78,d3ac,415b4c21,a3f1c71c}
Node totlen on flash (0x695c686d) != totlen from node ref (0x0000004c)
JFFS2 warning: (999) jffs2_do_read_inode_internal: no data nodes found for ino #9
But I can log into the system. However, when try to execute command like ls, cd, I still see the same error.
JFFS2 notice: (1088) read_dnode: node CRC failed on dnode at 0x1b30474: read 0x3afc5558, calculated 0xb169a063
JFFS2 warning: (1088) jffs2_do_read_inode_internal: no data nodes found for ino #154
iget() failed for ino #154
(none) login: root
login[1088]: root login on 'ttyAM0'
JFFS2 notice: (1088) read_dnode: node CRC failed on dnode at 0x1b4f42c: read 0x000000, calculated 0x28966911
Node totlen on flash (0x00000044) != totlen from node ref (0x000001b4)
~ #
~ # ls
JFFS2 notice: (1088) read_dnode: node CRC failed on dnode at 0x1b50bc8: read 0x1b62df47, calculated 0x3809b5af
JFFS2 notice: (1022) jffs2_get_inode_nodes: Node header CRC failed at 0x16ecd18. {008d,0000,00000000,00000007}
JFFS2 warning: (1088) jffs2_do_read_inode_internal: no data nodes found for ino #90
iget() failed for ino #90
-sh: ls: Input/output error
~ # JFFS2 warning: (1022) jffs2_do_read_inode_internal: no data nodes found for ino #374
Returned error for crccheck of ino #374. Expect badness...
Process of updating firmware is normal, and the kernel partition, ucl.xml is as following
Creating 2 MTD partitions on "mx28_nor_flash":
0x000000000000-0x000000400000 : "kernel" ----total 4M
0x000000400000-0x000002000000 : "rootfs" ----total 28M
<LIST name="SPI-NOR (kernel and rootfs)" desc="zyx test">
<CMD type="boot" body="Recovery" file="updater.sb" if="HabDisable">Booting update firmware.</CMD>
<CMD type="boot" body="Recovery" file="updater_ivt.sb" if="HabEnable">Booting update firmware.</CMD>
<CMD type="find" body="Updater" timeout="180"/>
<CMD type="push" body="mknod class/mtd,mtd0,/dev/mtd0"/>
<CMD type="push" body="mknod class/mtd,mtd1,/dev/mtd1"/>
<CMD type="push" body="mknod block,mtdblock1,/dev/mtdblock1,block"/>
<CMD type="push" body="$ flash_eraseall /dev/mtd0">Erasing kernel partition</CMD>
<CMD type="push" body="send" file="files/imx28_ivt_linux.sb">Sending kernel</CMD>
<CMD type="push" body="$ dd if=$FILE of=/dev/mtd0">Programming kernel</CMD>
<CMD type="push" body="$ flash_eraseall -j /dev/mtd1">Erasing rootfs partition</CMD>
<CMD type="push" body="$ mkdir -p /mnt/mtdblock1"/>
<CMD type="push" body="$ mount -t jffs2 /dev/mtdblock1 /mnt/mtdblock1"/>
<CMD type="push" body="pipe tar -jxv -C /mnt/mtdblock1" file="files/rootfs.tar.bz2">Sending and writting rootfs</CMD>
<CMD type="push" body="frf">Finishing rootfs write</CMD>
<CMD type="push" body="$ umount /mnt/mtdblock1">Unmounting rootfs partition</CMD>
<CMD type="push" body="$ echo Update Complete!">Done</CMD>
</LIST>
Thanks in advance!
解決済! 解決策の投稿を見る。
I think you should use raw data to test your SPI NOR driver first, for example, dd a 32MB file to your SPI NOR, then read back to check if the data is correct or not?
I succeed in enter my ramdisk. I will try your method. Thanks!
Thanks Li,
Can I put the dd cmd in my ucl.xml and how to do that?
I wonder if I can read the flash raw data into my local PC(Windows).
Regards,
You can put your rootfs to SD card or RAMDISK, then test the SPI NOR.
Thanks for your advice, Li
I tried another simple way. Since I can enter the system, I use several commands to test the read and write.
touch test
echo "ni hao“ > test
sync
sync
vi test
and in the vi editor, I can see the characters written by echo.
I don't know if this is enough to test the flash driver.