build/patch/u-boot/u-boot-rockchip64-v2022.04/general-set-eth1addr.patch

45 lines
2.1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Piotr Szczepanik <piter75@gmail.com>
Date: Sun, 3 May 2020 20:42:50 +0200
Subject: [ARCHEOLOGY] Added rk3328 efuse driver and stable secondary mac
address to u-boot (#1939)
> X-Git-Archeology: - Revision 7113913be8597cd269f61a7f8fd82da41d7b03a4: https://github.com/armbian/build/commit/7113913be8597cd269f61a7f8fd82da41d7b03a4
> X-Git-Archeology: Date: Sun, 03 May 2020 20:42:50 +0200
> X-Git-Archeology: From: Piotr Szczepanik <piter75@gmail.com>
> X-Git-Archeology: Subject: Added rk3328 efuse driver and stable secondary mac address to u-boot (#1939)
> X-Git-Archeology:
> X-Git-Archeology: - Revision 86abac1fd4e169712a44d245cf7adef4ee17c420: https://github.com/armbian/build/commit/86abac1fd4e169712a44d245cf7adef4ee17c420
> X-Git-Archeology: Date: Tue, 26 Oct 2021 22:14:41 +0200
> X-Git-Archeology: From: Piotr Szczepanik <piter75@gmail.com>
> X-Git-Archeology: Subject: Cleanup u-boot configurations for rockchip64 derivatives (#3150)
> X-Git-Archeology:
> X-Git-Archeology: - Revision 2813365dd25e3ad110936cbf014b95b38d7090ec: https://github.com/armbian/build/commit/2813365dd25e3ad110936cbf014b95b38d7090ec
> X-Git-Archeology: Date: Mon, 07 Nov 2022 21:29:00 +0100
> X-Git-Archeology: From: Igor Pecovnik <igorpecovnik@users.noreply.github.com>
> X-Git-Archeology: Subject: Move known non working rockhip64 boards to previous boot loader (#4392)
> X-Git-Archeology:
---
arch/arm/mach-rockchip/misc.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm/mach-rockchip/misc.c b/arch/arm/mach-rockchip/misc.c
index 87eebd9872..0c610e0284 100644
--- a/arch/arm/mach-rockchip/misc.c
+++ b/arch/arm/mach-rockchip/misc.c
@@ -52,6 +52,11 @@ int rockchip_setup_macaddr(void)
mac_addr[0] &= 0xfe; /* clear multicast bit */
mac_addr[0] |= 0x02; /* set local assignment bit (IEEE802) */
eth_env_set_enetaddr("ethaddr", mac_addr);
+
+ /* Make a valid MAC address for eth1 too */
+ mac_addr[5] += 0x20;
+ mac_addr[5] &= 0xff;
+ eth_env_set_enetaddr("eth1addr", mac_addr);
#endif
return 0;
}
--
Armbian