My Zynq-7000 AP SoC system uses two Ethernet interfaces. Is it possible to use both interfaces in the QEMU environment?
Yes, this is possible. Follow the steps below to set this configuration up.
These steps assume that you are using PetaLinux to build your Linux system and then launch QEMU.
1) Using the Processing System7 IP configuration wizard in the Vivado IP Integrator block diagram, enable the two GEM interfaces:
2) Export the hardware definition into a new PetaLinux project.
3) Update the system-top.dts in <PLNX_PROJECT_ROOT>\subsystems\linux\configs\device-tree with the nodes below:
Note: This device tree configuration is that it does represent the structure of actual hardware.
In real Zynq-7000 silicon, the MDIO interface is shared when both GEM interfaces are routed via MIO.
In the special case of the QEMU model, both GEM interfaces are treated separately with unique MDIO buses.
4) Build the PetaLinux image using petalinux-build and boot QEMU with the petalinux-boot --qemu command.
By default eth0 will be up.
5) Use ifconfig eth1 up to bring up the second Ethernet interface.