ucentral: development update

* update mdns daemon
* enable ssh on wan in the initial config
* add tplink cpe-710
* improve led blink behaviour

Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
John Crispin
2021-06-30 15:44:19 +02:00
parent 4d265de38a
commit 18f127f1d9
7 changed files with 387 additions and 26 deletions

View File

@@ -0,0 +1,30 @@
From e413c12b77acc0012a79e8981b553e35d4a2b20e Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Wed, 30 Jun 2021 14:21:23 +0200
Subject: [PATCH] umdns: update to latest HEAD
Signed-off-by: John Crispin <john@phrozen.org>
---
package/network/services/umdns/Makefile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/package/network/services/umdns/Makefile b/package/network/services/umdns/Makefile
index 9a5f46a705..908758e44b 100644
--- a/package/network/services/umdns/Makefile
+++ b/package/network/services/umdns/Makefile
@@ -12,9 +12,9 @@ PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE_URL=$(PROJECT_GIT)/project/mdnsd.git
PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2021-01-26
-PKG_SOURCE_VERSION:=78aa36b0e9808e801c527c6dc47320e593309522
-PKG_MIRROR_HASH:=241833f2bf2f3366f356703159be386862ef747d9b253af6c13555f252cc970d
+PKG_SOURCE_DATE:=2021-06-30
+PKG_SOURCE_VERSION:=4a8747193ab2b8f2d68a9d26334545e19d89cbe2
+PKG_MIRROR_HASH:=bdddec2793303e4cc1a90cb2ed2241c04fdd0a736b6c0cbbb1fab9de5527566a
PKG_MAINTAINER:=John Crispin <john@phrozen.org>
PKG_LICENSE:=LGPL-2.1
--
2.25.1

View File

