[Letux-kernel] Udoo neo and Ethernet MAC address (letux-4.19)

H. Nikolaus Schaller hns at goldelico.com
Wed Mar 27 15:25:48 CET 2019


it is a while that I observed some trouble with the Ethernet IP
address of the Udoo neo.

It did apparently change each time I did boot the board.

Deeper analysis shows that the board also has a different
MAC address each time, so that the DHCP server assigns a
new IP address...

Now I found this in the dmesg:

[    1.310700] libphy: Fixed MDIO Bus: probed
[    1.318614] fec 2188000.ethernet: 2188000.ethernet supply phy not found, using dummy regulator
[    1.327631] fec 2188000.ethernet: Linked as a consumer to regulator.0
[    1.346678] fec 2188000.ethernet (unnamed net_device) (uninitialized): Invalid MAC address: 00:00:00:00:00:00
[    1.356794] fec 2188000.ethernet (unnamed net_device) (uninitialized): Using random MAC address: 82:a9:2a:b1:2b:37
[    1.368115] libphy: fec_enet_mii_bus: probed

The code that produces this message is:

https://elixir.bootlin.com/linux/v5.1-rc2/source/drivers/net/ethernet/freescale/fec_main.c#L1637

So the MAC can either be set

by the cmdline: fec.macaddr=0x00,0x04,0x9f,0x01,0x30,0xe0
or by some FUSE (where I don't know if that exists on the Usoo neo / i.MX6)
or by device tree (which would be a bad idea to give all devices the same MAC address)

So what I don't know in detail is the U-Boot of the Udoo neo and if that one should
handle device specific MAC addresses.

makesd simply uses a variant of U-Boot that I did pull from a working SD card provided
by the Udoo neo makers.

Another option would be to add that to the /etc/network/interfaces so that the MAC
address is stored on the SD card (and can be kept different between boards). But that
is user-space code which would be unique to the Udoo neo and not needed for e.g.
BeagleBoneBlack.

Generally this topic is not urgent, but has to be addressed in the future.

BR,
Nikolaus



More information about the Letux-kernel mailing list