lantiq/xrx200: move 8M flash devices to a small flash subtarget
authorAndrew MacIntyre <andymac@pcug.org.au>
Fri, 29 Nov 2024 06:06:02 +0000 (17:06 +1100)
committerHauke Mehrtens <hauke@hauke-m.de>
Thu, 19 Dec 2024 10:25:30 +0000 (11:25 +0100)
Images for xrx200 8M flash are either not building due to image
size (TD-W8970, TD-W8980) or building such that the available
free space in the overlayfs is too little to be useful.

To keep images for these devices buildable, move them into a
small flash variant of the xrx200 subtarget.  As these devices
are NOR flash only, remove NAND and UBI references from the
kernel config to gain some additional image size reduction.

The apparent 8M flash devices Arcadyan VGV7510KW22-brn,
Arcadyan VGV7519-brn and Lantiq Easy80920-nor seem to exist in
order to create special "factory" installation images for these
devices (which actually have larger flash: 16MB for the
Arcardyan devices; 64MB for the Lantiq device).  As a
considerable amount of surgery would appear to be required to
the uboot-lantiq package structure to separate the "factory"
from the "sysupgrade" device recipes for these devices they
remain in the xrx200 target - if factory images aren't now
created, 23.05.x factory images should suffice for initial
installation.

Tested on: Netgear DM200, TP-Link TD-W8980,
           AVM Fritz7490 (xrx200 subtarget: image build only)

Fixes: https://github.com/openwrt/openwrt/issues/16761
Signed-off-by: Andrew MacIntyre <andymac@pcug.org.au>
Link: https://github.com/openwrt/openwrt/pull/17113
(cherry picked from commit e63326e26a82cb083eec602b3a2f71d4cd8e2ea4)
Link: https://github.com/openwrt/openwrt/pull/17303
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
28 files changed:
package/firmware/lantiq/dsl-vrx200-firmware-xdsl/Makefile
package/kernel/lantiq/ltq-atm/Makefile
package/kernel/lantiq/ltq-deu/Makefile
package/kernel/lantiq/ltq-ptm/Makefile
package/kernel/lantiq/ltq-vdsl-fw/Makefile
package/kernel/lantiq/ltq-vdsl-vr9-mei/Makefile
package/kernel/lantiq/ltq-vdsl-vr9/Makefile
package/kernel/lantiq/ltq-vectoring/Makefile
package/network/config/ltq-vdsl-vr9-app/Makefile
target/linux/lantiq/Makefile
target/linux/lantiq/image/Makefile
target/linux/lantiq/image/tp-link.mk
target/linux/lantiq/image/tp-link_legacy.mk [new file with mode: 0644]
target/linux/lantiq/image/vr9.mk
target/linux/lantiq/image/vr9_legacy.mk [new file with mode: 0644]
target/linux/lantiq/xrx200/base-files/etc/board.d/01_leds
target/linux/lantiq/xrx200/base-files/etc/board.d/02_network
target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom
target/linux/lantiq/xrx200/base-files/etc/uci-defaults/01_led_migration
target/linux/lantiq/xrx200_legacy/base-files/etc/board.d/01_leds [new file with mode: 0644]
target/linux/lantiq/xrx200_legacy/base-files/etc/board.d/02_network [new file with mode: 0644]
target/linux/lantiq/xrx200_legacy/base-files/etc/board.d/05_compat-version [new file with mode: 0644]
target/linux/lantiq/xrx200_legacy/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom [new file with mode: 0644]
target/linux/lantiq/xrx200_legacy/base-files/etc/uci-defaults/01_led_migration [new file with mode: 0644]
target/linux/lantiq/xrx200_legacy/base-files/lib/upgrade/platform.sh [new file with mode: 0755]
target/linux/lantiq/xrx200_legacy/config-6.6 [new file with mode: 0644]
target/linux/lantiq/xrx200_legacy/profiles/00-default.mk [new file with mode: 0644]
target/linux/lantiq/xrx200_legacy/target.mk [new file with mode: 0644]

index 37db950beae54f53aedfacee2550b9e712f35085..b6e1d11efc60a64de1f8fa5b16cd61b7e4f3c965 100644 (file)
@@ -40,7 +40,7 @@ define Package/dsl-vrx200-firmware-xdsl-a
   CATEGORY:=Firmware
   TITLE:=VRX200 / VR9 CPE xDSL Annex A firmware
   URL:=http://www.lantiq.com/
-  DEPENDS:=@TARGET_lantiq_xrx200
+  DEPENDS:=@(TARGET_lantiq_xrx200||TARGET_lantiq_xrx200_legacy)
 endef
 
 define Package/dsl-vrx200-firmware-xdsl-a/description
@@ -52,7 +52,7 @@ define Package/dsl-vrx200-firmware-xdsl-b
   CATEGORY:=Firmware
   TITLE:=VRX200 / VR9 CPE xDSL Annex B firmware
   URL:=http://www.lantiq.com/
-  DEPENDS:=@TARGET_lantiq_xrx200
+  DEPENDS:=@(TARGET_lantiq_xrx200||TARGET_lantiq_xrx200_legacy)
 endef
 
 define Package/dsl-vrx200-firmware-xdsl-b/description
@@ -64,7 +64,7 @@ define Package/dsl-vrx200-firmware-xdsl-a-patch
   CATEGORY:=Firmware
   TITLE:=VRX200 / VR9 CPE xDSL Annex B to Annex A firmware patch
   URL:=http://www.lantiq.com/
