AnsweredAssumed Answered

Another kernel panic - not syncing: VFS: Unable to mount root fs

Question asked by 3DeeMoN on Dec 9, 2015
Latest reply on Dec 22, 2015 by 3DeeMoN

I have the same issue as in https://ez.analog.com/message/235565#235565 but I don't understand what should I do to load rootfs from spi flash?

 

By the way, I can't manually mount rootfs partition from flash. When I make mount -t jffs2 /dev/mtdblock2 /mnt/rootfs I get

 

jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.

jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000000: 0xf160 instead

jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000004: 0x71b2 instead

jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000008: 0xf6e1 instead

jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000000c: 0x01a0 instead

jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000010: 0xff9c instead

jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000014: 0x00f0 instead

jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000018: 0x0510 instead

jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000001c: 0x4120 instead

........................

 

I use NOR SPI flash Micron N25Q512 Micron Technology, Inc. - N25Q512A13GF840F

I disabled initramfs as described in linux-kernel:jffs [Analog Devices Open Source| Mixed-signal and Digital Signal Processing ICs] but without success.

 

The commands I make in u-boot is:

 

sf probe 1

sf erase 0x80000 0x3C0000

sf erase 0x440000 0x3BC0000

 

mw.b 0x1000000 0x0 0x800000

tftp 0x1000000 u-boot.ldr

sf write 0x1000000 0x0 $(filesize)

 

mw.b 0x1000000 0x0 0x800000

tftp 0x1000000 vmImage

sf write 0x1000000 0x80000 $(filesize)

 

mw.b 0x1000000 0x0 0x800000

tftp 0x1000000 rootfs.jffs2

sf write 0x1000000 0x440000 $(filesize)

 

setenv bootargs root=/dev/mtdblock2 rw rootfstype=jffs2 console=ttyBF0,115200

setenv flashboot 'sf probe 1; sf read 0x1000000 0x80000 0x3c0000; bootm 0x1000000'

setenv bootcmd run flashboot

save

 

run bootcmd

Outcomes