From 2b88563ee5aafd9571d965b7f2093a0f58d98a31 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Thu, 26 Nov 2020 12:02:21 +0100 Subject: realtek: update the tree to the latest refactored version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * rename the target to realtek * add refactored DSA driver * add latest gpio driver * lots of arch cleanups * new irq driver * additional boards Signed-off-by: Bert Vermeulen Signed-off-by: Birger Koblitz Signed-off-by: Sander Vanheule Signed-off-by: Bjørn Mork Signed-off-by: John Crispin --- .../realtek/base-files/etc/board.d/02_network | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100755 target/linux/realtek/base-files/etc/board.d/02_network (limited to 'target/linux/realtek/base-files/etc/board.d/02_network') diff --git a/target/linux/realtek/base-files/etc/board.d/02_network b/target/linux/realtek/base-files/etc/board.d/02_network new file mode 100755 index 0000000000..dc1465661b --- /dev/null +++ b/target/linux/realtek/base-files/etc/board.d/02_network @@ -0,0 +1,43 @@ +#!/bin/sh + +. /lib/functions.sh +. /lib/functions/uci-defaults.sh +. /lib/functions/system.sh + +rtl838x_setup_switch() +{ + local lan lan_list + + for lan in /sys/class/net/lan*; do + lan_list="$lan_list $(basename $lan)" + done + ucidef_set_bridge_device switch + ucidef_set_interface_lan "$lan_list" +} + +rtl838x_setup_macs() +{ + local board="$1" + local lan_mac + local wan_mac + local label_mac + + case $board in + allnet,all-sg8208m|\ + netgear,gs110tpp-v1) + lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr) + label_mac=$lan_mac + esac + + [ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac + [ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac + [ -n "$label_mac" ] && ucidef_set_label_macaddr $label_mac +} + +board_config_update +board=$(board_name) +rtl838x_setup_switch +rtl838x_setup_macs $board +board_config_flush + +exit 0 -- cgit v1.2.3