AnsweredAssumed Answered

Kernel panic - not syncing: VFS: Unable to mount root fs

Question asked by rsdio on Nov 18, 2013
Latest reply on Dec 8, 2015 by Aaronwu

I have customized uClinux 3.10.10 for my board and have it running. If I manually mount my Flash partition after booting uImage, it works fine, but it's obviously not working as the root partition. If I try booting vmImage, the kernel panics while trying to mount my Flash partition, and the only clue in the error message is (driver?). I assume that I have all necessary drivers in my build, because I am able to manually mount the Flash partition. I even tried adding my gpio-addr-flash device in early platform devices, but that didn't help. My guess is that the root partition is being mounted before all drivers necessary to access it have been loaded, but I don't know how to fix that.


I looked at other boards that use gpio-addr-flash, and could not find anything missing from my code. Has anyone experienced a similar problem? Does anyone know what I need to change?


Any help would be appreciated.


At the risk of deleting too much (I hope I haven't), I've trimmed down my boot logs to what seems relevant. It is appended below. If more context is needed, I can append the entire boot log.


Linux version 3.10.10-ADI-2013R1 (brianw@sounds) (gcc version 4.3.5 (ADI-2013R1-RC1) ) #5 Mon Nov 18 14:37:55 PST 2013

register early platform devices

Memory map:

  fixedcode = 0x00000400-0x00000490

  text      = 0x00001000-0x001aea68

  rodata    = 0x001aea68-0x0023a320

  bss       = 0x0023b000-0x00250074

  data      = 0x00250080-0x00270000

    stack   = 0x0026e000-0x00270000

  init      = 0x00270000-0x0028f000

  available = 0x0028f000-0x01f00000

  DMA Zone  = 0x01f00000-0x02000000

Boot Mode: 7

Compiled for ADSP-BF516 Rev 0.2

NOMPU: setting up cplb tables

Kernel command line: root=/dev/mtdblock4 rw rootfstype=jffs2 clkin_hz=25000000 earlyprintk=serial,uart0,115200 console=ttyBF0,115200

Mount-cache hash table entries: 512

devtmpfs: initialized

iMix_init(): registering device resources

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

msgmni has been set to 56

Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)

Generic platform RAM MTD, (c) 2004 Simtec Electronics

gpio-addr-flash: probing 16-bit flash bus

gpio-addr-flash: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x000001 Chip ID 0x002201

Amd/Fujitsu Extended Query Table at 0x0040

  Amd/Fujitsu Extended Query version 1.3.

number of CFI chips: 1

Creating 5 MTD partitions on "gpio-addr-flash":

0x000000000000-0x000000040000 : "u-boot bootloader(nor)"

0x000000040000-0x000000200000 : "safe kernel(nor)"

0x000000200000-0x000000a00000 : "safe root filesystem(nor)"

0x000000a00000-0x000000e00000 : "main kernel(nor)"

0x000000e00000-0x000002000000 : "main filesystem(nor)"

mousedev: PS/2 mouse device common for all mice

Warning: unable to open an initial console.

VFS: Cannot open root device "mtdblock4" or unknown-block(31,4): error -2

Please append a correct "root=" boot option; here are the available partitions:

1f00             256 mtdblock0  (driver?)

1f01            1792 mtdblock1  (driver?)

1f02            8192 mtdblock2  (driver?)

1f03            4096 mtdblock3  (driver?)

1f04           18432 mtdblock4  (driver?)

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,4)