aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/base-files/etc
diff options
context:
space:
mode:
authorAndrew Yong <me@ndoo.sg>2016-05-11 00:17:54 +0800
committerJohn Crispin <john@phrozen.org>2016-05-12 03:29:35 +0200
commit374cae9e6fcaf4cf4de4f2095f3fec558da51df6 (patch)
treec6dfa75aeffb0061ce38702779a4e8fb07f6d466 /target/linux/ramips/base-files/etc
parent9195d8da355d0d141ac02c9a5269452dc64ffd2d (diff)
downloadupstream-374cae9e6fcaf4cf4de4f2095f3fec558da51df6.tar.gz
upstream-374cae9e6fcaf4cf4de4f2095f3fec558da51df6.tar.bz2
upstream-374cae9e6fcaf4cf4de4f2095f3fec558da51df6.zip
ramips: add initial support for SamKnows SK-WB8
Signed-off-by: Andrew Yong <me@ndoo.sg>
Diffstat (limited to 'target/linux/ramips/base-files/etc')
-rwxr-xr-xtarget/linux/ramips/base-files/etc/board.d/01_leds1
-rwxr-xr-xtarget/linux/ramips/base-files/etc/board.d/02_network4
-rw-r--r--target/linux/ramips/base-files/etc/diag.sh1
-rwxr-xr-xtarget/linux/ramips/base-files/etc/init.d/bootcount11
4 files changed, 17 insertions, 0 deletions
diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds
index 47e1e6a6a3..f2dc8adb3a 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -46,6 +46,7 @@ all0239-3g|\
hw550-3g|\
mofi3500-3gn|\
sap-g3200u3|\
+sk-wb8|\
wf-2881)
set_usb_led "$board:green:usb"
;;
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
index e7826d48b0..985ce4b266 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -79,6 +79,7 @@ ramips_setup_interfaces()
pbr-m1|\
psg1208|\
sap-g3200u3|\
+ sk-wb8|\
wf-2881|\
whr-300hp2|\
whr-600d|\
@@ -307,6 +308,9 @@ ramips_setup_macs()
lan_mac=$(macaddr_setbit_la "$lan_mac")
wan_mac=$(mtd_get_mac_binary factory 32772)
;;
+ sk-wb8)
+ wan_mac=$(mtd_get_mac_binary factory 57350)
+ ;;
tew-691gr)
lan_mac=$(cat /sys/class/net/eth0/address)
wan_mac=$(macaddr_add "$lan_mac" 3)
diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh
index c638d16a81..e432fa6a59 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -79,6 +79,7 @@ get_status_led() {
;;
awapn2403|\
dir-645|\
+ sk-wb8|\
wrh-300cr)
status_led="$board:green:wps"
;;
diff --git a/target/linux/ramips/base-files/etc/init.d/bootcount b/target/linux/ramips/base-files/etc/init.d/bootcount
new file mode 100755
index 0000000000..b93e3c96f1
--- /dev/null
+++ b/target/linux/ramips/base-files/etc/init.d/bootcount
@@ -0,0 +1,11 @@
+#!/bin/sh /etc/rc.common
+. /lib/ramips.sh
+
+START=99
+
+start() {
+ local board=$(ramips_board_name)
+ if [ $board = "sk-wb8" ]; then
+ fw_setenv bootcount 0
+ fi
+}