UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Newbie bharath
Newbie
1,505 Views
Registered: ‎09-28-2017

MicroZed ZC7010 rootfs over nfs (PetaLinux-2016.4)

Hi,

 

Facing kernel panic while booting with the following environment set,

setenv bootargs 'console=ttyPS0,115200 earlyprintk root=/dev/nfs nfsroot=<17x.xx.x.127>:/public,nolock rw mem=128M ip=<17x.xx.x.25>:<17x.x.x.127>'

setenv root /dev/nfs

setenv serverip <server-ip>

bootm

 

Configured u-boot with NFS

In Kernel config enabled NFS client and selected rootfs as filesystem

 

Output of bootm looks like:

Zynq> boot
Unknown command '17x.xx.x.25' - try 'help'
Unknown command 'tftp' - try 'help'
## Loading kernel from FIT Image at 10000000 ...
Using 'conf@1' configuration
Verifying Hash Integrity ... OK
Trying 'kernel@0' kernel subimage
Description: Linux Kernel
Type: Kernel Image
Compression: uncompressed
Data Start: 0x100000d4
Data Size: 4039616 Bytes = 3.9 MiB
Architecture: ARM
OS: Linux
Load Address: 0x00008000
Entry Point: 0x00008000
Hash algo: sha1
Hash value: 8ef1cb77fcfe86a86b5022c613b263e254cdc864
Verifying Hash Integrity ... sha1+ OK
## Loading ramdisk from FIT Image at 10000000 ...
Using 'conf@1' configuration
Trying 'ramdisk@0' ramdisk subimage
Description: ramdisk
Type: RAMDisk Image
Compression: uncompressed
Data Start: 0x103ddbdc
Data Size: 21640694 Bytes = 20.6 MiB
Architecture: ARM
OS: Linux
Load Address: unavailable
Entry Point: unavailable
Hash algo: sha1
Hash value: eaf0964c34a5d50ac3ee91f983577cfbe3bb66ea
Verifying Hash Integrity ... sha1+ OK
## Loading fdt from FIT Image at 10000000 ...
Using 'conf@1' configuration
Trying 'fdt@0' fdt subimage
Description: Flattened Device Tree blob
Type: Flat Device Tree
Compression: uncompressed
Data Start: 0x103da588
Data Size: 13730 Bytes = 13.4 KiB
Architecture: ARM
Hash algo: sha1
Hash value: 8c77ea8e17c501202a9d3c9a23aca21013c0b3f3
Verifying Hash Integrity ... sha1+ OK
Booting using the fdt blob at 0x103da588
Loading Kernel Image ... OK
Loading Ramdisk to 06b5c000, end 07fff5f6 ... OK
Loading Device Tree to 06b55000, end 06b5b5a1 ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Linux version 4.6.0-xilinx (bharath@bharath) (gcc version 5.2.1 20151005 (Linaro GCC 5.2-2015.11-2) ) #1 SMP PREEMPT Thu Sep 28 16:53:25 IST 2017
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine model: plnx
bootconsole [earlycon0] enabled
cma: Reserved 16 MiB at 0x05800000
Memory policy: Data cache writealloc
percpu: Embedded 12 pages/cpu @c6a27000 s19712 r8192 d21248 u49152
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512
Kernel command line: console=ttyPS0,115200 earlyprintk root=/dev/nfs nfsroot=172.16.9.127:/public,nolock rw mem=128M ip=172.16.9.25:172.16.9.127
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 81520K/131072K available (6315K kernel code, 232K rwdata, 2044K rodata, 1024K init, 202K bss, 33168K reserved, 16384K cma-reserved, 0K highme)
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0xc8800000 - 0xff800000 ( 880 MB)
lowmem : 0xc0000000 - 0xc8000000 ( 128 MB)
pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
.text : 0xc0008000 - 0xc0929ccc (9352 kB)
.init : 0xc0a00000 - 0xc0b00000 (1024 kB)
.data : 0xc0b00000 - 0xc0b3a0e0 ( 233 kB)
.bss : 0xc0b3a0e0 - 0xc0b6cc68 ( 203 kB)
Preemptible hierarchical RCU implementation.
Build-time adjustment of leaf fanout to 32.
RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=2
NR_IRQS:16 nr_irqs:16 16
efuse mapped to c8800000
slcr mapped to c8802000
L2C: platform modifies aux control register: 0x72360000 -> 0x72760000
L2C: DT/platform modifies aux control register: 0x72360000 -> 0x72760000
L2C-310 erratum 769419 enabled
L2C-310 enabling early BRESP for Cortex-A9
L2C-310 full line of zeros enabled for Cortex-A9
L2C-310 ID prefetch enabled, offset 1 lines
L2C-310 dynamic clock gating enabled, standby mode enabled
L2C-310 cache controller enabled, 8 ways, 512 kB
L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x76760001
zynq_clock_init: clkc starts at c8802100
Zynq clock init
sched_clock: 64 bits at 333MHz, resolution 3ns, wraps every 4398046511103ns
clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x4ce07af025, max_idle_ns: 440795209040 ns
Switching to timer-based delay loop, resolution 3ns
clocksource: ttc_clocksource: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 537538477 ns
timer #0 at c880a000, irq=17
Console: colour dummy device 80x30
Calibrating delay loop (skipped), value calculated using timer frequency.. 666.66 BogoMIPS (lpj=3333333)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0x100000 - 0x100058
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
Brought up 2 CPUs
SMP: Total of 2 processors activated (1333.33 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor menu
hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 4 bytes.
zynq-ocm f800c000.ocmc: ZYNQ OCM pool: 256 KiB @ 0xc8880000
zynq-pinctrl 700.pinctrl: zynq pinctrl initialized
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
media: Linux media interface: v0.10
Linux video capture interface: v2.00
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
PTP clock support registered
EDAC MC: Ver: 3.0.0
clocksource: Switched to clocksource arm_global_timer
FS-Cache: Loaded
NET: Registered protocol family 2
TCP established hash table entries: 1024 (order: 0, 4096 bytes)
TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
UDP hash table entries: 256 (order: 1, 8192 bytes)
UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
futex hash table entries: 512 (order: 3, 32768 bytes)
workingset: timestamp_bits=28 max_order=15 bucket_order=0
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
nfs4filelayout_init: NFSv4 File Layout Driver Registering...
Key type cifs.idmap registered
jffs2: version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
ceph: loaded (mds proto 32)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
dma-pl330 f8003000.dmac: Loaded driver for PL330 DMAC-241330
dma-pl330 f8003000.dmac: DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16
e0001000.serial: ttyPS0 at MMIO 0xe0001000 (irq = 144, base_baud = 3125000) is a xuartps
�console [ttyPS0] enabled
console [ttyPS0] enabled
bootconsole [earlycon0] disabled
bootconsole [earlycon0] disabled
xdevcfg f8007000.devcfg: ioremap 0xf8007000 to c886c000
[drm] Initialized drm 1.1.0 20060810
brd: module loaded
loop: module loaded
m25p80 spi0.0: found s25fl128s, expected m25p80
m25p80 spi0.0: s25fl128s (16384 Kbytes)
4 ofpart partitions found on MTD device spi0.0
Creating 4 MTD partitions on "spi0.0":
0x000000000000-0x000000500000 : "boot"
0x000000500000-0x000000520000 : "bootenv"
0x000000520000-0x000000fa0000 : "kernel"
0x000000fa0000-0x000001000000 : "spare"
gpiod_set_value: invalid GPIO
libphy: MACB_mii_bus: probed
macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 146 (00:0a:35:00:1e:53)
Marvell 88E1510 e000b000.etherne:00: attached PHY driver [Marvell 88E1510] (mii_bus:phy_addr=e000b000.etherne:00, irq=-1)
e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
usbcore: registered new interface driver usb-storage
mousedev: PS/2 mouse device common for all mice
i2c /dev entries driver
cdns-i2c e0004000.i2c: 400 kHz mmio e0004000 irq 141
EDAC MC: ECC not enabled
Xilinx Zynq CpuIdle Driver started
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
mmc0: SDHCI controller on e0100000.sdhci [e0100000.sdhci] using DMA
ledtrig-cpu: registered to indicate activity on CPUs
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
NET: Registered protocol family 17
Key type dns_resolver registered
Key type ceph registered
libceph: loaded (mon/osd proto 15/24)
Registering SWP/SWPB emulation handler
hctosys: unable to open rtc device (rtc0)
mmc0: new high speed SDHC card at address aaaa
mmcblk0: mmc0:aaaa SL08G 7.40 GiB
mmcblk0: p1 p2 p3 p4
macb e000b000.ethernet eth0: link up (100/Full)
IP-Config: Guessing netmask 255.255.0.0
IP-Config: Complete:
device=eth0, hwaddr=00:0a:35:00:1e:53, ipaddr=17x.xx.x.25, mask=255.255.0.0, gw=255.255.255.255
host=17x.xx.x.25, domain=, nis-domain=(none)
bootserver=17x.xx.x.127, rootserver=17x.xx.x.127, rootpath=
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "nfs" or unknown-block(2,0): error -6
Please append a correct "root=" boot option; here are the available partitions:
0100 16384 ram0 (driver?)
0101 16384 ram1 (driver?)
0102 16384 ram2 (driver?)
0103 16384 ram3 (driver?)
0104 16384 ram4 (driver?)
0105 16384 ram5 (driver?)
0106 16384 ram6 (driver?)
0107 16384 ram7 (driver?)
0108 16384 ram8 (driver?)
0109 16384 ram9 (driver?)
010a 16384 ram10 (driver?)
010b 16384 ram11 (driver?)
010c 16384 ram12 (driver?)
010d 16384 ram13 (driver?)
010e 16384 ram14 (driver?)
010f 16384 ram15 (driver?)
1f00 5120 mtdblock0 (driver?)
1f01 128 mtdblock1 (driver?)
1f02 10752 mtdblock2 (driver?)
1f03 384 mtdblock3 (driver?)
b300 7761920 mmcblk0 driver: mmcblk
b301 262144 mmcblk0p1 d9b42cc4-01
b302 786432 mmcblk0p2 d9b42cc4-02
b303 2097152 mmcblk0p3 d9b42cc4-03
b304 4193280 mmcblk0p4 d9b42cc4-04
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
CPU1: stopping
CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.6.0-xilinx #1
Hardware name: Xilinx Zynq Platform
[<c010e40c>] (unwind_backtrace) from [<c010a630>] (show_stack+0x10/0x14)
[<c010a630>] (show_stack) from [<c03534f4>] (dump_stack+0x80/0x9c)
[<c03534f4>] (dump_stack) from [<c010cb44>] (ipi_cpu_stop+0x3c/0x70)
[<c010cb44>] (ipi_cpu_stop) from [<c010d3c0>] (handle_IPI+0x64/0x84)
[<c010d3c0>] (handle_IPI) from [<c0101400>] (gic_handle_irq+0x74/0x90)
[<c0101400>] (gic_handle_irq) from [<c010b014>] (__irq_svc+0x54/0x90)
Exception stack(0xc546bf68 to 0xc546bfb0)
bf60: 00000000 00000017 05ffd000 c6a371c0 00000001 c6a365c0
bf80: 3e8d47d3 00000017 3de45065 00000017 00000000 00000001 00000008 c546bfb8
bfa0: c0511d58 c0511d7c 60000013 ffffffff
[<c010b014>] (__irq_svc) from [<c0511d7c>] (cpuidle_enter_state+0xe0/0x1b4)
[<c0511d7c>] (cpuidle_enter_state) from [<c014a2f4>] (cpu_startup_entry+0x184/0x1d0)
[<c014a2f4>] (cpu_startup_entry) from [<001014ac>] (0x1014ac)
---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)

 

 

 

 

