Boot from NFS server with Beaglebone black failed

Hello,
I tried to create an OpenWrt build for Beaglebone black that can boot from NFS server. I can confirm NFS server is up and running by having a stock Debian firmware boot NFS from it.
The issue I seem to be having is the kernel tried to boot NFS before the Ethernet eth0 is up.

Could you please provide some guidance ?

I have tried different variant of bootargs below, all were unsuccessful:

Bootargs

console=ttyO0,115200n8 root=/dev/nfs rw rootfstype=ext4 rootwait fixrtc nfsroot=192.168.3.132:/mnt/nfs_bbb,nfsvers=4,tcp ip=192.168.3.150:192.168.3.132:192.168.3.1:255.255.255.0::eth0:off earlyprintk nfsrootdebug

vers=3,tcp

Kernel config

CONFIG_KERNFS=y
CONFIG_NFS_FS=y
CONFIG_NFS_V2=y
CONFIG_NFS_V3=y
CONFIG_NFS_V3_ACL=y
CONFIG_NFS_V4=y
CONFIG_NFS_SWAP=y
CONFIG_NFS_V4_1=y
CONFIG_NFS_V4_2=y
CONFIG_PNFS_FILE_LAYOUT=y
CONFIG_PNFS_FLEXFILE_LAYOUT=m
CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN="kernel.org"
CONFIG_NFS_V4_1_MIGRATION=y
CONFIG_NFS_USE_LEGACY_DNS=y
CONFIG_NFS_DEBUG=y
CONFIG_NFSD=y
CONFIG_NFSD_V2_ACL=y
CONFIG_NFSD_V3=y
CONFIG_NFSD_V3_ACL=y
CONFIG_NFSD_V4=y
CONFIG_NFSD_PNFS=y
CONFIG_NFSD_BLOCKLAYOUT=y
CONFIG_NFSD_SCSILAYOUT=y
CONFIG_NFSD_FLEXFILELAYOUT=y
CONFIG_NFSD_FAULT_INJECTION=y
CONFIG_NFS_ACL_SUPPORT=y
CONFIG_NFS_COMMON=y

Kernel boot log

TFTP from server 192.168.3.132; our IP address is 192.168.3.150
Filename 'zImage'.
Load address: 0x82000000
Loading: #################################################################
	 #################################################################
	 #################################################################
	 ##############################################################
	 2.3 MiB/s
done
Bytes transferred = 3767304 (397c08 hex)
link up on port 0, speed 100, full duplex
Using cpsw device
TFTP from server 192.168.3.132; our IP address is 192.168.3.150
Filename 'dtbs/am335x-boneblack.dtb'.
Load address: 0x88000000
Loading: ###
	 2.2 MiB/s
done
Bytes transferred = 34782 (87de hex)
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
   Loading Device Tree to 8fff4000, end 8ffff7dd ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.19.108 (dev@dell) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r12992-165e442571)) #0 SMP Sat Apr 18 03:07:20 2020
