mediatek: add TP-Link TL-7DR7250 v1 support

Hardware specification:
  SoC: MediaTek MT7988D 3x A73
  Flash: ESMT F50L1G41LB 128MB
  RAM: NT5AD256M16E4 DDR4 512MB
  Ethernet: 2x 2.5G + 2x 1G Lan
  WiFi1: MT7975N 2.4GHz 4T4R
  WiFi2: MT7979N 5GHz 4T5R
  Button: Reset, WPS
  Power: DC 12V 2A

MAC addresses map:
   LAN 4C:xx:xx:xx:xx:57
   WAN 4C:xx:xx:xx:xx:58
   2G  4C:xx:xx:xx:xx:57
   5G  4C:xx:xx:xx:xx:59

Flash instructions:
  1. Connect to your PC via the Gigabit port of the router,
     set a static ip on the ethernet interface of your PC.
     (ip 192.168.1.254, gateway 192.168.1.1)

  2. Execute the following operation to open nc shell:
     https://forum.openwrt.org/t/tp-link-china-routers-rce-vuln

  3. Download the preloader.bin and uboot.fip, host them with
     the HTTP server: python3 -m http.server

  4. Replace the stock bootloader to OpenWrt's:
     ln -sf opt/game_acc/rootfs/bin/busybox wget && cd tmp
     /wget http://192.168.1.254:8000/openwrt-mediatek-filogic-tplink_tl-7dr7250-v1-preloader.bin
     /wget http://192.168.1.254:8000/openwrt-mediatek-filogic-tplink_tl-7dr7250-v1-bl31-uboot.fip
     dd bs=131072 conv=sync of=/dev/mtdblock15 if=openwrt-mediatek-filogic-tplink_tl-7dr7250-v1-preloader.bin
     dd bs=131072 conv=sync of=/dev/mtdblock15 seek=44 if=openwrt-mediatek-filogic-tplink_tl-7dr7250-v1-bl31-uboot.fip

  5. Download the initramfs image, host it with the tftp server,
     and restart the router, waiting for tftp recovery to complete.

  6. After openwrt boots up, upload sysupgrade.bin to upgrade.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Link: https://github.com/openwrt/openwrt/pull/24200
Signed-off-by: Jonas Jelonek <jonas@jonasjelonek.de>
This commit is contained in:
Chukun Pan authored and Jonas Jelonek committed 2026-09-27 10:32:14 +02:00
1 parent 820662d917
commit 7e2bacd43f
4 files changed
+148

No files matched your search

@@ -0,0 +1,130 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;
#include "mt7988d-tplink-tl-7dr72xx.dtsi"
/ {
model = "TP-Link TL-7DR7250 v1";
compatible = "tplink,tl-7dr7250-v1", "mediatek,mt7988d";
aliases {
led-boot = &led_status_green;
led-failsafe = &led_status_red;
led-running = &led_status_green;
led-upgrade = &led_status_red;
};
leds {
compatible = "gpio-leds";
led_status_red: status-red {
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_RED>;
gpios = <&pio 53 GPIO_ACTIVE_HIGH>;
};
led_status_green: status-green {
function = LED_FUNCTION_STATUS;
color = <LED_COLOR_ID_GREEN>;
gpios = <&pio 54 GPIO_ACTIVE_HIGH>;
};
};
};
&gmac0 {
nvmem-cells = <&macaddr_config_1c 0>;
nvmem-cell-names = "mac-address";
status = "okay";
};
&gmac1 {
nvmem-cells = <&macaddr_config_1c 0>;
nvmem-cell-names = "mac-address";
};
&gmac2 {
nvmem-cells = <&macaddr_config_1c 1>;
nvmem-cell-names = "mac-address";
phy-mode = "2500base-x";
phy-handle = <&phy13>;
status = "okay";
};
&gsw_phy0 {
pinctrl-names = "gbe-led";
pinctrl-0 = <&gbe0_led0_pins>;
};
&gsw_phy0_led0 {
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_LAN;
status = "okay";
};
&gsw_phy1 {
pinctrl-names = "gbe-led";
pinctrl-0 = <&gbe1_led0_pins>;
};
&gsw_phy1_led0 {
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_LAN;
status = "okay";
};
&gsw_phy2 {
status = "disabled";
};
&gsw_phy3 {
status = "disabled";
};
&gsw_port0 {
label = "lan2";
};
&gsw_port1 {
label = "lan1";
};
&gsw_port2 {
status = "disabled";
};
&gsw_port3 {
status = "disabled";
};
&i2p5gbe_led0 {
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_LAN;
};
&mdio_bus {
phy13: ethernet-phy@13 {
compatible = "ethernet-phy-ieee802.3-c45";
reg = <13>;
reset-assert-us = <10000>;
reset-deassert-us = <20000>;
reset-gpios = <&pio 1 GPIO_ACTIVE_LOW>;
interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
interrupt-parent = <&pio>;
};
};
&pio {
gbe0_led0_pins: gbe0-led0-pins {
mux {
function = "led";
groups = "gbe0_led0";
};
};
gbe1_led0_pins: gbe1-led0-pins {
mux {
function = "led";
groups = "gbe1_led0";
};
};
};
@@ -238,6 +238,9 @@ mediatek_setup_interfaces()
tplink,fr365-v1)
ucidef_set_interfaces_lan_wan "port1 port3 port4 port5 port6" "port2"
;;
tplink,tl-7dr7250*)
ucidef_set_interfaces_lan_wan "lan1 lan2 eth1" eth2
;;
tplink,tl-xdr6086|\
wavlink,wl-wn551x3|\
wavlink,wl-wn586x3|\
@@ -211,6 +211,7 @@ platform_do_upgrade() {
teralink,tl3020-256mb|\
tplink,be450-ubi|\
tplink,tl-7dr7230*|\
tplink,tl-7dr7250*|\
tplink,tl-xdr4288|\
tplink,tl-xdr6086|\
tplink,tl-xdr6088|\
@@ -458,6 +459,7 @@ platform_check_image() {
teralink,tl3020-256mb|\
tplink,be450-ubi|\
tplink,tl-7dr7230*|\
tplink,tl-7dr7250*|\
tplink,tl-xdr4288|\
tplink,tl-xdr6086|\
tplink,tl-xdr6088|\
+13
View File
@@ -3707,6 +3707,19 @@ define Device/tplink_tl-7dr7230-v2
endef
TARGET_DEVICES += tplink_tl-7dr7230-v2
define Device/tplink_tl-7dr7250-v1
DEVICE_MODEL := TL-7DR7250
DEVICE_VARIANT := v1
DEVICE_DTS := mt7988d-tplink-tl-7dr7250-v1
$(call Device/tplink-tl-7dr-common)
DEVICE_PACKAGES += kmod-phy-airoha-en8811h \
kmod-phy-mediatek-2p5g mt7988-2p5g-phy-firmware
ARTIFACTS := preloader.bin bl31-uboot.fip
ARTIFACT/preloader.bin := mt7988-bl2 spim-nand-ddr4
ARTIFACT/bl31-uboot.fip := mt7988-bl31-uboot tplink_tl-7dr7250-v1
endef
TARGET_DEVICES += tplink_tl-7dr7250-v1
define Device/tplink_tl-xdr-common
DEVICE_VENDOR := TP-Link
DEVICE_DTS_DIR := ../dts