-  DEPENDS:=@TARGET_lantiq_xrx200 +dsl-vrx200-firmware-xdsl-b +bspatch
+  DEPENDS:=@(TARGET_lantiq_xrx200||TARGET_lantiq_xrx200_legacy) +dsl-vrx200-firmware-xdsl-b +bspatch
 endef
 
 define Package/dsl-vrx200-firmware-xdsl-a-patch/description
@@ -76,7 +76,7 @@ define Package/dsl-vrx200-firmware-xdsl-b-patch
   CATEGORY:=Firmware
   TITLE:=VRX200 / VR9 CPE xDSL Annex A to Annex B firmware patch
   URL:=http://www.lantiq.com/
-  DEPENDS:=@TARGET_lantiq_xrx200 +dsl-vrx200-firmware-xdsl-a +bspatch
+  DEPENDS:=@(TARGET_lantiq_xrx200||TARGET_lantiq_xrx200_legacy) +dsl-vrx200-firmware-xdsl-a +bspatch
 endef
 
 define Package/dsl-vrx200-firmware-xdsl-b-patch/description
index b81f3bb2938224496aa91be7634aeff4137a545b..ca19c5052e9b24ebd45526ee4b529bd0c57ed9d3 100644 (file)
@@ -33,7 +33,7 @@ endef
 KernelPackage/ltq-atm-danube=$(call KernelPackage/ltq-atm-template,danube,(TARGET_lantiq_xway||TARGET_lantiq_xway_legacy))
 KernelPackage/ltq-atm-ar9=$(call KernelPackage/ltq-atm-template,ar9,TARGET_lantiq_xway)
 KernelPackage/ltq-atm-ase=$(call KernelPackage/ltq-atm-template,ase,TARGET_lantiq_ase)
-KernelPackage/ltq-atm-vr9=$(call KernelPackage/ltq-atm-template,vr9,TARGET_lantiq_xrx200)
+KernelPackage/ltq-atm-vr9=$(call KernelPackage/ltq-atm-template,vr9,(TARGET_lantiq_xrx200||TARGET_lantiq_xrx200_legacy))
 
 define Build/Configure
 endef
index 4e8127afabb9861c29709f8d676dee64516e2649..96414bf186f6968956f071349724f7522ee7515b 100644 (file)
@@ -21,14 +21,14 @@ define KernelPackage/ltq-deu-template
   TITLE:=deu driver for $(1)
   URL:=http://www.lantiq.com/
   VARIANT:=$(1)
-  DEPENDS:=@TARGET_lantiq_$(2) +kmod-crypto-manager +kmod-crypto-des
+  DEPENDS:=@$(2) +kmod-crypto-manager +kmod-crypto-des
   FILES:=$(PKG_BUILD_DIR)/ltq_deu_$(1).ko
   AUTOLOAD:=$(call AutoProbe,ltq_deu_$(1))
 endef
 
-KernelPackage/ltq-deu-danube=$(call KernelPackage/ltq-deu-template,danube,xway)
-KernelPackage/ltq-deu-ar9=$(call KernelPackage/ltq-deu-template,ar9,xway)
-KernelPackage/ltq-deu-vr9=$(call KernelPackage/ltq-deu-template,vr9,xrx200)
+KernelPackage/ltq-deu-danube=$(call KernelPackage/ltq-deu-template,danube,TARGET_lantiq_xway)
+KernelPackage/ltq-deu-ar9=$(call KernelPackage/ltq-deu-template,ar9,TARGET_lantiq_xway)
+KernelPackage/ltq-deu-vr9=$(call KernelPackage/ltq-deu-template,vr9,(TARGET_lantiq_xrx200||TARGET_lantiq_xrx200_legacy))
 
 define Build/Configure
 endef
index 03b121887470d0f9f1e0550b80b9b6548a6c9b47..c3ab47c1b3e5fbcad675c44eee0d21511b82de8b 100644 (file)
@@ -22,7 +22,7 @@ define KernelPackage/ltq-ptm-template
   TITLE:=ptm driver for $(1)
   URL:=http://www.lantiq.com/
   VARIANT:=$(1)
-  DEPENDS:=@TARGET_lantiq_$(2)
+  DEPENDS:=@$(2)
 ifeq ($(1),vr9)
   DEPENDS+= +PACKAGE_kmod-ltq-ptm-$(1):kmod-ltq-vdsl-vr9-mei
 else
@@ -34,10 +34,10 @@ endif
   FILES:=$(PKG_BUILD_DIR)/ltq_ptm_$(1).ko 
 endef
 
-KernelPackage/ltq-ptm-danube=$(call KernelPackage/ltq-ptm-template,danube,xway)
-KernelPackage/ltq-ptm-ar9=$(call KernelPackage/ltq-ptm-template,ar9,xway)
-KernelPackage/ltq-ptm-ase=$(call KernelPackage/ltq-ptm-template,ase,ase)
-KernelPackage/ltq-ptm-vr9=$(call KernelPackage/ltq-ptm-template,vr9,xrx200)
+KernelPackage/ltq-ptm-danube=$(call KernelPackage/ltq-ptm-template,danube,TARGET_lantiq_xway)
+KernelPackage/ltq-ptm-ar9=$(call KernelPackage/ltq-ptm-template,ar9,TARGET_lantiq_xway)
+KernelPackage/ltq-ptm-ase=$(call KernelPackage/ltq-ptm-template,ase,TARGET_lantiq_ase)
+KernelPackage/ltq-ptm-vr9=$(call KernelPackage/ltq-ptm-template,vr9,(TARGET_lantiq_xrx200||TARGET_lantiq_xrx200_legacy))
 
 define Build/Configure
 endef
