The bridge-utils package is included in the 2016.3 Petalinux root file system and is now enabled by default.
The bridge-utils package contains a utility needed to create and manage bridge devices. This is useful in setting up networks for a hosted virtual machine (VM).
For steps on how to do this, see below:
1) Create a zcu102 project.
2) Run the following command:
petalinux-config -c rootfs
Check whether Bridge utils is enabled default or not. It should be enabled by default.
3) Run the following command:
petalinux-build
4) boot the zcu102 hardware with the petalinux-boot kernel.
For example:
petalinux-boot --jtag --kernel --fpga --bitstream pre-built/linux/implementation/download.bit --hw_server-url lentinus12:3121
5) log in to the kernel prompt with username : root and password: root
6) Check whether Ethernet is working or not by using ifconfig.
7) Use the "brctl" command
8) Give the following command:
"brctl addbr shiva"
9) Run the following command:
brctl addif shiva eth0
You should see the following output:
root@Xilinx-ZCU102-2016_3:~# brctl addif shiva eth0
[ 1522.739809] shiva: port 1(eth0) entered blocking state
[ 1522.744884] shiva: port 1(eth0) entered disabled state
[ 1522.750173] device eth0 entered promiscuous mode
10) Run the following command:
ifconfig shiva up
You should see the following output:
root@Xilinx-ZCU102-2016_3:~# ifconfig shiva up
[ 1562.087842] shiva: port 1(eth0) entered blocking state
[ 1562.092920] shiva: port 1(eth0) entered forwarding state
11) Run the following command
ifconfig shiva 10.10.30.1 up
You should see the following output:
root@Xilinx-ZCU102-2016_3:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0A:35:00:02:90 inet addr:10.10.70.2 Bcast:10.10.70.255 Mask:255.255.255.0 inet6 addr: fe80::20a:35ff:fe00:290%4880304/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:134 errors:0 dropped:0 overruns:0 frame:0 TX packets:34 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:36412 (35.5 KiB) TX bytes:4220 (4.1 KiB) Interrupt:30 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1%4880304/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)shiva Link encap:Ethernet HWaddr 00:0A:35:00:02:90 inet addr:10.10.30.1 Bcast:10.255.255.255 Mask:255.0.0.0 inet6 addr: fe80::20a:35ff:fe00:290%4880304/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:9 errors:0 dropped:0 overruns:0 frame:0 TX packets:8 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1578 (1.5 KiB) TX bytes:648 (648.0 B)