networking – kernel hangs during mount NFS

I use the K2Hevm board and ProcessorSDK 6.3.0.103 (kernel v4.19.94 and U-boot 2019.01). I want to mount my filesystem via NFS. I changed all U-boot necessary variables, all files were uploaded and the kernel started logging. When the kernel wants to config eth, the link suddenly goes down and up and sends DHCP for the IP request. I want to use static IP. I changed [my root NFS]/etc/network/interfaces to:

auto eth0
iface eth0 inet static
address 192.168.137.4
netmask 255.255.255.0

but it doesn’t work. I need to disable links going up and down during the startup of the kernel.

I disabled the DHCP config in the kernel configs, but I know there are some configs in the rootfs that must be changed. They are related to interface and systemd.

kernel log is here:

U-Boot SPL 2019.01-gb5724c09aa-dirty (Apr 07 2022 - 00:05:18 -0700)
Trying to boot from SPI


U-Boot 2019.01-gb5724c09aa-dirty (Apr 07 2022 - 00:05:18 -0700)

CPU: 66AK2Hx SR2.0
Model: Texas Instruments Keystone 2 Kepler/Hawking EVM
DRAM:  DDR3A Speed will be configured for 1333 Operation.
Detected SO-DIMM [SQR-SD3T-2G1333SED]
DDR3 speed 1333
DRAM: 2 GiB (includes reported below)

Clear entire DDR3 memory to enable ECC
2 GiB
NAND:  512 MiB
Loading Environment from NAND... OK
Net:   eth0: netcp@2000000
Warning: netcp@slave-1 (eth1) using random MAC address - ae:61:89:9e:0d:a9
, eth1: netcp@slave-1
Warning: netcp@slave-2 (eth2) using random MAC address - 36:44:19:af:24:36
, eth2: netcp@slave-2
Warning: netcp@slave-3 (eth3) using random MAC address - c2:8a:bb:2f:76:36
, eth3: netcp@slave-3
Hit any key to stop autoboot:  0

netcp@2000000 Waiting for SGMII auto negotiation to complete. done
netcp@2000000 Waiting for PHY auto negotiation to complete... done
Using netcp@2000000 device
File transfer via NFS from server 192.168.137.2; our IP address is 192.168.137.4
Filename '/home/xxx/ti-processor-sdk-linux-k2hk-evm-06.03.00.106/targetNFS/boot/skern-k2hk.bin'.
Load address: 0x87000000
Loading: #######
done
Bytes transferred = 32832 (8040 hex)
K2_BM_15.07-53-ge1f885a SoC:k2hk built:04:33:22, Apr 19 2020

## installed monitor @ 0xc5f0000, freq [200000000], status 207552512

netcp@2000000 Waiting for SGMII auto negotiation to complete. done
Using netcp@2000000 device
File transfer via NFS from server 192.168.137.2; our IP address is 192.168.137.4
Filename '/home/xxx/ti-processor-sdk-linux-k2hk-evm-06.03.00.106/targetNFS/boot/zImage'.
Load address: 0x82000000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ####
done
Bytes transferred = 4346368 (425200 hex)

netcp@2000000 Waiting for SGMII auto negotiation to complete. done
Using netcp@2000000 device
File transfer via NFS from server 192.168.137.2; our IP address is 192.168.137.4
Filename '/home/xxx/ti-processor-sdk-linux-k2hk-evm-06.03.00.106/targetNFS/boot/k2-fw-initrd.cpio.gz'.
Load address: 0x88080000
Loading: *** ERROR: File lookup fail

done

netcp@2000000 Waiting for SGMII auto negotiation to complete. done
Using netcp@2000000 device
File transfer via NFS from server 192.168.137.2; our IP address is 192.168.137.4
Filename '/home/xxx/ti-processor-sdk-linux-k2hk-evm-06.03.00.106/targetNFS/boot/keystone-k2hk-evm.dtb'.
Load address: 0x88000000
Loading: ########
done
Bytes transferred = 39532 (9a6c hex)
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
   Loading Ramdisk to 8fbda000, end 8ffff200 ... OK
   Loading Device Tree to 8fbcd000, end 8fbd9a6b ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.19.94-gbe5389fd85 (oe-user@oe-host) (gcc version 8.3.0 (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36))) #1 SMP PREEMPT Sun Apr 19 02:59:01 UTC 2020