index 88883ffdee0f4abbf02e1337d55166d5248a07ce..61833e018c28dbc98b5dcedbf235039a342eeb15 100644 (file)
@@ -19,7 +19,7 @@ define Package/ltq-vdsl-vr9-vectoring-fw-installer
   TITLE:=VDSL2 Vectoring Firmware installer
   SECTION:=net
   CATEGORY:=Network
-  DEPENDS:=@TARGET_lantiq_xrx200 +kmod-ltq-vdsl-vr9
+  DEPENDS:=@(TARGET_lantiq_xrx200||TARGET_lantiq_xrx200_legacy) +kmod-ltq-vdsl-vr9
 endef
 
 define Build/Prepare
index e9c5a681fd0098a32e95ddaf0207fa848ca13f3d..9b3dac299feac116864c1ddf223f36b080b0eb54 100644 (file)
@@ -29,7 +29,7 @@ define KernelPackage/ltq-vdsl-vr9-mei
   TITLE:=mei driver for vdsl
   SECTION:=sys
   SUBMENU:=Network Devices
-  DEPENDS:=@TARGET_lantiq_xrx200 +kmod-ltq-ifxos +kmod-ltq-vectoring
+  DEPENDS:=@(TARGET_lantiq_xrx200||TARGET_lantiq_xrx200_legacy) +kmod-ltq-ifxos +kmod-ltq-vectoring
   FILES:=$(PKG_BUILD_DIR)/src/drv_mei_cpe.ko
   AUTOLOAD:=$(call AutoLoad,50,drv_mei_cpe)
 endef
@@ -44,7 +44,7 @@ define Package/ltq-vdsl-vr9-mei-test
   CATEGORY:=Network
   TITLE:=Lantiq mei driver test tool
   URL:=http://www.lantiq.com/
-  DEPENDS:=@TARGET_lantiq_xrx200
+  DEPENDS:=@(TARGET_lantiq_xrx200||TARGET_lantiq_xrx200_legacy)
 endef
 
 define Package/ltq-vdsl-vr9-mei-test/description
index ebcb935a739dc4406cddf7bc3e6817a564c3c283..5a53c050d4bfc0abea58213c5a5a75b21232ea1a 100644 (file)
@@ -29,7 +29,7 @@ define KernelPackage/ltq-vdsl-vr9
   TITLE:=vdsl driver
   SECTION:=sys
   SUBMENU:=Network Devices
-  DEPENDS:=@TARGET_lantiq_xrx200 +kmod-ltq-vdsl-vr9-mei
+  DEPENDS:=@(TARGET_lantiq_xrx200||TARGET_lantiq_xrx200_legacy) +kmod-ltq-vdsl-vr9-mei
   FILES:=$(PKG_BUILD_DIR)/src/drv_dsl_cpe_api.ko
   AUTOLOAD:=$(call AutoLoad,51,drv_dsl_cpe_api)
 endef
index 6076df774280919f3f5284c2dd9f4e6c38f88f41..ea177942b48c594bc9c21d86b95a712bc61a1786 100644 (file)
@@ -20,7 +20,7 @@ define KernelPackage/ltq-vectoring
   CATEGORY:=Kernel modules
   SUBMENU:=Network Devices
   TITLE:=driver for sending vectoring error samples
-  DEPENDS:=@TARGET_lantiq_xrx200
+  DEPENDS:=@(TARGET_lantiq_xrx200||TARGET_lantiq_xrx200_legacy)
   FILES:=$(PKG_BUILD_DIR)/$(MAKE_PATH)/ltq_vectoring.ko
   AUTOLOAD:=$(call AutoLoad,49,ltq_vectoring)
 endef
@@ -38,7 +38,7 @@ define KernelPackage/ltq-vectoring-test
   CATEGORY:=Kernel modules
   SUBMENU:=Network Devices
   TITLE:=driver for testing the vectoring driver
-  DEPENDS:=@TARGET_lantiq_xrx200 +kmod-ltq-vectoring
+  DEPENDS:=@(TARGET_lantiq_xrx200||TARGET_lantiq_xrx200_legacy) +kmod-ltq-vectoring
   FILES:=$(PKG_BUILD_DIR)/$(MAKE_PATH)/ltq_vectoring_test.ko
 endef
 
index 51b88231f7e4b8e9c508d263f7fd2cb996982143..a73cd4ae62ff7487b95f587a84427cdd90f0a8ea 100644 (file)
@@ -29,7 +29,7 @@ define Package/ltq-vdsl-vr9-app
   CATEGORY:=Network
   TITLE:=Lantiq VDSL userland tool
   URL:=http://www.lantiq.com/
-  DEPENDS:=@TARGET_lantiq_xrx200 +libpthread +librt +ltq-dsl-base +libubox +libubus
+  DEPENDS:=@(TARGET_lantiq_xrx200||TARGET_lantiq_xrx200_legacy) +libpthread +librt +ltq-dsl-base +libubox +libubus
   PROVIDES:=ltq-dsl-app
 endef
 
index 69fa8276e754c259712dd4a14f631ba903138afc..e7a251a505cc020f2c89f2ce0d5b5d6512142b0c 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 BOARD:=lantiq
 BOARDNAME:=Lantiq
 FEATURES:=squashfs
-SUBTARGETS:=xrx200 xway xway_legacy falcon ase
+SUBTARGETS:=xrx200 xrx200_legacy xway xway_legacy falcon ase
 
 KERNEL_PATCHVER:=6.6
 
