PYNQ Z-2 - v3.0.1 MAC Address

I’m trying the 3.0.1 image on the PYNQ Z-2 board, and it seems that it does not get a proper MAC address.

For example, I am getting 00:00:05:6b:00:b8, which doesn’t seem correct. I have also tried several boards and have encountered a MAC address collision.

2 Likes

Also, on one of my PYNQ boards with the v2.6 image, the MAC address is 00:05:6b:00:b8:a3. It looks like in the v3.0.1 image this is somehow getting shifted right by one byte, dropping the least significant byte (which is unfortunately the most important byte to distinguish between multiple boards)

I can confirm this. I have many boards that I run in parallel for students, so this introduced MAC clashes between the boards. I believe this should be related to U-boot, but I did not further investigate this.

My workaround was:

  1. install macchanger and confirm Change MAC automatically during apt install
  2. in /etc/default/macchanger set ENABLE_ON_POST_UP_DOWN=true
  3. in /etc/macchanger/ifupdown.sh disable last line and paste instead /usr/bin/${package} $IFACE -m 00:11:22:33:44:55 >> $LOGFILE 2>&1
  4. Restart to test

Caveat: eth0:1 (permanent local address 192.168.2.99) somehow cannot be set then.

Alternative is to use u-boot shell (connect via ttyUSB0 and use ESC during boot), however setenv ethaddr 00:11:22:33:44:55 gave an error. I believe the U-boot environment was corrupted. Resetting the environment (env default -a), setting ethaddr again and saveenv could save the MAC. However the MAC was again the wrong in Linux.

Presumably both U-boot and Linux read the MAC from a permanent memory and the driver for reading behaves differently in 3.0.1.

@cathalmccabe Do you know if anyone at AMD has a fix for this?