forked from freifunk-franken/firmware
Add support for TP-Link CPE210 v3
This device is still in PR state in OpenWrt, since ar71xx target is deprecated and thus lacking reviewers. It worked nicely for me anyway, so I include the current state of the PR (has not changed for months). Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Reviewed-by: Christian Dresel <fff@chrisi01.de>
This commit is contained in:
parent
8f322c253a
commit
3ab75a084b
|
@ -14,6 +14,8 @@ CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_cpe210-220-v1=y
|
||||||
CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_tiny_DEVICE_cpe210-220-v1=""
|
CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_tiny_DEVICE_cpe210-220-v1=""
|
||||||
CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_cpe210-v2=y
|
CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_cpe210-v2=y
|
||||||
CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_tiny_DEVICE_cpe210-v2=""
|
CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_tiny_DEVICE_cpe210-v2=""
|
||||||
|
CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_cpe210-v3=y
|
||||||
|
CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_tiny_DEVICE_cpe210-v3=""
|
||||||
CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_cpe510-520-v1=y
|
CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_cpe510-520-v1=y
|
||||||
CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_tiny_DEVICE_cpe510-520-v1=""
|
CONFIG_TARGET_DEVICE_PACKAGES_ar71xx_tiny_DEVICE_cpe510-520-v1=""
|
||||||
CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_gl-ar150=y
|
CONFIG_TARGET_DEVICE_ar71xx_tiny_DEVICE_gl-ar150=y
|
||||||
|
|
|
@ -7,6 +7,7 @@ images=("openwrt-${chipset}-${subtarget}-archer-c25-v1-squashfs-sysupgrade.bin"
|
||||||
"openwrt-${chipset}-${subtarget}-archer-c7-v2-squashfs-sysupgrade.bin"
|
"openwrt-${chipset}-${subtarget}-archer-c7-v2-squashfs-sysupgrade.bin"
|
||||||
"openwrt-${chipset}-${subtarget}-cpe210-220-v1-squashfs-sysupgrade.bin"
|
"openwrt-${chipset}-${subtarget}-cpe210-220-v1-squashfs-sysupgrade.bin"
|
||||||
"openwrt-${chipset}-${subtarget}-cpe210-v2-squashfs-sysupgrade.bin"
|
"openwrt-${chipset}-${subtarget}-cpe210-v2-squashfs-sysupgrade.bin"
|
||||||
|
"openwrt-${chipset}-${subtarget}-cpe210-v3-squashfs-sysupgrade.bin"
|
||||||
"openwrt-${chipset}-${subtarget}-cpe510-520-v1-squashfs-sysupgrade.bin"
|
"openwrt-${chipset}-${subtarget}-cpe510-520-v1-squashfs-sysupgrade.bin"
|
||||||
"openwrt-${chipset}-${subtarget}-gl-ar150-squashfs-sysupgrade.bin"
|
"openwrt-${chipset}-${subtarget}-gl-ar150-squashfs-sysupgrade.bin"
|
||||||
"openwrt-${chipset}-${subtarget}-tl-mr3020-v1-squashfs-sysupgrade.bin"
|
"openwrt-${chipset}-${subtarget}-tl-mr3020-v1-squashfs-sysupgrade.bin"
|
||||||
|
|
|
@ -0,0 +1,42 @@
|
||||||
|
From 76c420d218b666e7b4415ca2186e3c2ce9d5d358 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Adrian Schmutzler <freifunk@adrianschmutzler.de>
|
||||||
|
Date: Wed, 10 Oct 2018 20:05:53 +0200
|
||||||
|
Subject: [PATCH 1/2] firmware-utils: tplink-safeloader: Add CPE210 v3
|
||||||
|
|
||||||
|
Add TP-Link CPE210 v3 to the support list.
|
||||||
|
It's identical to the v2.
|
||||||
|
|
||||||
|
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||||
|
---
|
||||||
|
tools/firmware-utils/src/tplink-safeloader.c | 8 ++++++--
|
||||||
|
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tools/firmware-utils/src/tplink-safeloader.c b/tools/firmware-utils/src/tplink-safeloader.c
|
||||||
|
index b2cc96b..8164c1c 100644
|
||||||
|
--- a/tools/firmware-utils/src/tplink-safeloader.c
|
||||||
|
+++ b/tools/firmware-utils/src/tplink-safeloader.c
|
||||||
|
@@ -155,7 +155,7 @@ static struct device_info boards[] = {
|
||||||
|
.last_sysupgrade_partition = "support-list",
|
||||||
|
},
|
||||||
|
|
||||||
|
- /** Firmware layout for the CPE210 V2 */
|
||||||
|
+ /** Firmware layout for the CPE210 V2 and V3 */
|
||||||
|
{
|
||||||
|
.id = "CPE210V2",
|
||||||
|
.vendor = "CPE210(TP-LINK|UN|N300-2|00000000):2.0\r\n",
|
||||||
|
@@ -170,7 +170,11 @@ static struct device_info boards[] = {
|
||||||
|
"CPE210(TP-LINK|US|N300-2|55530000):2.0\r\n"
|
||||||
|
"CPE210(TP-LINK|UN|N300-2):2.0\r\n"
|
||||||
|
"CPE210(TP-LINK|EU|N300-2):2.0\r\n"
|
||||||
|
- "CPE210(TP-LINK|US|N300-2):2.0\r\n",
|
||||||
|
+ "CPE210(TP-LINK|US|N300-2):2.0\r\n"
|
||||||
|
+ "CPE210(TP-LINK|EU|N300-2|45550000):3.0\r\n"
|
||||||
|
+ "CPE210(TP-LINK|UN|N300-2|00000000):3.0\r\n"
|
||||||
|
+ "CPE210(TP-LINK|UN|N300-2):3.0\r\n"
|
||||||
|
+ "CPE210(TP-LINK|EU|N300-2):3.0\r\n",
|
||||||
|
.support_trail = '\xff',
|
||||||
|
.soft_ver = NULL,
|
||||||
|
|
||||||
|
--
|
||||||
|
2.7.4
|
||||||
|
|
|
@ -0,0 +1,146 @@
|
||||||
|
From 8b4c513b3a3515bde608aa5d465ed6eac201eb24 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Adrian Schmutzler <freifunk@adrianschmutzler.de>
|
||||||
|
Date: Wed, 10 Oct 2018 20:13:09 +0200
|
||||||
|
Subject: [PATCH 2/2] ar71xx: Add support for TP-Link CPE210 v3
|
||||||
|
|
||||||
|
Looks identical to the v2
|
||||||
|
|
||||||
|
This PR adds support for a popular low-cost 2.4GHz N based AP
|
||||||
|
|
||||||
|
Specifications:
|
||||||
|
- SoC: Qualcomm Atheros QCA9533 (650MHz)
|
||||||
|
- RAM: 64MB
|
||||||
|
- Storage: 8 MB SPI NOR
|
||||||
|
- Wireless: 2.4GHz N based built into SoC 2x2
|
||||||
|
- Ethernet: 1x 100/10 Mbps, integrated into SoC, 24V POE IN
|
||||||
|
|
||||||
|
Installation:
|
||||||
|
Flash factory image through stock firmware WEB UI or
|
||||||
|
through TFTP
|
||||||
|
To get to TFTP recovery just hold reset button while
|
||||||
|
powering on for around 4-5 seconds and release.
|
||||||
|
Rename factory image to recovery.bin
|
||||||
|
Stock TFTP server IP:192.168.0.100
|
||||||
|
Stock device TFTP address:192.168.0.254
|
||||||
|
|
||||||
|
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||||
|
---
|
||||||
|
target/linux/ar71xx/base-files/etc/board.d/01_leds | 4 +++-
|
||||||
|
target/linux/ar71xx/base-files/etc/board.d/02_network | 1 +
|
||||||
|
target/linux/ar71xx/base-files/lib/ar71xx.sh | 4 ++++
|
||||||
|
target/linux/ar71xx/base-files/lib/upgrade/platform.sh | 3 ++-
|
||||||
|
target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c | 3 +++
|
||||||
|
target/linux/ar71xx/files/arch/mips/ath79/machtypes.h | 1 +
|
||||||
|
target/linux/ar71xx/image/generic-tp-link.mk | 7 +++++++
|
||||||
|
7 files changed, 21 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds b/target/linux/ar71xx/base-files/etc/board.d/01_leds
|
||||||
|
index 858d675..25e2343 100755
|
||||||
|
--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
|
||||||
|
+++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
|
||||||
|
@@ -237,6 +237,7 @@ cf-e530n)
|
||||||
|
;;
|
||||||
|
cpe210|\
|
||||||
|
cpe210-v2|\
|
||||||
|
+cpe210-v3|\
|
||||||
|
cpe510|\
|
||||||
|
wbs210|\
|
||||||
|
wbs510)
|
||||||
|
@@ -247,7 +248,8 @@ wbs510)
|
||||||
|
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "tp-link:green:link4" "wlan0" "76" "100" "-75" "13"
|
||||||
|
|
||||||
|
case "$board" in
|
||||||
|
- cpe210-v2)
|
||||||
|
+ cpe210-v2|\
|
||||||
|
+ cpe210-v3)
|
||||||
|
ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan0" "eth0"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network
|
||||||
|
index b007636..f04ef27 100755
|
||||||
|
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
|
||||||
|
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
|
||||||
|
@@ -75,6 +75,7 @@ ar71xx_setup_interfaces()
|
||||||
|
cf-e380ac-v1|\
|
||||||
|
cf-e380ac-v2|\
|
||||||
|
cpe210-v2|\
|
||||||
|
+ cpe210-v3|\
|
||||||
|
dr342|\
|
||||||
|
eap120|\
|
||||||
|
eap300v2|\
|
||||||
|
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
|
||||||
|
index 3af2eee..c943e5c 100755
|
||||||
|
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
|
||||||
|
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
|
||||||
|
@@ -577,6 +577,10 @@ ar71xx_board_detect() {
|
||||||
|
name="cpe210-v2"
|
||||||
|
tplink_pharos_board_detect "$(tplink_pharos_v2_get_model_string)"
|
||||||
|
;;
|
||||||
|
+ *"CPE210 v3")
|
||||||
|
+ name="cpe210-v3"
|
||||||
|
+ tplink_pharos_board_detect "$(tplink_pharos_v2_get_model_string)"
|
||||||
|
+ ;;
|
||||||
|
*"CPE505N")
|
||||||
|
name="cpe505n"
|
||||||
|
;;
|
||||||
|
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
|
||||||
|
index ca1270b..a04dd74 100755
|
||||||
|
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
|
||||||
|
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
|
||||||
|
@@ -587,7 +587,8 @@ platform_check_image() {
|
||||||
|
tplink_pharos_check_image "$1" "7f454c46" "$(tplink_pharos_get_model_string)" '' && return 0
|
||||||
|
return 1
|
||||||
|
;;
|
||||||
|
- cpe210-v2)
|
||||||
|
+ cpe210-v2|\
|
||||||
|
+ cpe210-v3)
|
||||||
|
tplink_pharos_check_image "$1" "01000000" "$(tplink_pharos_v2_get_model_string)" '\0\xff\r' && return 0
|
||||||
|
return 1
|
||||||
|
;;
|
||||||
|
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c
|
||||||
|
index ceb1769..f25a69f 100644
|
||||||
|
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c
|
||||||
|
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c
|
||||||
|
@@ -236,6 +236,9 @@ MIPS_MACHINE(ATH79_MACH_CPE210, "CPE210", "TP-LINK CPE210/220",
|
||||||
|
MIPS_MACHINE(ATH79_MACH_CPE210_V2, "CPE210V2", "TP-LINK CPE210 v2",
|
||||||
|
cpe210_v2_setup);
|
||||||
|
|
||||||
|
+MIPS_MACHINE(ATH79_MACH_CPE210_V3, "CPE210V3", "TP-LINK CPE210 v3",
|
||||||
|
+ cpe210_v2_setup);
|
||||||
|
+
|
||||||
|
MIPS_MACHINE(ATH79_MACH_CPE510, "CPE510", "TP-LINK CPE510/520",
|
||||||
|
cpe510_setup);
|
||||||
|
|
||||||
|
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
|
||||||
|
index 390ec0b..f7621c4 100644
|
||||||
|
--- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
|
||||||
|
+++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
|
||||||
|
@@ -75,6 +75,7 @@ enum ath79_mach_type {
|
||||||
|
ATH79_MACH_CF_E530N, /* COMFAST CF-E530N */
|
||||||
|
ATH79_MACH_CPE210, /* TP-LINK CPE210 v1 */
|
||||||
|
ATH79_MACH_CPE210_V2, /* TP-LINK CPE210 v2 */
|
||||||
|
+ ATH79_MACH_CPE210_V3, /* TP-LINK CPE210 v3 */
|
||||||
|
ATH79_MACH_CPE505N, /* P&W CPE505N */
|
||||||
|
ATH79_MACH_CPE510, /* TP-LINK CPE510 */
|
||||||
|
ATH79_MACH_CPE830, /* YunCore CPE830 */
|
||||||
|
diff --git a/target/linux/ar71xx/image/generic-tp-link.mk b/target/linux/ar71xx/image/generic-tp-link.mk
|
||||||
|
index 502c88b..e5aca30 100644
|
||||||
|
--- a/target/linux/ar71xx/image/generic-tp-link.mk
|
||||||
|
+++ b/target/linux/ar71xx/image/generic-tp-link.mk
|
||||||
|
@@ -195,6 +195,13 @@ define Device/cpe210-v2
|
||||||
|
endef
|
||||||
|
TARGET_DEVICES += cpe210-v2
|
||||||
|
|
||||||
|
+define Device/cpe210-v3
|
||||||
|
+ $(Device/cpe210-v2)
|
||||||
|
+ DEVICE_TITLE := TP-LINK CPE210 v3
|
||||||
|
+ BOARDNAME := CPE210V3
|
||||||
|
+endef
|
||||||
|
+TARGET_DEVICES += cpe210-v3
|
||||||
|
+
|
||||||
|
define Device/wbs210-v1
|
||||||
|
$(Device/cpe510-520-v1)
|
||||||
|
DEVICE_TITLE := TP-LINK WBS210 v1
|
||||||
|
--
|
||||||
|
2.7.4
|
||||||
|
|
7
src/packages/fff/fff-network/ar71xx/network.cpe210-v3
Normal file
7
src/packages/fff/fff-network/ar71xx/network.cpe210-v3
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
WANDEV=eth0
|
||||||
|
SWITCHDEV=eth0
|
||||||
|
ONE_PORT="YES"
|
||||||
|
|
||||||
|
. /etc/network.mode
|
||||||
|
|
||||||
|
ROUTERMAC=$(cat /sys/class/ieee80211/phy0/macaddress)
|
2
src/packages/fff/fff-wireless/files/etc/wifi.cpe210-v3
Normal file
2
src/packages/fff/fff-wireless/files/etc/wifi.cpe210-v3
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
uci -q set system.rssid_wlan0.dev=radio0
|
||||||
|
uci -q commit system
|
Loading…
Reference in New Issue
Block a user