index 9fdb949392a156646699d64fd9e86aebd61ef37f..307d47a979e55d152a00bcab187e6b119c5410df 100644 (file)
@@ -162,6 +162,12 @@ include danube.mk
 include ar9.mk
 endif
 
+ifeq ($(SUBTARGET),xrx200_legacy)
+DEFAULT_SOC := vr9
+include tp-link_legacy.mk
+include vr9_legacy.mk
+endif
+
 ifeq ($(SUBTARGET),xrx200)
 DEFAULT_SOC := vr9
 include tp-link.mk
index 751f61589de8cfa51f75ffe0a151b22e87b2e9dd..c2f5b95dd6a0159fe8a66d417cb3d2175b1718dc 100644 (file)
@@ -17,34 +17,6 @@ define Device/lantiqTpLink
        check-size | append-metadata
 endef
 
-define Device/tplink_tdw8970
-  $(Device/dsa-migration)
-  $(Device/lantiqTpLink)
-  DEVICE_MODEL := TD-W8970
-  DEVICE_VARIANT := v1
-  TPLINK_FLASHLAYOUT := 8Mltq
-  TPLINK_HWID := 0x89700001
-  TPLINK_HWREV := 1
-  IMAGE_SIZE := 7680k
-  DEVICE_PACKAGES:= kmod-ath9k wpad-basic-mbedtls kmod-usb-dwc2 kmod-usb-ledtrig-usbport
-  SUPPORTED_DEVICES += TDW8970
-endef
-TARGET_DEVICES += tplink_tdw8970
-
-define Device/tplink_tdw8980
-  $(Device/dsa-migration)
-  $(Device/lantiqTpLink)
-  DEVICE_MODEL := TD-W8980
-  DEVICE_VARIANT := v1
-  TPLINK_FLASHLAYOUT := 8Mltq
-  TPLINK_HWID := 0x89800001
-  TPLINK_HWREV := 14
-  IMAGE_SIZE := 7680k
-  DEVICE_PACKAGES:= kmod-ath9k kmod-owl-loader wpad-basic-mbedtls kmod-usb-dwc2 kmod-usb-ledtrig-usbport
-  SUPPORTED_DEVICES += TDW8980
-endef
-TARGET_DEVICES += tplink_tdw8980
-
 define Device/tplink_vr200
   $(Device/dsa-migration)
   $(Device/lantiqTpLink)
diff --git a/target/linux/lantiq/image/tp-link_legacy.mk b/target/linux/lantiq/image/tp-link_legacy.mk
new file mode 100644 (file)
index 0000000..d9bcd35
--- /dev/null
@@ -0,0 +1,46 @@
+DEVICE_VARS += TPLINK_FLASHLAYOUT TPLINK_HWID TPLINK_HWREV TPLINK_HWREVADD TPLINK_HVERSION
+
+define Device/dsa-migration
+  DEVICE_COMPAT_VERSION := 1.1
+  DEVICE_COMPAT_MESSAGE := Config cannot be migrated from swconfig to DSA
+endef
+
+define Device/lantiqTpLink
+  DEVICE_VENDOR := TP-Link
+  TPLINK_HWREVADD := 0
+  TPLINK_HVERSION := 2
+  KERNEL := kernel-bin | append-dtb | lzma
+  KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | \
+       tplink-v2-header -s -V "ver. 1.0"
+  IMAGES := sysupgrade.bin
+  IMAGE/sysupgrade.bin := tplink-v2-image -s -V "ver. 1.0" | \
+       check-size | append-metadata
+endef
+
+define Device/tplink_tdw8970
+  $(Device/dsa-migration)
+  $(Device/lantiqTpLink)
+  DEVICE_MODEL := TD-W8970
+  DEVICE_VARIANT := v1
+  TPLINK_FLASHLAYOUT := 8Mltq
+  TPLINK_HWID := 0x89700001
+  TPLINK_HWREV := 1
+  IMAGE_SIZE := 7680k
+  DEVICE_PACKAGES:= kmod-ath9k wpad-basic-mbedtls kmod-usb-dwc2 kmod-usb-ledtrig-usbport
+  SUPPORTED_DEVICES += TDW8970
+endef
+TARGET_DEVICES += tplink_tdw8970
+
+define Device/tplink_tdw8980
+  $(Device/dsa-migration)
+  $(Device/lantiqTpLink)
+  DEVICE_MODEL := TD-W8980
+  DEVICE_VARIANT := v1
+  TPLINK_FLASHLAYOUT := 8Mltq
+  TPLINK_HWID := 0x89800001
+  TPLINK_HWREV := 14
+  IMAGE_SIZE := 7680k
+  DEVICE_PACKAGES:= kmod-ath9k kmod-owl-loader wpad-basic-mbedtls kmod-usb-dwc2 kmod-usb-ledtrig-usbport
+  SUPPORTED_DEVICES += TDW8980
+endef
+TARGET_DEVICES += tplink_tdw8980
index d4bded9cae7a96754318a98424c2d6f5be9fdda1..8df8b1ac567a3538a0d0347ba70ba91982eef7e9 100644 (file)
@@ -5,17 +5,6 @@ define Device/dsa-migration
   DEVICE_COMPAT_MESSAGE := Config cannot be migrated from swconfig to DSA
 endef
 