[    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: TI AM335x BeagleBone Black
[    0.000000] Memory policy: Data cache writeback
[    0.000000] cma: Reserved 16 MiB at 0x9ec00000
[    0.000000] CPU: All CPU(s) started in SVC mode.
[    0.000000] AM335X ES2.1 (sgx neon)
[    0.000000] random: get_random_bytes called from start_kernel+0x84/0x440 with crng_init=0
[    0.000000] percpu: Embedded 15 pages/cpu s30732 r8192 d22516 u61440
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 129412
[    0.000000] Kernel command line: console=ttyO0,115200n8 root=/dev/nfs rw rootfstype=ext4 rootwait fixrtc nfsroot=192.168.3.132:/mnt/nfs_bbb,nfsvers=4,tcp ip=192.168.3.150:192.168.3.132:192.168.3.1:255.255.255.0::eth0:off earlyprintk nfsrootdebug
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 487668K/522240K available (8248K kernel code, 333K rwdata, 2420K rodata, 1024K init, 307K bss, 18188K reserved, 16384K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xe0000000 - 0xff800000   ( 504 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xdfe00000   ( 510 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (9241 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 334 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 308 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu: 	RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] IRQ: Found an INTC at 0x(ptrval) (revision 5.0) with 128 interrupts
[    0.000000] OMAP clockevent source: timer2 at 24000000 Hz
[    0.000015] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000036] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000048] OMAP clocksource: timer1 at 24000000 Hz
[    0.000418] timer_probe: no matching timers found
[    0.000480] Calibrating delay loop... 996.14 BogoMIPS (lpj=4980736)
[    0.089122] pid_max: default: 32768 minimum: 301
[    0.089317] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.089332] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.090177] CPU: Testing write buffer coherency: ok
[    0.090245] CPU0: Spectre v2: using BPIALL workaround
[    0.090653] CPU0: thread -1, cpu 0, socket -1, mpidr 0
[    0.091337] Setting up static identity map for 0x80100000 - 0x80100060
[    0.091509] rcu: Hierarchical SRCU implementation.
[    0.092062] smp: Bringing up secondary CPUs ...
[    0.092078] smp: Brought up 1 node, 1 CPU
[    0.092088] SMP: Total of 1 processors activated (996.14 BogoMIPS).
[    0.092096] CPU: All CPU(s) started in SVC mode.
[    0.100705] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[    0.100974] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.101003] futex hash table entries: 256 (order: 2, 16384 bytes)
[    0.102162] pinctrl core: initialized pinctrl subsystem
[    0.103624] NET: Registered protocol family 16
[    0.106304] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.131874] l4_wkup_cm:clk:0010:0: failed to disable
[    0.171979] audit: initializing netlink subsys (disabled)
[    0.173188] cpuidle: using governor ladder
[    0.173205] cpuidle: using governor menu
[    0.178747] OMAP GPIO hardware version 0.1
[    0.185777] audit: type=2000 audit(0.170:1): state=initialized audit_enabled=0 res=1
[    0.235235] edma 49000000.edma: TI EDMA DMA engine driver
[    0.238945] SCSI subsystem initialized
[    0.252453] usbcore: registered new interface driver usbfs
[    0.252531] usbcore: registered new interface driver hub
[    0.252626] usbcore: registered new device driver usb
[    0.253313] pps_core: LinuxPPS API ver. 1 registered
[    0.253326] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.253354] PTP clock support registered
[    0.253614] Advanced Linux Sound Architecture Driver Initialized.
[    0.258382] clocksource: Switched to clocksource timer1
[    0.258629] VFS: Disk quotas dquot_6.6.0
[    0.258707] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.259910] NET: Registered protocol family 2
[    0.260590] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
[    0.260627] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.260671] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
[    0.260732] TCP: Hash tables configured (established 4096 bind 4096)
[    0.260836] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.260861] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.261064] NET: Registered protocol family 1
[    0.264515] RPC: Registered named UNIX socket transport module.
[    0.264539] RPC: Registered udp transport module.
[    0.264547] RPC: Registered tcp transport module.
[    0.264554] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.266745] No memory allocated for crashlog
[    0.267848] workingset: timestamp_bits=14 max_order=17 bucket_order=3
[    0.278392] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.284974] NFS: Registering the id_resolver key type
[    0.285028] Key type id_resolver registered
[    0.285038] Key type id_legacy registered
[    0.285059] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.285069] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    0.288360] jffs2: version 2.2 (NAND) (SUMMARY) (LZO) (LZMA) (RTIME) (RUBIN) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.297581] io scheduler noop registered
[    0.297605] io scheduler deadline registered (default)
[    0.299702] pinctrl-single 44e10800.pinmux: 142 pins, size 568
[    0.302040] Serial: 8250/16550 driver, 2 ports, IRQ sharing enabled
[    0.303206] omap_uart 44e09000.serial: no wakeirq for uart0
[    0.303267] 44e09000.serial: ttyO0 at MMIO 0x44e09000 (irq = 30, base_baud = 3000000) is a OMAP UART0
[    0.960342] console [ttyO0] enabled
[    0.984258] brd: module loaded
[    0.991653] loop: module loaded
[    0.996229] mtdoops: mtd device (mtddev=name/number) must be supplied
[    1.004331] libphy: Fixed MDIO Bus: probed
[    1.078325] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6, bus freq 1000000
[    1.086360] davinci_mdio 4a101000.mdio: detected phy mask fffffffe
[    1.093996] libphy: 4a101000.mdio: probed
[    1.098290] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver SMSC LAN8710/LAN8720
[    1.108743] cpsw 4a100000.ethernet: Detected MACID = 6c:ec:eb:ac:60:8c
[    1.116516] cpsw 4a100000.ethernet: initialized cpsw ale version 1.4
[    1.123270] cpsw 4a100000.ethernet: ALE Table size 1024
[    1.128819] cpsw 4a100000.ethernet: cpts: overflow check period 500 (jiffies)
[    1.138570] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.145413] ehci-omap: OMAP-EHCI Host Controller driver
[    1.153153] am335x-phy-driver 47401300.usb-phy: 47401300.usb-phy supply vcc not found, using dummy regulator
[    1.163698] am335x-phy-driver 47401300.usb-phy: Linked as a consumer to regulator.0
[    1.173384] am335x-phy-driver 47401b00.usb-phy: 47401b00.usb-phy supply vcc not found, using dummy regulator
[    1.183881] am335x-phy-driver 47401b00.usb-phy: Linked as a consumer to regulator.0
[    1.205953] omap_rtc 44e3e000.rtc: registered as rtc0
[    1.211956] i2c /dev entries driver
[    1.216838] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
[    1.226303] omap_gpio 44e07000.gpio: Could not set line 6 debounce to 200000 microseconds (-22)
[    1.235496] omap_hsmmc 48060000.mmc: Got CD GPIO
[    1.240825] omap_hsmmc 48060000.mmc: Linked as a consumer to regulator.1
[    1.273231] omap_hsmmc 481d8000.mmc: Linked as a consumer to regulator.1
[    1.307291] ledtrig-cpu: registered to indicate activity on CPUs
[    1.314170] omap-aes 53500000.aes: OMAP AES hw accel rev: 3.2
[    1.320699] omap-aes 53500000.aes: will run requests pump with realtime priority
[    1.330394] omap-sham 53100000.sham: hw accel on OMAP rev 4.3
[    1.349084] NET: Registered protocol family 10
[    1.355567] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.366057] Segment Routing with IPv6
[    1.370174] NET: Registered protocol family 17
[    1.374847] NET: Registered protocol family 15
[    1.379725] 8021q: 802.1Q VLAN Support v1.8
[    1.384151] Key type dns_resolver registered
[    1.388879] ThumbEE CPU extension supported.
[    1.393355] Registering SWP/SWPB emulation handler
[    1.398395] omap_voltage_late_init: Voltage driver support not added
[    1.405052] sr_dev_init: Unknown instance smartreflex0
[    1.410786] SmartReflex Class3 initialized
[    1.416615] mmc0: new high speed SDHC card at address aaaa
[    1.424320] mmcblk0: mmc0:aaaa SC16G 14.8 GiB 
[    1.444416]  mmcblk0: p1
[    1.465623] mmc1: new high speed MMC card at address 0001
[    1.472559] mmcblk1: mmc1:0001 MMC04G 3.60 GiB 
[    1.477594] mmcblk1boot0: mmc1:0001 MMC04G partition 1 2.00 MiB
[    1.484205] mmcblk1boot1: mmc1:0001 MMC04G partition 2 2.00 MiB
[    1.490595] mmcblk1rpmb: mmc1:0001 MMC04G partition 3 128 KiB, chardev (247:0)
[    1.500360] random: fast init done
[    1.504729]  mmcblk1: p1
[    1.521908] tps65217 0-0024: TPS65217 ID 0xe version 1.2
[    1.528024] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
[    1.536747] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 100 kHz
[    1.552405] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
[    1.558021] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 1
[    1.567618] hub 1-0:1.0: USB hub found
[    1.572116] hub 1-0:1.0: 1 port detected
[    1.577725] cpu cpu0: Linked as a consumer to regulator.3
[    1.583950] cpu cpu0: Dropping the link to regulator.3
[    1.589966] cpu cpu0: Linked as a consumer to regulator.3
[    1.598978] omap_rtc 44e3e000.rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
[    1.608013] sr_init: No PMIC hook to init smartreflex
[    1.614615] ALSA device list:
[    1.617728]   No soundcards found.
[    1.623342] VFS: Cannot open root device "nfs" or unknown-block(0,255): error -6
[    1.631282] Please append a correct "root=" boot option; here are the available partitions:
[    1.640063] 0100           16384 ram0 
[    1.640067]  (driver?)
[    1.646449] 0101           16384 ram1 
[    1.646452]  (driver?)
[    1.652855] 0102           16384 ram2 
[    1.652858]  (driver?)
[    1.659258] 0103           16384 ram3 
[    1.659260]  (driver?)
[    1.665642] 0104           16384 ram4 
[    1.665644]  (driver?)
[    1.672043] 0105           16384 ram5 
[    1.672045]  (driver?)
[    1.678441] 0106           16384 ram6 
[    1.678444]  (driver?)
[    1.684824] 0107           16384 ram7 
[    1.684826]  (driver?)
[    1.691225] 0108           16384 ram8 
[    1.691227]  (driver?)
[    1.697608] 0109           16384 ram9 
[    1.697611]  (driver?)
[    1.704009] 010a           16384 ram10 
[    1.704011]  (driver?)
[    1.710499] 010b           16384 ram11 
[    1.710502]  (driver?)
[    1.716974] 010c           16384 ram12 
[    1.716977]  (driver?)
[    1.723466] 010d           16384 ram13 
[    1.723468]  (driver?)
[    1.729958] 010e           16384 ram14 
[    1.729960]  (driver?)
[    1.736433] 010f           16384 ram15 
[    1.736435]  (driver?)
[    1.742935] b300        15558144 mmcblk0 
[    1.742939]  driver: mmcblk
[    1.750065]   b301         3682304 mmcblk0p1 3244345d-01
[    1.750068] 
[    1.757175] b308         3776512 mmcblk1 
[    1.757178]  driver: mmcblk
[    1.764304]   b309         3772416 mmcblk1p1 3b28ed17-01
[    1.764306] 
[    1.771435] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,255)
[    1.780273] Rebooting in 1 seconds..

did you use the search function to try to find a solution?

Yes I did, this forum, stackexchange and google .. :frowning: