diff --git a/.github/filters.yml b/.github/filters.yml
index 41e4b5a21079c1f6c0eb23306c84d3b09b4676a7..aa6ea75da65e65f29275eaf95a7bd2c0e4eaa15b 100644
--- a/.github/filters.yml
+++ b/.github/filters.yml
@@ -115,6 +115,16 @@
     "targets/generic",
     "targets/targets.mk"
   ],
+  "lantiq-xrx200_legacy": [
+    "targets/lantiq-xrx200_legacy",
+    ".github/workflows/build-gluon.yml",
+    "modules",
+    "Makefile",
+    "patches/**",
+    "scripts/**",
+    "targets/generic",
+    "targets/targets.mk"
+  ],
   "lantiq-xway": [
     "targets/lantiq-xway",
     ".github/workflows/build-gluon.yml",
diff --git a/docs/user/supported_devices.rst b/docs/user/supported_devices.rst
index 2946a3e21f64eabf3d74e6b2f91864ead20471ee..4d99d7e6eee596b9ef3db7903b2f8408695780db 100644
--- a/docs/user/supported_devices.rst
+++ b/docs/user/supported_devices.rst
@@ -287,6 +287,9 @@ lantiq-xrx200
   - FRITZ!Box 7362 SL [#eva_ramboot]_ [#lan_as_wan]_
   - FRITZ!Box 7412 [#eva_ramboot]_
 
+lantiq-xrx200_legacy
+--------------------
+
 * TP-Link
 
   - TD-W8970 (v1) [#lan_as_wan]_
diff --git a/scripts/target_config_lib.lua b/scripts/target_config_lib.lua
index c20e64013eec6d7e7e0eac56265ced17e536bee0..750a419e9f98f22b4840f66d94f7f6deadee56a2 100644
--- a/scripts/target_config_lib.lua
+++ b/scripts/target_config_lib.lua
@@ -150,7 +150,7 @@ local function handle_target_pkgs(pkgs)
 end
 
 local function get_default_pkgs()
-	local targetinfo_target = string.gsub(openwrt_config_target, '_', '/')
+	local targetinfo_target = string.gsub(openwrt_config_target, '_', '/', 1)
 	local target_matches = false
 	for line in io.lines('openwrt/tmp/.targetinfo') do
 		local target_match = string.match(line, '^Target: (.+)$')
diff --git a/targets/lantiq-xrx200_legacy b/targets/lantiq-xrx200_legacy
new file mode 100644
index 0000000000000000000000000000000000000000..c0ff62b0217157afb1384cd61c587daf5fbf8bb0
--- /dev/null
+++ b/targets/lantiq-xrx200_legacy
@@ -0,0 +1,30 @@
+packages {
+	'-ltq-vdsl-vr9-vectoring-fw-installer',
+	'-kmod-ltq-vdsl-vr9-mei',
+	'-kmod-ltq-vdsl-vr9',
+	'-kmod-ltq-atm-vr9',
+	'-kmod-ltq-ptm-vr9',
+	'-kmod-ltq-deu-vr9',
+	'-ltq-vdsl-vr9-app',
+	'-dsl-vrx200-firmware-xdsl-a',
+	'-dsl-vrx200-firmware-xdsl-b-patch',
+	'-ppp-mod-pppoa',
+	'-ltq-dsl-base',
+}
+
+-- TP-Link
+
+-- CAVEAT: These devices don't have a dedicated WAN port.
+--         All ethernet ports on the device are bridged and
+--         used as WAN ports. Clients connected to these
+--         ports will be connected to your private network.
+
+device('tp-link-td-w8970', 'tplink_tdw8970', {
+	factory = false,
+})
+
+device('tp-link-td-w8980', 'tplink_tdw8980', {
+	factory = false,
+	aliases = {'tp-link-td-w9980'},
+	broken = true, -- 5GHz unsupported
+})
diff --git a/targets/targets.mk b/targets/targets.mk
index 45a9f395f63a4f8fed304939ff4f885d10165278..1ee2fe7c35f7f63c00a79bd82dd3a277e65e8b9f 100644
--- a/targets/targets.mk
+++ b/targets/targets.mk
@@ -9,6 +9,7 @@ $(eval $(call GluonTarget,ipq40xx,generic))
 $(eval $(call GluonTarget,ipq40xx,mikrotik))
 $(eval $(call GluonTarget,ipq806x,generic))
 $(eval $(call GluonTarget,lantiq,xrx200))
+$(eval $(call GluonTarget,lantiq,xrx200_legacy))
 $(eval $(call GluonTarget,lantiq,xway))
 $(eval $(call GluonTarget,mediatek,filogic))
 $(eval $(call GluonTarget,mediatek,mt7622))