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

Yixun Lan dlan at kernel.org
Tue Sep 22 00:29:10 PDT 2026


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)



More information about the linux-riscv mailing list