cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Participant
Participant
6,015 Views
Registered: ‎06-28-2016

JFFS2 filesystem troubles ZCU102 petalinux eraseblock size

Jump to solution

Hello,

 

We are using the zcu102 dev board.  I can burn the kernel and  ramdisk image to QSPI flash and boot from it without a problem, now I need to configure the QSPI flash so I can mount a jffs2 file system on it.

 

I use the command flashcp -v rootfs.jffs2 /dev/mtd4 to copy the rfs on the partition of the qspi. Before that i've use flash_eraseall -j to clean the partition. When i reboot i get the following log:

 

[    3.525851] jffs2: Node at 0x00001a70 with length 0x0000090d would run over the end of the erase block
[    3.535108] jffs2: Perhaps the file system was created with the wrong erase size?
[    3.542557] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00001a74: 0x090d instead
[    3.552027] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00001a78: 0xd725 instead
[    3.561481] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00001a7c: 0x0013 instead

...

[  444.891362] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004
[  444.891362]

 

PARTITIONS:

root@Xilinx-ZCU102-2016_1:~# /proc/mtdc/proc/mtda/proc/mtdt/proc/mtd /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00002000 "boot"
mtd1: 00040000 00002000 "bootenv"
mtd2: 02000000 00002000 "kernel"
mtd3: 00020000 00002000 "devicetree"
mtd4: 03000000 00002000 "jffs2"
mtd5: 00100000 00002000 "qspi-fsbl-uboot"
mtd6: 00500000 00002000 "qspi-linux"
mtd7: 00020000 00002000 "qspi-device-tree"
mtd8: 005e0000 00002000 "qspi-rootfs"
root@Xilinx-ZCU102-2016_1:~# mtdinfo
Count of MTD devices:           9
Present MTD devices:            mtd0, mtd1, mtd2, mtd3, mtd4, mtd5, mtd6, mtd7, mtd8
Sysfs interface supported:      yes
root@Xilinx-ZCU102-2016_1:~# mtdinfo /dev/mtd4
mtd4
Name:                           jffs2
Type:                           nor
Eraseblock size:                8192 bytes, 8.0 KiB
Amount of eraseblocks:          6144 (50331648 bytes, 48.0 MiB)
Minimum input/output unit size: 1 byte
Sub-page size:                  1 byte
Character device major/minor:   90:8
Bad blocks are allowed:         false
Device is writable:             true

 

I think that the problem is that i have not configured the rfs with the right erase size. However the config menu of Petalinux only allow a minimum erase size of 16KB. Is there any way to config in petalinux a 8KB eraseblock size??

 

Thank you

0 Kudos
Reply
1 Solution

Accepted Solutions
Observer
Observer
8,216 Views
Registered: ‎11-25-2015

Hi,

 

If you need to change your erase size, in kernel configuration ncurses menu, got to Device drivers --> Memory Technology Device (MTD) support --> Self-contained MTD device drivers --> Test driver using RAM -->MTDRAM erase block size in KiB.

 

But, I am not sure if this resolves your issue.

 

Thanks,

Naveen

View solution in original post

0 Kudos
Reply
2 Replies
Explorer
Explorer
5,962 Views
Registered: ‎11-22-2015
 

I don't know about using flashcp to copy a pre-built rootfs; however, I know if I flash_erase and mount an QSPI partition as jffs2 it works just fine. 

 

jeff

0 Kudos
Reply
Observer
Observer
8,217 Views
Registered: ‎11-25-2015

Hi,

 

If you need to change your erase size, in kernel configuration ncurses menu, got to Device drivers --> Memory Technology Device (MTD) support --> Self-contained MTD device drivers --> Test driver using RAM -->MTDRAM erase block size in KiB.

 

But, I am not sure if this resolves your issue.

 

Thanks,

Naveen

View solution in original post

0 Kudos
Reply