-define Device/alphanetworks_asl56026
-  $(Device/dsa-migration)
-  DEVICE_VENDOR := Alpha
-  DEVICE_MODEL := ASL56026
-  DEVICE_ALT0_VENDOR := BT Openreach
-  DEVICE_ALT0_MODEL := ECI VDSL Modem V-2FUb/I
-  IMAGE_SIZE := 7488k
-  DEFAULT := n
-endef
-TARGET_DEVICES += alphanetworks_asl56026
-
 define Device/arcadyan_arv7519rw22
   $(Device/dsa-migration)
   DEVICE_VENDOR := Arcadyan
@@ -33,16 +22,6 @@ define Device/arcadyan_arv7519rw22
 endef
 TARGET_DEVICES += arcadyan_arv7519rw22
 
-define Device/arcadyan_vg3503j
-  $(Device/dsa-migration)
-  DEVICE_VENDOR := BT Openreach
-  DEVICE_MODEL := ECI VDSL Modem V-2FUb/R
-  IMAGE_SIZE := 8000k
-  SUPPORTED_DEVICES += VG3503J
-  DEFAULT := n
-endef
-TARGET_DEVICES += arcadyan_vg3503j
-
 define Device/arcadyan_vgv7510kw22-brn
   $(Device/dsa-migration)
   $(Device/lantiqBrnImage)
@@ -351,22 +330,6 @@ define Device/lantiq_easy80920-nor
 endef
 TARGET_DEVICES += lantiq_easy80920-nor
 
-define Device/netgear_dm200
-  $(Device/dsa-migration)
-  DEVICE_VENDOR := NETGEAR
-  DEVICE_MODEL := DM200
-  IMAGES := sysupgrade.bin factory.img
-  IMAGE/sysupgrade.bin := append-kernel | \
-       pad-offset 64k 64 | append-uImage-fakehdr filesystem | \
-       pad-offset 64k 64 | append-uImage-fakehdr filesystem | \
-       append-rootfs | pad-rootfs | check-size | append-metadata
-  IMAGE/factory.img := $$(IMAGE/sysupgrade.bin) | netgear-dni
-  IMAGE_SIZE := 7872k
-  NETGEAR_BOARD_ID := DM200
-  NETGEAR_HW_ID := 29765233+8+0+64+0+0
-endef
-TARGET_DEVICES += netgear_dm200
-
 define Device/zyxel_p-2812hnu-f1
   $(Device/dsa-migration)
   $(Device/NAND)
diff --git a/target/linux/lantiq/image/vr9_legacy.mk b/target/linux/lantiq/image/vr9_legacy.mk
new file mode 100644 (file)
index 0000000..814fb51
--- /dev/null
@@ -0,0 +1,43 @@
+DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID
+
+define Device/dsa-migration
+  DEVICE_COMPAT_VERSION := 1.1
+  DEVICE_COMPAT_MESSAGE := Config cannot be migrated from swconfig to DSA
+endef
+
+define Device/alphanetworks_asl56026
+  $(Device/dsa-migration)
+  DEVICE_VENDOR := Alpha
+  DEVICE_MODEL := ASL56026
+  DEVICE_ALT0_VENDOR := BT Openreach
+  DEVICE_ALT0_MODEL := ECI VDSL Modem V-2FUb/I
+  IMAGE_SIZE := 7488k
+  DEFAULT := n
+endef
+TARGET_DEVICES += alphanetworks_asl56026
+
+define Device/arcadyan_vg3503j
+  $(Device/dsa-migration)
+  DEVICE_VENDOR := BT Openreach
+  DEVICE_MODEL := ECI VDSL Modem V-2FUb/R
+  IMAGE_SIZE := 8000k
+  SUPPORTED_DEVICES += VG3503J
+  DEFAULT := n
+endef
+TARGET_DEVICES += arcadyan_vg3503j
+
+define Device/netgear_dm200
+  $(Device/dsa-migration)
+  DEVICE_VENDOR := NETGEAR
+  DEVICE_MODEL := DM200
+  IMAGES := sysupgrade.bin factory.img
+  IMAGE/sysupgrade.bin := append-kernel | \
+       pad-offset 64k 64 | append-uImage-fakehdr filesystem | \
+       pad-offset 64k 64 | append-uImage-fakehdr filesystem | \
+       append-rootfs | pad-rootfs | check-size | append-metadata
+  IMAGE/factory.img := $$(IMAGE/sysupgrade.bin) | netgear-dni
+  IMAGE_SIZE := 7872k
+  NETGEAR_BOARD_ID := DM200
+  NETGEAR_HW_ID := 29765233+8+0+64+0+0
+endef
+TARGET_DEVICES += netgear_dm200
index dfc647a43e4b6732765c23a86d8d2cfb9665b379..815f312dac069e9ac93c7eaa553d67ec2b611d42 100644 (file)
@@ -64,9 +64,6 @@ buffalo,wbmr-300hpd)
        ucidef_set_led_switch "lan3" "LAN3" "green:lan3" "switch0" "0x20"
        ucidef_set_led_default "router" "router" "green:router" "1"
        ;;
-netgear,dm200)
-       ucidef_set_led_netdev "lan" "lan" "green:lan" "eth0"
-       ;;
 esac
 
 board_config_flush
index 27a3c75edc44c71b855c68de192d74b82e41f96c..6c35c7a4debb18cbc2e744ae8b55baaa8b452547 100644 (file)
@@ -11,10 +11,6 @@ lantiq_setup_interfaces()
        local board="$1"
 
        case "$board" in
-       alphanetworks,asl56026|\
-       arcadyan,vg3503j)
-               ucidef_set_interface_lan "lan1 lan2"
-               ;;
        arcadyan,arv7519rw22)
                ucidef_set_interface_lan "lan1 lan2 lan3 lan4 lan5"
                ;;
