[v3,2/2] ramips/mt76x8: Add support for TP-Link TL-WR841N v13

Submitted by Adrian Schmutzler on April 14, 2020, 2:48 p.m.

Details

Message ID 20200414144831.63655-2-freifunk@adrianschmutzler.de
State Accepted
Headers show

Commit Message

Adrian Schmutzler April 14, 2020, 2:48 p.m.
From: Dominik Heidler <dominik@heidler.eu>

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 "lede-ramips-mt7628-tl-wr84...-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/24043a0d2e01b9843c0dc529205b3b0bc7ecbbf9

Signed-off-by: Dominik Heidler <dominik@heidler.eu>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[add commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
---
 bsp/board_mt76x8.bsp                                 |  1 +
 bsp/mt76x8/.config                                   |  2 ++
 .../fff/fff-network/ramips/network.tl-wr841n-v13     | 12 ++++++++++++
 3 files changed, 15 insertions(+)
 create mode 100644 src/packages/fff/fff-network/ramips/network.tl-wr841n-v13

Patch hide | download patch | download mbox

diff --git a/bsp/board_mt76x8.bsp b/bsp/board_mt76x8.bsp
index 812456c1..bf8d2365 100644
--- a/bsp/board_mt76x8.bsp
+++ b/bsp/board_mt76x8.bsp
@@ -2,4 +2,5 @@  machine=mt76x8
 chipset=ramips
 subtarget=mt76x8
 images=("openwrt-${chipset}-${subtarget}-tplink_c50-v3-squashfs-sysupgrade.bin"
+        "openwrt-${chipset}-${subtarget}-tl-wr841n-v13-squashfs-sysupgrade.bin"
         )
diff --git a/bsp/mt76x8/.config b/bsp/mt76x8/.config
index 9d76ed56..c908b983 100644
--- a/bsp/mt76x8/.config
+++ b/bsp/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_tl-wr841n-v13=y
+CONFIG_TARGET_DEVICE_PACKAGES_ramips_mt76x8_DEVICE_tl-wr841n-v13=""
 CONFIG_BUSYBOX_CUSTOM=y
 CONFIG_TARGET_PER_DEVICE_ROOTFS=y
 # CONFIG_BUSYBOX_CONFIG_BRCTL is not set
diff --git a/src/packages/fff/fff-network/ramips/network.tl-wr841n-v13 b/src/packages/fff/fff-network/ramips/network.tl-wr841n-v13
new file mode 100644
index 00000000..602b77e1
--- /dev/null
+++ b/src/packages/fff/fff-network/ramips/network.tl-wr841n-v13
@@ -0,0 +1,12 @@ 
+. /lib/functions/system.sh
+
+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=$(macaddr_setbit_la "$ROUTERMAC")

Comments

Fabian Blaese April 15, 2020, 1:27 p.m.
Reviewed-by: Fabian Bläse <fabian@blaese.de>