From: Andrew MacIntyre Date: Fri, 29 Nov 2024 06:06:02 +0000 (+1100) Subject: lantiq/xrx200: move 8M flash devices to a small flash subtarget X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=e63326e26a82cb083eec602b3a2f71d4cd8e2ea4;p=openwrt%2Fstaging%2Fwigyori.git lantiq/xrx200: move 8M flash devices to a small flash subtarget 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 Link: https://github.com/openwrt/openwrt/pull/17113 Signed-off-by: Hauke Mehrtens --- diff --git a/package/firmware/lantiq/dsl-vrx200-firmware-xdsl/Makefile b/package/firmware/lantiq/dsl-vrx200-firmware-xdsl/Makefile index 37db950bea..b6e1d11efc 100644 --- a/package/firmware/lantiq/dsl-vrx200-firmware-xdsl/Makefile +++ b/package/firmware/lantiq/dsl-vrx200-firmware-xdsl/Makefile @@ -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 diff --git a/package/kernel/lantiq/ltq-atm/Makefile b/package/kernel/lantiq/ltq-atm/Makefile index b81f3bb293..ca19c5052e 100644 --- a/package/kernel/lantiq/ltq-atm/Makefile +++ b/package/kernel/lantiq/ltq-atm/Makefile @@ -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 diff --git a/package/kernel/lantiq/ltq-deu/Makefile b/package/kernel/lantiq/ltq-deu/Makefile index 4e8127afab..96414bf186 100644 --- a/package/kernel/lantiq/ltq-deu/Makefile +++ b/package/kernel/lantiq/ltq-deu/Makefile @@ -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 diff --git a/package/kernel/lantiq/ltq-ptm/Makefile b/package/kernel/lantiq/ltq-ptm/Makefile index 03b1218874..c3ab47c1b3 100644 --- a/package/kernel/lantiq/ltq-ptm/Makefile +++ b/package/kernel/lantiq/ltq-ptm/Makefile @@ -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 diff --git a/package/kernel/lantiq/ltq-vdsl-fw/Makefile b/package/kernel/lantiq/ltq-vdsl-fw/Makefile index 88883ffdee..61833e018c 100644 --- a/package/kernel/lantiq/ltq-vdsl-fw/Makefile +++ b/package/kernel/lantiq/ltq-vdsl-fw/Makefile @@ -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 diff --git a/package/kernel/lantiq/ltq-vdsl-vr9-mei/Makefile b/package/kernel/lantiq/ltq-vdsl-vr9-mei/Makefile index e9c5a681fd..9b3dac299f 100644 --- a/package/kernel/lantiq/ltq-vdsl-vr9-mei/Makefile +++ b/package/kernel/lantiq/ltq-vdsl-vr9-mei/Makefile @@ -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 diff --git a/package/kernel/lantiq/ltq-vdsl-vr9/Makefile b/package/kernel/lantiq/ltq-vdsl-vr9/Makefile index ebcb935a73..5a53c050d4 100644 --- a/package/kernel/lantiq/ltq-vdsl-vr9/Makefile +++ b/package/kernel/lantiq/ltq-vdsl-vr9/Makefile @@ -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 diff --git a/package/kernel/lantiq/ltq-vectoring/Makefile b/package/kernel/lantiq/ltq-vectoring/Makefile index 6076df7742..ea177942b4 100644 --- a/package/kernel/lantiq/ltq-vectoring/Makefile +++ b/package/kernel/lantiq/ltq-vectoring/Makefile @@ -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 diff --git a/package/network/config/ltq-vdsl-vr9-app/Makefile b/package/network/config/ltq-vdsl-vr9-app/Makefile index 51b88231f7..a73cd4ae62 100644 --- a/package/network/config/ltq-vdsl-vr9-app/Makefile +++ b/package/network/config/ltq-vdsl-vr9-app/Makefile @@ -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 diff --git a/target/linux/lantiq/Makefile b/target/linux/lantiq/Makefile index 69fa8276e7..e7a251a505 100644 --- a/target/linux/lantiq/Makefile +++ b/target/linux/lantiq/Makefile @@ -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 diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile index 9fdb949392..307d47a979 100644 --- a/target/linux/lantiq/image/Makefile +++ b/target/linux/lantiq/image/Makefile @@ -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 diff --git a/target/linux/lantiq/image/tp-link.mk b/target/linux/lantiq/image/tp-link.mk index 751f61589d..c2f5b95dd6 100644 --- a/target/linux/lantiq/image/tp-link.mk +++ b/target/linux/lantiq/image/tp-link.mk @@ -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 index 0000000000..d9bcd35d10 --- /dev/null +++ b/target/linux/lantiq/image/tp-link_legacy.mk @@ -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 diff --git a/target/linux/lantiq/image/vr9.mk b/target/linux/lantiq/image/vr9.mk index fe5b5a6bb5..e2608213dc 100644 --- a/target/linux/lantiq/image/vr9.mk +++ b/target/linux/lantiq/image/vr9.mk @@ -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/NAND) DEVICE_COMPAT_VERSION := 2.0 diff --git a/target/linux/lantiq/image/vr9_legacy.mk b/target/linux/lantiq/image/vr9_legacy.mk new file mode 100644 index 0000000000..814fb51578 --- /dev/null +++ b/target/linux/lantiq/image/vr9_legacy.mk @@ -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 diff --git a/target/linux/lantiq/xrx200/base-files/etc/board.d/01_leds b/target/linux/lantiq/xrx200/base-files/etc/board.d/01_leds index dfc647a43e..815f312dac 100644 --- a/target/linux/lantiq/xrx200/base-files/etc/board.d/01_leds +++ b/target/linux/lantiq/xrx200/base-files/etc/board.d/01_leds @@ -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 diff --git a/target/linux/lantiq/xrx200/base-files/etc/board.d/02_network b/target/linux/lantiq/xrx200/base-files/etc/board.d/02_network index 27a3c75edc..6c35c7a4de 100644 --- a/target/linux/lantiq/xrx200/base-files/etc/board.d/02_network +++ b/target/linux/lantiq/xrx200/base-files/etc/board.d/02_network @@ -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) diff --git a/target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom b/target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom index eefc39b30b..164e2d39ca 100644 --- a/target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom +++ b/target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom @@ -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" ;; diff --git a/target/linux/lantiq/xrx200/base-files/etc/uci-defaults/01_led_migration b/target/linux/lantiq/xrx200/base-files/etc/uci-defaults/01_led_migration index 94f9df78bd..e3f6a98149 100644 --- a/target/linux/lantiq/xrx200/base-files/etc/uci-defaults/01_led_migration +++ b/target/linux/lantiq/xrx200/base-files/etc/uci-defaults/01_led_migration @@ -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 index 0000000000..dec22b51b5 --- /dev/null +++ b/target/linux/lantiq/xrx200_legacy/base-files/etc/board.d/01_leds @@ -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 index 0000000000..9088de86b1 --- /dev/null +++ b/target/linux/lantiq/xrx200_legacy/base-files/etc/board.d/02_network @@ -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 index 0000000000..45bef9385b --- /dev/null +++ b/target/linux/lantiq/xrx200_legacy/base-files/etc/board.d/05_compat-version @@ -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 index 0000000000..c10065d5d5 --- /dev/null +++ b/target/linux/lantiq/xrx200_legacy/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom @@ -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 index 0000000000..f6f11bc569 --- /dev/null +++ b/target/linux/lantiq/xrx200_legacy/base-files/etc/uci-defaults/01_led_migration @@ -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 index 0000000000..9a613c43b1 --- /dev/null +++ b/target/linux/lantiq/xrx200_legacy/base-files/lib/upgrade/platform.sh @@ -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 index 0000000000..c8650c4e87 --- /dev/null +++ b/target/linux/lantiq/xrx200_legacy/config-6.6 @@ -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 index 0000000000..26bc8b502b --- /dev/null +++ b/target/linux/lantiq/xrx200_legacy/profiles/00-default.mk @@ -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 index 0000000000..d9a6fff651 --- /dev/null +++ b/target/linux/lantiq/xrx200_legacy/target.mk @@ -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