* [PATCH] board: amlogic: vim3: ethernet mac fixed from serial
@ 2021-01-08 5:43 ` Artem Lapkin
0 siblings, 0 replies; 8+ messages in thread
From: Artem Lapkin @ 2021-01-08 5:43 UTC (permalink / raw)
To: u-boot
Fixed randomly generated ethernet mac address!
Used meson_generate_serial_ethaddr for generate mac address from
board serial number, if ethaddr variable not defined.
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;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH] board: amlogic: vim3: ethernet mac fixed from serial
@ 2021-01-08 5:43 ` Artem Lapkin
0 siblings, 0 replies; 8+ messages in thread
From: Artem Lapkin @ 2021-01-08 5:43 UTC (permalink / raw)
To: narmstrong
Cc: u-boot-amlogic, u-boot, khilman, christianshewitt,
martin.blumenstingl, art, nick, gouwa
Fixed randomly generated ethernet mac address!
Used meson_generate_serial_ethaddr for generate mac address from
board serial number, if ethaddr variable not defined.
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;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH] board: amlogic: vim3: ethernet mac fixed from serial
2021-01-08 5:43 ` Artem Lapkin
@ 2021-01-10 22:46 ` Jaehoon Chung
-1 siblings, 0 replies; 8+ messages in thread
From: Jaehoon Chung @ 2021-01-10 22:46 UTC (permalink / raw)
To: u-boot
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;
> }
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] board: amlogic: vim3: ethernet mac fixed from serial
@ 2021-01-10 22:46 ` Jaehoon Chung
0 siblings, 0 replies; 8+ messages in thread
From: Jaehoon Chung @ 2021-01-10 22:46 UTC (permalink / raw)
To: Artem Lapkin, narmstrong
Cc: u-boot-amlogic, u-boot, khilman, christianshewitt,
martin.blumenstingl, art, nick, gouwa
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;
> }
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] board: amlogic: vim3: ethernet mac fixed from serial
2021-01-10 22:46 ` Jaehoon Chung
@ 2021-01-11 1:27 ` Art Nikpal
-1 siblings, 0 replies; 8+ messages in thread
From: Art Nikpal @ 2021-01-11 1:27 UTC (permalink / raw)
To: u-boot
> 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 <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
>
>
> 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;
> > }
> >
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] board: amlogic: vim3: ethernet mac fixed from serial
@ 2021-01-11 1:27 ` Art Nikpal
0 siblings, 0 replies; 8+ messages in thread
From: Art Nikpal @ 2021-01-11 1:27 UTC (permalink / raw)
To: Jaehoon Chung
Cc: Neil Armstrong, u-boot-amlogic, u-boot, khilman,
Christian Hewitt, Martin Blumenstingl, Artem Lapkin, nick,
Gouwa Wang
[-- Attachment #1: Type: text/plain, Size: 1703 bytes --]
> 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 <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
>
>
> 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;
> > }
> >
>
>
[-- Attachment #2: Type: text/html, Size: 2763 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] board: amlogic: vim3: ethernet mac fixed from serial
2021-01-11 1:27 ` Art Nikpal
@ 2021-01-11 1:42 ` Art Nikpal
-1 siblings, 0 replies; 8+ messages in thread
From: Art Nikpal @ 2021-01-11 1:42 UTC (permalink / raw)
To: u-boot
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 <email2tema@gmail.com> 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 <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
>>
>>
>> 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;
>> > }
>> >
>>
>>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] board: amlogic: vim3: ethernet mac fixed from serial
@ 2021-01-11 1:42 ` Art Nikpal
0 siblings, 0 replies; 8+ messages in thread
From: Art Nikpal @ 2021-01-11 1:42 UTC (permalink / raw)
To: Jaehoon Chung
Cc: Neil Armstrong, u-boot-amlogic, u-boot, khilman,
Christian Hewitt, Martin Blumenstingl, Artem Lapkin, nick,
Gouwa Wang
[-- Attachment #1: Type: text/plain, Size: 2054 bytes --]
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 <email2tema@gmail.com> 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 <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
>>
>>
>> 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;
>> > }
>> >
>>
>>
[-- Attachment #2: Type: text/html, Size: 3673 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-01-11 1:42 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[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
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
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.