@@ -13,6 +13,7 @@
{
"name": "WAN",
"role": "upstream",
"services": [ "ssh" ],
"ethernet": [
{
"select-ports": [

View File

@@ -4,5 +4,5 @@ timeout=$1
/etc/init.d/led blink
sleep $1
/etc/init.d/led restart
/etc/init.d/led normal
exit 0

View File

@@ -0,0 +1,303 @@
From 84b1c4894ff871686c4bd7152aca47a323857db6 Mon Sep 17 00:00:00 2001
From: Andrew Cameron <apcameron@softhome.net>
Date: Mon, 12 Apr 2021 13:24:33 -0500
Subject: [PATCH] ath79: add support for TP-Link CPE710-v1
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
TP-Link CPE710-v1 is an outdoor wireless CPE for 5 GHz with
one Ethernet port based on the AP152 reference board
Specifications:
- SoC: QCA9563-AL3A MIPS 74kc @ 775MHz, AHB @ 258MHz
- RAM: 128MiB DDR2 @ 650MHz
- Flash: 16MiB SPI NOR Based on the GD25Q128
- Wi-Fi 5Ghz: ath10k chip (802.11ac for up to 867Mbps on 5GHz wireless data rate) Based on the QCA9896
- Ethernet: one 1GbE port
- 23dBi high-gain directional 2×2 MIMO antenna and a dedicated metal reflector
- Power, LAN, WLAN5G Blue LEDs
- 3x Blue LEDs
Flashing instructions:
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 30-40 seconds and release.
Rename factory image to recovery.bin
Stock TFTP server IP:192.168.0.100
Stock device TFTP adress:192.168.0.254
Signed-off-by: Andrew Cameron <apcameron@softhome.net>
---
.../ath79/dts/qca9563_tplink_cpe710-v1.dts | 141 ++++++++++++++++++
.../generic/base-files/etc/board.d/01_leds | 3 +-
.../generic/base-files/etc/board.d/02_network | 1 +
.../etc/hotplug.d/firmware/11-ath10k-caldata | 6 +
target/linux/ath79/image/generic-tp-link.mk | 11 ++
tools/firmware-utils/src/tplink-safeloader.c | 37 +++++
6 files changed, 198 insertions(+), 1 deletion(-)
create mode 100644 target/linux/ath79/dts/qca9563_tplink_cpe710-v1.dts
diff --git a/target/linux/ath79/dts/qca9563_tplink_cpe710-v1.dts b/target/linux/ath79/dts/qca9563_tplink_cpe710-v1.dts
new file mode 100644
index 0000000000..830c3d30b8
--- /dev/null
+++ b/target/linux/ath79/dts/qca9563_tplink_cpe710-v1.dts
@@ -0,0 +1,141 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "qca956x.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ model = "TP-Link CPE710 v1";
+ compatible = "tplink,cpe710-v1", "qca,qca9563";
+
+ aliases {
+ label-mac-device = &eth0;
+ led-boot = &led_lan;
+ led-failsafe = &led_lan;
+ led-upgrade = &led_lan;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_lan: lan {
+ label = "blue:lan";
+ gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
+ };
+
+ wlan5g {
+ label = "blue:wlan5g";
+ gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "Reset button";
+ linux,code = <KEY_RESTART>;
+ gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
+ debounce-interval = <60>;
+ };
+ };
+};
+
+&pcie {
+ status = "okay";
+};
+
+&spi {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <40000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x000000 0x040000>;
+ read-only;
+ };
+
+ partition@40000 {
+ label = "u-boot-env";
+ reg = <0x040000 0x010000>;
+ };
+
+ partition@50000 {
+ label = "partition-table";
+ reg = <0x050000 0x010000>;
+ read-only;
+ };
+
+ info: partition@60000 {
+ label = "info";
+ reg = <0x060000 0x010000>;
+ read-only;
+ };
+
+ partition@70000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x070000 0xf50000>;
+ };
+
+ partition@fc0000 {
+ label = "config";
+ reg = <0xfc0000 0x030000>;
+ read-only;
+ };
+
+ art: partition@ff0000 {
+ label = "art";
+ reg = <0xff0000 0x010000>;
+ read-only;
+ };
+ };
+ };
+};
+
+&pinmux {
+ mdio_pins: mdio_pins {
+ /* GPIO 10 as MDIO(0x20), GPIO 8 as MDC(0x21) */
+ pinctrl-single,bits = <0x8 0x00200021 0x00ff00ff>;
+ };
+};
+
+&mdio0 {
+ status = "okay";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&mdio_pins>;
+
+ phy-mask = <0x10>;
+
+ phy4: ethernet-phy@4 {
+ reg = <4>;
+ reset-gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+ };
+};
+
+&eth0 {
+ status = "okay";
+
+ phy-handle = <&phy4>;
+ phy-mode = "sgmii";
+
+ mtd-mac-address = <&info 0x8>;
+
+ qca956x-serdes-fixup;
+
+ gmac-config {
+ device = <&gmac>;
+ };
+};
diff --git a/target/linux/ath79/generic/base-files/etc/board.d/01_leds b/target/linux/ath79/generic/base-files/etc/board.d/01_leds
index fae5ac7c92..5c7e39e48f 100755
--- a/target/linux/ath79/generic/base-files/etc/board.d/01_leds
+++ b/target/linux/ath79/generic/base-files/etc/board.d/01_leds
@@ -164,7 +164,8 @@ enterasys,ws-ap3705i|\
openmesh,mr900-v1|\
openmesh,mr900-v2|\
openmesh,mr1750-v1|\
-openmesh,mr1750-v2)
+openmesh,mr1750-v2|\
+tplink,cpe710-v1)
ucidef_set_led_netdev "lan" "LAN" "blue:lan" "eth0"
;;
compex,wpj344-16m|\
diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network
index f300077dba..4fe605dee7 100755
--- a/target/linux/ath79/generic/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network
@@ -63,6 +63,7 @@ ath79_setup_interfaces()
tplink,cpe510-v3|\
tplink,cpe610-v1|\
tplink,cpe610-v2|\
+ tplink,cpe710-v1|\
tplink,eap225-outdoor-v1|\
tplink,eap225-v3|\
tplink,eap245-v1|\
diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index 94afc9c726..fc110af75c 100644
--- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -228,6 +228,12 @@ case "$FIRMWARE" in
ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \
/lib/firmware/ath10k/QCA9888/hw2.0/board.bin
;;
+ tplink,cpe710-v1)
+ caldata_extract "art" 0x5000 0x2f20
+ ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary info 0x8) )
+ ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \
+ /lib/firmware/ath10k/QCA9888/hw2.0/board.bin
+ ;;
tplink,eap225-outdoor-v1|\
tplink,eap225-v3|\
tplink,eap225-wall-v2|\
diff --git a/target/linux/ath79/image/generic-tp-link.mk b/target/linux/ath79/image/generic-tp-link.mk
index 0058d74f77..e8c081eab1 100644
--- a/target/linux/ath79/image/generic-tp-link.mk
+++ b/target/linux/ath79/image/generic-tp-link.mk
@@ -362,6 +362,17 @@ define Device/tplink_cpe610-v2
endef
TARGET_DEVICES += tplink_cpe610-v2
+define Device/tplink_cpe710-v1
+ $(Device/tplink-safeloader-uimage)
+ SOC := qca9563
+ IMAGE_SIZE := 15680k
+ DEVICE_MODEL := CPE710
+ DEVICE_VARIANT := v1
+ DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9888-ct
+ TPLINK_BOARD_ID := CPE710V1
+endef
+TARGET_DEVICES += tplink_cpe710-v1
+
define Device/tplink-eap2x5
$(Device/tplink-safeloader)
LOADER_TYPE := elf
diff --git a/tools/firmware-utils/src/tplink-safeloader.c b/tools/firmware-utils/src/tplink-safeloader.c
index 2bc4a3cb82..2bba417dfc 100644
--- a/tools/firmware-utils/src/tplink-safeloader.c
+++ b/tools/firmware-utils/src/tplink-safeloader.c
@@ -537,6 +537,43 @@ static struct device_info boards[] = {
.first_sysupgrade_partition = "os-image",
.last_sysupgrade_partition = "support-list",
},
+ /** Firmware layout for the CPE710 V1 */
+ {
+ .id = "CPE710V1",
+ .vendor = "CPE710(TP-LINK|UN|AC866-5|00000000):1.0\r\n",
+ .support_list =
+ "SupportList:\r\n"
+ "CPE710(TP-LINK|UN|AC866-5|00000000):1.0\r\n"
+ "CPE710(TP-LINK|EU|AC866-5|45550000):1.0\r\n"
+ "CPE710(TP-LINK|US|AC866-5|55530000):1.0\r\n"
+ "CPE710(TP-LINK|UN|AC866-5):1.0\r\n"
+ "CPE710(TP-LINK|EU|AC866-5):1.0\r\n"
+ "CPE710(TP-LINK|US|AC866-5):1.0\r\n",
+ .part_trail = 0xff,
+ .soft_ver = NULL,
+
+ .partitions = {
+ {"fs-uboot", 0x00000, 0x50000},
+ {"partition-table", 0x50000, 0x02000},
+ {"default-mac", 0x60000, 0x00020},
+ {"serial-number", 0x60100, 0x00020},
+ {"product-info", 0x61100, 0x00100},
+ {"device-info", 0x61400, 0x00400},
+ {"signature", 0x62000, 0x00400},
+ {"device-id", 0x63000, 0x00100},
+ {"firmware", 0x70000, 0xf40000},
+ {"soft-version", 0xfb0000, 0x00100},
+ {"support-list", 0xfb1000, 0x01000},
+ {"user-config", 0xfc0000, 0x10000},
+ {"default-config", 0xfd0000, 0x10000},
+ {"log", 0xfe0000, 0x10000},
+ {"radio", 0xff0000, 0x10000},
+ {NULL, 0, 0}
+ },
+
+ .first_sysupgrade_partition = "os-image",
+ .last_sysupgrade_partition = "support-list",
+ },
{
.id = "WBS210",
--
2.25.1

View File

@@ -1,28 +1,29 @@
From d459f53ff9608c47fbf0b634fa4380bce1099d49 Mon Sep 17 00:00:00 2001
From 5da505e5f59e93a8a6e928ad6c09a076f9889af1 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Mon, 19 Apr 2021 13:49:20 +0200
Subject: [PATCH 31/36] base-files: add a turnoff command to the led script
Subject: [PATCH 01/10] base-files: add a turnoff command to the led script
Signed-off-by: John Crispin <john@phrozen.org>
---
package/base-files/files/etc/init.d/led | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
package/base-files/files/etc/init.d/led | 29 +++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/package/base-files/files/etc/init.d/led b/package/base-files/files/etc/init.d/led
index 8d97515d52..3221c8c44c 100755
index 8d97515d52..c402428e40 100755
--- a/package/base-files/files/etc/init.d/led
+++ b/package/base-files/files/etc/init.d/led
@@ -3,6 +3,9 @@
@@ -3,6 +3,10 @@
START=96
+extra_command "turnoff" "Turn all leds off"
+extra_command "blink" "Blink all leds"
+extra_command "turnon" "Put the LEDs into their default state"
+extra_command "turnoff" "Turn all LEDs off"
+extra_command "blink" "Blink all LEDs"
+
load_led() {
local name
local sysfs
@@ -122,7 +125,25 @@ load_led() {
@@ -122,7 +126,32 @@ load_led() {
}
}
@@ -33,6 +34,13 @@ index 8d97515d52..3221c8c44c 100755
+ done
+}
+
+turnon() {
+ turnoff
+ . /etc/diag.sh
+ set_state done
+ start
+}
+
+blink() {
+ for led in `ls /sys/class/leds/`; do
+ echo 0 > /sys/class/leds/$led/brightness
@@ -41,21 +49,13 @@ index 8d97515d52..3221c8c44c 100755
+}
+
start() {
+ [ "$(uci get system.@system[-1].leds_off)" -eq 1 ] && {
+ [ "$(uci -q get system.@system[-1].leds_off)" = '1' ] && {
+ turnoff
+ exit 0
+ }
[ -e /sys/class/leds/ ] && {
[ -s /var/run/led.state ] && {
local led trigger brightness
@@ -138,5 +159,7 @@ start() {
config_load system
config_foreach load_led led
+ . /etc/diag.sh
+ set_state done
}
}
--
2.25.1

View File

@@ -1,16 +1,35 @@
From bc6e353902d5fc17c3fcb194d43cb29ed2f6d6ec Mon Sep 17 00:00:00 2001
From 6d0385f31cc4f19df8fc51b56bb08af7c9c0922a Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Sun, 23 May 2021 09:59:53 +0200
Subject: [PATCH] certificates: add ability to persistently store certificates
Subject: [PATCH 07/11] certificates: add ability to persistently store
certificates
Signed-off-by: John Crispin <john@phrozen.org>
---
package/base-files/files/lib/upgrade/nand.sh | 9 +++++++++
.../files/arch/arm/boot/dts/qcom-ipq4019-xx8300.dtsi | 3 +--
.../linux/ramips/dts/mt7628an_tplink_8m-split-uboot.dtsi | 7 ++++++-
.../linux/realtek/dts/rtl8392_edgecore_ecs4100-12ph.dts | 8 ++++++--
4 files changed, 22 insertions(+), 5 deletions(-)
target/linux/ath79/dts/qca9563_tplink_cpe710-v1.dts | 7 ++++++-
.../files/arch/arm/boot/dts/qcom-ipq4019-xx8300.dtsi | 3 +--
.../linux/ramips/dts/mt7628an_tplink_8m-split-uboot.dtsi | 7 ++++++-
.../linux/realtek/dts/rtl8392_edgecore_ecs4100-12ph.dts | 8 ++++++--
4 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/target/linux/ath79/dts/qca9563_tplink_cpe710-v1.dts b/target/linux/ath79/dts/qca9563_tplink_cpe710-v1.dts
index 830c3d30b8..71c6381f86 100644
--- a/target/linux/ath79/dts/qca9563_tplink_cpe710-v1.dts
+++ b/target/linux/ath79/dts/qca9563_tplink_cpe710-v1.dts
@@ -86,7 +86,12 @@
partition@70000 {
compatible = "denx,uimage";
label = "firmware";
- reg = <0x070000 0xf50000>;
+ reg = <0x070000 0xf40000>;
+ };
+
+ partition@fb0000 {
+ label = "certificates";
+ reg = <0xfb0000 0x10000>;
};
partition@fc0000 {
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-xx8300.dtsi b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-xx8300.dtsi
index 8f971e505c..0f1f083a5b 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-xx8300.dtsi

View File

@@ -0,0 +1,8 @@
---
profile: tplink_cpe710-v1
target: ath79
subtarget: generic
description: Build image for the TPLink CPE 710 v1
image: bin/targets/ath79/generic/openwrt-ath79-generic-tplink_cpe710-v1-squashfs-sysupgrade.bin
include:
- ucentral-ap