imx8mq android mount spi flash error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx8mq android mount spi flash error

313 Views
pyh0603
Contributor III

Hello,

Release: android_p11.0.0_2.6.0

Board: i.MX8MQ based custom board

 

 

I am currently debugging SPI FLASH and there is already a device file in the file system:

evk_8mq:/ #

evk_8mq:/ # ls /dev/mtd*

/dev/mtd0  /dev/mtd0ro

evk_8mq:/ #

And the block device has already been registered:

evk_8mq:/ #

evk_8mq:/ # ls /dev/block/mtdblock0

/dev/block/mtdblock0

evk_8mq:/ #

 

My steps:

Step 1: Create jffs2.img

Using the command on ubuntu to create jffs2.img:

sudo mkfs.jffs2- s 0x100 -e 0x10000 -p 0x1AF0000 -d jffs2_rootfs/ -o jffs2.img

The SPI flash model I am using is MT25QL256ABA1EW7, with a block size of 64K and a page size of 256 bytes

Then transfer jffs2.img to the path of Android:

adb push jffs2.img/data

step 2convert /dev/mtd0 to jff2

./busybox flash_eraseall -j /dev/mtd0

pyh0603_0-1690364542953.png

Step 4: Mount/dev/block/mtdblock0 to /mnt/mtd

mount - t jffs2 /dev/block/mtdblock0 /mnt/mtd

But the error is as follows:

[  474.113521][ T1757] jffs2: Further such events for this erase block will not be printed

[  474.122219][ T1757] jffs2: Node at 0x00069fdc with length 0x00000144 would run over the end of the erase block

[  474.132251][ T1757] jffs2: Perhaps the file system was created with the wrong erase size?

[  474.140520][ T1757] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0006a000: 0x1901 instead

[  474.150725][ T1757] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0006a004: 0x0008 instead

[  474.160923][ T1757] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0006a008: 0x3000 instead

[  474.171129][ T1757] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0006a00c: 0x0100 instead

[  474.181325][ T1757] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0006a010: 0x0100 instead

[  474.191526][ T1757] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0006a018: 0xf87e instead

[  474.201719][ T1757] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0006a01c: 0x5a76 instead

[  474.211927][ T1757] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0006a020: 0x7db3 instead

[  474.222121][ T1757] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0006a024: 0xe979 instead

[  474.232466][ T1757] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0006a028: 0x21dd instead

[  474.242665][ T1757] jffs2: Further such events for this erase block will not be printed

[  474.251374][ T1757] jffs2: Node at 0x0006af0c with length 0x00000144 would run over the end of the erase block

[  474.261401][ T1757] jffs2: Perhaps the file system was created with the wrong erase size?

pyh0603_1-1690364560006.png

How can I solve the problem of mounting errors?
Also: I noticed that there is a tool called mtd utils, but it is only available in the Linux version. Is there an Android version available for use? I have been unable to use Makefile after successful cross compilation.
git://git.infradead.org/mtd-utils.git

 

0 Kudos
Reply
1 Reply

292 Views
Sanket_Parekh
NXP TechSupport
NXP TechSupport
Hello @pyh0603,
 
I hope you are doing well
 
These filesystem-related errors might cause due to several reasons. 
->The issue occurs because the JFFS2 filesystem is configured with an incorrect erase block size.
->The issue could be due to a buggy driver which reads trash instead of valid data.
->There are chances that the issue is in the JFFS2 image.
 
For the query related to mtd-utils, kindly try the same on Android 13 and share the result.
 
Thanks & Regards,
Sanket Parekh
0 Kudos
Reply