From patchwork Tue Apr 14 14:48:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [v3,1/2] ramips/mt76x8: Add support for TP-Link Archer C50 v3 From: Adrian Schmutzler X-Patchwork-Id: 1337 Message-Id: <20200414144831.63655-1-freifunk@adrianschmutzler.de> To: franken-dev@freifunk.net Date: Tue, 14 Apr 2020 16:48:30 +0200 From: Fabian Blaese 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 "openwrt-ramips-mt7628-ArcherC50v3-squashfs-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: https://github.com/openwrt/openwrt/commit/14951e8f8e09ba6e2cff140769189a66155a5345 Signed-off-by: Fabian Bläse Reviewed-by: Adrian Schmutzler [extend commit title and add commit message] Signed-off-by: Adrian Schmutzler --- bsp/board_mt76x8.bsp | 5 ++++ bsp/mt76x8/.config | 27 +++++++++++++++++++ .../fff-network/ramips/network.tplink,c50-v3 | 10 +++++++ 3 files changed, 42 insertions(+) create mode 100644 bsp/board_mt76x8.bsp create mode 100644 bsp/mt76x8/.config create mode 100644 src/packages/fff/fff-network/ramips/network.tplink,c50-v3 diff --git a/bsp/board_mt76x8.bsp b/bsp/board_mt76x8.bsp new file mode 100644 index 00000000..812456c1 --- /dev/null +++ b/bsp/board_mt76x8.bsp @@ -0,0 +1,5 @@ +machine=mt76x8 +chipset=ramips +subtarget=mt76x8 +images=("openwrt-${chipset}-${subtarget}-tplink_c50-v3-squashfs-sysupgrade.bin" + ) diff --git a/bsp/mt76x8/.config b/bsp/mt76x8/.config new file mode 100644 index 00000000..9d76ed56 --- /dev/null +++ b/bsp/mt76x8/.config @@ -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 diff --git a/src/packages/fff/fff-network/ramips/network.tplink,c50-v3 b/src/packages/fff/fff-network/ramips/network.tplink,c50-v3 new file mode 100644 index 00000000..a779a717 --- /dev/null +++ b/src/packages/fff/fff-network/ramips/network.tplink,c50-v3 @@ -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)")