aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/base-files
diff options
context:
space:
mode:
authorKristian Evensen <kristian.evensen@gmail.com>2017-09-06 11:14:16 +0200
committerMathias Kresin <dev@kresin.me>2017-09-09 09:55:13 +0200
commit80829022b044d2109056b5e6e35bf16b9daf0719 (patch)
tree22567abd8984a91d5c4c8f47f660ddfbdf8ece90 /target/linux/ramips/base-files
parent096dff8fcdf4eeb0d94ea335b95a23b30f5d5f3d (diff)
downloadupstream-80829022b044d2109056b5e6e35bf16b9daf0719.tar.gz
upstream-80829022b044d2109056b5e6e35bf16b9daf0719.tar.bz2
upstream-80829022b044d2109056b5e6e35bf16b9daf0719.zip
ramips: add support for the HNET C108
The HNET C108 (http://www.szhwtech88.com/Product-product-cid-100-id-4374.html) is a mifi based on MT7602A, which has the following specifications: * CPU: MT7620A * 1x 10/100Mbps Ethernet. * 16 MB Flash. * 64 MB RAM. * 1x USB 2.0 port. Only power is connected, this port is meant for charging other devices. * 1x mini-PCIe slots. * 1x SIM slots. * 1x 2.4Ghz WIFI. * 1x button. * 6000 mAh battery. * 5x controllable LEDs. Works: * Wifi. * Switch. * mini-PCIe slot. Only tested with a USB device (a modem). * SIM slot. * Sysupgrade. * Button (reset). Not working (also applies to the factory firmware): * Wifi LED. It is always switched on, there is no relation to the up/down state or activity of the wireless interface. Not tested: * SD card reader. Notes: * The C108 has no dedicated status LED. I therefore set the LAN LED as status LED. Installation: The router comes pre-installed with OpenWRT, including a variant of Luci. The initial firmware install can be done through this UI, following normal procedure. I.e., access the UI and update the firmware using the sysupgrade-image. Remember to select that you do not want to keep existing settings. Recovery: If you brick the device, the C108 supports recovery using TFTP. Keep the reset button pressed for ~5sec when booting to trigger TFTP. Set the address of the network interface on your machine to 10.10.10.3/24, and rename your image file to Kernal.bin. Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
Diffstat (limited to 'target/linux/ramips/base-files')
-rwxr-xr-xtarget/linux/ramips/base-files/etc/board.d/01_leds4
-rwxr-xr-xtarget/linux/ramips/base-files/etc/board.d/02_network1
-rw-r--r--target/linux/ramips/base-files/etc/diag.sh3
-rwxr-xr-xtarget/linux/ramips/base-files/lib/ramips.sh3
-rwxr-xr-xtarget/linux/ramips/base-files/lib/upgrade/platform.sh1
5 files changed, 12 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 ff5d156f2c..83e1a94000 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -82,6 +82,10 @@ broadway)
set_usb_led "$board:red:diskmounted"
set_wifi_led "$board:red:wps_active"
;;
+c108)
+ ucidef_set_led_netdev "lan" "lan" "$board:green:lan" "eth0"
+ ucidef_set_led_netdev "modem" "modem" "$board:green:modem" "wwan0"
+ ;;
c20i)
ucidef_set_led_switch "lan" "lan" "$board:blue:lan" "switch0" "0x1e"
ucidef_set_led_switch "wan" "wan" "$board:blue:wan" "switch0" "0x01"
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 df70a8b2ec..9284b1812f 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -217,6 +217,7 @@ ramips_setup_interfaces()
ucidef_add_switch "switch0" \
"1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "9@eth0"
;;
+ c108|\
cf-wr800n)
ucidef_add_switch "switch0" \
"4:lan" "6t@eth0"
diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh
index 960e189283..75171673bb 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -103,6 +103,9 @@ get_status_led() {
wrh-300cr)
status_led="$board:green:wps"
;;
+ c108)
+ status_led="$board:green:lan"
+ ;;
cf-wr800n|\
psg1208)
status_led="$board:white:wps"
diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh
index fe66a87c2e..174e29e434 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -85,6 +85,9 @@ ramips_board_detect() {
*"Broadway")
name="broadway"
;;
+ *"C108")
+ name="c108"
+ ;;
*"C20i")
name="c20i"
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 3cb1d19a28..5cfca52ab1 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -29,6 +29,7 @@ platform_check_image() {
awm002-evb-8M|\
bc2|\
broadway|\
+ c108|\
carambola|\
cf-wr800n|\
cs-qr10|\