Wind River Support Network

HomeDefectsLIN1019-5108
Fixed

LIN1019-5108 : xilinx-zynqmp : issue with flash partition getting erased and jffs2 file system access from uboot

Created: Jul 27, 2020    Updated: Sep 3, 2020
Resolved Date: Aug 10, 2020
Found In Version: 10.19.45.8
Fix Version: 10.19.45.11
Severity: Critical
Applicable for: Wind River Linux LTS 19
Component/s: Kernel

Description

Different issues observed with mtd partitions on xilinx-zynqmp ZCU102 target.
 * After flashing data on the mtd partition (say mtdblock1), these data are erased after reboot
 * Even before rebooting, data flashed to the mtd partition are not displayed properly when mounting that partition on a folder; moreover it generates below warning :

 

root@xilinx-zynqmp:~# ls -lR /mnt/mtd2
/mnt/mtd2:
ls: cannot access '/mnt/mtd2/Foo': Input/output error
ls: cannot access '/mnt/mtd2/mtd1dumphex.txt': Input/output error
ls: cannot access '/mnt/mtd2/Bar': Input/output error
ls: cannot access '/mnt/mtd2/Tempfs.jffs2': Input/output error
total 0
-????????? ? ? ? ? ? Bar
-????????? ? ? ? ? ? Foo
-????????? ? ? ? ? ? Tempfs.jffs2
-????????? ? ? ? ? ? mtd1dumphex.txt
 jffs2: notice: (379) jffs2_get_inode_nodes: Node header C
C failed at 0x0003b4. {ffff,ffff,ffffffff,ffffffff} 
jffs2: Node totlen on flash (0xffffffff) != totlen from node ref (0x00000084) 
jffs2: warning: (379) jffs2_do_read_inode_internal: no data nodes found for ino
#6 
jffs2: iget() failed for ino #6 
jffs2: notice: (379) jffs2_get_inode_nodes: Node header CRC failed at 0x0004e8.
{ffff,ffff,ffffffff,ffffffff} 
jffs2: Node totlen on flash (0xffffffff) != totlen from node ref (0x00000068) 
jffs2: warning: (379) jffs2_do_read_inode_internal: no data nodes found for ino
#8 
jffs2: iget() failed for ino #8 
jffs2: notice: (379) jffs2_get_inode_nodes: Node header CRC failed at 0x000310.
{ffff,ffff,ffffffff,ffffffff} 
jffs2: Node totlen on flash (0xffffffff) != totlen from node ref (0x00000078) 
jffs2: warning: (379) jffs2_do_read_inode_internal: no data nodes found for ino
#5
... 

 

This issue is not reproduced with xilinx petalinux with the same kernel config. 

(see 'steps to reproduce' section for further detail and to fully understand the usecase and problem)

 

 

Steps to Reproduce

LTS19 RCPL 8 (or any RCPL) on xilinx-zynqmp zcu102 target

 

root@xilinx-zynqmp:~# flash_erase -j /dev/mtd1 0 0
Erasing 64 Kibyte @ 0 -- 0 % complete flash_erase: Cleanmarker Updated.
...
Erasing 64 Kibyte @ 4f0000 -- 98 % complete flash_erase: Cleanmarker Updated.Erasing 64 Kibyte @ 4f0000 -- 100 % complete
root@xilinx-zynqmp:~# mkdir Temp ; cd Temp


