Linux Boot from QSPI fails
Hi everyone,
I'm trying to do a system boot from QSPI flash on a custom arria10 board. So far, I have managed to get the fpga image to configure successfully, but am having issues with the Linux side. I am by no means an expert on embedded linux, so if anyone is able to give me any ideas on what is wrong or what I need to fix it would be super helpful. See below for the boot log:
[ 0.159880] SMP: Total of 2 processors activated (3188.32 BogoMIPS).
[ 0.159887] CPU: All CPU(s) started in SVC mode.
[ 0.160365] devtmpfs: initialized
[ 0.164547] VFP support v0.3: implementor 41 architecture 3 part 30 variant 4
[ 0.164825] clocksource jiffies: mask: 0xffffffff max_cycles: 0xffffffff, mas
[ 0.166184] NET: Registered protocol family 16
[ 0.166977] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.170893] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint.
[ 0.170906] hw-breakpoint: maximum watchpoint size is 4 bytes.
[ 0.211931] vgaarb: loaded
[ 0.212238] SCSI subsystem initialized
[ 0.212550] usbcore: registered new interface driver usbfs
[ 0.212619] usbcore: registered new interface driver hub
[ 0.212682] usbcore: registered new device driver usb
[ 0.213056] pps_core: LinuxPPS API ver. 1 registered
[ 0.213064] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giom>
[ 0.213099] PTP clock support registered
[ 0.213283] FPGA manager framework
[ 0.214263] Switched to clocksource timer
[ 0.245038] NET: Registered protocol family 2
[ 0.245640] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.245687] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.245752] TCP: Hash tables configured (established 4096 bind 4096)
[ 0.245811] UDP hash table entries: 256 (order: 1, 8192 bytes)
[ 0.245842] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[ 0.246022] NET: Registered protocol family 1
[ 0.246290] RPC: Registered named UNIX socket transport module.
[ 0.246300] RPC: Registered udp transport module.
[ 0.246306] RPC: Registered tcp transport module.
[ 0.246312] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.246751] CPU PMU: Failed to parse /sopc@0/pmu0/interrupt-affinity[0]
[ 0.246790] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 countee
[ 0.247694] futex hash table entries: 512 (order: 3, 32768 bytes)
[ 0.259317] NFS: Registering the id_resolver key type
[ 0.259362] Key type id_resolver registered
[ 0.259369] Key type id_legacy registered
[ 0.259435] ntfs: driver 2.1.32 [Flags: R/W].
[ 0.259752] jffs2: version 2.2. (NAND) �© 2001-2006 Red Hat, Inc.
[ 0.260696] io scheduler noop registered (default)
[ 0.264607] dma-pl330 ffda1000.dma: Loaded driver for PL330 DMAC-341330
[ 0.264626] dma-pl330 ffda1000.dma: DBUFF-512x8bytes Num_Chans-8 Num_Peri-38
[ 0.269216] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[ 0.270514] console [ttyS0] disabled
[ 0.270554] ffc02100.serial: ttyS0 at MMIO 0xffc02100 (irq = 28, base_baud =A
[ 0.834733] console [ttyS0] enabled
[ 0.840026] brd: module loaded
[ 0.843980] cadence-qspi ff809000.flash: Cadence QSPI NOR flash driver
[ 0.851488] CAN device driver interface
[ 0.855949] usbcore: registered new interface driver usb-storage
[ 0.862316] mousedev: PS/2 mouse device common for all mice
[ 0.868236] i2c /dev entries driver
[ 0.872097] watchdog: Invalid min and max timeout values, resetting to 0!
[ 0.879312] Synopsys Designware Multimedia Card Interface Driver
[ 0.885533] ledtrig-cpu: registered to indicate activity on CPUs
[ 0.891713] usbcore: registered new interface driver usbhid
[ 0.897277] usbhid: USB HID core driver
[ 0.901458] fpga_manager fpga0: SoCFPGA Arria10 FPGA Manager registered
[ 0.908682] oprofile: using arm/armv7-ca9
[ 0.913740] NET: Registered protocol family 10
[ 0.919030] sit: IPv6 over IPv4 tunneling driver
[ 0.924290] NET: Registered protocol family 17
[ 0.928747] NET: Registered protocol family 15
[ 0.933178] can: controller area network core (rev 20120528 abi 9)
[ 0.939416] NET: Registered protocol family 29
[ 0.943851] can: raw protocol (rev 20120528)
[ 0.948119] can: broadcast manager protocol (rev 20120528 t)
[ 0.953763] can: netlink gateway (rev 20130117) max_hops=1
[ 0.959459] 8021q: 802.1Q VLAN Support v1.8
[ 0.963683] Key type dns_resolver registered
[ 0.968021] ThumbEE CPU extension supported.
[ 0.972285] Registering SWP/SWPB emulation handler
[ 0.978078] of_cfs_init
[ 0.980583] of_cfs_init: OK
[ 0.985681] ttyS0 - failed to request DMA
[ 0.989833] List of all partitions:
[ 0.993317] 0100 8192 ram0 (driver?)
[ 0.998085] 0101 8192 ram1 (driver?)
[ 1.002691] No filesystem could mount root, tried: jffs2
[ 1.008123] Kernel panic - not syncing: VFS: Unable to mount root fs on unkn)
[ 1.016353] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.1.22-ltsi-altera #1
[ 1.023281] Hardware name: Altera SOCFPGA Arria10
[ 1.027998] [<c0018aa8>] (unwind_backtrace) from [<c0013ad4>] (show_stack+0x)
[ 1.035715] [<c0013ad4>] (show_stack) from [<c059a8a0>] (dump_stack+0x8c/0xa)
[ 1.042911] [<c059a8a0>] (dump_stack) from [<c0598664>] (panic+0xac/0x204)
[ 1.049768] [<c0598664>] (panic) from [<c07b8404>] (mount_block_root+0x254/0)
[ 1.057225] [<c07b8404>] (mount_block_root) from [<c07b861c>] (mount_root+0x)
[ 1.065112] [<c07b861c>] (mount_root) from [<c07b879c>] (prepare_namespace+0)
[ 1.073085] [<c07b879c>] (prepare_namespace) from [<c07b7f1c>] (kernel_init_)
[ 1.081928] [<c07b7f1c>] (kernel_init_freeable) from [<c0597348>] (kernel_in)
[ 1.090075] [<c0597348>] (kernel_init) from [<c000fae8>] (ret_from_fork+0x14)
[ 1.097613] CPU1: stopping
[ 1.100315] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.1.22-ltsi-altera #1
[ 1.107242] Hardware name: Altera SOCFPGA Arria10
[ 1.111938] [<c0018aa8>] (unwind_backtrace) from [<c0013ad4>] (show_stack+0x)
[ 1.119653] [<c0013ad4>] (show_stack) from [<c059a8a0>] (dump_stack+0x8c/0xa)
[ 1.126847] [<c059a8a0>] (dump_stack) from [<c001715c>] (handle_IPI+0x294/0x)
[ 1.134215] [<c001715c>] (handle_IPI) from [<c00094b4>] (gic_handle_irq+0x68)
[ 1.141753] [<c00094b4>] (gic_handle_irq) from [<c0014680>] (__irq_svc+0x40/)
[ 1.149200] Exception stack(0xdf507f60 to 0xdf507fa8)
[ 1.154233] 7f60: 00000000 00000000 000002b4 c00227c0 df506000 c082249c 10c00
[ 1.162376] 7f80: c0822450 c05a19c8 00000000 df507fb4 df507fb8 df507fa8 c001c
[ 1.170514] 7fa0: 60000113 ffffffff
[ 1.173992] [<c0014680>] (__irq_svc) from [<c00105dc>] (arch_cpu_idle+0x48/0)
[ 1.181366] [<c00105dc>] (arch_cpu_idle) from [<c005ea38>] (cpu_startup_entr)
[ 1.189599] [<c005ea38>] (cpu_startup_entry) from [<c0016c54>] (secondary_st)
[ 1.198606] [<c0016c54>] (secondary_start_kernel) from [<0000954c>] (0x954c)
[ 1.205629] ---[ end Kernel panic - not syncing: VFS: Unable to mount root f)
I'm using the 16.1 QSPI boot gsrd as reference: https://rocketboards.org/foswiki/Doc...srd161QspiBoot. For the linux side, I am using the precompiled versions of the kernel and root filesystem. I have regenerated a linux dtb based on the sopcinfo of my fpga design. However, I used the gsrd xml files. Those are specific to the devkit, but I figured if something wasn't present in the hardware, it would just be skipped given that there's information about the SD card and NAND flash layout in there. The layout and location of the rootfs are in those xml files and the flash layout I created is identical to the gsrd. The difference is the files inside, so if anyone can point me in the right direction it would be greatly appreciated.
Thanks,
Bogg