From 1e0bc1b4f3da53f629eb124f535ff22119e90cb0 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 11 Dec 2016 18:03:04 +0100 Subject: [PATCH] ar71xx-generic: update support list for CPE210/510/... Fixes #975 --- ...detection-for-TP-Link-Pharos-devices.patch | 40 +++++++++++++++++ ...r-update-support-list-for-CPE210-510.patch | 45 +++++++++++++++++++ 2 files changed, 85 insertions(+) create mode 100644 patches/openwrt/0083-ar71xx-simplify-model-detection-for-TP-Link-Pharos-devices.patch create mode 100644 patches/openwrt/0084-firmware-utils-tplink-safeloader-update-support-list-for-CPE210-510.patch diff --git a/patches/openwrt/0083-ar71xx-simplify-model-detection-for-TP-Link-Pharos-devices.patch b/patches/openwrt/0083-ar71xx-simplify-model-detection-for-TP-Link-Pharos-devices.patch new file mode 100644 index 00000000..ca7ef944 --- /dev/null +++ b/patches/openwrt/0083-ar71xx-simplify-model-detection-for-TP-Link-Pharos-devices.patch @@ -0,0 +1,40 @@ +From: Matthias Schiffer +Date: Sun, 11 Dec 2016 17:54:49 +0100 +Subject: ar71xx: simplify model detection for TP-Link Pharos devices + +This also makes the detection more flexible, as it doesn't need to check +for each model explicitly. + +Signed-off-by: Matthias Schiffer + +diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh +index 5928439..4a9a730 100755 +--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh ++++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh +@@ -329,24 +329,10 @@ tplink_pharos_get_model_string() { + tplink_pharos_board_detect() { + local model_string="$(tplink_pharos_get_model_string | tr -d '\r')" + local oIFS="$IFS"; IFS=":"; set -- $model_string; IFS="$oIFS" +- local model + +- case "$1" in +- 'CPE210(TP-LINK|UN|N300-2)') +- model='TP-Link CPE210' +- ;; +- 'CPE220(TP-LINK|UN|N300-2)') +- model='TP-Link CPE220' +- ;; +- 'CPE510(TP-LINK|UN|N300-5)') +- model='TP-Link CPE510' +- ;; +- 'CPE520(TP-LINK|UN|N300-5)') +- model='TP-Link CPE520' +- ;; +- esac ++ local model="${1%%\(*}" + +- [ -n "$model" ] && AR71XX_MODEL="$model v$2" ++ AR71XX_MODEL="TP-Link $model v$2" + } + + gl_inet_board_detect() { diff --git a/patches/openwrt/0084-firmware-utils-tplink-safeloader-update-support-list-for-CPE210-510.patch b/patches/openwrt/0084-firmware-utils-tplink-safeloader-update-support-list-for-CPE210-510.patch new file mode 100644 index 00000000..2949e2ee --- /dev/null +++ b/patches/openwrt/0084-firmware-utils-tplink-safeloader-update-support-list-for-CPE210-510.patch @@ -0,0 +1,45 @@ +From: Matthias Schiffer +Date: Sun, 11 Dec 2016 18:00:13 +0100 +Subject: firmware-utils: tplink-safeloader: update support list for CPE210/510/... + +Adds support for new EU and US variants, removes a few strings that were +never actually used and have been removed from the stock firmwares. + +Signed-off-by: Matthias Schiffer + +diff --git a/tools/firmware-utils/src/tplink-safeloader.c b/tools/firmware-utils/src/tplink-safeloader.c +index 4938f74..4a38dff 100644 +--- a/tools/firmware-utils/src/tplink-safeloader.c ++++ b/tools/firmware-utils/src/tplink-safeloader.c +@@ -169,8 +169,13 @@ static const char cpe210_support_list[] = + "SupportList:\r\n" + "CPE210(TP-LINK|UN|N300-2):1.0\r\n" + "CPE210(TP-LINK|UN|N300-2):1.1\r\n" +- "CPE220(TP-LINK|UN|N300-2):1.0\r\n" +- "CPE220(TP-LINK|UN|N300-2):1.1\r\n"; ++ "CPE210(TP-LINK|US|N300-2):1.1\r\n" ++ "CPE210(TP-LINK|EU|N300-2):1.1\r\n" ++ "CPE220(TP-LINK|UN|N300-2):1.1\r\n" ++ "CPE220(TP-LINK|US|N300-2):1.1\r\n" ++ "CPE220(TP-LINK|EU|N300-2):1.1\r\n" ++ ; ++ + /** + The support list for CPE210/220/510/520 + */ +@@ -178,8 +183,13 @@ static const char cpe510_support_list[] = + "SupportList:\r\n" + "CPE510(TP-LINK|UN|N300-5):1.0\r\n" + "CPE510(TP-LINK|UN|N300-5):1.1\r\n" +- "CPE520(TP-LINK|UN|N300-5):1.0\r\n" +- "CPE520(TP-LINK|UN|N300-5):1.1\r\n"; ++ "CPE510(TP-LINK|UN|N300-5):1.1\r\n" ++ "CPE510(TP-LINK|US|N300-5):1.1\r\n" ++ "CPE510(TP-LINK|EU|N300-5):1.1\r\n" ++ "CPE520(TP-LINK|UN|N300-5):1.1\r\n" ++ "CPE520(TP-LINK|US|N300-5):1.1\r\n" ++ "CPE520(TP-LINK|EU|N300-5):1.1\r\n" ++ ; + + /** + The support list for C2600