aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/realtek/base-files/etc
diff options
context:
space:
mode:
authorJohn Crispin <john@phrozen.org>2020-11-26 12:02:21 +0100
committerJohn Crispin <john@phrozen.org>2020-11-26 13:29:27 +0100
commit2b88563ee5aafd9571d965b7f2093a0f58d98a31 (patch)
treed2997a6745fe0cffab8db73d4a735c3366a301b0 /target/linux/realtek/base-files/etc
parent4e39949dd1f7eb706d857e1c44a992ae752132a7 (diff)
downloadupstream-2b88563ee5aafd9571d965b7f2093a0f58d98a31.tar.gz
upstream-2b88563ee5aafd9571d965b7f2093a0f58d98a31.tar.bz2
upstream-2b88563ee5aafd9571d965b7f2093a0f58d98a31.zip
realtek: update the tree to the latest refactored version
* 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 <bert@biot.com> Signed-off-by: Birger Koblitz <mail@birger-koblitz.de> Signed-off-by: Sander Vanheule <sander@svanheule.net> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: John Crispin <john@phrozen.org>
Diffstat (limited to 'target/linux/realtek/base-files/etc')
-rwxr-xr-xtarget/linux/realtek/base-files/etc/board.d/01_leds14
-rwxr-xr-xtarget/linux/realtek/base-files/etc/board.d/02_network43
-rw-r--r--target/linux/realtek/base-files/etc/inittab3
3 files changed, 60 insertions, 0 deletions
diff --git a/target/linux/realtek/base-files/etc/board.d/01_leds b/target/linux/realtek/base-files/etc/board.d/01_leds
new file mode 100755
index 0000000000..699ab817dd
--- /dev/null
+++ b/target/linux/realtek/base-files/etc/board.d/01_leds
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+. /lib/functions/uci-defaults.sh
+
+board=$(board_name)
+
+board_config_update
+
+case $board in
+esac
+
+board_config_flush
+
+exit 0
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
diff --git a/target/linux/realtek/base-files/etc/inittab b/target/linux/realtek/base-files/etc/inittab
new file mode 100644
index 0000000000..9820e7144b
--- /dev/null
+++ b/target/linux/realtek/base-files/etc/inittab
@@ -0,0 +1,3 @@
+::sysinit:/etc/init.d/rcS S boot
+::shutdown:/etc/init.d/rcS K shutdown
+::askconsole:/usr/libexec/login.sh