How to proprely pass mac address from U-Boot to Linux kernel

Hello Toradex team,

After successfully building my Yocto distribution and deploying it, I saw that my MAC address was randomly generated after each boot.

U-Boot is successfully generating my MACs address from Toradex config block and registering it in U-Boot var env (I got : ethaddr=00:14:2d:65:db:59 and eth1addr=00:14:2d:75:db:59)

I digged the problem and found out that (thanks to this post) When I add the two following aliases in my dts:

   ethernet0 = &fec1;
   ethernet1 = &fec2;

U-Boot’s function fdt_fixup_ethernet() is able to set the two ethernet MAC address in my loaded dts.

And the linux kernel is able to set the correct mac addresses on my ethernets controllers.

I wonder why those aliases are not by default in the IMX7 dts configurations ? (while they are in the IMX6 dts)
Is there an other (proper) way to do it ?

Thanks for the feed back on this,

1 Like

Hi @Rapsody

Thanks for writing to the Toradex Support and revealing this bug.
We will try to include this fix for the release.

Best regards,