[    0.000000] CPU: ARMv7 Processor [412fc0f4] revision 4 (ARMv7), cr=30c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[    0.000000] OF: fdt: Machine model: Texas Instruments Keystone 2 Kepler/Hawking EVM
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] Switching physical address space to 0x800000000
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] Reserved memory: created CMA memory pool at 0x000000081f800000, size 8 MiB
[    0.000000] OF: reserved mem: initialized node dsp-common-memory@81f800000, compatible id shared-dma-pool
[    0.000000] cma: Reserved 24 MiB at 0x000000087e400000
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: Using PSCI v0.1 Function IDs from DT
[    0.000000] random: get_random_bytes called from start_kernel+0xb4/0x470 with crng_init=0
[    0.000000] percpu: Embedded 15 pages/cpu s32396 r8192 d20852 u61440
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 359296
[    0.000000] Kernel command line: console=ttyS0,115200n8 rootwait=1 mtdparts=spi0.0:1m(u-boot-spl)ro,-(misc) rootfstype=nfs root=/dev/nfs rw nfsroot=192.168.137.2:/home/alireza/ti-processor-sdk-linux-k2hk-evm-06.03.00.106/targetNFS,v3,tcp,rsize=4096,wsize=4096 ip=192.168.137.4
[    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: 1374324K/1441792K available (10240K kernel code, 289K rwdata, 2728K rodata, 2048K init, 266K bss, 34700K reserved, 32768K cma-reserved, 892928K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (12256 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (2048 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 290 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 267 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
[    0.000000]  Tasks RCU enabled.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] arch_timer: cp15 timer(s) running at 200.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x2e2049d3e8, max_idle_ns: 440795210634 ns
[    0.000004] sched_clock: 56 bits at 200MHz, resolution 5ns, wraps every 4398046511102ns
[    0.000013] Switching to timer-based delay loop, resolution 5ns
[    0.000194] keystone timer clock @200000000 Hz
[    0.000365] Console: colour dummy device 80x30
[    0.000404] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[    0.000415] pid_max: default: 32768 minimum: 301
[    0.000508] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000517] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000984] CPU: Testing write buffer coherency: ok
[    0.001009] CPU0: Spectre v2: firmware did not set auxiliary control register IBE bit, system vulnerable
[    0.001208] /cpus/cpu@0 missing clock-frequency property
[    0.001230] /cpus/cpu@1 missing clock-frequency property
[    0.001251] /cpus/cpu@2 missing clock-frequency property
[    0.001273] /cpus/cpu@3 missing clock-frequency property
[    0.001282] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.060014] Setting up static identity map for 0x80200000 - 0x80200138
[    0.080017] rcu: Hierarchical SRCU implementation.
[    0.100159] EFI services will not be available.
[    0.120060] smp: Bringing up secondary CPUs ...
[    0.204593] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.204599] CPU1: Spectre v2: firmware did not set auxiliary control register IBE bit, system vulnerable
[    0.284687] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[    0.284693] CPU2: Spectre v2: firmware did not set auxiliary control register IBE bit, system vulnerable
[    0.364784] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[    0.364790] CPU3: Spectre v2: firmware did not set auxiliary control register IBE bit, system vulnerable
[    0.364927] smp: Brought up 1 node, 4 CPUs
[    0.364937] SMP: Total of 4 processors activated (1600.00 BogoMIPS).
[    0.364945] CPU: All CPU(s) started in HYP mode.
[    0.364952] CPU: Virtualization extensions available.
[    0.365390] devtmpfs: initialized
[    0.371232] VFP support v0.3: implementor 41 architecture 4 part 30 variant f rev 0
[    0.371437] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.371451] futex hash table entries: 1024 (order: 4, 65536 bytes)
[    0.371904] pinctrl core: initialized pinctrl subsystem
[    0.372258] DMI not present or invalid.
[    0.372463] NET: Registered protocol family 16
[    0.373291] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.373966] cpuidle: using governor ladder
[    0.373994] cpuidle: using governor menu
[    0.374108] No ATAGs?
[    0.374195] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.374205] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.389902] SCSI subsystem initialized
[    0.390843] media: Linux media interface: v0.10
[    0.390873] videodev: Linux video capture interface: v2.00
[    0.390928] pps_core: LinuxPPS API ver. 1 registered
[    0.390935] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.390950] PTP clock support registered
[    0.390977] EDAC MC: Ver: 3.0.0
[    0.391439] Advanced Linux Sound Architecture Driver Initialized.
[    0.392017] clocksource: Switched to clocksource arch_sys_counter
[    0.397439] NET: Registered protocol family 2
[    0.397810] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
[    0.397831] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.397860] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
[    0.397909] TCP: Hash tables configured (established 4096 bind 4096)
[    0.397966] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.397984] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.398124] NET: Registered protocol family 1
[    0.418442] RPC: Registered named UNIX socket transport module.
[    0.418450] RPC: Registered udp transport module.
[    0.418456] RPC: Registered tcp transport module.
[    0.418463] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.418594] Trying to unpack rootfs image as initramfs...
[    0.443568] Freeing initrd memory: 4248K
[    0.443773] hw perfevents: no interrupt-affinity property for /pmu, guessing.
[    0.444016] hw perfevents: enabled with armv7_cortex_a15 PMU driver, 7 counters available
[    0.444421] platform alarmtimer: set dma_pfn_offset00780000
[    0.444909] Initialise system trusted keyrings
[    0.445018] workingset: timestamp_bits=14 max_order=19 bucket_order=5
[    0.448807] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.449168] NFS: Registering the id_resolver key type
[    0.449184] Key type id_resolver registered
[    0.449190] Key type id_legacy registered
[    0.449219] ntfs: driver 2.1.32 [Flags: R/O].
[    0.450516] Key type asymmetric registered
[    0.450526] Asymmetric key parser 'x509' registered
[    0.450561] bounce: pool size: 64 pages
[    0.450587] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245)
[    0.450595] io scheduler noop registered
[    0.450601] io scheduler deadline registered
[    0.450674] io scheduler cfq registered (default)
[    0.450682] io scheduler mq-deadline registered
[    0.450689] io scheduler kyber registered
[    0.450980] keystone_irq 26202a0.keystone_irq: irqchip registered, nr_irqs 28
[    0.451653] ti,keystone-serdes 232a000.phy: Direct firmware load for ks2_gbe_serdes.bin failed with error -2
[    0.451664] ti,keystone-serdes 232a000.phy: can't get any serdes init fw
[    0.451672] ti,keystone-serdes 232a000.phy: serdes procider init failed -19
[    0.465482] keystone-navigator-qmss soc@0:qmss@2a40000: qmgr start queue 0, number of queues 8192
[    0.465616] keystone-navigator-qmss soc@0:qmss@2a40000: added qmgr start queue 0, num of queues 8192, reg_peek (ptrval), reg_status (ptrval), reg_config (ptrval), reg_region (ptrval), reg_push (ptrval), reg_pop (ptrval)
[    0.465628] keystone-navigator-qmss soc@0:qmss@2a40000: qmgr start queue 8192, number of queues 8192
[    0.465738] keystone-navigator-qmss soc@0:qmss@2a40000: added qmgr start queue 8192, num of queues 8192, reg_peek (ptrval), reg_status (ptrval), reg_config (ptrval), reg_region (ptrval), reg_push (ptrval), reg_pop (ptrval)
[    0.465866] keystone-navigator-qmss soc@0:qmss@2a40000: failed to get firmware for pdsp
[    0.467440] keystone-navigator-qmss soc@0:qmss@2a40000: pdsp id 0 not started for range acc-low-0
[    0.468097] keystone-navigator-dma soc@0:knav_dmas@0: DMA dma_gbe registered 41 logical channels, flows 32, tx chans: 9, rx chans: 24
[    0.501559] Serial: 8250/16550 driver, 10 ports, IRQ sharing enabled
[    0.501617] platform serial8250: set dma_pfn_offset00780000
[    0.504160] console [ttyS0] disabled
[    0.504205] 2530c00.serial: ttyS0 at MMIO 0x2530c00 (irq = 27, base_baud = 12500000) is a TI DA8xx/66AK2x
[    1.416273] console [ttyS0] enabled
[    1.420467] 2531000.serial: ttyS1 at MMIO 0x2531000 (irq = 28, base_baud = 12500000) is a TI DA8xx/66AK2x
[    1.449733] brd: module loaded
[    1.458451] loop: module loaded
[    1.463364] spi_davinci 21000400.spi: DMA is not supported (-19)
[    1.470142] m25p80 spi0.0: n25q128a11 (16384 Kbytes)
[    1.475153] 2 cmdlinepart partitions found on MTD device spi0.0
[    1.481092] Creating 2 MTD partitions on "spi0.0":
[    1.485923] 0x000000000000-0x000000100000 : "u-boot-spl"
[    1.491782] 0x000000100000-0x000001000000 : "misc"
[    1.497140] spi_davinci 21000400.spi: Controller at 0x(ptrval)
[    1.503250] spi_davinci 21000600.spi: DMA is not supported (-19)
[    1.509546] spi_davinci 21000600.spi: Controller at 0x(ptrval)
[    1.515646] spi_davinci 21000800.spi: DMA is not supported (-19)
[    1.521933] spi_davinci 21000800.spi: Controller at 0x(ptrval)
[    1.528042] platform Fixed MDIO bus.0: set dma_pfn_offset00780000
[    1.534311] libphy: Fixed MDIO Bus: probed
[    1.592040] davinci_mdio 2090300.mdio: davinci mdio revision 1.5, bus freq 2500000
[    1.599637] libphy: 2090300.mdio: probed
[    1.605068] davinci_mdio 2090300.mdio: phy[0]: device 2090300.mdio:00, driver Marvell 88E1111
[    1.613643] davinci_mdio 2090300.mdio: phy[1]: device 2090300.mdio:01, driver Marvell 88E1111
[    1.622638] ti,keystone-serdes 232a000.phy: Requested PHY is disabled
[    2.141547] ti,keystone-serdes 232a000.phy: Requested PHY is disabled
[    2.661228] netcp-1.0 2620110.netcp: initialized cpsw ale version 1.3
[    2.667712] netcp-1.0 2620110.netcp: ALE Table size 1024
[    2.673071] netcp-1.0 2620110.netcp: cpts: overflow check period 350 (jiffies)
[    2.680324] netcp-1.0 2620110.netcp: CPTS: ref_clk_freq:600000000 calc_mult:3579139413 calc_shift:31 error:-1 nsec/sec
[    2.691749] netcp-1.0 2620110.netcp: module(netcp-xgbe) not used for device
[    2.698929] i2c /dev entries driver
[    2.703885] sdhci: Secure Digital Host Controller Interface driver
[    2.710088] sdhci: Copyright(c) Pierre Ossman
[    2.714695] sdhci-pltfm: SDHCI platform and OF driver helper
[    2.721291] ledtrig-cpu: registered to indicate activity on CPUs
[    2.728824] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xac
[    2.735221] nand: Micron MT29F4G08ABBDAHC
[    2.739243] nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    2.747131] Bad block table found at page 262080, version 0x01
[    2.753475] Bad block table found at page 262016, version 0x01
[    2.759568] nand_read_bbt: bad block at 0x000000c80000
[    2.764734] nand_read_bbt: bad block at 0x000000ca0000
[    2.769950] 3 fixed-partitions partitions found on MTD device 30000000.nand
[    2.776948] Creating 3 MTD partitions on "30000000.nand":
[    2.782376] 0x000000000000-0x000000100000 : "u-boot"
[    2.787919] 0x000000100000-0x000000180000 : "params"
[    2.793437] 0x000000180000-0x000020000000 : "ubifs"
[    2.802037] davinci_nand 30000000.nand: controller rev. 2.5
[    2.808125] platform snd-soc-dummy: set dma_pfn_offset00780000
[    2.814834] NET: Registered protocol family 10
[    2.820031] Segment Routing with IPv6
[    2.823771] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    2.830073] NET: Registered protocol family 17
[    2.834649] Key type dns_resolver registered
[    2.839059] Registering SWP/SWPB emulation handler
[    2.844234] Loading compiled-in X.509 certificates
[    2.854268] hctosys: unable to open rtc device (rtc0)
[    3.062495] netcp-1.0 2620110.netcp eth0: Link is Down
[    3.069662] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    3.192019] (NULL net_device): Link is Down
[    3.196216] (NULL net_device): Link is Down
[    3.282485] netcp-1.0 2620110.netcp eth1: Link is Down
[    3.288434] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[    7.353107] netcp-1.0 2620110.netcp eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[    7.372047] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    7.402103] Sending DHCP and RARP requests ...... timed out!
[   90.108323] netcp-1.0 2620110.netcp eth0: Link is Down
[   90.118699] IP-Config: Retrying forever (NFS root)...
[   90.332484] netcp-1.0 2620110.netcp eth0: Link is Down
[   90.339060] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   90.552482] netcp-1.0 2620110.netcp eth1: Link is Down
[   90.558385] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[   94.633095] netcp-1.0 2620110.netcp eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[   94.642044] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   94.672079] Sending DHCP and RARP requests .
[   95.193417] random: fast init done
[   97.452028] ..... timed out!
[  181.535529] netcp-1.0 2620110.netcp eth0: Link is Down
[  181.545347] IP-Config: Retrying forever (NFS root)...
[  181.752484] netcp-1.0 2620110.netcp eth0: Link is Down
[  181.759048] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

Leave a Comment