From 8375623a064037bbdd914bd9e7529eefa7172560 Mon Sep 17 00:00:00 2001 From: Franz Flasch Date: Thu, 17 May 2018 11:57:00 +0200 Subject: ramips: add support for TP-Link Archer C2 Specification: - System-On-Chip: MT7620A - CPU/Speed: 580 MHz - Flash-Chip: Winbond 25Q64BVSIG - Flash size: 8192 KiB - RAM: 64 MiB - Wireless No1: SoC-integrated: MT7620A 2.4GHz 802.11bgn - Wireless No2: On-board chip: MT7610EN 5GHz 802.11ac - Switch: RTL8367RB Gigabit Switch - USB: Yes 1 x 2.0 Preparing a TFTP recovery image for initial flashing: Currently the only method to install openwrt for the first time is via TFTP download in u-boot. After first install you can use regular updates. WARNING: This method also overwrites the bootloader partition! Create a TFTP recovery image: 1) Download a stock TP-Link Firmware file here: https://www.tp-link.com/en/download/Archer-C2_V1.html#Firmware 2) Extract u-boot from the binary file: #> dd if=c2v1_stock_firmware.bin of=c2v1_uboot.bin bs=1 skip=512 count=131072 3) Now merge the sysupgrade image and the u-boot into one binary: #> cat c2v1_uboot.bin openwrt-squashfs-sysupgrade.bin > ArcherC2V1_tp_recovery.bin The resulting image can be flashed via TFTP recovery mode. Flash instructions: 1) To flash the recovery image, start a TFTP server from IP address 192.168.0.66 and serve the recovery image named ArcherC2V1_tp_recovery.bin. 2) Connect your device to the LAN port, then press the WPS/Reset button and power it up. Keep pressing the WPS/Reset button for 10 seconds. It will try to download the recovery image and flash it. It can take up to 20-25 minutes to finish. When it reaches 100%, the router will reboot itself. Signed-off-by: Serge Vasilugin Signed-off-by: Franz Flasch --- target/linux/ramips/base-files/etc/board.d/01_leds | 6 ++++++ target/linux/ramips/base-files/etc/board.d/02_network | 4 ++++ target/linux/ramips/base-files/etc/diag.sh | 1 + 3 files changed, 11 insertions(+) (limited to 'target/linux/ramips/base-files/etc') 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 54504c6ee8..9ed834eb5b 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -398,6 +398,12 @@ tl-wr841n-v13) ucidef_set_led_switch "lan4" "lan4" "$boardname:green:lan4" "switch0" "0x10" ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x01" ;; +tplink,c2-v1) + ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch1" "0x1e" + ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch1" "0x01" + set_usb_led "$boardname:green:usb" "2-1" + set_wifi_led "$boardname:green:wlan" + ;; tplink,c20-v1) ucidef_set_led_switch "lan" "lan" "$boardname:blue:lan" "switch0" "0x1e" ucidef_set_led_switch "wan" "wan" "$boardname: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 d2c15f8f46..c5e5549e25 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -335,6 +335,10 @@ ramips_setup_interfaces() ucidef_add_switch "switch0" \ "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "0@eth0" ;; + tplink,c2-v1) + ucidef_add_switch "switch1" \ + "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "6@eth0" + ;; tplink,tl-wr902ac-v3) ucidef_add_switch "switch0" \ "4:lan" "6@eth0" diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index 2f51add331..dd7a646a04 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|\ + tplink,c2-v1|\ wrh-300cr) status_led="$boardname:green:wps" ;; -- cgit v1.2.3