ramips/mt76x8: Add support for TP-Link Archer C50 v3

This adds support for the TP-Link Archer C50 v3 and adds the
necessary mt76x8 (sub-)target to our firmare.

Flashing instructions:

The image can only be flashed via TFTP, not via WebUI.

1. Configure PC with static IP 192.168.0.66/24 and tftp server.
2. Rename "...-tftp-recovery.bin" to "tp_recovery.bin" and place it
   in tftp server directory.
3. Connect PC with one of LAN ports, press the reset button, power up
   the router and keep button pressed for around 6-7 seconds, until
   device starts downloading the file.
4. Router will download file from server, write it to flash and reboot.

ref: 14951e8f8e

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[extend commit title and add commit message, rebase]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This commit is contained in:
Fabian Bläse 2020-04-14 16:48:30 +02:00 committed by Adrian Schmutzler
parent 157ddf2bc9
commit d165915178
3 changed files with 42 additions and 0 deletions

5
bsp/board_mt76x8.bsp Normal file
View File

@ -0,0 +1,5 @@
machine=mt76x8
chipset=ramips
subtarget=mt76x8
images=("openwrt-${chipset}-${subtarget}-tplink_c50-v3-squashfs-*"
)

27
bsp/mt76x8/.config Normal file
View File

@ -0,0 +1,27 @@
# Generated using "./buildscript config openwrt".
# Do no edit manually
#
CONFIG_TARGET_ramips=y
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_BUSYBOX_CUSTOM=y
CONFIG_TARGET_PER_DEVICE_ROOTFS=y
# CONFIG_BUSYBOX_CONFIG_BRCTL is not set
# CONFIG_BUSYBOX_CONFIG_CROND is not set
# CONFIG_BUSYBOX_CONFIG_CRONTAB is not set
# CONFIG_BUSYBOX_CONFIG_FEATURE_FAST_TOP is not set
# CONFIG_BUSYBOX_CONFIG_FEATURE_NTPD_SERVER is not set
CONFIG_CLEAN_IPKG=y
# CONFIG_DROPBEAR_CURVE25519 is not set
# CONFIG_FASTD_ENABLE_CIPHER_SALSA2012 is not set
# CONFIG_FASTD_ENABLE_MAC_GHASH is not set
# CONFIG_FASTD_ENABLE_MAC_UHASH is not set
# CONFIG_FASTD_ENABLE_METHOD_COMPOSED_GMAC is not set
# CONFIG_FASTD_ENABLE_METHOD_COMPOSED_UMAC is not set
# CONFIG_FASTD_ENABLE_METHOD_GENERIC_GMAC is not set
# CONFIG_FASTD_ENABLE_METHOD_GENERIC_UMAC is not set
# CONFIG_PACKAGE_ALFRED_VIS is not set
CONFIG_PACKAGE_opkg=m
CONFIG_STRIP_KERNEL_EXPORTS=y

View File

@ -0,0 +1,10 @@
. /lib/functions/fff/network
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)")