[PATCH v2 2/2] ramips/mt76x8: Add support for TP-Link Archer C50 v4

Adrian Schmutzler freifunk at adrianschmutzler.de
Di Dez 8 20:27:05 CET 2020


Add support for the TP-Link Archer C50 v4, a low-cost mt7628-based
dual-band router.

Label MAC address is on ethernet and 2.4 GHz WiFi.

The v4 uses the same hardware as the v3 variant, but v4 includes
the newer split uboot.

ATTENTION:

Initial flashing of this device requires additional steps:

As all installation methods require an U-Boot to be integrated into the
image (and we do not ship one with the image) we are not able to create
an image in our build-process.

Download a TP-Link image from their Website and a FFF/OpenWRT sysupgrade
image for the device and build yourself a factory image like following:

TP-Link image:             tpl.bin
OpenWRT sysupgrade image:  owrt.bin

 > dd if=tpl.bin of=boot.bin bs=131584 count=1
 > cat owrt.bin >> boot.bin

This image can be used for Web-UI and recovery, but not TFTP.

Additional instruction can be found in the OpenWrt commit
01dcd574a248 ("ramips: add support for Archer C50 v4")

Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
 bsp/ramips-mt76x8.bsp                                |  1 +
 bsp/ramips-mt76x8/.config                            |  2 ++
 src/packages/fff/fff-network/Makefile                |  2 +-
 .../fff/fff-network/files/lib/functions/fff/cpuport  |  1 +
 .../fff/fff-network/mipsel/network.tplink,c50-v4     | 12 ++++++++++++
 5 files changed, 17 insertions(+), 1 deletion(-)
 create mode 100644 src/packages/fff/fff-network/mipsel/network.tplink,c50-v4

diff --git a/bsp/ramips-mt76x8.bsp b/bsp/ramips-mt76x8.bsp
index 81cf9d29..8c665f08 100644
--- a/bsp/ramips-mt76x8.bsp
+++ b/bsp/ramips-mt76x8.bsp
@@ -1,5 +1,6 @@
 chipset=ramips
 subtarget=mt76x8
 images=("openwrt-${chipset}-${subtarget}-tplink_c50-v3-squashfs-*"
+        "openwrt-${chipset}-${subtarget}-tplink_c50-v4-squashfs-*"
         "openwrt-${chipset}-${subtarget}-tl-wr841n-v13-squashfs-*"
         )
diff --git a/bsp/ramips-mt76x8/.config b/bsp/ramips-mt76x8/.config
index c908b983..69b68b65 100644
--- a/bsp/ramips-mt76x8/.config
+++ b/bsp/ramips-mt76x8/.config
@@ -6,6 +6,8 @@ CONFIG_TARGET_ramips_mt76x8=y
 CONFIG_TARGET_MULTI_PROFILE=y
 CONFIG_TARGET_DEVICE_ramips_mt76x8_DEVICE_tplink_c50-v3=y
 CONFIG_TARGET_DEVICE_PACKAGES_ramips_mt76x8_DEVICE_tplink_c50-v3=""
+CONFIG_TARGET_DEVICE_ramips_mt76x8_DEVICE_tplink_c50-v4=y
+CONFIG_TARGET_DEVICE_PACKAGES_ramips_mt76x8_DEVICE_tplink_c50-v4=""
 CONFIG_TARGET_DEVICE_ramips_mt76x8_DEVICE_tl-wr841n-v13=y
 CONFIG_TARGET_DEVICE_PACKAGES_ramips_mt76x8_DEVICE_tl-wr841n-v13=""
 CONFIG_BUSYBOX_CUSTOM=y
diff --git a/src/packages/fff/fff-network/Makefile b/src/packages/fff/fff-network/Makefile
index e1b603b5..b2b8609d 100644
--- a/src/packages/fff/fff-network/Makefile
+++ b/src/packages/fff/fff-network/Makefile
@@ -1,7 +1,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=fff-network
-PKG_RELEASE:=24
+PKG_RELEASE:=25
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
 
diff --git a/src/packages/fff/fff-network/files/lib/functions/fff/cpuport b/src/packages/fff/fff-network/files/lib/functions/fff/cpuport
index 27558a85..39cccc9c 100644
--- a/src/packages/fff/fff-network/files/lib/functions/fff/cpuport
+++ b/src/packages/fff/fff-network/files/lib/functions/fff/cpuport
@@ -8,6 +8,7 @@ case "$BOARD" in
 		CPUPORT="5t"
 		;;
 	tplink,c50-v3|\
+	tplink,c50-v4|\
 	tplink,tl-wr1043nd-v2|\
 	tplink,tl-wr1043nd-v3|\
 	tl-wr841n-v13|\
diff --git a/src/packages/fff/fff-network/mipsel/network.tplink,c50-v4 b/src/packages/fff/fff-network/mipsel/network.tplink,c50-v4
new file mode 100644
index 00000000..caac8bf5
--- /dev/null
+++ b/src/packages/fff/fff-network/mipsel/network.tplink,c50-v4
@@ -0,0 +1,12 @@
+. /lib/functions/fff/network
+
+PORTORDER="0 1 2 3 4"
+
+WANDEV=eth0
+SWITCHDEV=eth0
+CLIENT_PORTS="6t 3 4"
+WAN_PORTS="6t 0"
+BATMAN_PORTS="6t 1 2"
+
+ROUTERMAC=$(cat /sys/class/net/eth0/address)
+ETHMESHMAC=$(macFlipLocalBit "$(cat /sys/class/net/eth0/address)")
-- 
2.20.1



Mehr Informationen über die Mailingliste franken-dev