Please give some suggestions to resolve the same.

0 Kudos
4 Replies
Voyager
Voyager
1,471 Views
Registered: ‎06-24-2013

Re: MicroZed ZC7010 rootfs over nfs (PetaLinux-2016.4)

Hey @bharath,

 

Your setup looks good so far, except for the nolock option.

Nevertheless, mounting the filesystem seems to fail and thus the Linux kernel panics.

 

Please give some suggestions to resolve the same.

I would suggest to add the nfsrootdebug option to the kernel command line to get more information.

Another useful approach is to test if when booting from a ramdisk or SD card, the NFS mount from the server succeeds with the given default arguments the kernel uses (see Documentation/filesystems/nfs/nfsroot.txt for details)

 

Hope this helps,

Herbert

-------------- Yes, I do this for fun!
0 Kudos
Moderator
Moderator
1,423 Views
Registered: ‎10-06-2016

Re: MicroZed ZC7010 rootfs over nfs (PetaLinux-2016.4)

Hi @bharath

 

I'm not sure if your U-Boot configuration has been masked (IPs defined with x) or just you are using a non valid configuration to your kernel. Please confirm it in order to analyize your issue.

 

Take a look also to the following links:

nfsroot documentation

u-boot with nfs boot

 

Regards,

Ibai


Ibai
Don’t forget to reply, kudo, and accept as solution.
0 Kudos
Highlighted
Moderator
Moderator
1,420 Views
Registered: ‎10-06-2016

