Changing MAC addresses on iMX8X SOMs


I’ve came across an article on MAC Address, and was wondering if it applies to iMX8X modules. I realize that the article linked is not applicable for Colibri iMX8X nor Apalis iMX8X (the two modules I’ve tried this on). I also did not manage to find any u-boot environment variable named “ethaddr” when performing fw_printenv. I tried to follow the instructions in the article to force a custom MAC address, but failed as the MAC address was not applied after introducing the required u-boot environment variables and a reboot.

fw_setenv ethaddr 01:23:45:67:89:ab

Are there different steps that we should follow in order to customize the MAC address on these modules?

My apologies. Turns out while running fw_printenv in userspace does not show the ethaddr variable, accessing u-boot and running printenv there does show the ethaddr variable. Why exactly would this be the case? Is there a difference between using fw_setenv and running setenv in u-boot directly?

Dear @YHChng,

No there is no difference in using fw_setenv or setenv (in u-boot). But we have seen cases where while setting a particular variable by using fw_setenv, that some single characters get lost in the process. Keep an eye out for this.

Best Regards