@@ -46,14 +42,11 @@ lantiq_setup_interfaces()
        avm,fritz7490|\
        avm,fritz7490-micron|\
        buffalo,wbmr-300hpd|\
-       tplink,tdw8970|\
-       tplink,tdw8980|\
        tplink,vr200|\
        tplink,vr200v)
                ucidef_set_interface_lan "lan1 lan2 lan3 lan4"
                ;;
-       avm,fritz7412|\
-       netgear,dm200)
+       avm,fritz7412)
                ucidef_set_interface_lan "lan"
                ;;
        *)
@@ -95,14 +88,9 @@ lantiq_setup_macs()
        local wan_mac=""
 
        case "$board" in
-       alphanetworks,asl56026)
-               lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
-               wan_mac=$(mtd_get_mac_ascii u-boot-env wanmac)
-               ;;
        arcadyan,arv7519rw22)
                wan_mac=$(macaddr_add "$(mtd_get_mac_binary boardconfig 0x16)" 1)
                ;;
-       arcadyan,vg3503j|\
        lantiq,easy80920-nand|\
        lantiq,easy80920-nor|\
        zyxel,p-2812hnu-f1|\
@@ -148,14 +136,6 @@ lantiq_setup_macs()
                lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
                wan_mac="$lan_mac"
                ;;
-       netgear,dm200)
-               lan_mac=$(mtd_get_mac_binary ART 0x0)
-               wan_mac=$(macaddr_add "$lan_mac" 1)
-               ;;
-       tplink,tdw8970|\
-       tplink,tdw8980)
-               wan_mac=$(macaddr_add "$(mtd_get_mac_binary boardconfig 0xf100)" 1)
-               ;;
        tplink,vr200|\
        tplink,vr200v)
                wan_mac=$(macaddr_add "$(mtd_get_mac_binary romfile 0xf100)" 1)
index eefc39b30b463e431eecc46fb0bd6f5c4bab4a43..164e2d39caa5b648de81b09286c4698f0fb37112 100644 (file)
@@ -31,10 +31,6 @@ case "$FIRMWARE" in
                                caldata_extract_ubi "caldata" 0x1000 0x1000
                                ath9k_patch_mac_crc $(macaddr_add $(mtd_get_mac_binary_ubi caldata 0x110c) 2) 0x10c
                                ;;
-                       tplink,tdw8970|\
-                       tplink,tdw8980)
-                               caldata_extract "boardconfig" 0x21000 0x1000
-                               ;;
                        *)
                                caldata_die "board $board is not supported yet"
                                ;;
index 94f9df78bd559ce248eda77c07fa7310caef6e6b..e3f6a98149fb44b69715b4bf52f5f191695f3162 100644 (file)
@@ -18,9 +18,7 @@ do_internet_led_rename()
 }
 
 case "$(board_name)" in
-alphanetworks,asl56026|\
 arcadyan,arv7519rw22|\
-arcadyan,vg3503j|\
 avm,fritz7360sl|\
 bt,homehub-v5a)
        do_internet_led_rename
