By default the MAC address is dynamically generated on each boot and will change. There are a couple of ways to set the MAC address to a constant:
- You can modify U-boot(u-boot/stm32mp1.c at v2018.11-stm32mp · STMicroelectronics/u-boot)) Ethernet initialization or
- if you don’t want to modify u-boot, you can execute the following commands after interrupting boot at u-boot: setenv .flags ethaddr
setenv ethaddr 11:22:33:44:55:66
Then, execute bootcmd.
- Program OTP to set MAC address as described here: How to update OTP with U-Boot – stm32mpu