root@xilinx-zynqmp:~/Temp# vi Foo
root@xilinx-zynqmp:~/Temp# vi Bar
root@xilinx-zynqmp:~/Temp# vi mtd1dumphex.txt
root@xilinx-zynqmp:~/Temp# cd ..
root@xilinx-zynqmp:~# mkfs.jffs2 -d Temp/ -o Tempfs.jffs2 -e 64KiB
root@xilinx-zynqmp:~# ls -lrt Temp
total 12
-rw-r--r-- 1 root root 51 Jul 23 19:43 Foo
-rw-r--r-- 1 root root 37 Jul 23 19:44 Bar
-rw-r--r-- 1 root root 40 Jul 23 19:44 mtd1dumphex.txt
root@xilinx-zynqmp:~# ls -lrt Tempfs.jffs2
-rw-r--r-- 1 root root 1204 Jul 23 19:45 Tempfs.jffs2
root@xilinx-zynqmp:~# flashcp -v Tempfs.jffs2 /dev/mtd1
Erasing blocks: 1/1 (100%)
Writing data: 1k/1k (100%)
Verifying data: 1k/1k (100%)
root@xilinx-zynqmp:~# hexdump -C -n 3000 -v /dev/mtd1
...Beginning of the data at @0...
root@xilinx-zynqmp:~# hexdump -C -n 300 -v /dev/mtd1
00000000 85 19 03 20 0c 00 00 00 b1 b0 1e e4 85 19 01 e0 |... ............|
00000010 30 00 00 00 78 be 3e fa 01 00 00 00 00 00 00 00 |0...x.>.........|
00000020 02 00 00 00 93 e8 19 5f 08 08 00 00 a5 8c 21 4d |......._......!M|
00000030 c0 13 c6 21 2e 42 61 72 2e 75 6e 7e 85 19 02 e0 |...!.Bar.un~....|
00000040 b9 00 00 00 67 35 fb ec 02 00 00 00 01 00 00 00 |....g5..........|
00000050 a4 81 00 00 00 00 00 00 0b 02 00 00 93 e8 19 5f |..............._|
00000060 93 e8 19 5f 93 e8 19 5f 00 00 00 00 75 00 00 00 |..._..._....u...|
00000070 0b 02 00 00 06 00 00 00 ba 7e 8b f1 48 54 24 99 |.........~..HT$.|
... End of the data followed by ff ff...
00000430 b6 72 30 4f 28 f4 7d 77 6d 74 64 31 64 75 6d 70 |.r0O(.}wmtd1dump|
00000440 68 65 78 2e 74 78 74 ff 85 19 02 e0 6c 00 00 00 |hex.txt.....l...|
00000450 cc 7c 71 fd 07 00 00 00 01 00 00 00 a4 81 00 00 |.|q.............|
00000460 00 00 00 00 28 00 00 00 b7 e8 19 5f b7 e8 19 5f |....(......_..._|
00000470 b7 e8 19 5f 00 00 00 00 28 00 00 00 28 00 00 00 |..._....(...(...|
00000480 00 00 00 00 ba d3 52 af 2a f3 40 28 57 69 6e 64 |......R.*.@(Wind|
00000490 72 69 62 65 72 20 4f 74 74 61 77 61 20 4b 61 6e |riber Ottawa Kan|
000004a0 61 74 61 20 54 65 72 72 79 20 46 6f 78 20 64 72 |ata Terry Fox dr|
000004b0 69 76 65 0a ff ff ff ff ff ff ff ff ff ff ff ff |ive.............|
000004c0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
000004d0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
000004e0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
root@xilinx-zynqmp:~# mount -t jffs2 /dev/mtdblock1 /mnt/mtd1
root@xilinx-zynqmp:~#
root@xilinx-zynqmp:~# ls -lR /mnt/mtd1                     
/mnt/mtd1:                                   
jffs2: warning: (454) jffs2_get_inode_nodes: Eep. No valid nodes for ino #6.  
jffs2: warning: (454) jffs2_do_read_inode_internal: no data nodes found for ino #6                                       
jffs2: iget() failed for ino #6                         
ls: cannot access '/mnt/mtd1/Foo': Input/output error              
jffs2: warning: (454) jffs2_get_inode_nodes: Eep. No valid nodes for ino #7.  
jffs2: warning: (454) jffs2_do_read_inode_internal: no data nodes found for ino #7                                       
jffs2: iget() failed for ino #7                         
ls: cannot access '/mnt/mtd1/mtd1dumphex.txt': Input/output errorjffs2: warning
 (454) jffs2_get_inode_nodes: Eep. No valid nodes for ino #5.  
 jffs2: warning: (454) jffs2_do_read_inode_internal: no data nodes found for ino #5                                       
jffs2: iget() failed for ino #5                         
ls: cannot access '/mnt/mtd1/Bar': Input/output error              
total 0                                     
-????????? ? ? ? ?      ? Bar                       
-????????? ? ? ? ?      ? Foo                       
-????????? ? ? ? ?      ? mtd1dumphex.txt   

 

 ------Reboot ------

Can't see the Data : mtdblock1 seems to have been erased

root@xilinx-zynqmp:~# mount -t jffs2 /dev/mtdblock1 /mnt/mtd1
root@xilinx-zynqmp:~# hexdump -C -n 300 -v /dev/mtdblock1
00000000 85 19 03 20 0c 00 00 00 b1 b0 1e e4 ff ff ff ff |... ............|
00000010 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
00000020 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
00000030 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| 

 
Live chat
Online