[PATCH] board: amlogic: vim3: ethernet mac fixed from serial

Jaehoon Chung jh80.chung at samsung.com
Sun Jan 10 23:46:37 CET 2021


Hi,

On 1/8/21 2:43 PM, Artem Lapkin wrote:
> Fixed randomly generated ethernet mac address!
> 
> Used meson_generate_serial_ethaddr for generate mac address from
> board serial number, if ethaddr variable not defined.

AFAIK, it's fixed with Marek's patch

https://patchwork.ozlabs.org/project/uboot/patch/20201217072642.1319-1-m.szyprowski@samsung.com/

Best Regards,
Jaehoon CHung

> 
> Signed-off-by: Artem Lapkin <art at khadas.com>
> ---
>  board/amlogic/vim3/vim3.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/board/amlogic/vim3/vim3.c b/board/amlogic/vim3/vim3.c
> index 09ef39ff30..0315eaf569 100644
> --- a/board/amlogic/vim3/vim3.c
> +++ b/board/amlogic/vim3/vim3.c
> @@ -133,5 +133,14 @@ int misc_init_r(void)
>  {
>  	meson_eth_init(PHY_INTERFACE_MODE_RGMII, 0);
>  
> +	u8 mac_addr[6];
> +	if (!eth_env_get_enetaddr("ethaddr", mac_addr)) {
> +		meson_generate_serial_ethaddr();
> +		eth_env_get_enetaddr("ethaddr", mac_addr);
> +		printf("[i] serial eth mac %02X:%02X:%02X:%02X:%02X:%02X\n",
> +			mac_addr[0],mac_addr[1],mac_addr[2],
> +			mac_addr[3],mac_addr[4],mac_addr[5]);
> +	}
> +
>  	return 0;
>  }
> 



More information about the U-Boot mailing list