By default, the Ethernet driver reads the burned-in MAC address. If no MAC address exists in the hardware, the MAC will read all zeros, making the MAC malfunction. The kernel will generate one random MAC address, which you can burn into hardware. You can only burn it once. If you burn it the second time, the result is unpredictable.

Attention: this way of setting it up will fuse the OTP hardware. If you do that again, the result is unknown.

You can use the “echo” command in the console to flash the MAC address in OTP hardware.

Example (Add MAC address: 1e:ed:19:27:1a:b5)

# echo 0x1eed > /sys/fsl_otp/HW_OCOTP_MAC1 // high 16 bits of MAC address

# echo 0x19271ab5 > /sys/fsl_otp/HW_OCOTP_MAC0 // low 32 bits of MAC address

When you’re done, reboot your board. You will find your MAC address is 1e:ed:19:27:1a:b5.