Problem with ethernet when porting toZybo Z7-10 with Petalinux 2020.1

Forked the repo: GitHub - ussamazahid96/ZYBO-PYNQ: Board files for building PYNQ linux for Zybo and made minor changes to be compatible with 2020.1.

Downloaded pre-build bionic image from pynq website.
exported xsa and paste it to project dir:
~/fpga/PYNQ/sdbuild/build/Zybo/petalinux_bsp/hardware_project/zybo.xsa

Successfully built:
make clean && make PREBUILT=/home/vsamotaiev/fpga/bionic.arm.2.6.0_2020_10_19.img BOARDS=Zybo

Flashed to SDcard and it works! It almost works. Ubuntu starts and all services are running fine.

(for some reason terminal interface is 74880, but it’s not a deal)

Network is not working. eth0 is up, tried both static and dynamic configuration. With the router and with direct Zybo-2-Mac connection. kernel successfully detects ip interface, no errors in logs. ifconfig shows that interface is up or down when I disconnect the cable, so-called ‘link’ LED blinks as it should blink on Zybo =)

I’ve tried adding routes to the route table and do all possible debugging.
Looks like it may be some hardware-specific problem related to voltage levels or smth even more complicated to debug. Looking for help and advice.

root@pynq:/etc/dhcp# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.2.99  netmask 255.255.255.0  broadcast 192.168.2.255
        ether de:af:7c:9d:cf:c6  txqueuelen 1000  (Ethernet)
        RX packets 145  bytes 18838 (18.8 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 136  bytes 22967 (22.9 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 28  base 0xb000  

root@pynq:/etc/dhcp# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.2.1     0.0.0.0         UG    0      0        0 eth0
192.168.2.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0

root@pynq:/etc/dhcp# cat /sys/class/net/eth0/statistics/rx_packets 
145
root@pynq:/etc/dhcp# cat /sys/class/net/eth0/statistics/tx_packets 
136

root@pynq:/etc/dhcp# cat /sys/class/net/eth0/statistics/tx_errors 
0
root@pynq:/etc/dhcp# cat /sys/class/net/eth0/statistics/rx_errors 
0

root@pynq:/etc/dhcp# ethtool eth0
Settings for eth0:
	Supported ports: [ TP MII ]
	Supported link modes:   10baseT/Half 10baseT/Full 
	                        100baseT/Half 100baseT/Full 
	                        1000baseT/Full 
	Supported pause frame use: Symmetric Receive-only
	Supports auto-negotiation: Yes
	Supported FEC modes: Not reported
	Advertised link modes:  10baseT/Half 10baseT/Full 
	                        100baseT/Half 100baseT/Full 
	                        1000baseT/Full 
	Advertised pause frame use: No
	Advertised auto-negotiation: Yes
	Advertised FEC modes: Not reported
	Link partner advertised link modes:  10baseT/Half 10baseT/Full 
	                                     100baseT/Half 100baseT/Full 
	                                     1000baseT/Half 1000baseT/Full 
	Link partner advertised pause frame use: Symmetric Receive-only
	Link partner advertised auto-negotiation: Yes
	Link partner advertised FEC modes: Not reported
	Speed: 1000Mb/s
	Duplex: Full
	Port: MII
	PHYAD: 0
	Transceiver: internal
	Auto-negotiation: on
	Link detected: yes

root@pynq:/etc/dhcp#  mii-tool eth0
eth0: negotiated 1000baseT-FD flow-control, link ok

At the startup I see next network-related lines:
Warning: ethernet@e000b000 (eth0) using random MAC address - 22:49:ab:e4:c4:cf
eth0: ethernet@e000b000

RTL8211E Gigabit Ethernet e000b000.ethernet-ffffffff:00: attached PHY driver [RTL8211E Gigabit Ethernet] (mii_bus:phy_addr=e000b000.ethernet-ffffffff:00, irq=POLL)
macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 28 (22:49:ab:e4:c4:cf)
e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
e1000e: Copyright(c) 1999 - 2015 Intel Corporation.

Dynamic DHCP fails in next way (connected to router, tested from mac via cable):
root@pynq:/etc/network# ifup eth0
Internet Systems Consortium DHCP Client 4.3.5
Copyright 2004-2016 Internet Systems Consortium.
All rights reserved.
For info, please visit ISC DHCP - ISC

Listening on LPF/eth0/22:49:ab:e4:c4:cf
Sending on   LPF/eth0/22:49:ab:e4:c4:cf
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 2
No DHCPOFFERS received.
No working leases in persistent database - sleeping.

MAC address is tricky to get sometimes, depending on the board. But that random address should be okay for you to use ethernet. Have you tried the static IP talking to your PC? At least that can rule out the hardware issue from the board.

Yep, I did. but it’s not delivering traffic.
I’ve tried to grab an interface traffic and when I do ping, I see some packages, but icmp itself doesn’t seem working.

Have you done the device-tree modifications as outlined here and here?

Peter