From mboxrd@z Thu Jan 1 00:00:00 1970 From: Art Nikpal Date: Mon, 11 Jan 2021 09:42:10 +0800 Subject: [PATCH] board: amlogic: vim3: ethernet mac fixed from serial In-Reply-To: References: <20210108054323.1449108-1-art@khadas.com> <7675a623-ca60-a071-1add-aa03bfc92216@samsung.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de plz ignore my prev emails > AFAIK, it's fixed with Marek's patch > https://patchwork.ozlabs.org/project/uboot/patch/20201217072642.1319-1-m.szyprowski at samsung.com/ look like yes ! u right Best regards Art On Mon, Jan 11, 2021 at 9:27 AM Art Nikpal wrote: > > AFAIK, it's fixed with Marek's patch > > > https://patchwork.ozlabs.org/project/uboot/patch/20201217072642.1319-1-m.szyprowski at samsung.com/ > > not solve ! > because mac which must stored in mcu is empty by default > and by default we have random mac every time > > i think i will make new complex patch from both patches > > On Mon, Jan 11, 2021 at 6:46 AM Jaehoon Chung > wrote: > >> 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 at samsung.com/ >> >> Best Regards, >> Jaehoon CHung >> >> > >> > Signed-off-by: Artem Lapkin >> > --- >> > 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; >> > } >> > >> >> From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-il1-f180.google.com (mail-il1-f180.google.com [209.85.166.180]) by mx.groups.io with SMTP id smtpd.web09.27900.1610329341815777101 for ; Sun, 10 Jan 2021 17:42:21 -0800 Received: by mail-il1-f180.google.com with SMTP id w17so16739129ilj.8 for ; Sun, 10 Jan 2021 17:42:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3u8qcW9CJ9u6biCVGB00QDtHOARW252ncysxXeQx8Dg=; b=c+eYP3M6SSgi6aR+jzLtEmPYjfIgUF59LMp6zxQwSWZbF0enrS5s2ROGJZN8cNg6uT KWeAuYtqX9aBwXAADCxtGS7nb77+wYyuhc/A/X1kaWCzPDS2kTQVBNr8Hq0j/0M+zl2t BfMGDGIZwr+1hDJHq/l+HYntxO25XbRkSSIFPiEm5WGRz8u95+OIwiDHIUNU0We8cWz8 Ee2O9sbuql51so18otngWH/UMEs1OEkmEN8Oj/D/bq//oEKXK3+y4pUy6WozSPNjyO5R W0lMqGMW0WbZqg4psmLwaY8yTJcFVtepnoGu32nX0QWEEISHgPRosVAfBoq1hNxvWSHD nQxg== MIME-Version: 1.0 References: <20210108054323.1449108-1-art@khadas.com> <7675a623-ca60-a071-1add-aa03bfc92216@samsung.com> In-Reply-To: From: Art Nikpal Date: Mon, 11 Jan 2021 09:42:10 +0800 Message-ID: Subject: Re: [PATCH] board: amlogic: vim3: ethernet mac fixed from serial Content-Type: multipart/alternative; boundary="0000000000005beffe05b89604de" To: Jaehoon Chung Cc: Neil Armstrong , u-boot-amlogic@groups.io, u-boot@lists.denx.de, khilman@baylibre.com, Christian Hewitt , Martin Blumenstingl , Artem Lapkin , nick@khadas.com, Gouwa Wang List-ID: --0000000000005beffe05b89604de Content-Type: text/plain; charset="UTF-8" plz ignore my prev emails > AFAIK, it's fixed with Marek's patch > https://patchwork.ozlabs.org/project/uboot/patch/20201217072642.1319-1-m.szyprowski@samsung.com/ look like yes ! u right Best regards Art On Mon, Jan 11, 2021 at 9:27 AM Art Nikpal wrote: > > AFAIK, it's fixed with Marek's patch > > > https://patchwork.ozlabs.org/project/uboot/patch/20201217072642.1319-1-m.szyprowski@samsung.com/ > > not solve ! > because mac which must stored in mcu is empty by default > and by default we have random mac every time > > i think i will make new complex patch from both patches > > On Mon, Jan 11, 2021 at 6:46 AM Jaehoon Chung > wrote: > >> 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 >> > --- >> > 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; >> > } >> > >> >> --0000000000005beffe05b89604de Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
plz ignore my prev emails

> AFAIK, it's= fixed with Marek's patch

look like yes ! u right=

Best regards Art

=

= On Mon, Jan 11, 2021 at 9:27 AM Art Nikpal <email2tema@gmail.com> wrote:
> AFAIK, it's fixe= d with Marek's patch

not solve !
because mac which must stored in mcu is empty by default
= and by default we have random mac every time

i thi= nk i will make new complex patch from both patches

On Mon, Jan 11, 202= 1 at 6:46 AM Jaehoon Chung <jh80.chung@samsung.com> wrote:
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

http= s://patchwork.ozlabs.org/project/uboot/patch/20201217072642.1319-1-m.szypro= wski@samsung.com/

Best Regards,
Jaehoon CHung

>
> Signed-off-by: Artem Lapkin <art@khadas.com>
> ---
>=C2=A0 board/amlogic/vim3/vim3.c | 9 +++++++++
>=C2=A0 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)
>=C2=A0 {
>=C2=A0 =C2=A0 =C2=A0 =C2=A0meson_eth_init(PHY_INTERFACE_MODE_RGMII, 0);=
>=C2=A0
> +=C2=A0 =C2=A0 =C2=A0u8 mac_addr[6];
> +=C2=A0 =C2=A0 =C2=A0if (!eth_env_get_enetaddr("ethaddr", ma= c_addr)) {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0meson_generate_serial= _ethaddr();
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0eth_env_get_enetaddr(= "ethaddr", mac_addr);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0printf("[i] seri= al eth mac %02X:%02X:%02X:%02X:%02X:%02X\n",
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0mac_addr[0],mac_addr[1],mac_addr[2],
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0mac_addr[3],mac_addr[4],mac_addr[5]);
> +=C2=A0 =C2=A0 =C2=A0}
> +
>=C2=A0 =C2=A0 =C2=A0 =C2=A0return 0;
>=C2=A0 }
>

--0000000000005beffe05b89604de--