[PATCH] rockchip: board: assign up to 3 static Ethernet MAC addresses
Quentin Schulz
quentin.schulz at cherry.de
Fri Jun 27 17:44:08 CEST 2025
Hi Micha,
On 6/27/25 5:23 PM, MichaIng wrote:
> Hi Quentin,
>
> many thanks for all your feedback and input.
>
> > If DM_SEQ_ALIAS is enabled, I believe so.
> > I would imagine people be surprised if the same device operates under
> two different MAC addresses depending on which SW is running at the
> moment (U-Boot or Linux for example).
>
> So far I only found https://eur02.safelinks.protection.outlook.com/?
> url=https%3A%2F%2Fgithub.com%2Fu-boot%2Fu-
> boot%2Fblob%2Fmaster%2Fboot%2Ffdt_support.c%23L645-
> L664&data=05%7C02%7Cquentin.schulz%40cherry.de%7Cce3f16cb7ffc4282428c08ddb58ea1dd%7C5e0e1b5221b54e7b83bb514ec460677e%7C0%7C0%7C638866346409088334%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=QoEVV9ymbETho9Zaz%2F%2BD7NDTv3al4GiweS4BdEM9v5w%3D&reserved=0, the fdt_fixup_ethernet() function, which, as far as I can see, is called after/with boot* commands. Ah, but if U-Boots device tree is used to boot, then of course it is applied there as well. What I meant is in bootloader stage before that, when it is about looping through boot media, and in case network boot options, searching for/executing boot.scr, in case U-Boot console.
>
U-Boot code is sometimes much more convoluted than a quick grep :)
I don't remember the whole path I took but essentially it led me to look
for enetaddr, net_enetaddr, eth_env_set_enetaddr, etc... which calls
dev_seq() on the udevice, which returns dev->seq_, which is set (if
DM_SEQ_ALIAS is enabled) by dev_read_alias_seq() when binding the driver.
Cheers,
Quentin
More information about the U-Boot
mailing list