[LEDE-DEV] [PATCH 5/5] lantiq: DGN3500: use the MAC address from uboot env

Mathias Kresin dev at kresin.me
Sat Jul 2 08:00:40 PDT 2016


Extract the base MAC address from the u-boot environment instead of
relying on a properly passed ethaddr kernel command-line parameter.

Signed-off-by: Mathias Kresin <dev at kresin.me>
---
 target/linux/lantiq/base-files/etc/board.d/02_network | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/target/linux/lantiq/base-files/etc/board.d/02_network b/target/linux/lantiq/base-files/etc/board.d/02_network
index 3bb4e6e..43ab17f 100755
--- a/target/linux/lantiq/base-files/etc/board.d/02_network
+++ b/target/linux/lantiq/base-files/etc/board.d/02_network
@@ -75,6 +75,8 @@ ARV4518PWR01*)
         ;;
 
 DGN3500*)
+	lan_mac=$(mtd_get_mac_ascii uboot-env ethaddr)
+	wan_mac=$(macaddr_add "$lan_mac" 1)
 	ucidef_add_switch "switch0" \
 		"3:lan:1" "2:lan:2" "1:lan:3" "0:lan:4" "5t at eth0"
 	;;
-- 
1.9.1




More information about the Lede-dev mailing list