From: Jaehoon Chung <jh80.chung@samsung.com> To: u-boot@lists.denx.de Subject: [PATCH] board: amlogic: vim3: ethernet mac fixed from serial Date: Mon, 11 Jan 2021 07:46:37 +0900 [thread overview] Message-ID: <7675a623-ca60-a071-1add-aa03bfc92216@samsung.com> (raw) In-Reply-To: <20210108054323.1449108-1-art@khadas.com> 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 <art@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; > } >
WARNING: multiple messages have this Message-ID (diff)
From: Jaehoon Chung <jh80.chung@samsung.com> To: Artem Lapkin <email2tema@gmail.com>, narmstrong@baylibre.com Cc: u-boot-amlogic@groups.io, u-boot@lists.denx.de, khilman@baylibre.com, christianshewitt@gmail.com, martin.blumenstingl@googlemail.com, art@khadas.com, nick@khadas.com, gouwa@khadas.com Subject: Re: [PATCH] board: amlogic: vim3: ethernet mac fixed from serial Date: Mon, 11 Jan 2021 07:46:37 +0900 [thread overview] Message-ID: <7675a623-ca60-a071-1add-aa03bfc92216@samsung.com> (raw) In-Reply-To: <20210108054323.1449108-1-art@khadas.com> 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@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; > } >
next prev parent reply other threads:[~2021-01-10 22:46 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <CGME20210108124343epcas1p46dccb0f4dd6dad4bc177a560f4b1cb26@epcas1p4.samsung.com> 2021-01-08 5:43 ` [PATCH] board: amlogic: vim3: ethernet mac fixed from serial Artem Lapkin 2021-01-08 5:43 ` Artem Lapkin 2021-01-10 22:46 ` Jaehoon Chung [this message] 2021-01-10 22:46 ` Jaehoon Chung 2021-01-11 1:27 ` Art Nikpal 2021-01-11 1:27 ` Art Nikpal 2021-01-11 1:42 ` Art Nikpal 2021-01-11 1:42 ` Art Nikpal
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=7675a623-ca60-a071-1add-aa03bfc92216@samsung.com \ --to=jh80.chung@samsung.com \ --cc=u-boot@lists.denx.de \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.