Re: [PATCH 1/1] riscv: dts: spacemit: set ETH MAC from eeprom for OrangePi

From: Yixun Lan

Date: Tue Sep 22 2026 - 03:38:43 EST


Hi Chukun,

On 14:50 Tue 22 Sep , Chukun Pan wrote:
> Hi,
>
> > Could you point me where the u-boot patching the MAC address?
> > I'm not fully aware of this problem..
>
> This is handled by U-Boot's fdt_fixup_ethernet() function:
> https://github.com/u-boot/u-boot/blob/main/boot/fdt_support.c#L639
>
> do_bootm_linux()
> |
> boot_prep_linux()
> |
> image_setup_linux()
> |
> image_setup_libfdt()
> |
> fdt_fixup_ethernet()
>
So checked the code, it's not a direct problem of /alias, but due to the
env variable provided to override the mac address, see

https://github.com/u-boot/u-boot/blob/main/boot/fdt_support.c#L698
tmp = env_get(mac);
if (!tmp)
continue;

In this case, I don't think it's necessary to drop the ethernet alias,
I mean it's totally fine if there is uboot ethaddr env and it wins

--
Yixun Lan (dlan)