CPU: ARM Cortex A-9
This is the kernel command line that I appears in configuration menu
root=mtd:jffs2 rw rootfstype=jffs2 console=ttyps0,115200
I have put three files in flash:
BOOT.BIN in mtd0
image.ub in mtd2
jffs2 in mtd3
to program flash I used the following command:
flashcp -v jffs2 /dev/mtd3
from a running system (from SD).
similarly I put Boot.bin (containing bootloader i.e uboot) and image.ub (kernel).
I got rootfs.jffs2, but I renamed it to jffs2, since it was giving the errors. I checked both rootfs.jffs2 and jffs2, but while booting both are giving same errors.
[Tue Apr 08 14:42:38.904 2014] List of all partitions:
[Tue Apr 08 14:42:38.904 2014] No filesystem could mount root, tried: jffs2
[Tue Apr 08 14:42:38.904 2014] Kernel panic - not syncing: VFS: Unable to mount root fs on mtd:
In fact whether I put jffs2 file or not this error is coming. Is it right to just copy jffs2 file in flash in mtd3 partition or do I need to change its type before copying?
How do I solve the issue?
I got this jffs2 file after compiling the kernel (selected jffs2 file system in config instad of initramfs).
The complete the log message is given below:
[Tue Apr 08 14:42:30.650 2014]
[Tue Apr 08 14:42:30.650 2014]
[Tue Apr 08 14:42:30.650 2014] U-Boot 2013.07 (Apr 07 2014 - 13:23:59)
[Tue Apr 08 14:42:30.650 2014]
[Tue Apr 08 14:42:30.650 2014] Memory: ECC disabled
[Tue Apr 08 14:42:30.650 2014] DRAM: 1 GiB
[Tue Apr 08 14:42:30.662 2014] SF: Detected N25Q128A with page size 64 KiB, total 16 MiB
[Tue Apr 08 14:42:30.683 2014] In: serial
[Tue Apr 08 14:42:30.683 2014] Out: serial
[Tue Apr 08 14:42:30.683 2014] Err: serial
[Tue Apr 08 14:42:30.683 2014] Hit any key to stop autoboot: 3 2 1 0
[Tue Apr 08 14:42:33.700 2014] boot Petalinux
[Tue Apr 08 14:42:33.700 2014] Unknown command 'mmcinfo' - try 'help'
[Tue Apr 08 14:42:33.700 2014] U-Boot-PetaLinux> run sfboot
[Tue Apr 08 14:42:37.437 2014] SF: Detected N25Q128A with page size 64 KiB, total 16 MiB
[Tue Apr 08 14:42:37.650 2014] SF: 1180352 bytes @ 0x520000 Read: OK
[Tue Apr 08 14:42:37.650 2014] ## Loading kernel from FIT Image at 01000000 ...
[Tue Apr 08 14:42:37.650 2014] Using 'conf@1' configuration
[Tue Apr 08 14:42:37.650 2014] Trying 'kernel@1' kernel subimage
[Tue Apr 08 14:42:37.650 2014] Description: PetaLinux Kernel
[Tue Apr 08 14:42:37.650 2014] Type: Kernel Image
[Tue Apr 08 14:42:37.650 2014] Compression: gzip compressed
[Tue Apr 08 14:42:37.650 2014] Data Start: 0x010000f0
[Tue Apr 08 14:42:37.650 2014] Data Size: 1167695 Bytes = 1.1 MiB
[Tue Apr 08 14:42:37.650 2014] Architecture: ARM
[Tue Apr 08 14:42:37.650 2014] OS: Linux
[Tue Apr 08 14:42:37.650 2014] Load Address: 0x00008000
[Tue Apr 08 14:42:37.650 2014] Entry Point: 0x00008000
[Tue Apr 08 14:42:37.650 2014] Verifying Hash Integrity ... OK
[Tue Apr 08 14:42:37.650 2014] ## Loading fdt from FIT Image at 01000000 ...
[Tue Apr 08 14:42:37.695 2014] Using 'conf@1' configuration
[Tue Apr 08 14:42:37.695 2014] Trying 'fdt@1' fdt subimage
[Tue Apr 08 14:42:37.695 2014] Description: Flattened Device Tree blob
[Tue Apr 08 14:42:37.695 2014] Type: Flat Device Tree
[Tue Apr 08 14:42:37.695 2014] Compression: uncompressed
[Tue Apr 08 14:42:37.695 2014] Data Start: 0x0111d2f0
[Tue Apr 08 14:42:37.695 2014] Data Size: 11179 Bytes = 10.9 KiB
[Tue Apr 08 14:42:37.695 2014] Architecture: ARM
[Tue Apr 08 14:42:37.695 2014] Hash algo: crc32
[Tue Apr 08 14:42:37.695 2014] Hash value: a7a92b47
[Tue Apr 08 14:42:37.695 2014] Hash algo: sha1
[Tue Apr 08 14:42:37.696 2014] Hash value: cd303b74749b464a852b236214414effa1b98cdc
[Tue Apr 08 14:42:37.696 2014] Verifying Hash Integrity ... crc32+ sha1+ OK
[Tue Apr 08 14:42:37.696 2014] Booting using the fdt blob at 0x111d2f0
[Tue Apr 08 14:42:37.711 2014] Uncompressing Kernel Image ... OK
[Tue Apr 08 14:42:37.787 2014] Loading Device Tree to 07ffa000, end 07fffbaa ... OK
[Tue Apr 08 14:42:37.787 2014]
[Tue Apr 08 14:42:37.787 2014] Starting kernel ...
[Tue Apr 08 14:42:37.787 2014]
[Tue Apr 08 14:42:38.392 2014] Booting Linux on physical CPU 0x0
[Tue Apr 08 14:42:38.392 2014] Linux version 3.8.11 (root@xilinx) (gcc version 4.7.3 (Sourcery CodeBench Lite 2013.05-40) ) #15 SMP PREEMPT Mon Apr 7 15:07:38 IST 2014
[Tue Apr 08 14:42:38.392 2014] CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c53c7d
[Tue Apr 08 14:42:38.392 2014] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[Tue Apr 08 14:42:38.392 2014] Machine: Xilinx Zynq Platform, model: Xilinx-ZC702-14.7
[Tue Apr 08 14:42:38.392 2014] Memory policy: ECC disabled, Data cache writealloc
[Tue Apr 08 14:42:38.392 2014] PERCPU: Embedded 7 pages/cpu @c0a7b000 s5568 r8192 d14912 u32768
[Tue Apr 08 14:42:38.392 2014] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 260096
[Tue Apr 08 14:42:38.437 2014] Kernel command line: root=mtd:jffs2 rw rootfstype=jffs2 console=ttyPS0,115200
[Tue Apr 08 14:42:38.437 2014] PID hash table entries: 4096 (order: 2, 16384 bytes)
[Tue Apr 08 14:42:38.437 2014] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[Tue Apr 08 14:42:38.437 2014] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[Tue Apr 08 14:42:38.437 2014] __ex_table already sorted, skipping sort
[Tue Apr 08 14:42:38.437 2014] Memory: 1024MB = 1024MB total
[Tue Apr 08 14:42:38.437 2014] Memory: 1036960k/1036960k available, 11616k reserved, 270336K highmem
[Tue Apr 08 14:42:38.437 2014] Virtual kernel memory layout:
[Tue Apr 08 14:42:38.437 2014] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[Tue Apr 08 14:42:38.481 2014] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
[Tue Apr 08 14:42:38.481 2014] vmalloc : 0xf0000000 - 0xff000000 ( 240 MB)
[Tue Apr 08 14:42:38.481 2014] lowmem : 0xc0000000 - 0xef800000 ( 760 MB)
[Tue Apr 08 14:42:38.481 2014] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[Tue Apr 08 14:42:38.481 2014] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[Tue Apr 08 14:42:38.481 2014] .text : 0xc0008000 - 0xc0220d94 (2148 kB)
[Tue Apr 08 14:42:38.481 2014] .init : 0xc0221000 - 0xc023c5c0 ( 110 kB)
[Tue Apr 08 14:42:38.481 2014] .data : 0xc023e000 - 0xc025c060 ( 121 kB)
[Tue Apr 08 14:42:38.481 2014] .bss : 0xc025c060 - 0xc026f3d8 ( 77 kB)
[Tue Apr 08 14:42:38.481 2014] Preemptible hierarchical RCU implementation.
[Tue Apr 08 14:42:38.529 2014] RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[Tue Apr 08 14:42:38.529 2014] NR_IRQS:16 nr_irqs:16 16
[Tue Apr 08 14:42:38.529 2014] MIO pin 47 not assigned(00001220)
[Tue Apr 08 14:42:38.529 2014] xslcr mapped to f0002000
[Tue Apr 08 14:42:38.529 2014] Zynq clock init
[Tue Apr 08 14:42:38.529 2014] sched_clock: 16 bits at 54kHz, resolution 18432ns, wraps every 1207ms
[Tue Apr 08 14:42:38.529 2014] ps7-ttc #0 at f0004000, irq=43
[Tue Apr 08 14:42:38.529 2014] Console: colour dummy device 80x30
[Tue Apr 08 14:42:38.529 2014] Calibrating delay loop... 1332.01 BogoMIPS (lpj=6660096)
[Tue Apr 08 14:42:38.529 2014] pid_max: default: 4096 minimum: 301
[Tue Apr 08 14:42:38.529 2014] Mount-cache hash table entries: 512
[Tue Apr 08 14:42:38.529 2014] CPU: Testing write buffer coherency: ok
[Tue Apr 08 14:42:38.529 2014] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[Tue Apr 08 14:42:38.566 2014] Setting up static identity map for 0x1cb148 - 0x1cb17c
[Tue Apr 08 14:42:38.566 2014] L310 cache controller enabled
[Tue Apr 08 14:42:38.566 2014] l2x0: 8 ways, CACHE_ID 0x000000c0, AUX_CTRL 0x72360000, Cache size: 524288 B
[Tue Apr 08 14:42:38.566 2014] CPU1: Booted secondary processor
[Tue Apr 08 14:42:38.566 2014] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[Tue Apr 08 14:42:38.566 2014] Brought up 2 CPUs
[Tue Apr 08 14:42:38.566 2014] SMP: Total of 2 processors activated (2664.03 BogoMIPS).
[Tue Apr 08 14:42:38.566 2014] devtmpfs: initialized
[Tue Apr 08 14:42:38.566 2014] NET: Registered protocol family 16
[Tue Apr 08 14:42:38.566 2014] DMA: preallocated 256 KiB pool for atomic coherent allocations
[Tue Apr 08 14:42:38.566 2014] xgpiops e000a000.ps7-gpio: gpio at 0xe000a000 mapped to 0xf004e000
[Tue Apr 08 14:42:38.611 2014] GPIO IRQ not connected
[Tue Apr 08 14:42:38.611 2014] XGpio: /amba@0/gpio@41220000: registered, base is 255
[Tue Apr 08 14:42:38.611 2014] GPIO IRQ not connected
[Tue Apr 08 14:42:38.611 2014] XGpio: /amba@0/gpio@41200000: registered, base is 251
[Tue Apr 08 14:42:38.611 2014] usbcore: registered new interface driver usbfs
[Tue Apr 08 14:42:38.611 2014] usbcore: registered new interface driver hub
[Tue Apr 08 14:42:38.611 2014] usbcore: registered new device driver usb
[Tue Apr 08 14:42:38.611 2014] Switching to clocksource xttcps_clocksource
[Tue Apr 08 14:42:38.611 2014] jffs2: version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
[Tue Apr 08 14:42:38.611 2014] e0001000.serial: ttyPS0 at MMIO 0xe0001000 (irq = 82) is a xuartps
[Tue Apr 08 14:42:38.611 2014] console [ttyPS0] enabled
[Tue Apr 08 14:42:38.632 2014] xdevcfg f8007000.ps7-dev-cfg: ioremap f8007000 to f0074000 with size 100
[Tue Apr 08 14:42:38.647 2014] xqspips e000d000.ps7-qspi: master is unqueued, this is deprecated
[Tue Apr 08 14:42:38.647 2014] spi spi32766.0: setup: unsupported mode bits 3
[Tue Apr 08 14:42:38.647 2014] xqspips e000d000.ps7-qspi: can't setup spi32766.0, status -22
[Tue Apr 08 14:42:38.647 2014] spi_master spi32766: spi_device register error /amba@0/ps7-qspi@e000d000/ps7-qspi@0
[Tue Apr 08 14:42:38.647 2014] xqspips e000d000.ps7-qspi: at 0xE000D000 mapped to 0xF0076000, irq=51
[Tue Apr 08 14:42:38.655 2014] libphy: XEMACPS mii bus: probed
[Tue Apr 08 14:42:38.667 2014] xemacps e000b000.ps7-ethernet: invalid address, use assigned
[Tue Apr 08 14:42:38.667 2014] xemacps e000b000.ps7-ethernet: MAC updated 7e:e2:ec:c2:7d:ec
[Tue Apr 08 14:42:38.667 2014] xemacps e000b000.ps7-ethernet: pdev->id -1, baseaddr 0xe000b000, irq 54
[Tue Apr 08 14:42:38.677 2014] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[Tue Apr 08 14:42:38.689 2014] ULPI transceiver vendor/product ID 0x0424/0x0007
[Tue Apr 08 14:42:38.689 2014] Found SMSC USB3320 ULPI transceiver.
[Tue Apr 08 14:42:38.689 2014] ULPI integrity check: passed.
[Tue Apr 08 14:42:38.699 2014] xusbps-ehci xusbps-ehci.0: Xilinx PS USB EHCI Host Controller
[Tue Apr 08 14:42:38.699 2014] xusbps-ehci xusbps-ehci.0: new USB bus registered, assigned bus number 1
[Tue Apr 08 14:42:38.723 2014] xusbps-ehci xusbps-ehci.0: irq 53, io mem 0x00000000
[Tue Apr 08 14:42:38.743 2014] xusbps-ehci xusbps-ehci.0: USB 2.0 started, EHCI 1.00
[Tue Apr 08 14:42:38.753 2014] hub 1-0:1.0: USB hub found
[Tue Apr 08 14:42:38.753 2014] hub 1-0:1.0: 1 port detected
[Tue Apr 08 14:42:38.763 2014] xi2cps e0004000.ps7-i2c: 400 kHz mmio e0004000 irq 57
[Tue Apr 08 14:42:38.772 2014] xadcps f8007100.ps7-xadc: enabled: yes reference: external
[Tue Apr 08 14:42:38.788 2014] xwdtps f8005000.ps7-wdt: Xilinx Watchdog Timer at f00ea000 with timeout 10s
[Tue Apr 08 14:42:38.788 2014] sdhci: Secure Digital Host Controller Interface driver
[Tue Apr 08 14:42:38.788 2014] sdhci: Copyright(c) Pierre Ossman
[Tue Apr 08 14:42:38.788 2014] sdhci-pltfm: SDHCI platform and OF driver helper
[Tue Apr 08 14:42:38.798 2014] usbcore: registered new interface driver usbhid
[Tue Apr 08 14:42:38.798 2014] usbhid: USB HID core driver
[Tue Apr 08 14:42:38.798 2014] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[Tue Apr 08 14:42:38.843 2014] MTD: MTD device with name "jffs2" not found.
[Tue Apr 08 14:42:38.843 2014] List of all partitions:
[Tue Apr 08 14:42:38.843 2014] No filesystem could mount root, tried: jffs2
[Tue Apr 08 14:42:38.843 2014] Kernel panic - not syncing: VFS: Unable to mount root fs on mtd:jffs2
[Tue Apr 08 14:42:38.843 2014] CPU1: stopping
[Tue Apr 08 14:42:38.843 2014] Backtrace:
[Tue Apr 08 14:42:38.843 2014] Function entered at [<c0011094>] from [<c01c63e8>]
[Tue Apr 08 14:42:38.843 2014] r6:c0246418 r5:00000000 r4:00000001 r3:60000193
[Tue Apr 08 14:42:38.843 2014] Function entered at [<c01c63d0>] from [<c0011fbc>]
[Tue Apr 08 14:42:38.843 2014] Function entered at [<c0011f78>] from [<c0012270>]
[Tue Apr 08 14:42:38.843 2014] r4:c0247ef4 r3:c0011f78
[Tue Apr 08 14:42:38.843 2014] Function entered at [<c001220c>] from [<c00084e4>]
[Tue Apr 08 14:42:38.843 2014] r5:ef07bf68 r4:f8f00100
[Tue Apr 08 14:42:38.887 2014] Function entered at [<c0008484>] from [<c000da00>]
[Tue Apr 08 14:42:38.887 2014] Exception stack(0xef07bf68 to 0xef07bfb0)
[Tue Apr 08 14:42:38.887 2014] bf60: c0a838d0 00000000 00000003 00000000 ef07a000 c01cd528
[Tue Apr 08 14:42:38.887 2014] bf80: ef07a000 c025c418 0000406a 413fc090 00000000 ef07bfbc ef07bfc0 ef07bfb0
[Tue Apr 08 14:42:38.887 2014] bfa0: c000e94c c000e950 60000113 ffffffff
[Tue Apr 08 14:42:38.887 2014] r6:ffffffff r5:60000113 r4:c000e950 r3:c000e94c
[Tue Apr 08 14:42:38.887 2014] Function entered at [<c000e924>] from [<c000eacc>]
[Tue Apr 08 14:42:38.887 2014] Function entered at [<c000ea40>] from [<c01c41e8>]
[Tue Apr 08 14:42:38.887 2014] r5:00000001 r4:c024cf68
[Tue Apr 08 14:42:38.887 2014] Function entered at [<c01c40f8>] from [<001c37a8>]
[Tue Apr 08 14:42:38.904 2014] r6:10c03c7d r5:00000015 r4:2f06406a r3:c01c3790
[Tue Apr 08 14:42:38.904 2014] List of all partitions:
[Tue Apr 08 14:42:38.904 2014] No filesystem could mount root, tried: jffs2
[Tue Apr 08 14:42:38.904 2014] Kernel panic - not syncing: VFS: Unable to mount root fs on mtd:
Also here is my u-boot variables:
U-Boot-PetaLinux> printenv
autoload=no
baudrate=115200
bootcmd=setenv var "if test ${dtbsize} -le 0; then run sdboot; else run dtbboot; fi"; run var; setenv var
bootdelay=3
bootenvsize=0x00020000
bootenvstart=0x00500000
bootfile=image.ub
bootsize=0x00500000
bootstart=0x00000000
clobstart=0x1000000
console=console=ttyPS0,115200
cp_dtb2ram=sf probe 0; sf read ${clobstart} ${dtbstart} ${dtbsize}
dtbboot=sf probe 0; sf read ${netstart} ${kernstart} ${kernsize}; sf read ${dtbnetstart} ${dtbstart} ${dtbsize}; bootm ${netstart} - ${dtbnetstart}
dtbnetboot=tftp ${netstart} image.ub; tftp ${dtbnetstart} system.dtb; bootm ${netstart} - ${dtbnetstart}
dtbnetstart=0x11202c0
eraseconf=sf probe 0; sf erase ${confstart} ${confsize}
eraseenv=sf probe 0; sf erase ${bootenvstart} ${bootenvsize}
ethaddr=00:0a:35:00:75:11
fault=echo $img image size is greater than allocated place - $img is NOT UPDATED
get_dtb=run cp_dtb2ram; fdt addr ${clobstart}
hostname="Xilinx-ZC702-2013.3"
install_dtb=sf probe 0; sf erase ${dtbstart} ${dtbsize};sf write ${clobstart} ${dtbstart} ${filesize}
install_jffs2=sf probe 0; sf erase ${jffs2start} ${jffs2size};sf write ${clobstart} ${jffs2start} ${filesize}
install_kernel=sf probe 0; sf erase ${kernstart} ${kernsize};sf write ${fileaddr} ${kernstart} ${filesize}
install_uboot=sf probe 0; sf erase ${bootstart} ${bootsize};sf write ${clobstart} ${bootstart} ${filesize}
kernsize=0x001202c0
kernstart=0x00520000
load_boot=tftp ${clobstart} BOOT.BIN
load_dtb=tftp ${clobstart} system.dtb
load_jffs2=tftp ${clobstart} rootfs.jffs2
load_kernel=tftp ${clobstart} image.ub
loadaddr=0x1000000
mtdids=nor0=0
mtdparts=mtdparts=0:5M<boot>,128K<bootenv>,1216K<iamge>,5M<jffs2>
netboot=tftp ${netstart} image.ub && bootm
netstart=0x1000000
psserial0=setenv stdout ttyPS0;setenv stdin ttyPS0
sd_update_boot=echo Updating BOOT from SD;mmcinfo && fatload mmc 0:1 ${clobstart} BOOT.BIN && run install_uboot
sd_update_kernel=echo Updating Kernel from SD;mmcinfo && fatload mmc 0:1 ${clobstart} ${bootfile}&& set fileaddr ${clobstart}&&run install_kernel
sdboot=echo boot Petalinux; mmcinfo && fatload mmc 0 ${netstart} ${bootfile}&& bootm
serial=setenv stdout serial;setenv stdin serial
serverip=192.168.1.7
sfboot=sf probe 0; sf read ${netstart} ${kernstart} ${kernsize}; bootm ${netstart}
test_crc=if imi ${clobstart}; then run test_img; else echo $img Bad CRC - $img is NOT UPDATED; fi
test_img=setenv var "if test ${filesize} -gt ${psize}; then run fault; else run ${installcmd}; fi"; run var; setenv var
update_boot=setenv img BOOT.BIN; setenv psize ${bootsize}; setenv installcmd install_uboot; run load_boot test_img; setenv img; setenv psize; setenv installcmd
update_dtb=setenv img DTB; setenv psize ${dtbsize}; setenv installcmd install_dtb; run load_dtb test_img; setenv img
update_jffs2=setenv img JFFS2; setenv psize ${jffs2size}; setenv installcmd install_jffs2; run load_jffs2 test_img; setenv img; setenv psize; setenv installcmd
update_kernel=setenv img KERNEL; setenv psize ${kernsize}; setenv installcmd "install_kernel"; run load_kernel test_crc; setenv img; setenv psize; setenv installcmd
Environment size: 3195/131068 bytes
U-Boot-PetaLinux>
Another thing which is wrong and coming in log messages:
[Tue Apr 08 14:42:38.647 2014] xqspips e000d000.ps7-qspi: master is unqueued, this is deprecated
[Tue Apr 08 14:42:38.647 2014] spi spi32766.0: setup: unsupported mode bits 3
[Tue Apr 08 14:42:38.647 2014] xqspips e000d000.ps7-qspi: can't setup spi32766.0, status -22
[Tue Apr 08 14:42:38.647 2014] spi_master spi32766: spi_device register error /amba@0/ps7-qspi@e000d000/ps7-qspi@0
Just to remind you I am booting from qspi flash with mode 3.