[openwrt/openwrt] econet: Add new target TP-Link Archer VR1200v (v2)

LEDE Commits lede-commits at lists.infradead.org
Thu Sep 11 15:55:02 PDT 2025


hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/442f91c1174dc7a54cfe607b78b92532d2ef0544

commit 442f91c1174dc7a54cfe607b78b92532d2ef0544
Author: Caleb James DeLisle <cjd at cjdns.fr>
AuthorDate: Mon Sep 1 10:21:10 2025 +0000

    econet: Add new target TP-Link Archer VR1200v (v2)
    
    The TP-Link Archer VR1200v (v2) is a low end DSL modem based on the
    EcoNet EN751221 processor platform.
    
    While it does have an unlocked bootloader, the factory upgrade feature
    requires a cryptographic signature so flashing from the web UI is not
    feasible.
    
    The Archer VR1200v (v2) uses a dual-image layout. I have chosen to reuse
    this to support dual-boot between OpenWRT and the factory firmware.
    
    Flashing instructions (from bootloader):
    
    Build and then locate the squashfs-sysupgrade.bin image file
    Get the length of that file in hex: printf '%X\n' "$(stat -c%s the-file-squashfs-sysupgrade.bin)"
    Connect to device with xmodem capability, e.g. picocom --send-cmd lsx -vv -b 115200 /dev/ttyUSB0
    Switch device on and press a key within 3 seconds, you should get to a `bldr>` prompt
    Type: xmdm 80020000 <file length hex>
    Quickly start xmodem and send the file, in picocom that is ctrl+a ctrl+s <paste-the-file-name> enter If the transfer fails to start, wait 30 seconds to a minute for the bootloader prompt to return and then try the command again.
    Once the transfer has completed successfully, type the following flash 80000 80020000 <file length hex>
    Type `re` or simply restart the device to boot into OpenWRT
    
    Signed-off-by: Caleb James DeLisle <cjd at cjdns.fr>
    Link: https://github.com/openwrt/openwrt/pull/19021
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../dts/en751221_tplink_archer-vr1200v-v2.dts      | 69 ++++++++++++++++++++++
 target/linux/econet/image/Makefile                 | 18 ++++++
 2 files changed, 87 insertions(+)

diff --git a/target/linux/econet/dts/en751221_tplink_archer-vr1200v-v2.dts b/target/linux/econet/dts/en751221_tplink_archer-vr1200v-v2.dts
new file mode 100644
index 0000000000..1866b446fd
--- /dev/null
+++ b/target/linux/econet/dts/en751221_tplink_archer-vr1200v-v2.dts
@@ -0,0 +1,69 @@
+// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+/dts-v1/;
+
+#include "en751221.dtsi"
+
+/ {
+	model = "TP-Link Archer VR1200v (v2)";
+	compatible = "tplink,archer-vr1200v-v2", "econet,en751221";
+
+	memory at 0 {
+		device_type = "memory";
+		reg = <0x00000000 0x8000000>;
+	};
+
+	chosen {
+		stdout-path = "/serial at 1fbf0000:115200";
+		linux,usable-memory-range = <0x00020000 0x07fe0000>;
+	};
+};
+
+&nand {
+	status = "okay";
+	econet,bmt;
+
+	partitions {
+		compatible = "fixed-partitions";
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		partition at 0 {
+			label = "bootloader";
+			reg = <0x0 0x00080000>;
+			read-only;
+		};
+		partition at 80000 {
+			label = "misc";
+			reg = <0x00080000 0x140000>;
+		};
+		partition at 1c0200 {
+			label = "kernel";
+			reg = <0x001c0000 0x400000>;
+		};
+		partition at 5c0000 {
+			label = "rootfs";
+			reg = <0x005c0000 0x1a40000>;
+			linux,rootfs;
+		};
+		partition at 1c0000 {
+			label = "firmware";
+			reg = <0x001c0000 0x1e40000>;
+		};
+		partition at 2000000 {
+			label = "firmware_factory";
+			reg = <0x2000000 0x1e40000>;
+		};
+		partition at 3fe0000 {
+			label = "reserve";
+			reg = <0x3fe0000 0x20000>;
+		};
+		partition at 4000000 {
+			label = "openwrt_ubi";
+			/* From the factory this is unallocated space, so it's ours for the taking.
+			 * We have up to 0x35e0000 of space, but we reserve 10 eraseblocks (1.25MB)
+			 * in case the BMT steals them from us.
+			 */
+			reg = <0x4000000 0x34a0000>;
+		};
+	};
+};
diff --git a/target/linux/econet/image/Makefile b/target/linux/econet/image/Makefile
index 95bff987cf..94804115cf 100644
--- a/target/linux/econet/image/Makefile
+++ b/target/linux/econet/image/Makefile
@@ -30,4 +30,22 @@ define Device/smartfiber_xp8421-b
 endef
 TARGET_DEVICES += smartfiber_xp8421-b
 
+# NOTE: This will not work for upgrading from factory because it requires a cryptographic signature
+#       however, it it can be flashed, then it will boot correctly.
+define Device/tplink_archer-vr1200v-v2
+  DEVICE_VENDOR := TP-Link
+  DEVICE_MODEL := Archer vr1200v
+  DEVICE_VARIANT := v2
+  TPLINK_FLASHLAYOUT := 16Mmtk
+  TPLINK_HWID := 0x0b473502
+  TPLINK_HWREV := 0x0006007c
+  TPLINK_HWREVADD := 0x0
+  TPLINK_HVERSION := 3
+  DEVICE_DTS := en751221_tplink_archer-vr1200v-v2
+  IMAGES := sysupgrade.bin
+  IMAGE/sysupgrade.bin := append-kernel | lzma | pad-to 4193792 | append-rootfs | \
+    tplink-v2-header -R 0x400000
+endef
+TARGET_DEVICES += tplink_archer-vr1200v-v2
+
 $(eval $(call BuildImage))




More information about the lede-commits mailing list