aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/base-files/etc
diff options
context:
space:
mode:
authorPavel Kubelun <be.dissent@gmail.com>2017-08-12 17:56:11 +0300
committerJohn Crispin <john@phrozen.org>2017-08-23 14:59:12 +0200
commit6e283cdc0da25928f8148805ebef7f8f2b769ee8 (patch)
tree532335271e41ba1cd18ca931c2ed5b865d11554d /target/linux/ramips/base-files/etc
parent4fce22e88f21733b62c30de65eec94bc8630cba5 (diff)
downloadupstream-6e283cdc0da25928f8148805ebef7f8f2b769ee8.tar.gz
upstream-6e283cdc0da25928f8148805ebef7f8f2b769ee8.tar.bz2
upstream-6e283cdc0da25928f8148805ebef7f8f2b769ee8.zip
ramips: add Xiaomi Mi Router 3G support
This commit adds support for Xiaomi Mi WiFi Router 3G. Short specification: - MT7621AT + MT7603EN + 7612EN - 256MB DDR3 RAM - 128MB NAND flash - 1+2 x 1000M Ethernet - 1x USB 3.0 port - reset button - yellow, blue, red leds Installation through telnet/ssh: - copy lede-ramips-mt7621-mir3g-squashfs-kernel1.bin and lede-ramips-mt7621-mir3g-squashfs-rootfs0.bin to usb disk or wget it from LEDE download site to /tmp - switch to /extdisks/sda1/ (if copied to USB drive) or to /tmp if wgetted from LEDE download site - run: mtd write lede-ramips-mt7621-mir3g-squashfs-kernel1.bin kernel1 - run: mtd write lede-ramips-mt7621-mir3g-squashfs-rootfs0.bin rootfs0 - run: mtd erase kernel0 - run: reboot Originally stock firmware has following partitions: - ... - kernel0 (primary kernel image) - kernel1 (secondary kernel image, used by u-boot in failsafe routine) - rootfs0 (primary rootfs) - rootfs1 (secondary rootfs in case primary fails) - overlay (used as ubi overlay) This commit squashes rootfs0, rootfs1 and overlay partitions into 1, so it can be used by LEDE fully for package installation, resulting in 117,5MiB. This device lacks hw watchdog, so adding softdog instead (stock does the same). Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
Diffstat (limited to 'target/linux/ramips/base-files/etc')
-rw-r--r--target/linux/ramips/base-files/etc/board.d/01_leds4
-rwxr-xr-xtarget/linux/ramips/base-files/etc/board.d/02_network7
-rw-r--r--target/linux/ramips/base-files/etc/diag.sh3
3 files changed, 14 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 a2d5c2e7de..ff5d156f2c 100644
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -242,6 +242,10 @@ miniembplug)
set_wifi_led "$board:red:wlan"
set_usb_led "$board:green:mobile"
;;
+mir3g)
+ ucidef_set_led_netdev "eth" "Ethernet" "$board:red:wan" "eth0"
+ set_usb_led "$board:blue:usb"
+ ;;
miwifi-mini)
ucidef_set_led_default "power" "power" "$board:red:status" "1"
;;
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 2f001134a2..df70a8b2ec 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -122,6 +122,10 @@ ramips_setup_interfaces()
ucidef_add_switch "switch0" \
"0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0"
;;
+ mir3g)
+ ucidef_add_switch "switch0" \
+ "1:wan" "2:lan:2" "3:lan:1" "6@eth0"
+ ;;
psg1218b)
ucidef_add_switch "switch0" \
"0:lan:3" "1:lan:2" "2:lan:1" "3:wan" "6@eth0"
@@ -421,6 +425,9 @@ ramips_setup_macs()
lan_mac=$(mtd_get_mac_binary factory_info 13)
wan_mac=$(macaddr_add "$lan_mac" 1)
;;
+ mir3g)
+ lan_mac=$(mtd_get_mac_binary Factory e006)
+ ;;
miwifi-mini)
wan_mac=$(cat /sys/class/net/eth0/address)
lan_mac=$(macaddr_setbit_la "$wan_mac")
diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh
index 5278830eb7..960e189283 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -177,6 +177,9 @@ get_status_led() {
m4-8M)
status_led="m4:blue:status"
;;
+ mir3g)
+ status_led="$board:yellow:status"
+ ;;
miwifi-mini|\
zte-q7)
status_led="$board:red:status"