Re: MicroZed ZC7010 rootfs over nfs (PetaLinux-2016.4)

Hi @bharath

 

It seems that I'm right and you are just not configuring properly your kernel with bootargs. The kernel hang is due to the fact the system is not able to mount the NFS location since a while (I just reproduce the issue with a non valid IP addresses), so please check you configuration.

 

IP-Config: Guessing netmask 255.255.0.0
IP-Config: Complete:
device=eth0, hwaddr=00:0a:35:00:1e:53, ipaddr=17x.xx.x.25, mask=255.255.0.0, gw=255.255.255.255
host=17x.xx.x.25, domain=, nis-domain=(none)
bootserver=17x.xx.x.127, rootserver=17x.xx.x.127, rootpath=

Ibai
Don’t forget to reply, kudo, and accept as solution.
0 Kudos
Newbie bharath
Newbie
1,384 Views
Registered: ‎09-28-2017

Re: MicroZed ZC7010 rootfs over nfs (PetaLinux-2016.4)

Thank you all for the suggestions.

 

I found the solution for the same. As I have enabled NFS client version 4 in Kernel configuration, while booting it was requesting for the same version. So when specified the version as 4 in bootargs, the things worked fine.

 

Bootargs with version specified now looks as below.,

setenv bootargs 'console=ttyPS0,115200 root=/dev/nfs nfsroot=172.16.9.xxx:/nfsserver,v4,tcp ip=172.16.9.25 rw'

 

 

0 Kudos