diff --git a/target/linux/lantiq/xrx200_legacy/base-files/etc/board.d/01_leds b/target/linux/lantiq/xrx200_legacy/base-files/etc/board.d/01_leds
new file mode 100644 (file)
index 0000000..dec22b5
--- /dev/null
@@ -0,0 +1,34 @@
+#
+# Copyright (C) 2011-2015 OpenWrt.org
+#
+
+. /lib/functions/leds.sh
+. /lib/functions/uci-defaults.sh
+
+board_config_update
+
+led_wifi="$(get_dt_led wifi)"
+[ -n "$led_wifi" ] && ucidef_set_led_wlan "wifi" "wifi" "$led_wifi" "phy0tpt"
+
+led_dsl="$(get_dt_led dsl)"
+[ -n "$led_dsl" ] && {
+       led_internet="$(get_dt_led internet)"
+       if [ -n "$led_internet" ]; then
+               ucidef_set_led_default "dsl" "dsl" "$led_dsl" "0"
+               ucidef_set_led_netdev "internet" "internet" "$led_internet" "pppoe-wan"
+       else
+               ucidef_set_led_netdev "dsl" "dsl" "$led_dsl" "dsl0"
+       fi
+}
+
+board=$(board_name)
+
+case "$board" in
+netgear,dm200)
+       ucidef_set_led_netdev "lan" "lan" "green:lan" "eth0"
+       ;;
+esac
+
+board_config_flush
+
+exit 0
diff --git a/target/linux/lantiq/xrx200_legacy/base-files/etc/board.d/02_network b/target/linux/lantiq/xrx200_legacy/base-files/etc/board.d/02_network
new file mode 100644 (file)
index 0000000..9088de8
--- /dev/null
@@ -0,0 +1,75 @@
+#
+# Copyright (C) 2011-2015 OpenWrt.org
+#
+
+. /lib/functions/uci-defaults.sh
+. /lib/functions/system.sh
+. /lib/functions/lantiq.sh
+
+lantiq_setup_interfaces()
+{
+       local board="$1"
+
+       case "$board" in
+       alphanetworks,asl56026|\
+       arcadyan,vg3503j)
+               ucidef_set_interface_lan "lan1 lan2"
+               ;;
+       tplink,tdw8970|\
+       tplink,tdw8980)
+               ucidef_set_interface_lan "lan1 lan2 lan3 lan4"
+               ;;
+       netgear,dm200)
+               ucidef_set_interface_lan "lan"
+               ;;
+       *)
+               ucidef_set_interface_lan 'eth0'
+               ;;
+       esac
+}
+
+lantiq_setup_dsl()
+{
+       local board="$1"
+       local annex="a"
+
+       lantiq_setup_dsl_helper "$annex"
+}
+
+lantiq_setup_macs()
+{
+       local board="$1"
+       local lan_mac=""
+       local wan_mac=""
+
+       case "$board" in
+       alphanetworks,asl56026)
+               lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
+               wan_mac=$(mtd_get_mac_ascii u-boot-env wanmac)
+               ;;
+       arcadyan,vg3503j)
+               lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
+               wan_mac=$(macaddr_add "$lan_mac" 1)
+               ;;
+       netgear,dm200)
+               lan_mac=$(mtd_get_mac_binary ART 0x0)
+               wan_mac=$(macaddr_add "$lan_mac" 1)
+               ;;
+       tplink,tdw8970|\
+       tplink,tdw8980)
+               wan_mac=$(macaddr_add "$(mtd_get_mac_binary boardconfig 0xf100)" 1)
+               ;;
+       esac
+
+       [ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" "$lan_mac"
+       [ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" "$wan_mac"
+}
+
+board_config_update
+board=$(board_name)
+lantiq_setup_interfaces $board
+lantiq_setup_dsl $board
+lantiq_setup_macs $board
+board_config_flush
+
+exit 0
diff --git a/target/linux/lantiq/xrx200_legacy/base-files/etc/board.d/05_compat-version b/target/linux/lantiq/xrx200_legacy/base-files/etc/board.d/05_compat-version
new file mode 100644 (file)
index 0000000..45bef93
--- /dev/null
@@ -0,0 +1,18 @@
+#
+# Copyright (C) 2020 OpenWrt.org
+#
+
+. /lib/functions.sh
+. /lib/functions/uci-defaults.sh
+
+board_config_update
+
+case "$(board_name)" in
+       *)
+               ucidef_set_compat_version "1.1"
+               ;;
+esac
+
+board_config_flush
+
+exit 0
diff --git a/target/linux/lantiq/xrx200_legacy/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom b/target/linux/lantiq/xrx200_legacy/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom
new file mode 100644 (file)
index 0000000..c10065d
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+[ -e /lib/firmware/$FIRMWARE ] && exit 0
+
+. /lib/functions/caldata.sh
+
+case "$FIRMWARE" in
+       "ath9k-eeprom-pci-0000:00:0e.0.bin" | \
+       "ath9k-eeprom-pci-0000:01:00.0.bin" | \
+       "ath9k-eeprom-pci-0000:02:00.0.bin")
+               board=$(board_name)
+
+               case "$board" in
+                       tplink,tdw8970|\
+                       tplink,tdw8980)
+                               caldata_extract "boardconfig" 0x21000 0x1000
+                               ;;
+                       *)
+                               caldata_die "board $board is not supported yet"
+                               ;;
+               esac
+               ;;
+esac
diff --git a/target/linux/lantiq/xrx200_legacy/base-files/etc/uci-defaults/01_led_migration b/target/linux/lantiq/xrx200_legacy/base-files/etc/uci-defaults/01_led_migration
new file mode 100644 (file)
index 0000000..f6f11bc
--- /dev/null
@@ -0,0 +1,31 @@
+#
+# Copyright (C) 2013 OpenWrt.org
+#
+
+. /lib/functions/migrations.sh
+
+do_internet_led_rename()
+{
+       config_load system
+
+       [ -n $(config_get led_internet name) ] || return
+       [ -z $(config_get led_dsl name) ] || return
+
+       uci rename system.led_internet=led_dsl
+       uci set system.led_dsl.name=dsl
+
+       logger -t led-migration "internet led renamed to dsl"
+}
+
+case "$(board_name)" in
+alphanetworks,asl56026|\
+arcadyan,vg3503j)
+       do_internet_led_rename
+       ;;
+esac
+
+remove_devicename_leds
+
+migrations_apply system
+
+exit 0
diff --git a/target/linux/lantiq/xrx200_legacy/base-files/lib/upgrade/platform.sh b/target/linux/lantiq/xrx200_legacy/base-files/lib/upgrade/platform.sh
new file mode 100755 (executable)
index 0000000..9a613c4
--- /dev/null
@@ -0,0 +1,16 @@
+PART_NAME=firmware
+REQUIRE_IMAGE_METADATA=1
+
+platform_check_image() {
+       return 0
+}
+
+platform_do_upgrade() {
+       local board=$(board_name)
+
+       case "$board" in
+       *)
+               default_do_upgrade "$1"
+               ;;
+       esac
+}
diff --git a/target/linux/lantiq/xrx200_legacy/config-6.6 b/target/linux/lantiq/xrx200_legacy/config-6.6
new file mode 100644 (file)
index 0000000..c8650c4
--- /dev/null
@@ -0,0 +1,86 @@
+CONFIG_AT803X_PHY=y
+CONFIG_BLK_MQ_PCI=y
+CONFIG_CONTEXT_TRACKING=y
+CONFIG_CONTEXT_TRACKING_IDLE=y
+CONFIG_CPU_MIPSR2_IRQ_EI=y
+CONFIG_CPU_MIPSR2_IRQ_VI=y
+CONFIG_CPU_RMAP=y
+CONFIG_CRC16=y
+CONFIG_CRYPTO_DEFLATE=y
+CONFIG_CRYPTO_HASH_INFO=y
+CONFIG_CRYPTO_LZO=y
+CONFIG_CRYPTO_ZSTD=y
+CONFIG_EXTRA_FIRMWARE="lantiq/xrx200_phy11g_a14.bin lantiq/xrx200_phy11g_a22.bin lantiq/xrx200_phy22f_a14.bin lantiq/xrx200_phy22f_a22.bin"
+CONFIG_EXTRA_FIRMWARE_DIR="firmware"
+CONFIG_GENERIC_ALLOCATOR=y
+CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
+CONFIG_GRO_CELLS=y
+CONFIG_HWMON=y
+CONFIG_HW_RANDOM=y
+CONFIG_ICPLUS_PHY=y
+CONFIG_IFX_VPE_EXT=y
+CONFIG_INPUT=y
+CONFIG_INPUT_EVDEV=y
+CONFIG_INTEL_XWAY_PHY=y
+CONFIG_IRQ_DOMAIN_HIERARCHY=y
+# CONFIG_ISDN is not set
+CONFIG_LANTIQ_XRX200=y
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_MIPS_MT=y
+# CONFIG_MIPS_MT_FPAFF is not set
+CONFIG_MIPS_MT_SMP=y
+CONFIG_MIPS_NR_CPU_NR_MAP=2
+CONFIG_MIPS_PERF_SHARED_TC_COUNTERS=y
+CONFIG_MIPS_VPE_APSP_API=y
+CONFIG_MIPS_VPE_APSP_API_MT=y
+CONFIG_MIPS_VPE_LOADER=y
+CONFIG_MIPS_VPE_LOADER_MT=y
+CONFIG_MIPS_VPE_LOADER_TOM=y
+CONFIG_NEED_SRCU_NMI_SAFE=y
+CONFIG_NET_DEVLINK=y
+CONFIG_NET_DSA=y
+CONFIG_NET_DSA_LANTIQ_GSWIP=y
+CONFIG_NET_DSA_TAG_GSWIP=y
+CONFIG_NET_FLOW_LIMIT=y
+CONFIG_NET_SWITCHDEV=y
+CONFIG_NLS=y
+CONFIG_NR_CPUS=2
+CONFIG_PADATA=y
+CONFIG_PCI=y
+CONFIG_PCIEPORTBUS=y
+CONFIG_PCIE_LANTIQ=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_PCI_LANTIQ=y
+CONFIG_PHYLINK=y
+CONFIG_PHY_LANTIQ_VRX200_PCIE=y
+CONFIG_POWER_RESET_GPIO=y
+CONFIG_POWER_SUPPLY=y
+CONFIG_POWER_SUPPLY_HWMON=y
+CONFIG_QCOM_NET_PHYLIB=y
+CONFIG_QUEUED_RWLOCKS=y
+CONFIG_QUEUED_SPINLOCKS=y
+CONFIG_REGULATOR=y
+CONFIG_REGULATOR_FIXED_VOLTAGE=y
+CONFIG_RFS_ACCEL=y
+CONFIG_RPS=y
+CONFIG_SENSORS_LTQ_CPUTEMP=y
+CONFIG_SGL_ALLOC=y
+CONFIG_SMP=y
+CONFIG_SMP_UP=y
+CONFIG_SOCK_RX_QUEUE_MAPPING=y
+CONFIG_SYNC_R4K=y
+CONFIG_SYS_SUPPORTS_SCHED_SMT=y
+CONFIG_SYS_SUPPORTS_SMP=y
+CONFIG_TREE_RCU=y
+CONFIG_TREE_SRCU=y
+CONFIG_USB=y
+CONFIG_USB_COMMON=y
+CONFIG_USB_SUPPORT=y
+CONFIG_XPS=y
+CONFIG_XXHASH=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZSTD_COMMON=y
+CONFIG_ZSTD_COMPRESS=y
+CONFIG_ZSTD_DECOMPRESS=y
diff --git a/target/linux/lantiq/xrx200_legacy/profiles/00-default.mk b/target/linux/lantiq/xrx200_legacy/profiles/00-default.mk
new file mode 100644 (file)
index 0000000..26bc8b5
--- /dev/null
@@ -0,0 +1,9 @@
+define Profile/Default
+       NAME:=Default Profile
+       PRIORITY:=1
+endef
+
+define Profile/Default/Description
+       Default package set compatible with most boards.
+endef
+$(eval $(call Profile,Default))
diff --git a/target/linux/lantiq/xrx200_legacy/target.mk b/target/linux/lantiq/xrx200_legacy/target.mk
new file mode 100644 (file)
index 0000000..d9a6fff
--- /dev/null
@@ -0,0 +1,22 @@
+ARCH:=mips
+SUBTARGET:=xrx200_legacy
+BOARDNAME:=XRX200 Legacy
+FEATURES+=atm ramdisk small_flash
+CPU_TYPE:=24kc
+
+DEFAULT_PACKAGES+=kmod-leds-gpio \
+       kmod-gpio-button-hotplug \
+       ltq-vdsl-vr9-vectoring-fw-installer \
+       kmod-ltq-vdsl-vr9-mei \
+       kmod-ltq-vdsl-vr9 \
+       kmod-ltq-atm-vr9 \
+       kmod-ltq-deu-vr9 \
+       kmod-ltq-ptm-vr9 \
+       ltq-vdsl-vr9-app \
+       dsl-vrx200-firmware-xdsl-a \
+       dsl-vrx200-firmware-xdsl-b-patch \
+       ppp-mod-pppoa
+
+define Target/Description
+       Lantiq XRX200 Legacy for boards with small flash
+endef